From ea3fb3979c7436ba19287d1d1fac068bbeb50493 Mon Sep 17 00:00:00 2001 From: Jesper Wilhelmsson Date: Thu, 4 Oct 2018 10:35:59 +0200 Subject: [PATCH 001/124] Added tag jdk-12+14 for changeset 6f04692c7d51 --- .hgtags | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.hgtags b/.hgtags index ebb437ff809..5f2accdd825 100644 --- a/.hgtags +++ b/.hgtags @@ -515,3 +515,5 @@ f0f5d23449d31f1b3580c8a73313918cafeaefd7 jdk-12+11 15094d12a632f452a2064318a4e416d0c7a9ce0c jdk-12+12 511a9946f83e3e3c7b9dbe1840367063fb39b4e1 jdk-12+13 8897e41b327c0a5601c6ba2bba5d07f15a3ffc91 jdk-12+14 +8897e41b327c0a5601c6ba2bba5d07f15a3ffc91 jdk-12+14 +6f04692c7d5137ee34a6bd94c0c8a6c9219cb127 jdk-12+14 From f5d19b9109c7a0a40a85ca022d3089230ed1456b Mon Sep 17 00:00:00 2001 From: Pallavi Sonal Date: Thu, 4 Oct 2018 17:25:51 +0530 Subject: [PATCH 002/124] 8166138: DateTimeFormatter.ISO_INSTANT should handle offsets Reviewed-by: rriggs, scolebourne, naoto --- .../java/time/format/DateTimeFormatter.java | 7 +- .../time/format/DateTimeFormatterBuilder.java | 9 +- .../time/format/TCKInstantPrinterParser.java | 87 ++++++++++++++----- 3 files changed, 79 insertions(+), 24 deletions(-) diff --git a/src/java.base/share/classes/java/time/format/DateTimeFormatter.java b/src/java.base/share/classes/java/time/format/DateTimeFormatter.java index 199313df7e1..3d3cd956c49 100644 --- a/src/java.base/share/classes/java/time/format/DateTimeFormatter.java +++ b/src/java.base/share/classes/java/time/format/DateTimeFormatter.java @@ -1138,9 +1138,12 @@ public final class DateTimeFormatter { *

* This returns an immutable formatter capable of formatting and parsing * the ISO-8601 instant format. - * When formatting, the second-of-minute is always output. + * When formatting, the instant will always be suffixed by 'Z' to indicate UTC. + * The second-of-minute is always output. * The nano-of-second outputs zero, three, six or nine digits as necessary. - * When parsing, time to at least the seconds field is required. + * When parsing, the behaviour of {@link DateTimeFormatterBuilder#appendOffsetId()} + * will be used to parse the offset, converting the instant to UTC as necessary. + * The time to at least the seconds field is required. * Fractional seconds from zero to nine are parsed. * The localized decimal style is not used. *

diff --git a/src/java.base/share/classes/java/time/format/DateTimeFormatterBuilder.java b/src/java.base/share/classes/java/time/format/DateTimeFormatterBuilder.java index 28e58797b47..ca37005fe8a 100644 --- a/src/java.base/share/classes/java/time/format/DateTimeFormatterBuilder.java +++ b/src/java.base/share/classes/java/time/format/DateTimeFormatterBuilder.java @@ -837,6 +837,10 @@ public final class DateTimeFormatterBuilder { * The leap-second time of '23:59:59' is handled to some degree, see * {@link DateTimeFormatter#parsedLeapSecond()} for full details. *

+ * When formatting, the instant will always be suffixed by 'Z' to indicate UTC. + * When parsing, the behaviour of {@link DateTimeFormatterBuilder#appendOffsetId()} + * will be used to parse the offset, converting the instant to UTC as necessary. + *

* An alternative to this method is to format/parse the instant as a single * epoch-seconds value. That is achieved using {@code appendValue(INSTANT_SECONDS)}. * @@ -3468,7 +3472,7 @@ public final class DateTimeFormatterBuilder { .appendValue(MINUTE_OF_HOUR, 2).appendLiteral(':') .appendValue(SECOND_OF_MINUTE, 2) .appendFraction(NANO_OF_SECOND, minDigits, maxDigits, true) - .appendLiteral('Z') + .appendOffsetId() .toFormatter().toPrinterParser(false); DateTimeParseContext newContext = context.copy(); int pos = parser.parse(newContext, text, position); @@ -3486,6 +3490,7 @@ public final class DateTimeFormatterBuilder { Long nanoVal = newContext.getParsed(NANO_OF_SECOND); int sec = (secVal != null ? secVal.intValue() : 0); int nano = (nanoVal != null ? nanoVal.intValue() : 0); + int offset = newContext.getParsed(OFFSET_SECONDS).intValue(); int days = 0; if (hour == 24 && min == 0 && sec == 0 && nano == 0) { hour = 0; @@ -3498,7 +3503,7 @@ public final class DateTimeFormatterBuilder { long instantSecs; try { LocalDateTime ldt = LocalDateTime.of(year, month, day, hour, min, sec, 0).plusDays(days); - instantSecs = ldt.toEpochSecond(ZoneOffset.UTC); + instantSecs = ldt.toEpochSecond(ZoneOffset.ofTotalSeconds(offset)); instantSecs += Math.multiplyExact(yearParsed / 10_000L, SECONDS_PER_10000_YEARS); } catch (RuntimeException ex) { return ~position; diff --git a/test/jdk/java/time/tck/java/time/format/TCKInstantPrinterParser.java b/test/jdk/java/time/tck/java/time/format/TCKInstantPrinterParser.java index ebd90505c2a..4c8c55f9e0c 100644 --- a/test/jdk/java/time/tck/java/time/format/TCKInstantPrinterParser.java +++ b/test/jdk/java/time/tck/java/time/format/TCKInstantPrinterParser.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2018, 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 @@ -69,12 +69,18 @@ import java.time.Period; import java.time.ZoneOffset; import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatterBuilder; +import java.time.format.DateTimeParseException; import java.time.format.ResolverStyle; import java.time.temporal.TemporalAccessor; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; +/* + * @test + * @bug 8166138 + */ + /** * Test DateTimeFormatterBuilder.appendInstant(). */ @@ -200,7 +206,10 @@ public class TCKInstantPrinterParser { {0, 0, "1970-01-01T00:00:00Z"}, {0, 0, "1970-01-01T00:00:00.0Z"}, {0, 0, "1970-01-01T00:00:00.000Z"}, - {0, 0, "1970-01-01T00:00:00.000000000Z"}, + + {0, 0, "1970-01-01T00:00:00+00:00"}, + {0, 0, "1970-01-01T05:30:00+05:30"}, + {0, 0, "1970-01-01T01:00:00.0+01:00"}, {-1, 0, "1969-12-31T23:59:59Z"}, {1, 0, "1970-01-01T00:00:01Z"}, @@ -208,16 +217,22 @@ public class TCKInstantPrinterParser { {3600, 0, "1970-01-01T01:00:00Z"}, {86400, 0, "1970-01-02T00:00:00Z"}, + {-1, 0, "1969-12-31T23:59:59+00:00"}, + {1, 0, "1970-01-01T05:30:01+05:30"}, + {60, 0, "1969-12-31T19:01:00-05:00"}, + {3600, 0, "1970-01-01T06:30:00+05:30"}, + {86400, 0, "1970-01-01T19:00:00-05:00"}, + {182, 234000000, "1970-01-01T00:03:02.234Z"}, {182, 234000000, "1970-01-01T00:03:02.2340Z"}, {182, 234000000, "1970-01-01T00:03:02.23400Z"}, {182, 234000000, "1970-01-01T00:03:02.234000Z"}, - {182, 234000000, "1970-01-01T00:03:02.234000000Z"}, - {((23 * 60) + 59) * 60 + 59, 123456789, "1970-01-01T23:59:59.123456789Z"}, + {182, 234000000, "1970-01-01T00:03:02.234+00:00"}, + {182, 234000000, "1970-01-01T05:33:02.2340+05:30"}, + {182, 234000000, "1969-12-31T19:03:02.23400-05:00"}, + {182, 234000000, "1970-01-01T00:03:02.234000+00:00"}, - {Instant.MAX.getEpochSecond(), 999999999, "+1000000000-12-31T23:59:59.999999999Z"}, - {Instant.MIN.getEpochSecond(), 0, "-1000000000-01-01T00:00:00.000000000Z"}, }; } @@ -230,22 +245,46 @@ public class TCKInstantPrinterParser { assertEquals(f.parse(input).query(DateTimeFormatter.parsedLeapSecond()), Boolean.FALSE); } - @Test(dataProvider="parseDigits") + @DataProvider(name="parseNineDigits") + Object[][] data_parse_ninedigits() { + return new Object[][] { + {0, 0, "1970-01-01T00:00:00.000000000Z"}, + {0, 0, "1970-01-01T05:30:00.000000000+05:30"}, + + {182, 234000000, "1970-01-01T00:03:02.234000000Z"}, + {182, 234000000, "1970-01-01T01:03:02.234000000+01:00"}, + + {((23 * 60) + 59) * 60 + 59, 123456789, "1970-01-01T23:59:59.123456789Z"}, + {((23 * 60) + 59) * 60 + 59, 123456789, "1970-01-02T05:29:59.123456789+05:30"}, + + {Instant.MAX.getEpochSecond(), 999999999, "+1000000000-12-31T23:59:59.999999999Z"}, + {Instant.MIN.getEpochSecond(), 0, "-1000000000-01-01T00:00:00.000000000Z"}, + {Instant.MAX.getEpochSecond(), 999999999, "+1000000000-12-31T23:59:59.999999999+00:00"}, + {Instant.MIN.getEpochSecond(), 0, "-1000000000-01-01T00:00:00.000000000+00:00"}, + }; + } + + @Test(dataProvider="parseNineDigits") public void test_parse_digitsNine(long instantSecs, int nano, String input) { DateTimeFormatter f = new DateTimeFormatterBuilder().appendInstant(9).toFormatter(); - if (input.charAt(input.length() - 11) == '.') { - Instant expected = Instant.ofEpochSecond(instantSecs, nano); - assertEquals(f.parse(input, Instant::from), expected); - assertEquals(f.parse(input).query(DateTimeFormatter.parsedExcessDays()), Period.ZERO); - assertEquals(f.parse(input).query(DateTimeFormatter.parsedLeapSecond()), Boolean.FALSE); - } else { - try { - f.parse(input, Instant::from); - fail(); - } catch (DateTimeException ex) { - // expected - } - } + Instant expected = Instant.ofEpochSecond(instantSecs, nano); + assertEquals(f.parse(input, Instant::from), expected); + assertEquals(f.parse(input).query(DateTimeFormatter.parsedExcessDays()), Period.ZERO); + assertEquals(f.parse(input).query(DateTimeFormatter.parsedLeapSecond()), Boolean.FALSE); + } + + @DataProvider(name="parseMaxMinInstant") + Object[][] data_parse_MaxMinInstant() { + return new Object[][] { + {"+1000000000-12-31T23:59:59.999999999-01:00"}, + {"-1000000000-01-01T00:00:00.000000000+01:00"} + }; + } + + @Test(dataProvider="parseMaxMinInstant", expectedExceptions=DateTimeParseException.class) + public void test_invalid_Instant(String input) { + DateTimeFormatter f = new DateTimeFormatterBuilder().appendInstant(-1).toFormatter(); + f.parse(input, Instant::from); } @Test @@ -283,4 +322,12 @@ public class TCKInstantPrinterParser { new DateTimeFormatterBuilder().appendInstant(10); } + //------------------------------------------------------------------------ + @Test + public void test_equality() { + Instant instant1 = Instant.parse("2018-09-12T22:15:51+05:30"); + Instant instant2 = Instant.parse("2018-09-12T16:45:51Z"); + assertEquals(instant2, instant1); + } + } From dcfb9a75aa9d84639ad89772958d796749cb75ba Mon Sep 17 00:00:00 2001 From: Robbin Ehn Date: Thu, 4 Oct 2018 14:03:13 +0200 Subject: [PATCH 003/124] 8210303: VM_HandshakeAllThreads fails assert with "failed: blocked and not walkable" Reviewed-by: dcubed, dholmes --- src/hotspot/share/runtime/handshake.cpp | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/src/hotspot/share/runtime/handshake.cpp b/src/hotspot/share/runtime/handshake.cpp index 7aa1bc53ce7..68703cb3663 100644 --- a/src/hotspot/share/runtime/handshake.cpp +++ b/src/hotspot/share/runtime/handshake.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2018, 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 @@ -347,6 +347,27 @@ bool HandshakeState::vmthread_can_process_handshake(JavaThread* target) { target->is_ext_suspended(); } +static bool possibly_vmthread_can_process_handshake(JavaThread* target) { + // An externally suspended thread cannot be resumed while the + // Threads_lock is held so it is safe. + // Note that this method is allowed to produce false positives. + assert(Threads_lock->owned_by_self(), "Not holding Threads_lock."); + if (target->is_ext_suspended()) { + return true; + } + switch (target->thread_state()) { + case _thread_in_native: + // native threads are safe if they have no java stack or have walkable stack + return !target->has_last_Java_frame() || target->frame_anchor()->walkable(); + + case _thread_blocked: + return true; + + default: + return false; + } +} + bool HandshakeState::claim_handshake_for_vmthread() { if (!_semaphore.trywait()) { return false; @@ -366,7 +387,7 @@ void HandshakeState::process_by_vmthread(JavaThread* target) { return; } - if (!vmthread_can_process_handshake(target)) { + if (!possibly_vmthread_can_process_handshake(target)) { // JT is observed in an unsafe state, it must notice the handshake itself return; } From 4af237427144060d0b97c14a086401b0a3781198 Mon Sep 17 00:00:00 2001 From: Martin Doerr Date: Thu, 4 Oct 2018 16:39:07 +0200 Subject: [PATCH 004/124] 8210754: print_location is not reliable enough (printing register info) Reviewed-by: stuefe, coleenp --- .../share/classfile/classLoaderDataGraph.cpp | 15 ++ .../share/classfile/classLoaderDataGraph.hpp | 4 + src/hotspot/share/code/codeBlob.cpp | 63 ++++++++ src/hotspot/share/code/codeBlob.hpp | 1 + src/hotspot/share/memory/metaspace.cpp | 36 +++++ src/hotspot/share/memory/metaspace.hpp | 11 ++ .../memory/metaspace/virtualSpaceList.cpp | 6 +- .../memory/metaspace/virtualSpaceList.hpp | 3 +- src/hotspot/share/oops/klass.cpp | 17 +++ src/hotspot/share/oops/klass.hpp | 4 + src/hotspot/share/oops/oop.cpp | 57 ++++++++ src/hotspot/share/oops/oop.hpp | 7 + src/hotspot/share/oops/symbol.cpp | 17 +++ src/hotspot/share/oops/symbol.hpp | 2 + src/hotspot/share/runtime/os.cpp | 134 +++++++----------- src/hotspot/share/runtime/os.hpp | 4 + 16 files changed, 298 insertions(+), 83 deletions(-) diff --git a/src/hotspot/share/classfile/classLoaderDataGraph.cpp b/src/hotspot/share/classfile/classLoaderDataGraph.cpp index 81a59a32bff..9340d03c4b0 100644 --- a/src/hotspot/share/classfile/classLoaderDataGraph.cpp +++ b/src/hotspot/share/classfile/classLoaderDataGraph.cpp @@ -487,6 +487,21 @@ bool ClassLoaderDataGraph::contains_loader_data(ClassLoaderData* loader_data) { } #endif // PRODUCT +bool ClassLoaderDataGraph::is_valid(ClassLoaderData* loader_data) { + DEBUG_ONLY( if (!VMError::is_error_reported()) { assert_locked_or_safepoint(ClassLoaderDataGraph_lock); } ) + if (loader_data != NULL) { + if (loader_data == ClassLoaderData::the_null_class_loader_data()) { + return true; + } + for (ClassLoaderData* data = _head; data != NULL; data = data->next()) { + if (loader_data == data) { + return true; + } + } + } + return false; +} + // Move class loader data from main list to the unloaded list for unloading // and deallocation later. bool ClassLoaderDataGraph::do_unloading(bool do_cleaning) { diff --git a/src/hotspot/share/classfile/classLoaderDataGraph.hpp b/src/hotspot/share/classfile/classLoaderDataGraph.hpp index 1ee4db2e0b7..0eaa51e8dac 100644 --- a/src/hotspot/share/classfile/classLoaderDataGraph.hpp +++ b/src/hotspot/share/classfile/classLoaderDataGraph.hpp @@ -146,6 +146,10 @@ class ClassLoaderDataGraph : public AllStatic { #ifndef PRODUCT static bool contains_loader_data(ClassLoaderData* loader_data); #endif + + // Check if ClassLoaderData is part of the ClassLoaderDataGraph (not unloaded) + // Usage without lock only allowed during error reporting. + static bool is_valid(ClassLoaderData* loader_data); }; class LockedClassesDo : public KlassClosure { diff --git a/src/hotspot/share/code/codeBlob.cpp b/src/hotspot/share/code/codeBlob.cpp index eb8ee897df5..bad89d02be2 100644 --- a/src/hotspot/share/code/codeBlob.cpp +++ b/src/hotspot/share/code/codeBlob.cpp @@ -26,7 +26,9 @@ #include "jvm.h" #include "code/codeBlob.hpp" #include "code/codeCache.hpp" +#include "code/icBuffer.hpp" #include "code/relocInfo.hpp" +#include "code/vtableStubs.hpp" #include "compiler/disassembler.hpp" #include "interpreter/bytecode.hpp" #include "memory/allocation.inline.hpp" @@ -559,6 +561,67 @@ void CodeBlob::print_value_on(outputStream* st) const { st->print_cr("[CodeBlob]"); } +void CodeBlob::dump_for_addr(address addr, outputStream* st, bool verbose) const { + if (is_buffer_blob()) { + // the interpreter is generated into a buffer blob + InterpreterCodelet* i = Interpreter::codelet_containing(addr); + if (i != NULL) { + st->print_cr(INTPTR_FORMAT " is at code_begin+%d in an Interpreter codelet", p2i(addr), (int)(addr - i->code_begin())); + i->print_on(st); + return; + } + if (Interpreter::contains(addr)) { + st->print_cr(INTPTR_FORMAT " is pointing into interpreter code" + " (not bytecode specific)", p2i(addr)); + return; + } + // + if (AdapterHandlerLibrary::contains(this)) { + st->print_cr(INTPTR_FORMAT " is at code_begin+%d in an AdapterHandler", p2i(addr), (int)(addr - code_begin())); + AdapterHandlerLibrary::print_handler_on(st, this); + } + // the stubroutines are generated into a buffer blob + StubCodeDesc* d = StubCodeDesc::desc_for(addr); + if (d != NULL) { + st->print_cr(INTPTR_FORMAT " is at begin+%d in a stub", p2i(addr), (int)(addr - d->begin())); + d->print_on(st); + st->cr(); + return; + } + if (StubRoutines::contains(addr)) { + st->print_cr(INTPTR_FORMAT " is pointing to an (unnamed) stub routine", p2i(addr)); + return; + } + // the InlineCacheBuffer is using stubs generated into a buffer blob + if (InlineCacheBuffer::contains(addr)) { + st->print_cr(INTPTR_FORMAT " is pointing into InlineCacheBuffer", p2i(addr)); + return; + } + VtableStub* v = VtableStubs::stub_containing(addr); + if (v != NULL) { + st->print_cr(INTPTR_FORMAT " is at entry_point+%d in a vtable stub", p2i(addr), (int)(addr - v->entry_point())); + v->print_on(st); + st->cr(); + return; + } + } + if (is_nmethod()) { + nmethod* nm = (nmethod*)this; + ResourceMark rm; + st->print(INTPTR_FORMAT " is at entry_point+%d in (nmethod*)" INTPTR_FORMAT, + p2i(addr), (int)(addr - nm->entry_point()), p2i(nm)); + if (verbose) { + st->print(" for "); + nm->method()->print_value_on(st); + } + st->cr(); + nm->print_nmethod(verbose); + return; + } + st->print_cr(INTPTR_FORMAT " is at code_begin+%d in ", p2i(addr), (int)(addr - code_begin())); + print_on(st); +} + void RuntimeBlob::verify() { ShouldNotReachHere(); } diff --git a/src/hotspot/share/code/codeBlob.hpp b/src/hotspot/share/code/codeBlob.hpp index c3e0f17b4ac..df657716649 100644 --- a/src/hotspot/share/code/codeBlob.hpp +++ b/src/hotspot/share/code/codeBlob.hpp @@ -221,6 +221,7 @@ public: virtual void print() const { print_on(tty); }; virtual void print_on(outputStream* st) const; virtual void print_value_on(outputStream* st) const; + void dump_for_addr(address addr, outputStream* st, bool verbose) const; void print_code(); // Print the comment associated with offset on stream, if there is one diff --git a/src/hotspot/share/memory/metaspace.cpp b/src/hotspot/share/memory/metaspace.cpp index eafb46ce710..79154b59f28 100644 --- a/src/hotspot/share/memory/metaspace.cpp +++ b/src/hotspot/share/memory/metaspace.cpp @@ -863,6 +863,42 @@ void MetaspaceUtils::verify_metrics() { #endif } +// Utils to check if a pointer or range is part of a committed metaspace region. +metaspace::VirtualSpaceNode* MetaspaceUtils::find_enclosing_virtual_space(const void* p) { + VirtualSpaceNode* vsn = Metaspace::space_list()->find_enclosing_space(p); + if (Metaspace::using_class_space() && vsn == NULL) { + vsn = Metaspace::class_space_list()->find_enclosing_space(p); + } + return vsn; +} + +bool MetaspaceUtils::is_in_committed(const void* p) { +#if INCLUDE_CDS + if (UseSharedSpaces) { + for (int idx = MetaspaceShared::ro; idx <= MetaspaceShared::mc; idx++) { + if (FileMapInfo::current_info()->is_in_shared_region(p, idx)) { + return true; + } + } + } +#endif + return find_enclosing_virtual_space(p) != NULL; +} + +bool MetaspaceUtils::is_range_in_committed(const void* from, const void* to) { +#if INCLUDE_CDS + if (UseSharedSpaces) { + for (int idx = MetaspaceShared::ro; idx <= MetaspaceShared::mc; idx++) { + if (FileMapInfo::current_info()->is_in_shared_region(from, idx)) { + return FileMapInfo::current_info()->is_in_shared_region(to, idx); + } + } + } +#endif + VirtualSpaceNode* vsn = find_enclosing_virtual_space(from); + return (vsn != NULL) && vsn->contains(to); +} + // Metaspace methods diff --git a/src/hotspot/share/memory/metaspace.hpp b/src/hotspot/share/memory/metaspace.hpp index cfbd5bea27b..f2c47919f4d 100644 --- a/src/hotspot/share/memory/metaspace.hpp +++ b/src/hotspot/share/memory/metaspace.hpp @@ -71,6 +71,7 @@ namespace metaspace { class PrintCLDMetaspaceInfoClosure; class SpaceManager; class VirtualSpaceList; + class VirtualSpaceNode; } // Metaspaces each have a SpaceManager and allocations @@ -297,6 +298,10 @@ class MetaspaceUtils : AllStatic { // Spacemanager updates running counters. friend class metaspace::SpaceManager; + // Special access for error reporting (checks without locks). + friend class oopDesc; + friend class Klass; + // Running counters for statistics concerning in-use chunks. // Note: capacity = used + free + waste + overhead. Note that we do not // count free and waste. Their sum can be deduces from the three other values. @@ -324,6 +329,12 @@ class MetaspaceUtils : AllStatic { // Helper for print_xx_report. static void print_vs(outputStream* out, size_t scale); + // Utils to check if a pointer or range is part of a committed metaspace region + // without acquiring any locks. + static metaspace::VirtualSpaceNode* find_enclosing_virtual_space(const void* p); + static bool is_in_committed(const void* p); + static bool is_range_in_committed(const void* from, const void* to); + public: // Collect used metaspace statistics. This involves walking the CLDG. The resulting diff --git a/src/hotspot/share/memory/metaspace/virtualSpaceList.cpp b/src/hotspot/share/memory/metaspace/virtualSpaceList.cpp index d8105a05f97..cf1c71f8744 100644 --- a/src/hotspot/share/memory/metaspace/virtualSpaceList.cpp +++ b/src/hotspot/share/memory/metaspace/virtualSpaceList.cpp @@ -141,17 +141,17 @@ void VirtualSpaceList::purge(ChunkManager* chunk_manager) { // This function looks at the mmap regions in the metaspace without locking. // The chunks are added with store ordering and not deleted except for at // unloading time during a safepoint. -bool VirtualSpaceList::contains(const void* ptr) { +VirtualSpaceNode* VirtualSpaceList::find_enclosing_space(const void* ptr) { // List should be stable enough to use an iterator here because removing virtual // space nodes is only allowed at a safepoint. VirtualSpaceListIterator iter(virtual_space_list()); while (iter.repeat()) { VirtualSpaceNode* vsn = iter.get_next(); if (vsn->contains(ptr)) { - return true; + return vsn; } } - return false; + return NULL; } void VirtualSpaceList::retire_current_virtual_space() { diff --git a/src/hotspot/share/memory/metaspace/virtualSpaceList.hpp b/src/hotspot/share/memory/metaspace/virtualSpaceList.hpp index 04c27d7ff33..5879d033dbc 100644 --- a/src/hotspot/share/memory/metaspace/virtualSpaceList.hpp +++ b/src/hotspot/share/memory/metaspace/virtualSpaceList.hpp @@ -116,7 +116,8 @@ class VirtualSpaceList : public CHeapObj { void inc_virtual_space_count(); void dec_virtual_space_count(); - bool contains(const void* ptr); + VirtualSpaceNode* find_enclosing_space(const void* ptr); + bool contains(const void* ptr) { return find_enclosing_space(ptr) != NULL; } // Unlink empty VirtualSpaceNodes and free it. void purge(ChunkManager* chunk_manager); diff --git a/src/hotspot/share/oops/klass.cpp b/src/hotspot/share/oops/klass.cpp index e376e7e0940..07898b0fc81 100644 --- a/src/hotspot/share/oops/klass.cpp +++ b/src/hotspot/share/oops/klass.cpp @@ -24,6 +24,7 @@ #include "precompiled.hpp" #include "classfile/classLoaderData.inline.hpp" +#include "classfile/classLoaderDataGraph.inline.hpp" #include "classfile/dictionary.hpp" #include "classfile/javaClasses.hpp" #include "classfile/systemDictionary.hpp" @@ -740,6 +741,22 @@ void Klass::oop_verify_on(oop obj, outputStream* st) { guarantee(obj->klass()->is_klass(), "klass field is not a klass"); } +Klass* Klass::decode_klass_raw(narrowKlass narrow_klass) { + return (Klass*)(void*)( (uintptr_t)Universe::narrow_klass_base() + + ((uintptr_t)narrow_klass << Universe::narrow_klass_shift())); +} + +bool Klass::is_valid(Klass* k) { + if (!is_aligned(k, sizeof(MetaWord))) return false; + if ((size_t)k < os::min_page_size()) return false; + + if (!os::is_readable_range(k, k + 1)) return false; + if (!MetaspaceUtils::is_range_in_committed(k, k + 1)) return false; + + if (!Symbol::is_valid(k->name())) return false; + return ClassLoaderDataGraph::is_valid(k->class_loader_data()); +} + klassVtable Klass::vtable() const { return klassVtable(const_cast(this), start_of_vtable(), vtable_length() / vtableEntry::size()); } diff --git a/src/hotspot/share/oops/klass.hpp b/src/hotspot/share/oops/klass.hpp index 57b5737e623..d428e5b0e34 100644 --- a/src/hotspot/share/oops/klass.hpp +++ b/src/hotspot/share/oops/klass.hpp @@ -715,6 +715,10 @@ protected: virtual void oop_verify_on(oop obj, outputStream* st); + // for error reporting + static Klass* decode_klass_raw(narrowKlass narrow_klass); + static bool is_valid(Klass* k); + static bool is_null(narrowKlass obj); static bool is_null(Klass* obj); diff --git a/src/hotspot/share/oops/oop.cpp b/src/hotspot/share/oops/oop.cpp index 208bf4e4790..ef5f8b9dc72 100644 --- a/src/hotspot/share/oops/oop.cpp +++ b/src/hotspot/share/oops/oop.cpp @@ -171,6 +171,63 @@ bool oopDesc::has_klass_gap() { return UseCompressedClassPointers; } +oop oopDesc::decode_oop_raw(narrowOop narrow_oop) { + return (oop)(void*)( (uintptr_t)Universe::narrow_oop_base() + + ((uintptr_t)narrow_oop << Universe::narrow_oop_shift())); +} + +void* oopDesc::load_klass_raw(oop obj) { + if (UseCompressedClassPointers) { + narrowKlass narrow_klass = *(obj->compressed_klass_addr()); + if (narrow_klass == 0) return NULL; + return (void*)Klass::decode_klass_raw(narrow_klass); + } else { + return *(void**)(obj->klass_addr()); + } +} + +void* oopDesc::load_oop_raw(oop obj, int offset) { + uintptr_t addr = (uintptr_t)(void*)obj + (uint)offset; + if (UseCompressedOops) { + narrowOop narrow_oop = *(narrowOop*)addr; + if (narrow_oop == 0) return NULL; + return (void*)decode_oop_raw(narrow_oop); + } else { + return *(void**)addr; + } +} + +bool oopDesc::is_valid(oop obj) { + if (!is_object_aligned(obj)) return false; + if ((size_t)(oopDesc*)obj < os::min_page_size()) return false; + + // We need at least the mark and the klass word in the committed region. + if (!os::is_readable_range(obj, (oopDesc*)obj + 1)) return false; + if (!Universe::heap()->is_in(obj)) return false; + + Klass* k = (Klass*)load_klass_raw(obj); + + if (!os::is_readable_range(k, k + 1)) return false; + return MetaspaceUtils::is_range_in_committed(k, k + 1); +} + +oop oopDesc::oop_or_null(address addr) { + if (is_valid(oop(addr))) { + // We were just given an oop directly. + return oop(addr); + } + + // Try to find addr using block_start. + HeapWord* p = Universe::heap()->block_start(addr); + if (p != NULL && Universe::heap()->block_is_obj(p)) { + if (!is_valid(oop(p))) return NULL; + return oop(p); + } + + // If we can't find it it just may mean that heap wasn't parsable. + return NULL; +} + oop oopDesc::obj_field_acquire(int offset) const { return HeapAccess::oop_load_at(as_oop(), offset); } void oopDesc::obj_field_put_raw(int offset, oop value) { RawAccess<>::oop_store_at(as_oop(), offset, value); } diff --git a/src/hotspot/share/oops/oop.hpp b/src/hotspot/share/oops/oop.hpp index 2bf60bf49cf..0e57e46d29c 100644 --- a/src/hotspot/share/oops/oop.hpp +++ b/src/hotspot/share/oops/oop.hpp @@ -334,6 +334,13 @@ class oopDesc { assert(has_klass_gap(), "only applicable to compressed klass pointers"); return klass_offset_in_bytes() + sizeof(narrowKlass); } + + // for error reporting + static oop decode_oop_raw(narrowOop narrow_oop); + static void* load_klass_raw(oop obj); + static void* load_oop_raw(oop obj, int offset); + static bool is_valid(oop obj); + static oop oop_or_null(address addr); }; #endif // SHARE_VM_OOPS_OOP_HPP diff --git a/src/hotspot/share/oops/symbol.cpp b/src/hotspot/share/oops/symbol.cpp index 3c43193632a..fae165e36bb 100644 --- a/src/hotspot/share/oops/symbol.cpp +++ b/src/hotspot/share/oops/symbol.cpp @@ -26,6 +26,7 @@ #include "precompiled.hpp" #include "classfile/altHashing.hpp" #include "classfile/classLoaderData.hpp" +#include "gc/shared/collectedHeap.hpp" #include "logging/log.hpp" #include "logging/logStream.hpp" #include "memory/allocation.inline.hpp" @@ -317,5 +318,21 @@ void Symbol::print_value_on(outputStream* st) const { } } +bool Symbol::is_valid(Symbol* s) { + if (!is_aligned(s, sizeof(MetaWord))) return false; + if ((size_t)s < os::min_page_size()) return false; + + if (!os::is_readable_range(s, s + 1)) return false; + + // Symbols are not allocated in Java heap. + if (Universe::heap()->is_in_reserved(s)) return false; + + int len = s->utf8_length(); + if (len < 0) return false; + + jbyte* bytes = (jbyte*) s->bytes(); + return os::is_readable_range(bytes, bytes + len); +} + // SymbolTable prints this in its statistics NOT_PRODUCT(size_t Symbol::_total_count = 0;) diff --git a/src/hotspot/share/oops/symbol.hpp b/src/hotspot/share/oops/symbol.hpp index 0ef2430e981..ac74c674af8 100644 --- a/src/hotspot/share/oops/symbol.hpp +++ b/src/hotspot/share/oops/symbol.hpp @@ -255,6 +255,8 @@ class Symbol : public MetaspaceObj { void print() { print_on(tty); } void print_value() { print_value_on(tty); } + static bool is_valid(Symbol* s); + #ifndef PRODUCT // Empty constructor to create a dummy symbol object on stack // only for getting its vtable pointer. diff --git a/src/hotspot/share/runtime/os.cpp b/src/hotspot/share/runtime/os.cpp index a3fc417b1bc..d703c7297e1 100644 --- a/src/hotspot/share/runtime/os.cpp +++ b/src/hotspot/share/runtime/os.cpp @@ -1010,6 +1010,15 @@ bool os::is_readable_pointer(const void* p) { return (SafeFetch32(aligned, cafebabe) != cafebabe) || (SafeFetch32(aligned, deadbeef) != deadbeef); } +bool os::is_readable_range(const void* from, const void* to) { + for (address p = align_down((address)from, min_page_size()); p < to; p += min_page_size()) { + if (!is_readable_pointer(p)) { + return false; + } + } + return true; +} + // moved from debug.cpp (used to be find()) but still called from there // The verbose parameter is only set by the debug code in one case @@ -1020,99 +1029,48 @@ void os::print_location(outputStream* st, intptr_t x, bool verbose) { st->print_cr("0x0 is NULL"); return; } + + // Check if addr points into a code blob. CodeBlob* b = CodeCache::find_blob_unsafe(addr); if (b != NULL) { - if (b->is_buffer_blob()) { - // the interpreter is generated into a buffer blob - InterpreterCodelet* i = Interpreter::codelet_containing(addr); - if (i != NULL) { - st->print_cr(INTPTR_FORMAT " is at code_begin+%d in an Interpreter codelet", p2i(addr), (int)(addr - i->code_begin())); - i->print_on(st); - return; - } - if (Interpreter::contains(addr)) { - st->print_cr(INTPTR_FORMAT " is pointing into interpreter code" - " (not bytecode specific)", p2i(addr)); - return; - } - // - if (AdapterHandlerLibrary::contains(b)) { - st->print_cr(INTPTR_FORMAT " is at code_begin+%d in an AdapterHandler", p2i(addr), (int)(addr - b->code_begin())); - AdapterHandlerLibrary::print_handler_on(st, b); - } - // the stubroutines are generated into a buffer blob - StubCodeDesc* d = StubCodeDesc::desc_for(addr); - if (d != NULL) { - st->print_cr(INTPTR_FORMAT " is at begin+%d in a stub", p2i(addr), (int)(addr - d->begin())); - d->print_on(st); - st->cr(); - return; - } - if (StubRoutines::contains(addr)) { - st->print_cr(INTPTR_FORMAT " is pointing to an (unnamed) stub routine", p2i(addr)); - return; - } - // the InlineCacheBuffer is using stubs generated into a buffer blob - if (InlineCacheBuffer::contains(addr)) { - st->print_cr(INTPTR_FORMAT " is pointing into InlineCacheBuffer", p2i(addr)); - return; - } - VtableStub* v = VtableStubs::stub_containing(addr); - if (v != NULL) { - st->print_cr(INTPTR_FORMAT " is at entry_point+%d in a vtable stub", p2i(addr), (int)(addr - v->entry_point())); - v->print_on(st); - st->cr(); - return; - } - } - nmethod* nm = b->as_nmethod_or_null(); - if (nm != NULL) { - ResourceMark rm; - st->print(INTPTR_FORMAT " is at entry_point+%d in (nmethod*)" INTPTR_FORMAT, - p2i(addr), (int)(addr - nm->entry_point()), p2i(nm)); - if (verbose) { - st->print(" for "); - nm->method()->print_value_on(st); - } - st->cr(); - nm->print_nmethod(verbose); - return; - } - st->print_cr(INTPTR_FORMAT " is at code_begin+%d in ", p2i(addr), (int)(addr - b->code_begin())); - b->print_on(st); + b->dump_for_addr(addr, st, verbose); return; } + // Check if addr points into Java heap. if (Universe::heap()->is_in(addr)) { - HeapWord* p = Universe::heap()->block_start(addr); - bool print = false; - // If we couldn't find it it just may mean that heap wasn't parsable - // See if we were just given an oop directly - if (p != NULL && Universe::heap()->block_is_obj(p)) { - print = true; - } else if (p == NULL && oopDesc::is_oop(oop(addr))) { - p = (HeapWord*) addr; - print = true; - } - if (print) { - if (p == (HeapWord*) addr) { - st->print_cr(INTPTR_FORMAT " is an oop", p2i(addr)); + oop o = oopDesc::oop_or_null(addr); + if (o != NULL) { + if ((HeapWord*)o == (HeapWord*)addr) { + st->print(INTPTR_FORMAT " is an oop: ", p2i(addr)); } else { - st->print_cr(INTPTR_FORMAT " is pointing into object: " INTPTR_FORMAT, p2i(addr), p2i(p)); + st->print(INTPTR_FORMAT " is pointing into object: " , p2i(addr)); } - oop(p)->print_on(st); + o->print_on(st); return; } - } else { - if (Universe::heap()->is_in_reserved(addr)) { - st->print_cr(INTPTR_FORMAT " is an unallocated location " - "in the heap", p2i(addr)); + } else if (Universe::heap()->is_in_reserved(addr)) { + st->print_cr(INTPTR_FORMAT " is an unallocated location in the heap", p2i(addr)); + return; + } + + // Compressed oop needs to be decoded first. +#ifdef _LP64 + if (UseCompressedOops && ((uintptr_t)addr &~ (uintptr_t)max_juint) == 0) { + narrowOop narrow_oop = (narrowOop)(uintptr_t)addr; + oop o = oopDesc::decode_oop_raw(narrow_oop); + + if (oopDesc::is_valid(o)) { + st->print(UINT32_FORMAT " is a compressed pointer to object: ", narrow_oop); + o->print_on(st); return; } } +#endif bool accessible = is_readable_pointer(addr); + // Check if addr is a JNI handle. if (align_down((intptr_t)addr, sizeof(intptr_t)) != 0 && accessible) { if (JNIHandles::is_global_handle((jobject) addr)) { st->print_cr(INTPTR_FORMAT " is a global jni handle", p2i(addr)); @@ -1131,6 +1089,7 @@ void os::print_location(outputStream* st, intptr_t x, bool verbose) { #endif } + // Check if addr belongs to a Java thread. for (JavaThreadIteratorWithHandle jtiwh; JavaThread *thread = jtiwh.next(); ) { // Check for privilege stack if (thread->privileged_stack_top() != NULL && @@ -1159,9 +1118,12 @@ void os::print_location(outputStream* st, intptr_t x, bool verbose) { } } - // Check if in metaspace and print types that have vptrs (only method now) + // Check if in metaspace and print types that have vptrs if (Metaspace::contains(addr)) { - if (Method::has_method_vptr((const void*)addr)) { + if (Klass::is_valid((Klass*)addr)) { + st->print_cr(INTPTR_FORMAT " is a pointer to class: ", p2i(addr)); + ((Klass*)addr)->print_on(st); + } else if (Method::is_valid_method((const Method*)addr)) { ((Method*)addr)->print_value_on(st); st->cr(); } else { @@ -1171,6 +1133,20 @@ void os::print_location(outputStream* st, intptr_t x, bool verbose) { return; } + // Compressed klass needs to be decoded first. +#ifdef _LP64 + if (UseCompressedClassPointers && ((uintptr_t)addr &~ (uintptr_t)max_juint) == 0) { + narrowKlass narrow_klass = (narrowKlass)(uintptr_t)addr; + Klass* k = Klass::decode_klass_raw(narrow_klass); + + if (Klass::is_valid(k)) { + st->print_cr(UINT32_FORMAT " is a compressed pointer to class: " INTPTR_FORMAT, narrow_klass, p2i((HeapWord*)k)); + k->print_on(st); + return; + } + } +#endif + // Try an OS specific find if (os::find(addr, st)) { return; diff --git a/src/hotspot/share/runtime/os.hpp b/src/hotspot/share/runtime/os.hpp index 3b904a8b6a2..6bc92abbc0f 100644 --- a/src/hotspot/share/runtime/os.hpp +++ b/src/hotspot/share/runtime/os.hpp @@ -303,6 +303,9 @@ class os: AllStatic { return _page_sizes[0]; } + // Return a lower bound for page sizes. Also works before os::init completed. + static size_t min_page_size() { return 4 * K; } + // Methods for tracing page sizes returned by the above method. // The region_{min,max}_size parameters should be the values // passed to page_size_for_region() and page_size should be the result of that @@ -415,6 +418,7 @@ class os: AllStatic { // Check if pointer points to readable memory (by 4-byte read access) static bool is_readable_pointer(const void* p); + static bool is_readable_range(const void* from, const void* to); // Routines used to serialize the thread state without using membars static void serialize_thread_states(); From 73a631303892dfa86c731f47fbf01708eaab5403 Mon Sep 17 00:00:00 2001 From: Mandy Chung Date: Thu, 4 Oct 2018 08:45:21 -0700 Subject: [PATCH 005/124] 8181443: Replace usages of jdk.internal.misc.Unsafe with MethodHandles.Lookup.defineClass Reviewed-by: alanb, egahlin --- .../java/lang/invoke/ClassSpecializer.java | 29 +++++++------------ .../classes/java/lang/reflect/Proxy.java | 12 ++++---- .../jdk/internal/reflect/ClassDefiner.java | 10 ++++--- .../jdk/jfr/internal/EventClassBuilder.java | 2 +- .../jdk/jfr/internal/EventHandlerCreator.java | 2 +- .../jdk/jfr/internal/SecuritySupport.java | 15 ++++++++-- .../jsr292/NonInlinedCall/RedefineTest.java | 11 +++---- .../unsafe/UnsafeGetConstantField.java | 9 +++++- .../Dictionary/CleanProtectionDomain.java | 7 +++-- 9 files changed, 56 insertions(+), 41 deletions(-) diff --git a/src/java.base/share/classes/java/lang/invoke/ClassSpecializer.java b/src/java.base/share/classes/java/lang/invoke/ClassSpecializer.java index 9ee60001ae7..b1d75a5ac09 100644 --- a/src/java.base/share/classes/java/lang/invoke/ClassSpecializer.java +++ b/src/java.base/share/classes/java/lang/invoke/ClassSpecializer.java @@ -37,7 +37,6 @@ import java.lang.reflect.Field; import java.lang.reflect.Modifier; import java.security.AccessController; import java.security.PrivilegedAction; -import java.security.ProtectionDomain; import java.util.ArrayList; import java.util.Collections; import java.util.List; @@ -578,23 +577,17 @@ abstract class ClassSpecializer.SpeciesDat InvokerBytecodeGenerator.maybeDump(classBCName(className), classFile); Class speciesCode; - ClassLoader cl = topClass().getClassLoader(); - ProtectionDomain pd = null; - if (cl != null) { - pd = AccessController.doPrivileged( - new PrivilegedAction<>() { - @Override - public ProtectionDomain run() { - return topClass().getProtectionDomain(); - } - }); - } - try { - speciesCode = UNSAFE.defineClass(className, classFile, 0, classFile.length, cl, pd); - } catch (Exception ex) { - throw newInternalError(ex); - } - + MethodHandles.Lookup lookup = IMPL_LOOKUP.in(topClass()); + speciesCode = AccessController.doPrivileged(new PrivilegedAction<>() { + @Override + public Class run() { + try { + return lookup.defineClass(classFile); + } catch (Exception ex) { + throw newInternalError(ex); + } + } + }); return speciesCode.asSubclass(topClass()); } diff --git a/src/java.base/share/classes/java/lang/reflect/Proxy.java b/src/java.base/share/classes/java/lang/reflect/Proxy.java index 456527dd19b..2538b924d89 100644 --- a/src/java.base/share/classes/java/lang/reflect/Proxy.java +++ b/src/java.base/share/classes/java/lang/reflect/Proxy.java @@ -39,12 +39,11 @@ import java.util.Objects; import java.util.Set; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicLong; -import java.util.stream.Collectors; -import java.util.stream.Stream; import jdk.internal.loader.BootLoader; +import jdk.internal.misc.JavaLangAccess; +import jdk.internal.misc.SharedSecrets; import jdk.internal.module.Modules; -import jdk.internal.misc.Unsafe; import jdk.internal.misc.VM; import jdk.internal.reflect.CallerSensitive; import jdk.internal.reflect.Reflection; @@ -468,7 +467,7 @@ public class Proxy implements java.io.Serializable { * in which the proxy class will be defined. */ private static final class ProxyBuilder { - private static final Unsafe UNSAFE = Unsafe.getUnsafe(); + private static final JavaLangAccess JLA = SharedSecrets.getJavaLangAccess(); // prefix for all proxy class names private static final String proxyClassNamePrefix = "$Proxy"; @@ -535,9 +534,8 @@ public class Proxy implements java.io.Serializable { byte[] proxyClassFile = ProxyGenerator.generateProxyClass( proxyName, interfaces.toArray(EMPTY_CLASS_ARRAY), accessFlags); try { - Class pc = UNSAFE.defineClass(proxyName, proxyClassFile, - 0, proxyClassFile.length, - loader, null); + Class pc = JLA.defineClass(loader, proxyName, proxyClassFile, + null, "__dynamic_proxy__"); reverseProxyCache.sub(pc).putIfAbsent(loader, Boolean.TRUE); return pc; } catch (ClassFormatError e) { diff --git a/src/java.base/share/classes/jdk/internal/reflect/ClassDefiner.java b/src/java.base/share/classes/jdk/internal/reflect/ClassDefiner.java index 8bf8bf9d1d7..d11385bb07f 100644 --- a/src/java.base/share/classes/jdk/internal/reflect/ClassDefiner.java +++ b/src/java.base/share/classes/jdk/internal/reflect/ClassDefiner.java @@ -27,14 +27,16 @@ package jdk.internal.reflect; import java.security.AccessController; import java.security.PrivilegedAction; -import jdk.internal.misc.Unsafe; -/** Utility class which assists in calling Unsafe.defineClass() by +import jdk.internal.misc.JavaLangAccess; +import jdk.internal.misc.SharedSecrets; + +/** Utility class which assists in calling defineClass() by creating a new class loader which delegates to the one needed in order for proper resolution of the given bytecodes to occur. */ class ClassDefiner { - static final Unsafe unsafe = Unsafe.getUnsafe(); + static final JavaLangAccess JLA = SharedSecrets.getJavaLangAccess(); /**

We define generated code into a new class loader which delegates to the defining loader of the target class. It is @@ -60,7 +62,7 @@ class ClassDefiner { return new DelegatingClassLoader(parentClassLoader); } }); - return unsafe.defineClass(name, bytes, off, len, newLoader, null); + return JLA.defineClass(newLoader, name, bytes, null, "__ClassDefiner__"); } } diff --git a/src/jdk.jfr/share/classes/jdk/jfr/internal/EventClassBuilder.java b/src/jdk.jfr/share/classes/jdk/jfr/internal/EventClassBuilder.java index d20b773465a..754ed3d0723 100644 --- a/src/jdk.jfr/share/classes/jdk/jfr/internal/EventClassBuilder.java +++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/EventClassBuilder.java @@ -70,7 +70,7 @@ public final class EventClassBuilder { endClass(); byte[] bytes = classWriter.toByteArray(); ASMToolkit.logASM(fullClassName, bytes); - return SecuritySupport.defineClass(type.getInternalName(), bytes, Event.class.getClassLoader()).asSubclass(Event.class); + return SecuritySupport.defineClass(Event.class, bytes).asSubclass(Event.class); } private void endClass() { diff --git a/src/jdk.jfr/share/classes/jdk/jfr/internal/EventHandlerCreator.java b/src/jdk.jfr/share/classes/jdk/jfr/internal/EventHandlerCreator.java index 0d5fe27ddbc..26b9524137b 100644 --- a/src/jdk.jfr/share/classes/jdk/jfr/internal/EventHandlerCreator.java +++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/EventHandlerCreator.java @@ -134,7 +134,7 @@ final class EventHandlerCreator { buildWriteMethod(); byte[] bytes = classWriter.toByteArray(); ASMToolkit.logASM(className, bytes); - return SecuritySupport.defineClass(className, bytes, Event.class.getClassLoader()).asSubclass(EventHandler.class); + return SecuritySupport.defineClass(EventHandler.class, bytes).asSubclass(EventHandler.class); } public static EventHandler instantiateEventHandler(Class handlerClass, boolean registered, EventType eventType, EventControl eventControl) throws Error { diff --git a/src/jdk.jfr/share/classes/jdk/jfr/internal/SecuritySupport.java b/src/jdk.jfr/share/classes/jdk/jfr/internal/SecuritySupport.java index f8a57f6c9f0..1d1efe685a7 100644 --- a/src/jdk.jfr/share/classes/jdk/jfr/internal/SecuritySupport.java +++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/SecuritySupport.java @@ -31,6 +31,7 @@ import java.io.IOException; import java.io.InputStream; import java.io.RandomAccessFile; import java.io.Reader; +import java.lang.invoke.MethodHandles; import java.lang.reflect.Constructor; import java.lang.reflect.Field; import java.lang.reflect.Method; @@ -71,6 +72,7 @@ import jdk.jfr.Recording; */ public final class SecuritySupport { private final static Unsafe unsafe = Unsafe.getUnsafe(); + private final static MethodHandles.Lookup LOOKUP = MethodHandles.lookup(); private final static Module JFR_MODULE = Event.class.getModule(); public final static SafePath JFC_DIRECTORY = getPathInProperty("java.home", "lib/jfr"); @@ -381,8 +383,17 @@ public final class SecuritySupport { unsafe.ensureClassInitialized(clazz); } - static Class defineClass(String name, byte[] bytes, ClassLoader classLoader) { - return unsafe.defineClass(name, bytes, 0, bytes.length, classLoader, null); + static Class defineClass(Class lookupClass, byte[] bytes) { + return AccessController.doPrivileged(new PrivilegedAction<>() { + @Override + public Class run() { + try { + return MethodHandles.privateLookupIn(lookupClass, LOOKUP).defineClass(bytes); + } catch (IllegalAccessException e) { + throw new InternalError(e); + } + } + }); } static Thread createThreadWitNoPermissions(String threadName, Runnable runnable) { diff --git a/test/hotspot/jtreg/compiler/jsr292/NonInlinedCall/RedefineTest.java b/test/hotspot/jtreg/compiler/jsr292/NonInlinedCall/RedefineTest.java index 806b7490893..364b8189758 100644 --- a/test/hotspot/jtreg/compiler/jsr292/NonInlinedCall/RedefineTest.java +++ b/test/hotspot/jtreg/compiler/jsr292/NonInlinedCall/RedefineTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2018, 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 @@ -48,7 +48,6 @@ package compiler.jsr292.NonInlinedCall; -import jdk.internal.misc.Unsafe; import jdk.internal.org.objectweb.asm.ClassWriter; import jdk.internal.org.objectweb.asm.MethodVisitor; import jdk.internal.vm.annotation.DontInline; @@ -68,13 +67,15 @@ import static jdk.internal.org.objectweb.asm.Opcodes.IRETURN; public class RedefineTest { static final MethodHandles.Lookup LOOKUP = MethodHandleHelper.IMPL_LOOKUP; - static final Unsafe UNSAFE = Unsafe.getUnsafe(); - static final String NAME = "compiler/jsr292/NonInlinedCall/RedefineTest$T"; static Class getClass(int r) { byte[] classFile = getClassFile(r); - return UNSAFE.defineClass(NAME, classFile, 0, classFile.length, null, null); + try { + return MethodHandles.lookup().defineClass(classFile); + } catch (IllegalAccessException e) { + throw new Error(e); + } } /** diff --git a/test/hotspot/jtreg/compiler/unsafe/UnsafeGetConstantField.java b/test/hotspot/jtreg/compiler/unsafe/UnsafeGetConstantField.java index f3d0a07c477..b7a36ca0ee6 100644 --- a/test/hotspot/jtreg/compiler/unsafe/UnsafeGetConstantField.java +++ b/test/hotspot/jtreg/compiler/unsafe/UnsafeGetConstantField.java @@ -32,6 +32,9 @@ * java.base/jdk.internal.vm.annotation * java.base/jdk.internal.misc * + * @library ../jsr292/patches + * @build java.base/java.lang.invoke.MethodHandleHelper + * * @run main/bootclasspath/othervm -XX:+UnlockDiagnosticVMOptions * -Xbatch -XX:-TieredCompilation * -XX:+FoldStableValues @@ -64,6 +67,9 @@ import jdk.internal.vm.annotation.Stable; import jdk.test.lib.Asserts; import jdk.test.lib.Platform; +import java.lang.invoke.MethodHandleHelper; +import java.lang.invoke.MethodHandles; +import java.lang.invoke.MethodHandles.Lookup; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; @@ -393,8 +399,9 @@ public class UnsafeGetConstantField { } Test generate() { - Class c = U.defineClass(className, classFile, 0, classFile.length, THIS_CLASS.getClassLoader(), null); try { + Lookup lookup = MethodHandleHelper.IMPL_LOOKUP.in(MethodHandles.class); + Class c = lookup.defineClass(classFile); return (Test) c.newInstance(); } catch(Exception e) { throw new Error(e); diff --git a/test/hotspot/jtreg/runtime/Dictionary/CleanProtectionDomain.java b/test/hotspot/jtreg/runtime/Dictionary/CleanProtectionDomain.java index 3b559d9bc64..b7ee9bcc4e4 100644 --- a/test/hotspot/jtreg/runtime/Dictionary/CleanProtectionDomain.java +++ b/test/hotspot/jtreg/runtime/Dictionary/CleanProtectionDomain.java @@ -57,11 +57,10 @@ public class CleanProtectionDomain { static class Test { public static void test() throws Exception { - Unsafe unsafe = Unsafe.getUnsafe(); TestClassLoader classloader = new TestClassLoader(); ProtectionDomain pd = new ProtectionDomain(null, null); byte klassbuf[] = InMemoryJavaCompiler.compile("TestClass", "class TestClass { }"); - Class klass = unsafe.defineClass(null, klassbuf, 0, klassbuf.length, classloader, pd); + Class klass = classloader.defineClass("TestClass", klassbuf, pd); } public static void main(String[] args) throws Exception { @@ -91,6 +90,10 @@ public class CleanProtectionDomain { public TestClassLoader() { super(); } + + public Class defineClass(String name, byte[] bytes, ProtectionDomain pd) { + return defineClass(name, bytes, 0, bytes.length, pd); + } } } } From 2589e9733e054c164a64112db80e25fefd6dd222 Mon Sep 17 00:00:00 2001 From: Vicente Romero Date: Thu, 4 Oct 2018 08:37:08 -0700 Subject: [PATCH 006/124] 8211148: var in implicit lambdas shouldn't be accepted for source < 11 Reviewed-by: mcimadamore --- .../com/sun/tools/javac/code/Source.java | 1 + .../sun/tools/javac/parser/JavacParser.java | 29 ++++++++++------- .../tools/javac/resources/compiler.properties | 3 ++ .../diags/examples/VarInImplicitLambda.java | 32 +++++++++++++++++++ .../tools/javac/lambda/LambdaParserTest.java | 27 +++++++++------- .../VarInImplicitLambdaNegTest01.java | 1 + .../VarInImplicitLambdaNegTest01.out | 8 ++--- .../VarInImplicitLambdaNegTest01_source10.out | 6 ++++ 8 files changed, 80 insertions(+), 27 deletions(-) create mode 100644 test/langtools/tools/javac/diags/examples/VarInImplicitLambda.java create mode 100644 test/langtools/tools/javac/var_implicit_lambda/VarInImplicitLambdaNegTest01_source10.out diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Source.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Source.java index 0cd344531bd..269b6f6e63a 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Source.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Source.java @@ -180,6 +180,7 @@ public enum Source { UNDERSCORE_IDENTIFIER(MIN, JDK8), PRIVATE_INTERFACE_METHODS(JDK9, Fragments.FeaturePrivateIntfMethods, DiagKind.PLURAL), LOCAL_VARIABLE_TYPE_INFERENCE(JDK10), + VAR_SYNTAX_IMPLICIT_LAMBDAS(JDK11, Fragments.FeatureVarSyntaxInImplicitLambda, DiagKind.PLURAL), IMPORT_ON_DEMAND_OBSERVABLE_PACKAGES(JDK1_2, JDK8), SWITCH_MULTIPLE_CASE_LABELS(JDK12, Fragments.FeatureMultipleCaseLabels, DiagKind.PLURAL), SWITCH_RULE(JDK12, Fragments.FeatureSwitchRules, DiagKind.PLURAL), diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java index 7e850919a63..df992908488 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java @@ -1783,7 +1783,9 @@ public class JavacParser implements Parser { if (param.vartype != null && isRestrictedLocalVarTypeName(param.vartype, false) && param.vartype.hasTag(TYPEARRAY)) { - log.error(DiagnosticFlag.SYNTAX, param.pos, Errors.VarNotAllowedArray); + log.error(DiagnosticFlag.SYNTAX, param.pos, + Feature.VAR_SYNTAX_IMPLICIT_LAMBDAS.allowedInSource(source) + ? Errors.VarNotAllowedArray : Errors.VarNotAllowedHere); } lambdaClassifier.addParameter(param); if (lambdaClassifier.result() == LambdaParameterKind.ERROR) { @@ -1794,7 +1796,9 @@ public class JavacParser implements Parser { log.error(DiagnosticFlag.SYNTAX, pos, Errors.InvalidLambdaParameterDeclaration(lambdaClassifier.diagFragment)); } for (JCVariableDecl param: params) { - if (param.vartype != null && isRestrictedLocalVarTypeName(param.vartype, true)) { + if (param.vartype != null + && isRestrictedLocalVarTypeName(param.vartype, true)) { + checkSourceLevel(param.pos, Feature.VAR_SYNTAX_IMPLICIT_LAMBDAS); param.startPos = TreeInfo.getStartPos(param.vartype); param.vartype = null; } @@ -1804,9 +1808,9 @@ public class JavacParser implements Parser { } enum LambdaParameterKind { - EXPLICIT(0), - IMPLICIT(1), - VAR(2), + VAR(0), + EXPLICIT(1), + IMPLICIT(2), ERROR(-1); private final int index; @@ -1816,11 +1820,11 @@ public class JavacParser implements Parser { } } - private final static Fragment[][] decisionTable = new Fragment[][]{ - /* EXPLICIT IMPLICIT VAR */ - /* EXPLICIT */ {null, ImplicitAndExplicitNotAllowed, VarAndExplicitNotAllowed}, - /* IMPLICIT */ {ImplicitAndExplicitNotAllowed, null, VarAndImplicitNotAllowed}, - /* VAR */ {VarAndExplicitNotAllowed, VarAndImplicitNotAllowed, null} + private final static Fragment[][] decisionTable = new Fragment[][] { + /* VAR EXPLICIT IMPLICIT */ + /* VAR */ {null, VarAndExplicitNotAllowed, VarAndImplicitNotAllowed}, + /* EXPLICIT */ {VarAndExplicitNotAllowed, null, ImplicitAndExplicitNotAllowed}, + /* IMPLICIT */ {VarAndImplicitNotAllowed, ImplicitAndExplicitNotAllowed, null}, }; class LambdaClassifier { @@ -1849,7 +1853,10 @@ public class JavacParser implements Parser { } else if (kind != newKind && kind != LambdaParameterKind.ERROR) { LambdaParameterKind currentKind = kind; kind = LambdaParameterKind.ERROR; - diagFragment = decisionTable[currentKind.index][newKind.index]; + boolean varIndex = currentKind.index == LambdaParameterKind.VAR.index || + newKind.index == LambdaParameterKind.VAR.index; + diagFragment = Feature.VAR_SYNTAX_IMPLICIT_LAMBDAS.allowedInSource(source) || !varIndex ? + decisionTable[currentKind.index][newKind.index] : null; } } diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties index ad1d00a674a..e3c66bbb835 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties @@ -2832,6 +2832,9 @@ compiler.misc.feature.switch.expressions=\ compiler.misc.feature.raw.string.literals=\ raw string literals +compiler.misc.feature.var.syntax.in.implicit.lambda=\ + var syntax in implicit lambdas + compiler.warn.underscore.as.identifier=\ as of release 9, ''_'' is a keyword, and may not be used as an identifier diff --git a/test/langtools/tools/javac/diags/examples/VarInImplicitLambda.java b/test/langtools/tools/javac/diags/examples/VarInImplicitLambda.java new file mode 100644 index 00000000000..dea52c2a6d5 --- /dev/null +++ b/test/langtools/tools/javac/diags/examples/VarInImplicitLambda.java @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2018, 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. + * + * 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. + */ + +// key: compiler.misc.feature.var.syntax.in.implicit.lambda +// key: compiler.err.feature.not.supported.in.source.plural +// options: -source 10 -Xlint:-options + +import java.util.function.*; + +class VarInImplicitLambda { + IntBinaryOperator f2 = (var x, y) -> x + y; +} diff --git a/test/langtools/tools/javac/lambda/LambdaParserTest.java b/test/langtools/tools/javac/lambda/LambdaParserTest.java index d4db1c4862f..0e705603d5b 100644 --- a/test/langtools/tools/javac/lambda/LambdaParserTest.java +++ b/test/langtools/tools/javac/lambda/LambdaParserTest.java @@ -107,8 +107,8 @@ public class LambdaParserTest extends ComboInstance { } enum SourceKind { - SOURCE_9("9"), - SOURCE_10("10"); + SOURCE_10("10"), + SOURCE_11("11"); String sourceNumber; @@ -121,9 +121,9 @@ public class LambdaParserTest extends ComboInstance { IMPLICIT_1("", ExplicitKind.IMPLICIT), IMPLICIT_2("var", ExplicitKind.IMPLICIT_VAR), - EXPLIICT_SIMPLE("A", ExplicitKind.EXPLICIT), - EXPLIICT_SIMPLE_ARR1("A[]", ExplicitKind.EXPLICIT), - EXPLIICT_SIMPLE_ARR2("A[][]", ExplicitKind.EXPLICIT), + EXPLICIT_SIMPLE("A", ExplicitKind.EXPLICIT), + EXPLICIT_SIMPLE_ARR1("A[]", ExplicitKind.EXPLICIT), + EXPLICIT_SIMPLE_ARR2("A[][]", ExplicitKind.EXPLICIT), EXPLICIT_VARARGS("A...", ExplicitKind.EXPLICIT), EXPLICIT_GENERIC1("A", ExplicitKind.EXPLICIT), EXPLICIT_GENERIC2("A", ExplicitKind.EXPLICIT), @@ -157,13 +157,7 @@ public class LambdaParserTest extends ComboInstance { } ExplicitKind explicitKind(SourceKind sk) { - switch (explicitKind) { - case IMPLICIT_VAR: - return (sk == SourceKind.SOURCE_9) ? - ExplicitKind.EXPLICIT : ExplicitKind.IMPLICIT_VAR; - default: - return explicitKind; - } + return explicitKind; } } @@ -299,6 +293,15 @@ public class LambdaParserTest extends ComboInstance { errorExpected |= pn == LambdaParameterName.UNDERSCORE && lk.arity() > 0; + for (int i = 0; i < lk.arity(); i++) { + if (!lk.isShort() && + pks[i].explicitKind(sk) == LambdaParameterKind.ExplicitKind.IMPLICIT_VAR && + sk == SourceKind.SOURCE_10) { + errorExpected = true; + break; + } + } + if (errorExpected != res.hasErrors()) { fail("invalid diagnostics for source:\n" + res.compilationInfo() + diff --git a/test/langtools/tools/javac/var_implicit_lambda/VarInImplicitLambdaNegTest01.java b/test/langtools/tools/javac/var_implicit_lambda/VarInImplicitLambdaNegTest01.java index 4a39be13cb1..c1a440c0e8a 100644 --- a/test/langtools/tools/javac/var_implicit_lambda/VarInImplicitLambdaNegTest01.java +++ b/test/langtools/tools/javac/var_implicit_lambda/VarInImplicitLambdaNegTest01.java @@ -3,6 +3,7 @@ * @bug 8198512 8199327 * @summary compiler support for local-variable syntax for lambda parameters * @compile/fail/ref=VarInImplicitLambdaNegTest01.out -XDrawDiagnostics VarInImplicitLambdaNegTest01.java + * @compile/fail/ref=VarInImplicitLambdaNegTest01_source10.out -source 10 -XDrawDiagnostics VarInImplicitLambdaNegTest01.java */ import java.util.function.*; diff --git a/test/langtools/tools/javac/var_implicit_lambda/VarInImplicitLambdaNegTest01.out b/test/langtools/tools/javac/var_implicit_lambda/VarInImplicitLambdaNegTest01.out index 7aee5be36e0..19110e4ec4a 100644 --- a/test/langtools/tools/javac/var_implicit_lambda/VarInImplicitLambdaNegTest01.out +++ b/test/langtools/tools/javac/var_implicit_lambda/VarInImplicitLambdaNegTest01.out @@ -1,6 +1,6 @@ -VarInImplicitLambdaNegTest01.java:11:28: compiler.err.invalid.lambda.parameter.declaration: (compiler.misc.var.and.implicit.not.allowed) VarInImplicitLambdaNegTest01.java:12:28: compiler.err.invalid.lambda.parameter.declaration: (compiler.misc.var.and.implicit.not.allowed) -VarInImplicitLambdaNegTest01.java:13:28: compiler.err.invalid.lambda.parameter.declaration: (compiler.misc.var.and.explicit.not.allowed) -VarInImplicitLambdaNegTest01.java:14:28: compiler.err.invalid.lambda.parameter.declaration: (compiler.misc.implicit.and.explicit.not.allowed) -VarInImplicitLambdaNegTest01.java:16:52: compiler.err.var.not.allowed.array +VarInImplicitLambdaNegTest01.java:13:28: compiler.err.invalid.lambda.parameter.declaration: (compiler.misc.var.and.implicit.not.allowed) +VarInImplicitLambdaNegTest01.java:14:28: compiler.err.invalid.lambda.parameter.declaration: (compiler.misc.var.and.explicit.not.allowed) +VarInImplicitLambdaNegTest01.java:15:28: compiler.err.invalid.lambda.parameter.declaration: (compiler.misc.implicit.and.explicit.not.allowed) +VarInImplicitLambdaNegTest01.java:17:52: compiler.err.var.not.allowed.array 5 errors diff --git a/test/langtools/tools/javac/var_implicit_lambda/VarInImplicitLambdaNegTest01_source10.out b/test/langtools/tools/javac/var_implicit_lambda/VarInImplicitLambdaNegTest01_source10.out new file mode 100644 index 00000000000..8c325a59f3e --- /dev/null +++ b/test/langtools/tools/javac/var_implicit_lambda/VarInImplicitLambdaNegTest01_source10.out @@ -0,0 +1,6 @@ +- compiler.warn.source.no.bootclasspath: 10 +VarInImplicitLambdaNegTest01.java:12:36: compiler.err.feature.not.supported.in.source.plural: (compiler.misc.feature.var.syntax.in.implicit.lambda), 10, 11 +VarInImplicitLambdaNegTest01.java:15:28: compiler.err.invalid.lambda.parameter.declaration: (compiler.misc.implicit.and.explicit.not.allowed) +VarInImplicitLambdaNegTest01.java:17:52: compiler.err.var.not.allowed.here +3 errors +1 warning From 44a83147db4c421fd23c0b6caf3c3fac3bea369b Mon Sep 17 00:00:00 2001 From: Gilles Duboscq Date: Fri, 17 Aug 2018 12:19:52 +0200 Subject: [PATCH 007/124] 8209136: [JVMCI] Make sure volatile fields are read as volatile during constant reflection Reviewed-by: kvn --- .../HotSpotConstantReflectionProvider.java | 7 ++- .../HotSpotMemoryAccessProviderImpl.java | 51 +++++++++---------- 2 files changed, 27 insertions(+), 31 deletions(-) diff --git a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstantReflectionProvider.java b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstantReflectionProvider.java index 346f8aa7f80..32c84cedb17 100644 --- a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstantReflectionProvider.java +++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstantReflectionProvider.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2018, 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 @@ -108,7 +108,6 @@ public class HotSpotConstantReflectionProvider implements ConstantReflectionProv * Otherwise the generated code might be the only reference to the boxed value and since object * references from nmethods are weak this can cause GC problems. * - * @param source * @return true if the box is cached */ private static boolean isBoxCached(JavaConstant source) { @@ -182,13 +181,13 @@ public class HotSpotConstantReflectionProvider implements ConstantReflectionProv if (hotspotField.isStatic()) { HotSpotResolvedJavaType holder = (HotSpotResolvedJavaType) hotspotField.getDeclaringClass(); if (holder.isInitialized()) { - return memoryAccess.readFieldValue(hotspotField, holder.mirror()); + return memoryAccess.readFieldValue(hotspotField, holder.mirror(), field.isVolatile()); } } else { if (receiver.isNonNull()) { Object object = ((HotSpotObjectConstantImpl) receiver).object(); if (hotspotField.isInObject(receiver)) { - return memoryAccess.readFieldValue(hotspotField, object); + return memoryAccess.readFieldValue(hotspotField, object, field.isVolatile()); } } } diff --git a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMemoryAccessProviderImpl.java b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMemoryAccessProviderImpl.java index a3dcd294bb2..925bcfb0d1e 100644 --- a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMemoryAccessProviderImpl.java +++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMemoryAccessProviderImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2018, 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 @@ -208,37 +208,34 @@ class HotSpotMemoryAccessProviderImpl implements HotSpotMemoryAccessProvider { return ret; } - JavaConstant readFieldValue(HotSpotResolvedJavaField field, Object obj) { + JavaConstant readFieldValue(HotSpotResolvedJavaField field, Object obj, boolean isVolatile) { assert obj != null; assert !field.isStatic() || obj instanceof Class; long displacement = field.getOffset(); assert checkRead(field.getJavaKind(), displacement, (HotSpotResolvedObjectType) runtime.getHostJVMCIBackend().getMetaAccess().lookupJavaType(obj.getClass()), obj, runtime.getHostJVMCIBackend().getMetaAccess()); - if (field.getJavaKind() == JavaKind.Object) { - Object o = UNSAFE.getObject(obj, displacement); - return HotSpotObjectConstantImpl.forObject(o); - } else { - JavaKind kind = field.getJavaKind(); - switch (kind) { - case Boolean: - return JavaConstant.forBoolean(UNSAFE.getBoolean(obj, displacement)); - case Byte: - return JavaConstant.forByte(UNSAFE.getByte(obj, displacement)); - case Char: - return JavaConstant.forChar(UNSAFE.getChar(obj, displacement)); - case Short: - return JavaConstant.forShort(UNSAFE.getShort(obj, displacement)); - case Int: - return JavaConstant.forInt(UNSAFE.getInt(obj, displacement)); - case Long: - return JavaConstant.forLong(UNSAFE.getLong(obj, displacement)); - case Float: - return JavaConstant.forFloat(UNSAFE.getFloat(obj, displacement)); - case Double: - return JavaConstant.forDouble(UNSAFE.getDouble(obj, displacement)); - default: - throw new IllegalArgumentException("Unsupported kind: " + kind); - } + JavaKind kind = field.getJavaKind(); + switch (kind) { + case Boolean: + return JavaConstant.forBoolean(isVolatile ? UNSAFE.getBooleanVolatile(obj, displacement) : UNSAFE.getBoolean(obj, displacement)); + case Byte: + return JavaConstant.forByte(isVolatile ? UNSAFE.getByteVolatile(obj, displacement) : UNSAFE.getByte(obj, displacement)); + case Char: + return JavaConstant.forChar(isVolatile ? UNSAFE.getCharVolatile(obj, displacement) : UNSAFE.getChar(obj, displacement)); + case Short: + return JavaConstant.forShort(isVolatile ? UNSAFE.getShortVolatile(obj, displacement) : UNSAFE.getShort(obj, displacement)); + case Int: + return JavaConstant.forInt(isVolatile ? UNSAFE.getIntVolatile(obj, displacement) : UNSAFE.getInt(obj, displacement)); + case Long: + return JavaConstant.forLong(isVolatile ? UNSAFE.getLongVolatile(obj, displacement) : UNSAFE.getLong(obj, displacement)); + case Float: + return JavaConstant.forFloat(isVolatile ? UNSAFE.getFloatVolatile(obj, displacement) : UNSAFE.getFloat(obj, displacement)); + case Double: + return JavaConstant.forDouble(isVolatile ? UNSAFE.getDoubleVolatile(obj, displacement) : UNSAFE.getDouble(obj, displacement)); + case Object: + return HotSpotObjectConstantImpl.forObject(isVolatile ? UNSAFE.getObjectVolatile(obj, displacement) : UNSAFE.getObject(obj, displacement)); + default: + throw new IllegalArgumentException("Unsupported kind: " + kind); } } From 2c88ce1b89744119458f85f1d9c46659ee9adb01 Mon Sep 17 00:00:00 2001 From: Erik Joelsson Date: Thu, 4 Oct 2018 09:43:49 -0700 Subject: [PATCH 008/124] 8211677: Java resource copy and clean should use MakeTargetDir macro Reviewed-by: tbell, ihse --- make/common/JavaCompilation.gmk | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/make/common/JavaCompilation.gmk b/make/common/JavaCompilation.gmk index a1cdd9264d7..2d85ba0bf61 100644 --- a/make/common/JavaCompilation.gmk +++ b/make/common/JavaCompilation.gmk @@ -76,8 +76,8 @@ define add_file_to_copy $1_COPY_$$($2_TARGET) := 1 # Now we can setup the dependency that will trigger the copying. $$($1_BIN)$$($1_MODULE_SUBDIR)$$($2_TARGET) : $2 - $(MKDIR) -p $$(@D) - $(CP) $$< $$@ + $$(call LogInfo, Copying $$(patsubst $(OUTPUTDIR)/%,%, $$@)) + $$(install-file) $(CHMOD) -f ug+w $$@ # And do not forget this target @@ -120,7 +120,8 @@ define add_file_to_clean ifneq ($$($1_CLEAN_$$($2_TARGET)), 1) $1_CLEAN_$$($2_TARGET) := 1 $$($1_BIN)$$($1_MODULE_SUBDIR)$$($2_TARGET) : $2 - $(MKDIR) -p $$(@D) + $$(call LogInfo, Cleaning $$(patsubst $(OUTPUTDIR)/%,%, $$@)) + $$(call MakeTargetDir) export LC_ALL=C ; ( $(CAT) $$< && $(ECHO) "" ) \ | $(SED) -e 's/\([^\\]\):/\1\\:/g' -e 's/\([^\\]\)=/\1\\=/g' \ -e 's/\([^\\]\)!/\1\\!/g' -e 's/^[ ]*#.*/#/g' \ From 609d90e98ae5663ad4587812052a9b98e98078bb Mon Sep 17 00:00:00 2001 From: Vicente Romero Date: Thu, 4 Oct 2018 10:19:01 -0700 Subject: [PATCH 009/124] 8210789: langtools/tools/javac/T8152616.java missing @modules Reviewed-by: jjg --- test/langtools/tools/javac/T8152616.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/langtools/tools/javac/T8152616.java b/test/langtools/tools/javac/T8152616.java index 9b49f283152..e2c6d38eaf6 100644 --- a/test/langtools/tools/javac/T8152616.java +++ b/test/langtools/tools/javac/T8152616.java @@ -25,8 +25,8 @@ * @test * @bug 8152616 * @summary Unit test for corner case of PrettyPrinting when SourceOutput is false - * @run compile --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED T8152616.java - * @run main T8152616 + * @modules jdk.compiler/com.sun.tools.javac.api + * jdk.compiler/com.sun.tools.javac.tree */ import java.io.File; From 46f0fa8c20382d19cb38d9af8d4b08ea2b3ca896 Mon Sep 17 00:00:00 2001 From: Mandy Chung Date: Thu, 4 Oct 2018 13:02:58 -0700 Subject: [PATCH 010/124] 8206240: java.lang.Class.newInstance() is causing caller to leak Reviewed-by: alanb --- .../share/classes/java/lang/Class.java | 29 ++---- .../java/lang/reflect/AccessibleObject.java | 89 +++++++++++++------ .../java/lang/reflect/Constructor.java | 17 +++- .../java/lang/reflect/ReflectAccess.java | 6 ++ .../internal/reflect/LangReflectAccess.java | 4 + .../internal/reflect/ReflectionFactory.java | 6 ++ .../lang/StackWalker/ReflectionFrames.java | 71 +++++++++++---- .../lang/reflect/callerCache/AccessTest.java | 7 ++ .../ReflectionCallerCacheTest.java | 3 +- test/jdk/jdk/modules/open/Basic.java | 37 ++++++++ 10 files changed, 198 insertions(+), 71 deletions(-) diff --git a/src/java.base/share/classes/java/lang/Class.java b/src/java.base/share/classes/java/lang/Class.java index 8203e07c320..904ace62070 100644 --- a/src/java.base/share/classes/java/lang/Class.java +++ b/src/java.base/share/classes/java/lang/Class.java @@ -64,7 +64,6 @@ import jdk.internal.HotSpotIntrinsicCandidate; import jdk.internal.loader.BootLoader; import jdk.internal.loader.BuiltinClassLoader; import jdk.internal.misc.Unsafe; -import jdk.internal.misc.VM; import jdk.internal.module.Resources; import jdk.internal.reflect.CallerSensitive; import jdk.internal.reflect.ConstantPool; @@ -540,11 +539,9 @@ public final class Class implements java.io.Serializable, checkMemberAccess(sm, Member.PUBLIC, Reflection.getCallerClass(), false); } - // NOTE: the following code may not be strictly correct under - // the current Java memory model. - // Constructor lookup - if (cachedConstructor == null) { + Constructor tmpConstructor = cachedConstructor; + if (tmpConstructor == null) { if (this == Class.class) { throw new IllegalAccessException( "Can not call newInstance() on the Class for java.lang.Class" @@ -555,9 +552,7 @@ public final class Class implements java.io.Serializable, final Constructor c = getReflectionFactory().copyConstructor( getConstructor0(empty, Member.DECLARED)); // Disable accessibility checks on the constructor - // since we have to do the security check here anyway - // (the stack depth is wrong for the Constructor's - // security check to work) + // access check is done with the true caller java.security.AccessController.doPrivileged( new java.security.PrivilegedAction<>() { public Void run() { @@ -565,32 +560,24 @@ public final class Class implements java.io.Serializable, return null; } }); - cachedConstructor = c; + cachedConstructor = tmpConstructor = c; } catch (NoSuchMethodException e) { throw (InstantiationException) new InstantiationException(getName()).initCause(e); } } - Constructor tmpConstructor = cachedConstructor; - // Security check (same as in java.lang.reflect.Constructor) - Class caller = Reflection.getCallerClass(); - if (newInstanceCallerCache != caller) { - int modifiers = tmpConstructor.getModifiers(); - Reflection.ensureMemberAccess(caller, this, this, modifiers); - newInstanceCallerCache = caller; - } - // Run constructor + try { - return tmpConstructor.newInstance((Object[])null); + Class caller = Reflection.getCallerClass(); + return getReflectionFactory().newInstance(tmpConstructor, null, caller); } catch (InvocationTargetException e) { Unsafe.getUnsafe().throwException(e.getTargetException()); // Not reached return null; } } - private transient volatile Constructor cachedConstructor; - private transient volatile Class newInstanceCallerCache; + private transient volatile Constructor cachedConstructor; /** * Determines if the specified {@code Object} is assignment-compatible diff --git a/src/java.base/share/classes/java/lang/reflect/AccessibleObject.java b/src/java.base/share/classes/java/lang/reflect/AccessibleObject.java index bebdd357b14..9baffbe7733 100644 --- a/src/java.base/share/classes/java/lang/reflect/AccessibleObject.java +++ b/src/java.base/share/classes/java/lang/reflect/AccessibleObject.java @@ -27,6 +27,7 @@ package java.lang.reflect; import java.lang.annotation.Annotation; import java.lang.invoke.MethodHandle; +import java.lang.ref.WeakReference; import java.security.AccessController; import jdk.internal.misc.VM; @@ -567,21 +568,68 @@ public class AccessibleObject implements AnnotatedElement { // Shared access checking logic. // For non-public members or members in package-private classes, - // it is necessary to perform somewhat expensive security checks. - // If the security check succeeds for a given class, it will + // it is necessary to perform somewhat expensive access checks. + // If the access check succeeds for a given class, it will // always succeed (it is not affected by the granting or revoking // of permissions); we speed up the check in the common case by // remembering the last Class for which the check succeeded. // - // The simple security check for Constructor is to see if + // The simple access check for Constructor is to see if // the caller has already been seen, verified, and cached. - // (See also Class.newInstance(), which uses a similar method.) // - // A more complicated security check cache is needed for Method and Field - // The cache can be either null (empty cache), a 2-array of {caller,targetClass}, + // A more complicated access check cache is needed for Method and Field + // The cache can be either null (empty cache), {caller,targetClass} pair, // or a caller (with targetClass implicitly equal to memberClass). - // In the 2-array case, the targetClass is always different from the memberClass. - volatile Object securityCheckCache; + // In the {caller,targetClass} case, the targetClass is always different + // from the memberClass. + volatile Object accessCheckCache; + + private static class Cache { + final WeakReference> callerRef; + final WeakReference> targetRef; + + Cache(Class caller, Class target) { + this.callerRef = new WeakReference<>(caller); + this.targetRef = new WeakReference<>(target); + } + + boolean isCacheFor(Class caller, Class refc) { + return callerRef.get() == caller && targetRef.get() == refc; + } + + static Object protectedMemberCallerCache(Class caller, Class refc) { + return new Cache(caller, refc); + } + } + + /* + * Returns true if the previous access check was verified for the + * given caller accessing a protected member with an instance of + * the given targetClass where the target class is different than + * the declaring member class. + */ + private boolean isAccessChecked(Class caller, Class targetClass) { + Object cache = accessCheckCache; // read volatile + if (cache instanceof Cache) { + return ((Cache) cache).isCacheFor(caller, targetClass); + } + return false; + } + + /* + * Returns true if the previous access check was verified for the + * given caller accessing a static member or an instance member of + * the target class that is the same as the declaring member class. + */ + private boolean isAccessChecked(Class caller) { + Object cache = accessCheckCache; // read volatile + if (cache instanceof WeakReference) { + @SuppressWarnings("unchecked") + WeakReference> ref = (WeakReference>) cache; + return ref.get() == caller; + } + return false; + } final void checkAccess(Class caller, Class memberClass, Class targetClass, int modifiers) @@ -603,21 +651,13 @@ public class AccessibleObject implements AnnotatedElement { if (caller == memberClass) { // quick check return true; // ACCESS IS OK } - Object cache = securityCheckCache; // read volatile if (targetClass != null // instance member or constructor && Modifier.isProtected(modifiers) && targetClass != memberClass) { - // Must match a 2-list of { caller, targetClass }. - if (cache instanceof Class[]) { - Class[] cache2 = (Class[]) cache; - if (cache2[1] == targetClass && - cache2[0] == caller) { - return true; // ACCESS IS OK - } - // (Test cache[1] first since range check for [1] - // subsumes range check for [0].) + if (isAccessChecked(caller, targetClass)) { + return true; // ACCESS IS OK } - } else if (cache == caller) { + } else if (isAccessChecked(caller)) { // Non-protected case (or targetClass == memberClass or static member). return true; // ACCESS IS OK } @@ -642,14 +682,9 @@ public class AccessibleObject implements AnnotatedElement { Object cache = (targetClass != null && Modifier.isProtected(modifiers) && targetClass != memberClass) - ? new Class[] { caller, targetClass } - : caller; - - // Note: The two cache elements are not volatile, - // but they are effectively final. The Java memory model - // guarantees that the initializing stores for the cache - // elements will occur before the volatile write. - securityCheckCache = cache; // write volatile + ? Cache.protectedMemberCallerCache(caller, targetClass) + : new WeakReference<>(caller); + accessCheckCache = cache; // write volatile return true; } diff --git a/src/java.base/share/classes/java/lang/reflect/Constructor.java b/src/java.base/share/classes/java/lang/reflect/Constructor.java index 2d7a8160ba5..49184d0dc4c 100644 --- a/src/java.base/share/classes/java/lang/reflect/Constructor.java +++ b/src/java.base/share/classes/java/lang/reflect/Constructor.java @@ -476,18 +476,27 @@ public final class Constructor extends Executable { throws InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException { - if (!override) { - Class caller = Reflection.getCallerClass(); + Class caller = override ? null : Reflection.getCallerClass(); + return newInstanceWithCaller(initargs, !override, caller); + } + + /* package-private */ + T newInstanceWithCaller(Object[] args, boolean checkAccess, Class caller) + throws InstantiationException, IllegalAccessException, + InvocationTargetException + { + if (checkAccess) checkAccess(caller, clazz, clazz, modifiers); - } + if ((clazz.getModifiers() & Modifier.ENUM) != 0) throw new IllegalArgumentException("Cannot reflectively create enum objects"); + ConstructorAccessor ca = constructorAccessor; // read volatile if (ca == null) { ca = acquireConstructorAccessor(); } @SuppressWarnings("unchecked") - T inst = (T) ca.newInstance(initargs); + T inst = (T) ca.newInstance(args); return inst; } diff --git a/src/java.base/share/classes/java/lang/reflect/ReflectAccess.java b/src/java.base/share/classes/java/lang/reflect/ReflectAccess.java index 754b8bf2be9..dd84d0abd38 100644 --- a/src/java.base/share/classes/java/lang/reflect/ReflectAccess.java +++ b/src/java.base/share/classes/java/lang/reflect/ReflectAccess.java @@ -159,4 +159,10 @@ class ReflectAccess implements jdk.internal.reflect.LangReflectAccess { public T getRoot(T obj) { return (T) obj.getRoot(); } + + public T newInstance(Constructor ctor, Object[] args, Class caller) + throws IllegalAccessException, InstantiationException, InvocationTargetException + { + return ctor.newInstanceWithCaller(args, true, caller); + } } diff --git a/src/java.base/share/classes/jdk/internal/reflect/LangReflectAccess.java b/src/java.base/share/classes/jdk/internal/reflect/LangReflectAccess.java index 38ccbcc4a5c..9a80e913b25 100644 --- a/src/java.base/share/classes/jdk/internal/reflect/LangReflectAccess.java +++ b/src/java.base/share/classes/jdk/internal/reflect/LangReflectAccess.java @@ -118,4 +118,8 @@ public interface LangReflectAccess { /** Gets the root of the given AccessibleObject object; null if arg is the root */ public T getRoot(T obj); + + /** Returns a new instance created by the given constructor with access check */ + public T newInstance(Constructor ctor, Object[] args, Class caller) + throws IllegalAccessException, InstantiationException, InvocationTargetException; } diff --git a/src/java.base/share/classes/jdk/internal/reflect/ReflectionFactory.java b/src/java.base/share/classes/jdk/internal/reflect/ReflectionFactory.java index 4b2f43868a1..cf88992a63f 100644 --- a/src/java.base/share/classes/jdk/internal/reflect/ReflectionFactory.java +++ b/src/java.base/share/classes/jdk/internal/reflect/ReflectionFactory.java @@ -398,6 +398,12 @@ public class ReflectionFactory { return langReflectAccess().getExecutableSharedParameterTypes(ex); } + public T newInstance(Constructor ctor, Object[] args, Class caller) + throws IllegalAccessException, InstantiationException, InvocationTargetException + { + return langReflectAccess().newInstance(ctor, args, caller); + } + //-------------------------------------------------------------------------- // // Routines used by serialization diff --git a/test/jdk/java/lang/StackWalker/ReflectionFrames.java b/test/jdk/java/lang/StackWalker/ReflectionFrames.java index eacc55fe92b..5a9ea78389f 100644 --- a/test/jdk/java/lang/StackWalker/ReflectionFrames.java +++ b/test/jdk/java/lang/StackWalker/ReflectionFrames.java @@ -48,6 +48,16 @@ import static org.testng.Assert.*; public class ReflectionFrames { final static boolean verbose = false; + final static Class REFLECT_ACCESS = findClass("java.lang.reflect.ReflectAccess"); + final static Class REFLECTION_FACTORY = findClass("jdk.internal.reflect.ReflectionFactory"); + + private static Class findClass(String cn) { + try { + return Class.forName(cn); + } catch (ClassNotFoundException e) { + throw new AssertionError(e); + } + } /** * This test invokes new StackInspector() directly from @@ -326,6 +336,8 @@ public class ReflectionFrames { assertEquals(obj.collectedFrames, List.of(StackInspector.class.getName() +"::", + Constructor.class.getName() + +"::newInstanceWithCaller", Constructor.class.getName() +"::newInstance", StackInspector.Caller.class.getName() @@ -354,6 +366,8 @@ public class ReflectionFrames { assertEquals(obj.collectedFrames, List.of(StackInspector.class.getName() +"::", + Constructor.class.getName() + +"::newInstanceWithCaller", Constructor.class.getName() +"::newInstance", StackInspector.Caller.class.getName() @@ -386,6 +400,8 @@ public class ReflectionFrames { assertEquals(obj.collectedFrames, List.of(StackInspector.class.getName() +"::", + Constructor.class.getName() + +"::newInstanceWithCaller", Constructor.class.getName() +"::newInstance", StackInspector.Caller.class.getName() @@ -436,15 +452,19 @@ public class ReflectionFrames { assertEquals(obj.collectedFrames, List.of(StackInspector.class.getName() +"::", + REFLECT_ACCESS.getName() + +"::newInstance", + REFLECTION_FACTORY.getName() + +"::newInstance", Class.class.getName() +"::newInstance", StackInspector.Caller.class.getName() +"::create", ReflectionFrames.class.getName() +"::testNewInstance")); - // Because Class.newInstance is not filtered, then the - // caller is Class.class - assertEquals(obj.cls, Class.class); + // Because implementation frames are not filtered, then the + // caller is ReflectAccess.class + assertEquals(obj.cls, REFLECT_ACCESS); assertEquals(obj.filtered, 0); // Calls the StackInspector.reflect method through reflection @@ -464,6 +484,10 @@ public class ReflectionFrames { assertEquals(obj.collectedFrames, List.of(StackInspector.class.getName() +"::", + REFLECT_ACCESS.getName() + +"::newInstance", + REFLECTION_FACTORY.getName() + +"::newInstance", Class.class.getName() +"::newInstance", StackInspector.Caller.class.getName() @@ -473,9 +497,9 @@ public class ReflectionFrames { ReflectionFrames.class.getName() +"::testNewInstance")); - // Because Class.newInstance is not filtered, then the - // caller is Class.class - assertEquals(obj.cls, Class.class); + // Because implementation frames are not filtered, then the + // caller is ReflectAccess.class + assertEquals(obj.cls, REFLECT_ACCESS); assertEquals(obj.filtered, 0); // Calls the StackInspector.handle method through reflection @@ -495,6 +519,10 @@ public class ReflectionFrames { assertEquals(obj.collectedFrames, List.of(StackInspector.class.getName() +"::", + REFLECT_ACCESS.getName() + +"::newInstance", + REFLECTION_FACTORY.getName() + +"::newInstance", Class.class.getName() +"::newInstance", StackInspector.Caller.class.getName() @@ -504,9 +532,9 @@ public class ReflectionFrames { ReflectionFrames.class.getName() +"::testNewInstance")); - // Because Class.newInstance is not filtered, then the - // caller is Class.class - assertEquals(obj.cls, Class.class); + // Because implementation frames are not filtered, then the + // caller is ReflectAccess.class + assertEquals(obj.cls, REFLECT_ACCESS); assertEquals(obj.filtered, 0); // Sets a non-default walker configured to show @@ -529,6 +557,8 @@ public class ReflectionFrames { List.of(StackInspector.class.getName() +"::", Constructor.class.getName() + +"::newInstanceWithCaller", + REFLECT_ACCESS.getName() +"::newInstance", Class.class.getName() +"::newInstance", @@ -538,9 +568,9 @@ public class ReflectionFrames { +"::invoke", ReflectionFrames.class.getName() +"::testNewInstance")); - // Because Class.newInstance is not filtered, then the - // caller is Class.class - assertEquals(obj.cls, Class.class); + // Because implementation frames are not filtered, then the + // caller is ReflectAccess.class + assertEquals(obj.cls, REFLECT_ACCESS); assertNotEquals(obj.filtered, 0); // Calls the StackInspector.reflect method through reflection @@ -557,10 +587,13 @@ public class ReflectionFrames { obj = ((StackInspector)StackInspector.Caller.class .getMethod("reflect", How.class) .invoke(null, How.CLASS)); + System.out.println(obj.collectedFrames); assertEquals(obj.collectedFrames, List.of(StackInspector.class.getName() +"::", Constructor.class.getName() + +"::newInstanceWithCaller", + REFLECT_ACCESS.getName() +"::newInstance", Class.class.getName() +"::newInstance", @@ -575,9 +608,9 @@ public class ReflectionFrames { ReflectionFrames.class.getName() +"::testNewInstance")); - // Because Class.newInstance is not filtered, then the - // caller is Class.class - assertEquals(obj.cls, Class.class); + // Because implementation frames are not filtered, then the + // caller is ReflectAccess.class + assertEquals(obj.cls, REFLECT_ACCESS); assertNotEquals(obj.filtered, 0); // Calls the StackInspector.handle method through reflection @@ -598,6 +631,8 @@ public class ReflectionFrames { List.of(StackInspector.class.getName() +"::", Constructor.class.getName() + +"::newInstanceWithCaller", + REFLECT_ACCESS.getName() +"::newInstance", Class.class.getName() +"::newInstance", @@ -611,9 +646,9 @@ public class ReflectionFrames { ReflectionFrames.class.getName() +"::testNewInstance")); - // Because Class.newInstance is not filtered, then the - // caller is Class.class - assertEquals(obj.cls, Class.class); + // Because implementation frames are not filtered, then the + // caller is ReflectAccess.class + assertEquals(obj.cls, REFLECT_ACCESS); assertNotEquals(obj.filtered, 0); } diff --git a/test/jdk/java/lang/reflect/callerCache/AccessTest.java b/test/jdk/java/lang/reflect/callerCache/AccessTest.java index cab7fd96744..0037d81732d 100644 --- a/test/jdk/java/lang/reflect/callerCache/AccessTest.java +++ b/test/jdk/java/lang/reflect/callerCache/AccessTest.java @@ -149,4 +149,11 @@ public class AccessTest { super("privateStaticFinalField"); } } + + public static class NewInstance implements Callable { + public Object call() throws Exception { + return Members.class.newInstance(); + } + } + } diff --git a/test/jdk/java/lang/reflect/callerCache/ReflectionCallerCacheTest.java b/test/jdk/java/lang/reflect/callerCache/ReflectionCallerCacheTest.java index a6e9da08806..2f8dafaf754 100644 --- a/test/jdk/java/lang/reflect/callerCache/ReflectionCallerCacheTest.java +++ b/test/jdk/java/lang/reflect/callerCache/ReflectionCallerCacheTest.java @@ -77,7 +77,8 @@ public class ReflectionCallerCacheTest { { "AccessTest$PublicFinalField"}, { "AccessTest$PrivateFinalField"}, { "AccessTest$PublicStaticFinalField"}, - { "AccessTest$PrivateStaticFinalField"} + { "AccessTest$PrivateStaticFinalField"}, + { "AccessTest$NewInstance"} }; } diff --git a/test/jdk/jdk/modules/open/Basic.java b/test/jdk/jdk/modules/open/Basic.java index 27c54902c5b..ade1fe3ec86 100644 --- a/test/jdk/jdk/modules/open/Basic.java +++ b/test/jdk/jdk/modules/open/Basic.java @@ -98,6 +98,9 @@ public class Basic { ctor.setAccessible(true); ctor.newInstance(); + // Class::newInstance + clazz.newInstance(); + // method handles findNoArgConstructorAndInvoke(clazz, MethodHandles.publicLookup()); findNoArgConstructorAndInvoke(clazz, MethodHandles.lookup()); @@ -122,6 +125,12 @@ public class Basic { ctor.setAccessible(true); ctor.newInstance(); + // Class::newInstance + try { + clazz.newInstance(); + assertTrue(false); + } catch (IllegalAccessException expected) { } + // method handles try { findNoArgConstructorAndInvoke(clazz, MethodHandles.publicLookup()); @@ -150,6 +159,9 @@ public class Basic { ctor.setAccessible(true); ctor.newInstance(); + // Class::newInstance + clazz.newInstance(); + // method handles findNoArgConstructorAndInvoke(clazz, MethodHandles.publicLookup()); findNoArgConstructorAndInvoke(clazz, MethodHandles.lookup()); @@ -174,6 +186,12 @@ public class Basic { ctor.setAccessible(true); ctor.newInstance(); + // Class::newInstance + try { + clazz.newInstance(); + assertTrue(false); + } catch (IllegalAccessException expected) { } + // method handles try { findNoArgConstructorAndInvoke(clazz, MethodHandles.publicLookup()); @@ -200,6 +218,7 @@ public class Basic { // core reflection Class clazz = q.PublicType.class; clazz.getConstructor().newInstance(); + clazz.newInstance(); // method handles findNoArgConstructorAndInvoke(clazz, MethodHandles.publicLookup()); @@ -226,6 +245,12 @@ public class Basic { ctor.setAccessible(true); ctor.newInstance(); + // Class::newInstance + try { + clazz.newInstance(); + assertTrue(false); + } catch (IllegalAccessException expected) { } + // method handles try { findNoArgConstructorAndInvoke(clazz, MethodHandles.publicLookup()); @@ -256,6 +281,12 @@ public class Basic { assertTrue(false); } catch (InaccessibleObjectException expected) { } + // Class::newInstance + try { + clazz.newInstance(); + assertTrue(false); + } catch (IllegalAccessException expected) { } + // method handles try { findNoArgConstructorAndInvoke(clazz, MethodHandles.publicLookup()); @@ -288,6 +319,12 @@ public class Basic { assertTrue(false); } catch (InaccessibleObjectException expected) { } + // Class::newInstance + try { + clazz.newInstance(); + assertTrue(false); + } catch (IllegalAccessException expected) { } + // method handles try { findNoArgConstructorAndInvoke(clazz, MethodHandles.publicLookup()); From 271e3be381caeda89b33a8ba2b1c6f705d5379c4 Mon Sep 17 00:00:00 2001 From: Naoto Sato Date: Thu, 4 Oct 2018 14:12:34 -0700 Subject: [PATCH 011/124] 8211398: Square character support for the Japanese new era Reviewed-by: rriggs --- make/data/unicodedata/UnicodeData.txt | 1 + .../share/classes/java/lang/Character.java | 4 ++-- test/jdk/java/lang/Character/Scripts.txt | 1 + test/jdk/java/lang/Character/UnicodeData.txt | 1 + test/jdk/java/lang/Character/charprop00.bin | Bin 1048617 -> 1048617 bytes 5 files changed, 5 insertions(+), 2 deletions(-) diff --git a/make/data/unicodedata/UnicodeData.txt b/make/data/unicodedata/UnicodeData.txt index d89c64f526a..e9814761e70 100644 --- a/make/data/unicodedata/UnicodeData.txt +++ b/make/data/unicodedata/UnicodeData.txt @@ -11729,6 +11729,7 @@ 32FC;CIRCLED KATAKANA WI;So;0;L; 30F0;;;;N;;;;; 32FD;CIRCLED KATAKANA WE;So;0;L; 30F1;;;;N;;;;; 32FE;CIRCLED KATAKANA WO;So;0;L; 30F2;;;;N;;;;; +32FF;SQUARE ERA NAME NEWERA;So;0;L; 5143 53F7;;;;N;SQUARED TWO IDEOGRAPHS ERA NAME NEWERA;;;; 3300;SQUARE APAATO;So;0;L; 30A2 30D1 30FC 30C8;;;;N;SQUARED APAATO;;;; 3301;SQUARE ARUHUA;So;0;L; 30A2 30EB 30D5 30A1;;;;N;SQUARED ARUHUA;;;; 3302;SQUARE ANPEA;So;0;L; 30A2 30F3 30DA 30A2;;;;N;SQUARED ANPEA;;;; diff --git a/src/java.base/share/classes/java/lang/Character.java b/src/java.base/share/classes/java/lang/Character.java index f655f89165e..0ed379442f6 100644 --- a/src/java.base/share/classes/java/lang/Character.java +++ b/src/java.base/share/classes/java/lang/Character.java @@ -5385,7 +5385,7 @@ class Character implements java.io.Serializable, Comparable { 0x3260, // 3260..327E; HANGUL 0x327F, // 327F..32CF; COMMON 0x32D0, // 32D0..32FE; KATAKANA - 0x32FF, // 32FF ; UNKNOWN + 0x32FF, // 32FF ; COMMON 0x3300, // 3300..3357; KATAKANA 0x3358, // 3358..33FF; COMMON 0x3400, // 3400..4DB5; HAN @@ -6902,7 +6902,7 @@ class Character implements java.io.Serializable, Comparable { HANGUL, // 3260..327E COMMON, // 327F..32CF KATAKANA, // 32D0..32FE - UNKNOWN, // 32FF + COMMON, // 32FF KATAKANA, // 3300..3357 COMMON, // 3358..33FF HAN, // 3400..4DB5 diff --git a/test/jdk/java/lang/Character/Scripts.txt b/test/jdk/java/lang/Character/Scripts.txt index 80430b32a8f..794ef91a888 100644 --- a/test/jdk/java/lang/Character/Scripts.txt +++ b/test/jdk/java/lang/Character/Scripts.txt @@ -402,6 +402,7 @@ 328A..32B0 ; Common # So [39] CIRCLED IDEOGRAPH MOON..CIRCLED IDEOGRAPH NIGHT 32B1..32BF ; Common # No [15] CIRCLED NUMBER THIRTY SIX..CIRCLED NUMBER FIFTY 32C0..32CF ; Common # So [16] IDEOGRAPHIC TELEGRAPH SYMBOL FOR JANUARY..LIMITED LIABILITY SIGN +32FF ; Common # So SQUARE ERA NAME NEWERA 3358..33FF ; Common # So [168] IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR ZERO..SQUARE GAL 4DC0..4DFF ; Common # So [64] HEXAGRAM FOR THE CREATIVE HEAVEN..HEXAGRAM FOR BEFORE COMPLETION A700..A716 ; Common # Sk [23] MODIFIER LETTER CHINESE TONE YIN PING..MODIFIER LETTER EXTRA-LOW LEFT-STEM TONE BAR diff --git a/test/jdk/java/lang/Character/UnicodeData.txt b/test/jdk/java/lang/Character/UnicodeData.txt index d89c64f526a..e9814761e70 100644 --- a/test/jdk/java/lang/Character/UnicodeData.txt +++ b/test/jdk/java/lang/Character/UnicodeData.txt @@ -11729,6 +11729,7 @@ 32FC;CIRCLED KATAKANA WI;So;0;L; 30F0;;;;N;;;;; 32FD;CIRCLED KATAKANA WE;So;0;L; 30F1;;;;N;;;;; 32FE;CIRCLED KATAKANA WO;So;0;L; 30F2;;;;N;;;;; +32FF;SQUARE ERA NAME NEWERA;So;0;L; 5143 53F7;;;;N;SQUARED TWO IDEOGRAPHS ERA NAME NEWERA;;;; 3300;SQUARE APAATO;So;0;L; 30A2 30D1 30FC 30C8;;;;N;SQUARED APAATO;;;; 3301;SQUARE ARUHUA;So;0;L; 30A2 30EB 30D5 30A1;;;;N;SQUARED ARUHUA;;;; 3302;SQUARE ANPEA;So;0;L; 30A2 30F3 30DA 30A2;;;;N;SQUARED ANPEA;;;; diff --git a/test/jdk/java/lang/Character/charprop00.bin b/test/jdk/java/lang/Character/charprop00.bin index fb3f2658b3aefc78ffc60ac54a6bf436bee71bfe..5174850ce6992b53bcbac8c3359ce8b45b4f5009 100644 GIT binary patch delta 87 zcmZ44;IOj6fpg7U2G$Y=ZbPF+&Q?ywR!*j^oXnyI%uF0I?TQA>K+FQftU$~L#Oy%K a0mPg@%mu{UK+FTgygK+FQftU$~L#Oy%K a0mPg@%mu{UK+FTgyg Date: Fri, 5 Oct 2018 07:54:28 +0200 Subject: [PATCH 012/124] 8210459: Add support for generating compile_commands.json Reviewed-by: erikj, ihse --- make/CompileCommands.gmk | 60 +++++++++++++++++ make/Main.gmk | 49 +++++++++++++- make/ModuleWrapper.gmk | 8 ++- make/common/JdkNativeCompilation.gmk | 23 +++++++ make/common/NativeCompilation.gmk | 68 ++++++++++++++++---- make/conf/jib-profiles.js | 2 +- make/hotspot/lib/CompileJvm.gmk | 96 +++++++++++++++------------- make/launcher/Launcher-jdk.pack.gmk | 10 +-- make/launcher/LauncherCommon.gmk | 6 +- make/lib/Awt2dLibraries.gmk | 4 +- make/lib/Lib-jdk.accessibility.gmk | 2 +- make/lib/LibCommon.gmk | 18 ------ test/make/TestCompileCommands.gmk | 54 ++++++++++++++++ test/make/TestMake.gmk | 5 +- 14 files changed, 309 insertions(+), 96 deletions(-) create mode 100644 make/CompileCommands.gmk create mode 100644 test/make/TestCompileCommands.gmk diff --git a/make/CompileCommands.gmk b/make/CompileCommands.gmk new file mode 100644 index 00000000000..ad729830e53 --- /dev/null +++ b/make/CompileCommands.gmk @@ -0,0 +1,60 @@ +# +# Copyright (c) 2018, 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. +# + +default: all + +include $(SPEC) +include MakeBase.gmk + +# When FIXPATH is set, let it process the file to make sure all paths are usable +# by system native tools. The FIXPATH tool assumes arguments preceeded by an @ +# character points to a text file containing further arguments (similar to a +# linker). It replaces any such arguments with a different temporary filename, +# whose contents has been processed to make any paths native. To obtain a +# properly processed compile_commands.json, FIXPATH is then made to invoke an +# AWK script with the unprocessed json file as the only argument, prepended with +# an @ character. The AWK script simply copies the contents of this processed +# file. +# +# The sed command encloses the fragments inside brackets and removes the final +# trailing comma. +$(OUTPUTDIR)/compile_commands.json: $(wildcard $(MAKESUPPORT_OUTPUTDIR)/compile-commands/*.json) + $(call LogWarn, Updating compile_commands.json) + $(RM) $@ + $(FIND) $(MAKESUPPORT_OUTPUTDIR)/compile-commands/ -name \*.json | \ + $(SORT) | $(XARGS) $(CAT) >> $@.tmp + $(if $(FIXPATH),$(FIXPATH) $(AWK) 'BEGIN { \ + tmpfile = substr(ARGV[2],2); \ + cmd = "$(CP) " "\047" tmpfile "\047" " $@.tmp"; \ + system(cmd); \ + }' -- @$@.tmp) + $(SED) -e '1s/^/[\$(NEWLINE)/' -e '$(DOLLAR)s/,\s\{0,\}$(DOLLAR)/\$(NEWLINE)]/' $@.tmp > $@ + $(RM) $@.tmp + +TARGETS += $(OUTPUTDIR)/compile_commands.json + +all: $(TARGETS) + +.PHONY: all diff --git a/make/Main.gmk b/make/Main.gmk index 3b957d2c979..d16463910bc 100644 --- a/make/Main.gmk +++ b/make/Main.gmk @@ -262,6 +262,31 @@ hotspot-ide-project: ALL_TARGETS += $(HOTSPOT_VARIANT_TARGETS) $(HOTSPOT_VARIANT_GENSRC_TARGETS) \ $(HOTSPOT_VARIANT_LIBS_TARGETS) hotspot-ide-project +################################################################################ +# Generate libs and launcher targets for creating compile_commands.json fragments +define DeclareCompileCommandsRecipe + $1-compile-commands: + $$(call LogInfo, Generating compile_commands.json fragments for $1) + +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Main.gmk $1-only \ + GENERATE_COMPILE_COMMANDS_ONLY=true) + + COMPILE_COMMANDS_TARGETS_$2 += $1-compile-commands +endef + +$(foreach t, $(HOTSPOT_VARIANT_LIBS_TARGETS), \ + $(eval $(call DeclareCompileCommandsRecipe,$t,HOTSPOT)) \ +) + +$(foreach t, $(LIBS_TARGETS) $(LAUNCHER_TARGETS), \ + $(eval $(call DeclareCompileCommandsRecipe,$t,JDK)) \ +) + +compile-commands compile-commands-hotspot: + +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileCommands.gmk) + +ALL_TARGETS += $(COMPILE_COMMANDS_TARGETS_HOTSPOT) $(COMPILE_COMMANDS_TARGETS_JDK) +ALL_TARGETS += compile-commands compile-commands-hotspot + ################################################################################ # Build demos targets @@ -559,8 +584,12 @@ test-jdk-jtreg-native: test-make: ($(CD) $(TOPDIR)/test/make && $(MAKE) $(MAKE_ARGS) -f TestMake.gmk $(TEST_TARGET)) +test-compile-commands: + ($(CD) $(TOPDIR)/test/make && $(MAKE) $(MAKE_ARGS) -f TestMake.gmk test-compile-commands) + ALL_TARGETS += test test-hotspot-jtreg test-hotspot-jtreg-native \ - test-hotspot-internal test-hotspot-gtest test-jdk-jtreg-native test-make + test-hotspot-internal test-hotspot-gtest test-jdk-jtreg-native test-make \ + test-compile-commands ################################################################################ # Bundles @@ -735,6 +764,20 @@ else $(foreach m, $(ALL_MODULES), $(eval $m-jmod: $($(m)_JMOD_DEPS))) $(foreach m, $(INTERIM_IMAGE_MODULES), $(eval $m-interim-jmod: $($(m)_JMOD_DEPS))) + # Setup the minimal set of generated native source dependencies for hotspot + $(foreach v, $(JVM_VARIANTS), \ + $(eval hotspot-$v-libs-compile-commands: hotspot-$v-gensrc) \ + $(foreach m, $(filter java.desktop jdk.hotspot.agent, $(GENSRC_MODULES)), \ + $(eval hotspot-$v-libs-compile-commands: $m-gensrc)) \ + ) + + # For the full JDK compile commands, create all possible generated sources + $(foreach m, $(GENSRC_MODULES), $(eval $m-libs-compile-commands: $m-gensrc)) + $(foreach m, $(filter $(JAVA_MODULES), $(LIBS_MODULES)), $(eval $m-libs-compile-commands: $m-java)) + + compile-commands-hotspot: $(COMPILE_COMMANDS_TARGETS_HOTSPOT) + compile-commands: $(COMPILE_COMMANDS_TARGETS_HOTSPOT) $(COMPILE_COMMANDS_TARGETS_JDK) + # Jmods cannot be created until we have the jmod tool ready to run. During # a normal build we run it from the exploded image, but when cross compiling # it's run from the buildjdk, which is either created at build time or user @@ -849,6 +892,8 @@ else test-make: clean-test-make + test-compile-commands: compile-commands + build-test-lib: exploded-image-optimize build-test-failure-handler: interim-langtools @@ -1071,7 +1116,7 @@ CLEAN_MODULE_PHASE_TARGETS := $(addprefix clean-, $(foreach m, $(ALL_MODULES), \ # Remove everything, except the output from configure. clean: $(CLEAN_DIR_TARGETS) - ($(CD) $(OUTPUTDIR) && $(RM) -r build*.log*) + ($(CD) $(OUTPUTDIR) && $(RM) -r build*.log* compile_commands.json) $(ECHO) Cleaned all build artifacts. clean-docs: diff --git a/make/ModuleWrapper.gmk b/make/ModuleWrapper.gmk index dd6a8afebf1..5f9c5fc82ec 100644 --- a/make/ModuleWrapper.gmk +++ b/make/ModuleWrapper.gmk @@ -100,5 +100,9 @@ $(eval $(call SetupCopyFiles, COPY_CONF, \ $(TARGETS)), \ )) -all: $(TARGETS) $(COPY_LIBS_TO_BIN) $(COPY_LIBS_TO_LIB) \ - $(COPY_INCLUDE) $(COPY_CMDS) $(COPY_CONF) $(LINK_LIBS_TO_LIB) +ifeq ($(GENERATE_COMPILE_COMMANDS_ONLY), true) + all: $(filter $(MAKESUPPORT_OUTPUTDIR)/compile-commands/%, $(TARGETS)) +else + all: $(TARGETS) $(COPY_LIBS_TO_BIN) $(COPY_LIBS_TO_LIB) \ + $(COPY_INCLUDE) $(COPY_CMDS) $(COPY_CONF) $(LINK_LIBS_TO_LIB) +endif diff --git a/make/common/JdkNativeCompilation.gmk b/make/common/JdkNativeCompilation.gmk index bf09d4875e5..c1c0a4323cd 100644 --- a/make/common/JdkNativeCompilation.gmk +++ b/make/common/JdkNativeCompilation.gmk @@ -47,6 +47,29 @@ FindSrcDirsForComponent += \ $(TOPDIR)/src/$(strip $1)/$(OPENJDK_TARGET_OS_TYPE)/native/$(strip $2) \ $(TOPDIR)/src/$(strip $1)/share/native/$(strip $2))) +# Find a library +# Param 1 - module name +# Param 2 - library name +# Param 3 - optional subdir for library +FindLib = \ + $(call FindLibDirForModule, \ + $(strip $1))$(strip $3)/$(LIBRARY_PREFIX)$(strip $2)$(SHARED_LIBRARY_SUFFIX) + +# Find a static library +# Param 1 - module name +# Param 2 - library name +# Param 3 - optional subdir for library +FindStaticLib = \ + $(addprefix $(SUPPORT_OUTPUTDIR)/native/, \ + $(strip $1)$(strip $3)/$(LIBRARY_PREFIX)$(strip $2)$(STATIC_LIBRARY_SUFFIX)) + +# If only generating compile_commands.json, make these return empty to avoid +# declaring dependencies. +ifeq ($(GENERATE_COMPILE_COMMANDS_ONLY), true) + FindLib = + FindStaticLib = +endif + GetJavaHeaderDir = \ $(wildcard $(SUPPORT_OUTPUTDIR)/headers/$(strip $1)) diff --git a/make/common/NativeCompilation.gmk b/make/common/NativeCompilation.gmk index f90022ce2ff..7b409256870 100644 --- a/make/common/NativeCompilation.gmk +++ b/make/common/NativeCompilation.gmk @@ -59,6 +59,29 @@ define GetSymbols fi endef +################################################################################ +# Creates a recipe that creates a compile_commands.json fragment. Remove any +# occurences of FIXPATH programs from the command to show the actual invocation. +# +# Param 1: Name of file to create +# Param 2: Working directory +# Param 3: Source file +# Param 4: Compile command +# Param 5: Object name +################################################################################ +define WriteCompileCommandsFragment + $(call LogInfo, Creating compile commands fragment for $(notdir $3)) + $(call MakeDir, $(dir $1)) + $(call WriteFile,{ \ + "directory": "$(strip $2)"$(COMMA) \ + "file": "$(strip $3)"$(COMMA) \ + "command": "$(strip $(subst $(DQUOTE),\$(DQUOTE),$(subst \,\\,\ + $(subst $(FIXPATH),,$4))))"$(COMMA) \ + "output": "$(strip $5)" \ + }$(COMMA), \ + $1) +endef + ################################################################################ # Define a native toolchain configuration that can be used by # SetupNativeCompilation calls @@ -203,6 +226,11 @@ define SetupCompileNativeFileBody $1_OBJ := $$($$($1_BASE)_OBJECT_DIR)/$$(call replace_with_obj_extension, \ $$($1_FILENAME)) + # Generate the corresponding compile_commands.json fragment. + $1_OBJ_JSON = $$(MAKESUPPORT_OUTPUTDIR)/compile-commands/$$(subst /,_,$$(subst \ + $$(OUTPUTDIR)/,,$$($1_OBJ))).json + $$($1_BASE)_ALL_OBJS_JSON += $$($1_OBJ_JSON) + # Only continue if this object file hasn't been processed already. This lets # the first found source file override any other with the same name. ifeq ($$(findstring $$($1_OBJ), $$($$($1_BASE)_OBJS_SO_FAR)), ) @@ -297,8 +325,15 @@ define SetupCompileNativeFileBody $1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, $$($1_OBJ).vardeps) endif - $$($1_OBJ): $$($1_SRC_FILE) $$($$($1_BASE)_COMPILE_VARDEPS_FILE) \ - $$($$($1_BASE)_EXTRA_DEPS) $$($1_VARDEPS_FILE) | $$($$($1_BASE)_BUILD_INFO) + $1_OBJ_DEPS := $$($1_SRC_FILE) $$($$($1_BASE)_COMPILE_VARDEPS_FILE) \ + $$($$($1_BASE)_EXTRA_DEPS) $$($1_VARDEPS_FILE) + $1_COMPILE_OPTIONS := $$($1_FLAGS) $(CC_OUT_OPTION)$$($1_OBJ) $$($1_SRC_FILE) + + $$($1_OBJ_JSON): $$($1_OBJ_DEPS) + $$(call WriteCompileCommandsFragment, $$@, $$(PWD), $$($1_SRC_FILE), \ + $$($1_COMPILER) $$($1_COMPILE_OPTIONS), $$($1_OBJ)) + + $$($1_OBJ): $$($1_OBJ_DEPS) | $$($$($1_BASE)_BUILD_INFO) $$(call LogInfo, Compiling $$($1_FILENAME) (for $$($$($1_BASE)_BASENAME))) $$(call MakeDir, $$(@D)) ifneq ($(TOOLCHAIN_TYPE), microsoft) @@ -307,13 +342,11 @@ define SetupCompileNativeFileBody # object file in the generated deps files. Fixing it with sed. If # compiling assembly, don't try this. $$(call ExecuteWithLog, $$@, \ - $$($1_COMPILER) $$($1_FLAGS) $$($1_DEP_FLAG) $$($1_DEP).tmp \ - $(CC_OUT_OPTION)$$($1_OBJ) $$($1_SRC_FILE)) + $$($1_COMPILER) $$($1_DEP_FLAG) $$($1_DEP).tmp $$($1_COMPILE_OPTIONS)) $(SED) 's|^$$(@F):|$$@:|' $$($1_DEP).tmp > $$($1_DEP) else $$(call ExecuteWithLog, $$@, \ - $$($1_COMPILER) $$($1_FLAGS) $$($1_DEP_FLAG) $$($1_DEP) \ - $(CC_OUT_OPTION)$$($1_OBJ) $$($1_SRC_FILE)) + $$($1_COMPILER) $$($1_DEP_FLAG) $$($1_DEP) $$($1_COMPILE_OPTIONS)) endif # Create a dependency target file from the dependency file. # Solution suggested by http://make.mad-scientist.net/papers/advanced-auto-dependency-generation/ @@ -329,8 +362,7 @@ define SetupCompileNativeFileBody # on Windows. No need to save exit code from compilation since # pipefail is always active on Windows. $$(call ExecuteWithLog, $$@, \ - $$($1_COMPILER) $$($1_FLAGS) -showIncludes \ - $(CC_OUT_OPTION)$$($1_OBJ) $$($1_SRC_FILE)) \ + $$($1_COMPILER) -showIncludes $$($1_COMPILE_OPTIONS)) \ | $(TR) -d '\r' | $(GREP) -v -e "^Note: including file:" \ -e "^$$($1_FILENAME)$$$$" || test "$$$$?" = "1" ; \ $(ECHO) $$@: \\ > $$($1_DEP) ; \ @@ -694,17 +726,25 @@ define SetupNativeCompilationBody -include $$($1_PCH_DEP) -include $$($1_PCH_DEP_TARGETS) + $1_PCH_COMMAND := $$($1_CC) $$($1_CFLAGS) $$($1_EXTRA_CFLAGS) $$($1_SYSROOT_CFLAGS) \ + $$($1_OPT_CFLAGS) -x c++-header -c $(C_FLAG_DEPS) $$($1_PCH_DEP) + $$($1_PCH_FILE): $$($1_PRECOMPILED_HEADER) $$($1_COMPILE_VARDEPS_FILE) $$(call LogInfo, Generating precompiled header) $$(call MakeDir, $$(@D)) - $$(call ExecuteWithLog, $$@, \ - $$($1_CC) $$($1_CFLAGS) $$($1_EXTRA_CFLAGS) $$($1_SYSROOT_CFLAGS) \ - $$($1_OPT_CFLAGS) \ - -x c++-header -c $(C_FLAG_DEPS) $$($1_PCH_DEP) $$< -o $$@) + $$(call ExecuteWithLog, $$@, $$($1_PCH_COMMAND) $$< -o $$@) $(SED) $(DEPENDENCY_TARGET_SED_PATTERN) $$($1_PCH_DEP) > $$($1_PCH_DEP_TARGETS) $$($1_ALL_OBJS): $$($1_PCH_FILE) + # Generate the corresponding compile_commands.json fragment. + $1_PCH_FILE_JSON := $$(MAKESUPPORT_OUTPUTDIR)/compile-commands/$$(subst /,_,$$(subst \ + $$(OUTPUTDIR)/,,$$($1_PCH_FILE))).json + $1_ALL_OBJS_JSON += $$($1_PCH_FILE_JSON) + + $$($1_PCH_FILE_JSON): $$($1_PRECOMPILED_HEADER) $$($1_COMPILE_VARDEPS_FILE) + $$(call WriteCompileCommandsFragment, $$@, $$(PWD), $$<, \ + $$($1_PCH_COMMAND) $$< -o $$($1_PCH_FILE), $$($1_PCH_FILE)) endif endif endif @@ -1025,6 +1065,10 @@ define SetupNativeCompilationBody endif endif endif + + ifeq ($(GENERATE_COMPILE_COMMANDS_ONLY), true) + $1 := $$($1_ALL_OBJS_JSON) + endif endef endif # _NATIVE_COMPILATION_GMK diff --git a/make/conf/jib-profiles.js b/make/conf/jib-profiles.js index 916c46cc6ec..a3285c234fb 100644 --- a/make/conf/jib-profiles.js +++ b/make/conf/jib-profiles.js @@ -522,7 +522,7 @@ var getJibProfilesProfiles = function (input, common, data) { .forEach(function (name) { var maketestName = name + "-testmake"; profiles[maketestName] = concatObjects(profiles[name], testmakeBase); - profiles[maketestName].default_make_targets = [ "test-make" ]; + profiles[maketestName].default_make_targets = [ "test-make", "test-compile-commands" ]; }); // Profiles for building the zero jvm variant. These are used for verification. diff --git a/make/hotspot/lib/CompileJvm.gmk b/make/hotspot/lib/CompileJvm.gmk index 002db8f6c73..45c30e9a3c1 100644 --- a/make/hotspot/lib/CompileJvm.gmk +++ b/make/hotspot/lib/CompileJvm.gmk @@ -214,15 +214,17 @@ VM_VERSION_OBJ := $(JVM_OUTPUTDIR)/objs/vm_version$(OBJ_SUFFIX) $(VM_VERSION_OBJ): $(filter-out $(VM_VERSION_OBJ) $(JVM_MAPFILE), \ $(BUILD_LIBJVM_TARGET_DEPS)) -ifeq ($(OPENJDK_TARGET_OS), windows) - # It doesn't matter which jvm.lib file gets exported, but we need - # to pick just one. - ifeq ($(JVM_VARIANT), $(JVM_VARIANT_MAIN)) - $(eval $(call SetupCopyFiles, COPY_JVM_LIB, \ - DEST := $(LIB_OUTPUTDIR), \ - FILES :=$(BUILD_LIBJVM_IMPORT_LIBRARY), \ - )) - TARGETS += $(COPY_JVM_LIB) +ifneq ($(GENERATE_COMPILE_COMMANDS_ONLY), true) + ifeq ($(OPENJDK_TARGET_OS), windows) + # It doesn't matter which jvm.lib file gets exported, but we need + # to pick just one. + ifeq ($(JVM_VARIANT), $(JVM_VARIANT_MAIN)) + $(eval $(call SetupCopyFiles, COPY_JVM_LIB, \ + DEST := $(LIB_OUTPUTDIR), \ + FILES :=$(BUILD_LIBJVM_IMPORT_LIBRARY), \ + )) + TARGETS += $(COPY_JVM_LIB) + endif endif endif @@ -261,44 +263,46 @@ TARGETS += $(BUILD_LIBJVM) # Search the output for the operator(s) of interest, to see where they are # referenced. -ifneq ($(filter $(TOOLCHAIN_TYPE), gcc clang solstudio), ) +ifneq ($(GENERATE_COMPILE_COMMANDS_ONLY), true) + ifneq ($(filter $(TOOLCHAIN_TYPE), gcc clang solstudio), ) - DEMANGLED_REGEXP := [^:]operator (new|delete) + DEMANGLED_REGEXP := [^:]operator (new|delete) - # Running c++filt to find offending symbols in all files is too expensive, - # especially on Solaris, so use mangled names when looking for symbols. - # Save the demangling for when something is actually found. - ifeq ($(TOOLCHAIN_TYPE), solstudio) - MANGLED_SYMS := \ - __1c2n6FL_pv_ \ - __1c2N6FL_pv_ \ - __1c2k6Fpv_v_ \ - __1c2K6Fpv_v_ \ - # - UNDEF_PATTERN := UNDEF - else - MANGLED_SYMS := \ - _ZdaPv \ - _ZdlPv \ - _Znam \ - _Znwm \ - # - UNDEF_PATTERN := ' U ' + # Running c++filt to find offending symbols in all files is too expensive, + # especially on Solaris, so use mangled names when looking for symbols. + # Save the demangling for when something is actually found. + ifeq ($(TOOLCHAIN_TYPE), solstudio) + MANGLED_SYMS := \ + __1c2n6FL_pv_ \ + __1c2N6FL_pv_ \ + __1c2k6Fpv_v_ \ + __1c2K6Fpv_v_ \ + # + UNDEF_PATTERN := UNDEF + else + MANGLED_SYMS := \ + _ZdaPv \ + _ZdlPv \ + _Znam \ + _Znwm \ + # + UNDEF_PATTERN := ' U ' + endif + + define SetupOperatorNewDeleteCheck + $1.op_check: $1 + if [ -n "`$(NM) $$< | $(GREP) $(addprefix -e , $(MANGLED_SYMS)) \ + | $(GREP) $(UNDEF_PATTERN)`" ]; then \ + $(ECHO) "$$<: Error: Use of global operators new and delete is not allowed in Hotspot:"; \ + $(NM) $$< | $(CXXFILT) | $(EGREP) '$(DEMANGLED_REGEXP)' | $(GREP) $(UNDEF_PATTERN); \ + $(ECHO) "See: $(TOPDIR)/make/hotspot/lib/CompileJvm.gmk"; \ + exit 1; \ + fi + $(TOUCH) $$@ + + TARGETS += $1.op_check + endef + + $(foreach o, $(BUILD_LIBJVM_ALL_OBJS), $(eval $(call SetupOperatorNewDeleteCheck,$o))) endif - - define SetupOperatorNewDeleteCheck - $1.op_check: $1 - if [ -n "`$(NM) $$< | $(GREP) $(addprefix -e , $(MANGLED_SYMS)) \ - | $(GREP) $(UNDEF_PATTERN)`" ]; then \ - $(ECHO) "$$<: Error: Use of global operators new and delete is not allowed in Hotspot:"; \ - $(NM) $$< | $(CXXFILT) | $(EGREP) '$(DEMANGLED_REGEXP)' | $(GREP) $(UNDEF_PATTERN); \ - $(ECHO) "See: $(TOPDIR)/make/hotspot/lib/CompileJvm.gmk"; \ - exit 1; \ - fi - $(TOUCH) $$@ - - TARGETS += $1.op_check - endef - - $(foreach o, $(BUILD_LIBJVM_ALL_OBJS), $(eval $(call SetupOperatorNewDeleteCheck,$o))) endif diff --git a/make/launcher/Launcher-jdk.pack.gmk b/make/launcher/Launcher-jdk.pack.gmk index 75879d3eeb3..122aece5a86 100644 --- a/make/launcher/Launcher-jdk.pack.gmk +++ b/make/launcher/Launcher-jdk.pack.gmk @@ -91,21 +91,15 @@ $(eval $(call SetupJdkExecutable, BUILD_UNPACKEXE, \ CFLAGS_solaris := -KPIC, \ CFLAGS_macosx := -fPIC, \ DISABLED_WARNINGS_clang := format-nonliteral, \ - LDFLAGS := $(UNPACKEXE_ZIPOBJS) \ - $(LDFLAGS_JDKEXE) $(LDFLAGS_CXX_JDK) \ + LDFLAGS := $(LDFLAGS_JDKEXE) $(LDFLAGS_CXX_JDK) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ LIBS := $(UNPACKEXE_LIBS) $(LIBCXX), \ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/unpackexe, \ MANIFEST := $(TOPDIR)/src/jdk.pack/windows/native/unpack200/unpack200_proto.exe.manifest, \ MANIFEST_VERSION := $(VERSION_NUMBER_FOUR_POSITIONS), \ + EXTRA_OBJECT_FILES := $(UNPACKEXE_ZIPOBJS) \ )) -ifneq ($(USE_EXTERNAL_LIBZ), true) - - $(BUILD_UNPACKEXE): $(UNPACKEXE_ZIPOBJS) - -endif - TARGETS += $(BUILD_UNPACKEXE) ################################################################################ diff --git a/make/launcher/LauncherCommon.gmk b/make/launcher/LauncherCommon.gmk index 27afc85ecf2..294dd1770d2 100644 --- a/make/launcher/LauncherCommon.gmk +++ b/make/launcher/LauncherCommon.gmk @@ -135,7 +135,7 @@ define SetupBuildLauncherBody $1_LIBS += -lz endif - $1_WINDOWS_JLI_LIB := $(SUPPORT_OUTPUTDIR)/native/java.base/libjli/jli.lib + $1_WINDOWS_JLI_LIB := $(call FindStaticLib, java.base, jli, /libjli) $$(eval $$(call SetupJdkExecutable, BUILD_LAUNCHER_$1, \ NAME := $1, \ @@ -181,11 +181,11 @@ define SetupBuildLauncherBody TARGETS += $$($1) ifeq ($(OPENJDK_TARGET_OS), aix) - $$(BUILD_LAUNCHER_$1): $(SUPPORT_OUTPUTDIR)/native/java.base/libjli_static.a + $$(BUILD_LAUNCHER_$1): $(call FindStaticLib, java.base, jli_static) endif ifeq ($(OPENJDK_TARGET_OS), windows) - $$(BUILD_LAUNCHER_$1): $(SUPPORT_OUTPUTDIR)/native/java.base/libjava/java.lib \ + $$(BUILD_LAUNCHER_$1): $(call FindStaticLib, java.base, java, /libjava) \ $$($1_WINDOWS_JLI_LIB) endif endef diff --git a/make/lib/Awt2dLibraries.gmk b/make/lib/Awt2dLibraries.gmk index 8ee27deafd7..3592d9e8c36 100644 --- a/make/lib/Awt2dLibraries.gmk +++ b/make/lib/Awt2dLibraries.gmk @@ -739,11 +739,11 @@ else # OPENJDK_TARGET_OS not windows ifeq ($(ENABLE_HEADLESS_ONLY), false) $(BUILD_LIBJAWT): $(BUILD_LIBAWT_XAWT) else - $(BUILD_LIBJAWT): $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)awt_headless$(SHARED_LIBRARY_SUFFIX) + $(BUILD_LIBJAWT): $(call FindLib, $(MODULE), awt_headless) endif ifeq ($(OPENJDK_TARGET_OS), macosx) - $(BUILD_LIBJAWT): $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)awt_lwawt$(SHARED_LIBRARY_SUFFIX) + $(BUILD_LIBJAWT): $(call FindLib, $(MODULE), awt_lwawt) endif endif # OPENJDK_TARGET_OS diff --git a/make/lib/Lib-jdk.accessibility.gmk b/make/lib/Lib-jdk.accessibility.gmk index fbe2f8fc6b6..d95ca62d85d 100644 --- a/make/lib/Lib-jdk.accessibility.gmk +++ b/make/lib/Lib-jdk.accessibility.gmk @@ -55,7 +55,7 @@ ifeq ($(OPENJDK_TARGET_OS), windows) VERSIONINFO_RESOURCE := $(ROOT_SRCDIR)/common/AccessBridgeStatusWindow.rc, \ ) - $$(BUILD_JAVAACCESSBRIDGE$1): $(SUPPORT_OUTPUTDIR)/native/java.desktop/libjawt/jawt.lib + $$(BUILD_JAVAACCESSBRIDGE$1): $(call FindStaticLib, java.desktop, jawt, /libjawt) TARGETS += $$(BUILD_JAVAACCESSBRIDGE$1) endef diff --git a/make/lib/LibCommon.gmk b/make/lib/LibCommon.gmk index 3af84454c90..00b19a4d815 100644 --- a/make/lib/LibCommon.gmk +++ b/make/lib/LibCommon.gmk @@ -61,24 +61,6 @@ else ifeq ($(TOOLCHAIN_TYPE), xlc) endif endif -################################################################################ -# Find a library -# Param 1 - module name -# Param 2 - library name -# Param 3 - optional subdir for library -FindLib = \ - $(call FindLibDirForModule, \ - $(strip $1))$(strip $3)/$(LIBRARY_PREFIX)$(strip $2)$(SHARED_LIBRARY_SUFFIX) - -################################################################################ -# Find a static library -# Param 1 - module name -# Param 2 - library name -# Param 3 - optional subdir for library -FindStaticLib = \ - $(addprefix $(SUPPORT_OUTPUTDIR)/native/, \ - $(strip $1)$(strip $3)/$(LIBRARY_PREFIX)$(strip $2)$(STATIC_LIBRARY_SUFFIX)) - # Put the libraries here. INSTALL_LIBRARIES_HERE := $(call FindLibDirForModule, $(MODULE)) diff --git a/test/make/TestCompileCommands.gmk b/test/make/TestCompileCommands.gmk new file mode 100644 index 00000000000..d79805c4b0e --- /dev/null +++ b/test/make/TestCompileCommands.gmk @@ -0,0 +1,54 @@ + +# Copyright (c) 2018, 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. +# + +include $(SPEC) +include MakeBase.gmk + +default: all + +COMPILE_COMMANDS := $(OUTPUTDIR)/compile_commands.json + +# Perform basic compile_commands.json validation: +# - should start with [ and end with ] +# - should contain at least one entry (opening {) +# - last entry should not have a trailing comma (end with }) +verify-compile-commands-json: + $(HEAD) -n 1 $(COMPILE_COMMANDS) | $(GREP) -q -e "^\[$$" + $(TAIL) -1 $(COMPILE_COMMANDS) | $(GREP) -q -e "^\]$$" + $(HEAD) -n 2 $(COMPILE_COMMANDS) | $(GREP) -q -e "{" + $(TAIL) -2 $(COMPILE_COMMANDS) | $(GREP) -q -e "}$$" + +# Ensure that no native shared library for hotspot was created during the +# build. Checking hotspot only since on Windows the jdk folders are prepopulated +# with CRT DLLs. Also note that this test requires a clean build folder. +verify-no-shared-libraries: + $(FIND) $(OUTPUTDIR)/hotspot -type f -name "*$(SHARED_LIBRARY_SUFFIX)" \ + -exec false {} + + +TEST_TARGETS += verify-compile-commands-json verify-no-shared-libraries + +all: $(TEST_TARGETS) + +.PHONY: default all verify-compile-commands diff --git a/test/make/TestMake.gmk b/test/make/TestMake.gmk index 258dcd56484..f274f7c2ea2 100644 --- a/test/make/TestMake.gmk +++ b/test/make/TestMake.gmk @@ -39,7 +39,10 @@ copy-files: test-idea: +$(MAKE) -f TestIdea.gmk $(TEST_SUBTARGET) +test-compile-commands: + +$(MAKE) -f TestCompileCommands.gmk $(TEST_SUBTARGET) + all: make-base java-compilation copy-files test-idea -.PHONY: default all make-base java-compilation copy-files test-idea +.PHONY: default all make-base java-compilation copy-files test-idea test-compile-commands From e8f90125d2d22927be546333034f194775b3b03f Mon Sep 17 00:00:00 2001 From: Michael McMahon Date: Fri, 5 Oct 2018 11:28:23 +0100 Subject: [PATCH 013/124] 8211420: com.sun.net.httpserver.HttpServer returns Content-length header for 204 response code Reviewed-by: chegar --- .../sun/net/httpserver/ExchangeImpl.java | 8 +- .../com/sun/net/httpserver/bugs/B8211420.java | 108 ++++++++++++++++++ 2 files changed, 115 insertions(+), 1 deletion(-) create mode 100644 test/jdk/com/sun/net/httpserver/bugs/B8211420.java diff --git a/src/jdk.httpserver/share/classes/sun/net/httpserver/ExchangeImpl.java b/src/jdk.httpserver/share/classes/sun/net/httpserver/ExchangeImpl.java index 3341595f168..6d1230a54e0 100644 --- a/src/jdk.httpserver/share/classes/sun/net/httpserver/ExchangeImpl.java +++ b/src/jdk.httpserver/share/classes/sun/net/httpserver/ExchangeImpl.java @@ -210,6 +210,7 @@ class ExchangeImpl { PlaceholderOutputStream o = getPlaceholderResponseBody(); tmpout.write (bytes(statusLine, 0), 0, statusLine.length()); boolean noContentToSend = false; // assume there is content + boolean noContentLengthHeader = false; // must not send Content-length is set rspHdrs.set ("Date", dateFormat.get().format (new Date())); /* check for response type that is not allowed to send a body */ @@ -225,6 +226,7 @@ class ExchangeImpl { logger.log (Level.WARNING, msg); } contentLen = -1; + noContentLengthHeader = (rCode != 304); } if (isHeadRequest() || rCode == 304) { @@ -253,7 +255,11 @@ class ExchangeImpl { noContentToSend = true; contentLen = 0; } - rspHdrs.set("Content-length", Long.toString(contentLen)); + if (noContentLengthHeader) { + rspHdrs.remove("Content-length"); + } else { + rspHdrs.set("Content-length", Long.toString(contentLen)); + } o.setWrappedStream (new FixedLengthOutputStream (this, ros, contentLen)); } } diff --git a/test/jdk/com/sun/net/httpserver/bugs/B8211420.java b/test/jdk/com/sun/net/httpserver/bugs/B8211420.java new file mode 100644 index 00000000000..3a358592648 --- /dev/null +++ b/test/jdk/com/sun/net/httpserver/bugs/B8211420.java @@ -0,0 +1,108 @@ +/* + * Copyright (c) 2018, 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. + * + * 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 8211420 + * @run main/othervm B8211420 + * @summary + */ + +import com.sun.net.httpserver.*; + +import java.util.*; +import java.util.concurrent.*; +import java.util.logging.*; +import java.io.*; +import java.net.*; + +public class B8211420 { + + public static void main (String[] args) throws Exception { + Logger logger = Logger.getLogger ("com.sun.net.httpserver"); + ConsoleHandler c = new ConsoleHandler(); + c.setLevel (Level.WARNING); + logger.addHandler (c); + logger.setLevel (Level.WARNING); + Handler handler = new Handler(); + InetSocketAddress addr = new InetSocketAddress (0); + HttpServer server = HttpServer.create (addr, 0); + HttpContext ctx = server.createContext ("/test", handler); + ExecutorService executor = Executors.newCachedThreadPool(); + server.setExecutor (executor); + server.start (); + + URL url = new URL ("http://localhost:"+server.getAddress().getPort()+"/test/foo.html"); + HttpURLConnection urlc = (HttpURLConnection)url.openConnection (); + try { + InputStream is = urlc.getInputStream(); + while (is.read()!= -1) ; + is.close (); + String prop = urlc.getHeaderField("Content-length"); + System.out.println ("Content-length = " + prop + " should be null"); + if (prop != null) + throw new RuntimeException("Content-length was present"); + + urlc = (HttpURLConnection)url.openConnection(); + is = urlc.getInputStream(); + while (is.read()!= -1) ; + is.close (); + if (urlc.getResponseCode() != 304) // expected for 2nd test + throw new RuntimeException("wrong response code"); + String clen = urlc.getHeaderField("Content-length"); + System.out.println ("Content-length = " + clen + " should be 99"); + System.out.println ("len = " + clen.length()); + if (clen == null || !clen.equals("99")) + throw new RuntimeException("Content-length not present or has wrong value"); + System.out.println ("OK"); + } finally { + server.stop(2); + executor.shutdown(); + } + } + + public static boolean error = false; + + static class Handler implements HttpHandler { + volatile int invocation = 1; + public void handle (HttpExchange t) + throws IOException + { + InputStream is = t.getRequestBody(); + Headers map = t.getRequestHeaders(); + Headers rmap = t.getResponseHeaders(); + while (is.read () != -1) ; + is.close(); + if (invocation++ == 1) { + // send a 204 response with no body + t.sendResponseHeaders(204, -1); + t.close(); + } else { + // send a 304 response with no body but with content - length + rmap.add("Content-length", "99"); + t.sendResponseHeaders(304, -1); + t.close(); + } + } + } +} From d872314ef3f9a9c3fdea88d097867599c8e08494 Mon Sep 17 00:00:00 2001 From: Harold Seigel Date: Fri, 5 Oct 2018 08:50:49 -0400 Subject: [PATCH 014/124] 8211438: [Testbug] runtime/XCheckJniJsig/XCheckJSig.java looks for libjsig in wrong location Remove the os_arch string and JRE path from the test. Also add JNIEXPORT to libjsig symbols so dlsym can find them Reviewed-by: dholmes, lfoltan --- src/java.base/unix/native/libjsig/jsig.c | 6 +++--- test/hotspot/jtreg/ProblemList.txt | 1 - .../jtreg/runtime/XCheckJniJsig/XCheckJSig.java | 14 +++----------- 3 files changed, 6 insertions(+), 15 deletions(-) diff --git a/src/java.base/unix/native/libjsig/jsig.c b/src/java.base/unix/native/libjsig/jsig.c index 86d619f98bb..3578b99bb6c 100644 --- a/src/java.base/unix/native/libjsig/jsig.c +++ b/src/java.base/unix/native/libjsig/jsig.c @@ -312,7 +312,7 @@ JNIEXPORT int sigaction(int sig, const struct sigaction *act, struct sigaction * } /* The three functions for the jvm to call into. */ -void JVM_begin_signal_setting() { +JNIEXPORT void JVM_begin_signal_setting() { signal_lock(); sigemptyset(&jvmsigs); jvm_signal_installing = true; @@ -320,7 +320,7 @@ void JVM_begin_signal_setting() { signal_unlock(); } -void JVM_end_signal_setting() { +JNIEXPORT void JVM_end_signal_setting() { signal_lock(); jvm_signal_installed = true; jvm_signal_installing = false; @@ -328,7 +328,7 @@ void JVM_end_signal_setting() { signal_unlock(); } -struct sigaction *JVM_get_signal_action(int sig) { +JNIEXPORT struct sigaction *JVM_get_signal_action(int sig) { allocate_sact(); /* Does race condition make sense here? */ if (sigismember(&jvmsigs, sig)) { diff --git a/test/hotspot/jtreg/ProblemList.txt b/test/hotspot/jtreg/ProblemList.txt index 8d7c33a0af7..a9014d2c266 100644 --- a/test/hotspot/jtreg/ProblemList.txt +++ b/test/hotspot/jtreg/ProblemList.txt @@ -84,7 +84,6 @@ runtime/appcds/javaldr/GCDuringDump.java 8208778 macosx-x64 runtime/CompressedOops/UseCompressedOops.java 8079353 generic-all runtime/RedefineTests/RedefineRunningMethods.java 8208778 macosx-x64 runtime/SharedArchiveFile/SASymbolTableTest.java 8193639 solaris-all -runtime/XCheckJniJsig/XCheckJSig.java 8211084 macosx-x64 ############################################################################# diff --git a/test/hotspot/jtreg/runtime/XCheckJniJsig/XCheckJSig.java b/test/hotspot/jtreg/runtime/XCheckJniJsig/XCheckJSig.java index df40afd548c..830d226515c 100644 --- a/test/hotspot/jtreg/runtime/XCheckJniJsig/XCheckJSig.java +++ b/test/hotspot/jtreg/runtime/XCheckJniJsig/XCheckJSig.java @@ -44,29 +44,21 @@ public class XCheckJSig { System.out.println("Regression test for bugs 7051189 and 8023393"); String jdk_path = System.getProperty("test.jdk"); - String os_arch = Platform.getOsArch(); String libjsig; String env_var; if (Platform.isOSX()) { env_var = "DYLD_INSERT_LIBRARIES"; - libjsig = jdk_path + "/jre/lib/libjsig.dylib"; // jdk location - if (!(new File(libjsig).exists())) { - libjsig = jdk_path + "/lib/libjsig.dylib"; // jre location - } + libjsig = jdk_path + "/lib/libjsig.dylib"; // jre location } else { env_var = "LD_PRELOAD"; - libjsig = jdk_path + "/jre/lib/" + os_arch + "/libjsig.so"; // jdk location - if (!(new File(libjsig).exists())) { - libjsig = jdk_path + "/lib/" + os_arch + "/libjsig.so"; // jre location - } + libjsig = jdk_path + "/lib/libjsig.so"; // jre location } // If this test fails, these might be useful to know. System.out.println("libjsig: " + libjsig); - System.out.println("osArch: " + os_arch); // Make sure the libjsig file exists. if (!(new File(libjsig).exists())) { - throw new jtreg.SkippedException("File " + libjsig + " not found"); + throw new RuntimeException("File libjsig not found, path: " + libjsig); } ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-Xcheck:jni", "-version"); From 432605be5cd1cf89eba38ff023515df9e6116351 Mon Sep 17 00:00:00 2001 From: Coleen Phillimore Date: Fri, 5 Oct 2018 09:15:52 -0400 Subject: [PATCH 015/124] 8209889: RedefineStress tests crash Create CompileTaskWrapper before potential safepoint Reviewed-by: mdoerr, dlong --- src/hotspot/share/compiler/compileBroker.cpp | 45 ++++++++++---------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/src/hotspot/share/compiler/compileBroker.cpp b/src/hotspot/share/compiler/compileBroker.cpp index 619a9f1e002..861972e5bc9 100644 --- a/src/hotspot/share/compiler/compileBroker.cpp +++ b/src/hotspot/share/compiler/compileBroker.cpp @@ -1781,30 +1781,31 @@ void CompileBroker::compiler_thread_loop() { return; // Stop this thread. } } - continue; - } + } else { + // Assign the task to the current thread. Mark this compilation + // thread as active for the profiler. + // CompileTaskWrapper also keeps the Method* from being deallocated if redefinition + // occurs after fetching the compile task off the queue. + CompileTaskWrapper ctw(task); + nmethodLocker result_handle; // (handle for the nmethod produced by this task) + task->set_code_handle(&result_handle); + methodHandle method(thread, task->method()); - if (UseDynamicNumberOfCompilerThreads) { - possibly_add_compiler_threads(); - } + // Never compile a method if breakpoints are present in it + if (method()->number_of_breakpoints() == 0) { + // Compile the method. + if ((UseCompiler || AlwaysCompileLoopMethods) && CompileBroker::should_compile_new_jobs()) { + invoke_compiler_on_method(task); + thread->start_idle_timer(); + } else { + // After compilation is disabled, remove remaining methods from queue + method->clear_queued_for_compilation(); + task->set_failure_reason("compilation is disabled"); + } + } - // Assign the task to the current thread. Mark this compilation - // thread as active for the profiler. - CompileTaskWrapper ctw(task); - nmethodLocker result_handle; // (handle for the nmethod produced by this task) - task->set_code_handle(&result_handle); - methodHandle method(thread, task->method()); - - // Never compile a method if breakpoints are present in it - if (method()->number_of_breakpoints() == 0) { - // Compile the method. - if ((UseCompiler || AlwaysCompileLoopMethods) && CompileBroker::should_compile_new_jobs()) { - invoke_compiler_on_method(task); - thread->start_idle_timer(); - } else { - // After compilation is disabled, remove remaining methods from queue - method->clear_queued_for_compilation(); - task->set_failure_reason("compilation is disabled"); + if (UseDynamicNumberOfCompilerThreads) { + possibly_add_compiler_threads(); } } } From cd95f5a933a13212fd27adba79c31d7dfccadb2e Mon Sep 17 00:00:00 2001 From: Kim Barrett Date: Fri, 5 Oct 2018 14:28:44 -0400 Subject: [PATCH 016/124] 8211296: Remove HotSpot deprecation warning suppression for Mac/clang Removed deprecation warning suppression, fixed uses of deprecated functions. Reviewed-by: dholmes, mikael --- make/hotspot/lib/CompileJvm.gmk | 2 +- src/hotspot/os/bsd/os_bsd.cpp | 10 ---------- src/hotspot/share/utilities/globalDefinitions_gcc.hpp | 4 ++-- 3 files changed, 3 insertions(+), 13 deletions(-) diff --git a/make/hotspot/lib/CompileJvm.gmk b/make/hotspot/lib/CompileJvm.gmk index 45c30e9a3c1..a520621f3c2 100644 --- a/make/hotspot/lib/CompileJvm.gmk +++ b/make/hotspot/lib/CompileJvm.gmk @@ -92,7 +92,7 @@ ifeq ($(call check-jvm-feature, zero), true) DISABLED_WARNINGS_gcc += return-type switch endif -DISABLED_WARNINGS_clang := tautological-compare deprecated-declarations \ +DISABLED_WARNINGS_clang := tautological-compare \ undefined-var-template sometimes-uninitialized unknown-pragmas \ delete-non-virtual-dtor missing-braces char-subscripts \ ignored-qualifiers missing-field-initializers mismatched-tags diff --git a/src/hotspot/os/bsd/os_bsd.cpp b/src/hotspot/os/bsd/os_bsd.cpp index 7879d2f2cc0..73dfc6f1ec6 100644 --- a/src/hotspot/os/bsd/os_bsd.cpp +++ b/src/hotspot/os/bsd/os_bsd.cpp @@ -3238,16 +3238,6 @@ void os::init(void) { Bsd::clock_init(); initial_time_count = javaTimeNanos(); -#ifdef __APPLE__ - // XXXDARWIN - // Work around the unaligned VM callbacks in hotspot's - // sharedRuntime. The callbacks don't use SSE2 instructions, and work on - // Linux, Solaris, and FreeBSD. On Mac OS X, dyld (rightly so) enforces - // alignment when doing symbol lookup. To work around this, we force early - // binding of all symbols now, thus binding when alignment is known-good. - _dyld_bind_fully_image_containing_address((const void *) &os::init); -#endif - os::Posix::init(); } diff --git a/src/hotspot/share/utilities/globalDefinitions_gcc.hpp b/src/hotspot/share/utilities/globalDefinitions_gcc.hpp index 7f7546b5a3a..c9031a8332f 100644 --- a/src/hotspot/share/utilities/globalDefinitions_gcc.hpp +++ b/src/hotspot/share/utilities/globalDefinitions_gcc.hpp @@ -218,8 +218,8 @@ inline int g_isnan(double f) { return isnan(f); } // Checking for finiteness -inline int g_isfinite(jfloat f) { return finite(f); } -inline int g_isfinite(jdouble f) { return finite(f); } +inline int g_isfinite(jfloat f) { return isfinite(f); } +inline int g_isfinite(jdouble f) { return isfinite(f); } // Wide characters From a87e8e52ea800b44eb801a9a3ccf2d3d7d72dd8c Mon Sep 17 00:00:00 2001 From: Jean Christophe Beyler Date: Fri, 5 Oct 2018 13:38:03 -0700 Subject: [PATCH 017/124] 8211123: GC Metaspace printing after full gc Move GC printing to after usage is calculated Co-authored-by: Jiapeng Li Reviewed-by: tschatzl, stuefe --- .../share/gc/shared/genCollectedHeap.cpp | 6 +- .../jtreg/gc/logging/TestMetaSpaceLog.java | 143 ++++++++++++++++++ test/hotspot/jtreg/gc/logging/testcases.jar | Bin 0 -> 18020 bytes 3 files changed, 146 insertions(+), 3 deletions(-) create mode 100644 test/hotspot/jtreg/gc/logging/TestMetaSpaceLog.java create mode 100644 test/hotspot/jtreg/gc/logging/testcases.jar diff --git a/src/hotspot/share/gc/shared/genCollectedHeap.cpp b/src/hotspot/share/gc/shared/genCollectedHeap.cpp index 71200926fb9..609c3b48eb0 100644 --- a/src/hotspot/share/gc/shared/genCollectedHeap.cpp +++ b/src/hotspot/share/gc/shared/genCollectedHeap.cpp @@ -649,9 +649,6 @@ void GenCollectedHeap::do_collection(bool full, // a whole heap collection. complete = complete || collected_old; - print_heap_change(young_prev_used, old_prev_used); - MetaspaceUtils::print_metaspace_change(metadata_prev_used); - // Adjust generation sizes. if (collected_old) { _old_gen->compute_new_size(); @@ -667,6 +664,9 @@ void GenCollectedHeap::do_collection(bool full, update_full_collections_completed(); } + print_heap_change(young_prev_used, old_prev_used); + MetaspaceUtils::print_metaspace_change(metadata_prev_used); + // Track memory usage and detect low memory after GC finishes MemoryService::track_memory_usage(); diff --git a/test/hotspot/jtreg/gc/logging/TestMetaSpaceLog.java b/test/hotspot/jtreg/gc/logging/TestMetaSpaceLog.java new file mode 100644 index 00000000000..4b967243b3e --- /dev/null +++ b/test/hotspot/jtreg/gc/logging/TestMetaSpaceLog.java @@ -0,0 +1,143 @@ +/* + * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, Google 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. + * + * 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. + */ + +import java.io.File; +import java.net.URL; +import java.net.URLClassLoader; +import java.util.List; +import java.util.function.Predicate; +import java.util.regex.Pattern; +import java.util.regex.Matcher; + +import jdk.test.lib.Asserts; +import jdk.test.lib.process.OutputAnalyzer; +import jdk.test.lib.process.ProcessTools; +import sun.hotspot.WhiteBox; + +/* + * @test TestMetaSpaceLog + * @bug 8211123 + * @summary Ensure that the Metaspace is updated in the log + * @requires vm.gc=="null" + * @key gc + * @library /test/lib + * @modules java.base/jdk.internal.misc + * java.management + * + * @compile TestMetaSpaceLog.java + * @run driver ClassFileInstaller sun.hotspot.WhiteBox + * @run main TestMetaSpaceLog + */ + +public class TestMetaSpaceLog { + private static Pattern metaSpaceRegexp; + + static { + // Do this once here. + metaSpaceRegexp = Pattern.compile(".*Metaspace: ([0-9]+).*->([0-9]+).*"); + } + + public static void main(String[] args) throws Exception { + testMetaSpaceUpdate("UseParallelGC"); + testMetaSpaceUpdate("UseG1GC"); + testMetaSpaceUpdate("UseConcMarkSweepGC"); + testMetaSpaceUpdate("UseSerialGC"); + } + + private static void verifyContainsMetaSpaceUpdate(OutputAnalyzer output) { + Predicate collectedMetaSpace = line -> check(line); + + // At least one metaspace line from GC should show GC being collected. + boolean foundCollectedMetaSpace = output.asLines().stream() + .filter(s -> s.contains("[gc,metaspace")) + .anyMatch(TestMetaSpaceLog::check); + Asserts.assertTrue(foundCollectedMetaSpace); + } + + private static boolean check(String line) { + Matcher m = metaSpaceRegexp.matcher(line); + Asserts.assertTrue(m.matches(), "Unexpected line for metaspace logging: " + line); + long before = Long.parseLong(m.group(1)); + long after = Long.parseLong(m.group(2)); + return before > after; + } + + private static void testMetaSpaceUpdate(String gcFlag) throws Exception { + // Propagate test.src for the jar file. + String testSrc= "-Dtest.src=" + System.getProperty("test.src", "."); + + System.err.println("Testing with GC Flag: " + gcFlag); + ProcessBuilder pb = + ProcessTools.createJavaProcessBuilder( + "-XX:+" + gcFlag, + "-Xlog:gc*", + "-Xbootclasspath/a:.", + "-XX:+UnlockDiagnosticVMOptions", + "-XX:+WhiteBoxAPI", + "-Xmx1000M", + "-Xms1000M", + testSrc, StressMetaSpace.class.getName()); + + OutputAnalyzer output = null; + try { + output = new OutputAnalyzer(pb.start()); + verifyContainsMetaSpaceUpdate(output); + } catch (Exception e) { + // For error diagnosis: print and throw. + e.printStackTrace(); + output.reportDiagnosticSummary(); + throw e; + } + } + + static class StressMetaSpace { + private static URL[] urls = new URL[1]; + + static { + try { + File jarFile = new File(System.getProperty("test.src") + "/testcases.jar"); + urls[0] = jarFile.toURI().toURL(); + } catch (Exception e) { + e.printStackTrace(); + } + } + + public static void main(String args[]) { + WhiteBox wb = WhiteBox.getWhiteBox(); + for(int i = 0; i < 10000; i++) { + loadClass(wb); + } + wb.fullGC(); + } + + public static void loadClass(WhiteBox wb) { + try { + URLClassLoader ucl = new URLClassLoader(urls); + Class.forName("case00", false, ucl); + } catch (Exception e) { + e.printStackTrace(); + } + } + } +} diff --git a/test/hotspot/jtreg/gc/logging/testcases.jar b/test/hotspot/jtreg/gc/logging/testcases.jar new file mode 100644 index 0000000000000000000000000000000000000000..5996133fe1ed2ca30a11f587abd28de4d6536f77 GIT binary patch literal 18020 zcmcIr30M_v2pD!~D1ty_7nEv5#IOYfMOj@+kwscTs4R+rprB|~ zumz#k-JsMD1O*lO+^SY_`CF|ZZPkkU&m=QAlVt3KCtrN>JgB^x_nw@4-gD16H#88C z*P+m8G>TfdoEHW2QliLHf_=liZ2Uvmv))~xPykA3pdtrENfGq0j-OMa0ynno3nusj;O#T$Br5A^;(qOI_?C-e^!FIDKL*y!|l zCet={MRa;P>#tS+^#DOI7BsX4d0jbsvv!4QGSr z9b0oPH2@XBIy5XTCiP$*)wIBKVa(#)IUzAo$4_sVzc49HslWu#9&n{|oX* z+$eQ<8EwIq1A``N1WXO&JPyldf z|7B{cqc8%jsj$*Zg{bC{+f}YIp{hWRDii_wvZIpuSA+rJ5`8E^3a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GN$$MX>> zFcr)e^QJBL9+HF0SQzHt>Ah=*dYJ;C4R zhu7!Oj}uVLeJkuIz}KU&*OB1x^Wk+C`Vo6sN)(B`9E3-%fR2a)Bof9%k=V;Rc%(jL z2LTevTSbxB%QJZ7SrmyRk)lZKWfnYg1%NygN!dh^*qbGIq%QPb3D_bjlqeE=(F2b> zha!>wnJ5x_?*flZQ9z!Fqz9r%>@^5H(f~w|h+c~#v9}WN$SwqlUYZa^Vs8oHk*gGi z&$J`(1nfvX9%(>BkOZE99YDt;EtC)>fhSwGi`o`DL5xR!k0J>?0Xxu(M=n-Fo=M;d*!fyKQeIt%M8|(c*<#0C@yH)g zB!MSjr%&<72o2L=$-?fhS<+7V$_$ zEd+@iZA5L0og%~|+fgJzG{MgF;gQQAL501~p1_B&6Lxr{3M4lIB!LfM=iTtgpAaNE zk0-iL?DQEP89PPzOa}rV!p?%>ks7)PlE8?8ypx%3m{nFKzB9WlToS%yL+ zIyWKeL)hLv9y#3zK@#{7wr!3_{(>S2d$Qp literal 0 HcmV?d00001 From 9a1fbb653c835bd8b14b941f4d28e509b96717e2 Mon Sep 17 00:00:00 2001 From: Brian Burkhalter Date: Fri, 5 Oct 2018 15:37:46 -0700 Subject: [PATCH 018/124] 8211794: Remove jdk/java/nio/channels/Selector/RacyDeregister.java from problem list Reviewed-by: bchristi --- test/jdk/ProblemList.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/test/jdk/ProblemList.txt b/test/jdk/ProblemList.txt index bf6432c62ce..b373980f18c 100644 --- a/test/jdk/ProblemList.txt +++ b/test/jdk/ProblemList.txt @@ -565,7 +565,6 @@ java/nio/Buffer/EqualsCompareTest.java 8193917 solaris- java/nio/channels/DatagramChannel/ChangingAddress.java 7141822 macosx-all java/nio/channels/Selector/Wakeup.java 6963118 windows-all -java/nio/channels/Selector/RacyDeregister.java 8201765 windows-all java/nio/file/WatchService/Basic.java 7158947 solaris-all Solaris 11 java/nio/file/WatchService/MayFlies.java 7158947 solaris-all Solaris 11 From ec0cbd58f4585c157cf3a798784ce63e62b911fc Mon Sep 17 00:00:00 2001 From: Vladimir Kozlov Date: Fri, 5 Oct 2018 15:46:47 -0700 Subject: [PATCH 019/124] 8206963: [AOT] bug with multiple class loaders AOT should not support custom class loaders. Reviewed-by: dlong, iveresov --- src/hotspot/share/aot/aotCodeHeap.cpp | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/hotspot/share/aot/aotCodeHeap.cpp b/src/hotspot/share/aot/aotCodeHeap.cpp index 7108839e905..9b456e29149 100644 --- a/src/hotspot/share/aot/aotCodeHeap.cpp +++ b/src/hotspot/share/aot/aotCodeHeap.cpp @@ -735,6 +735,14 @@ bool AOTCodeHeap::load_klass_data(InstanceKlass* ik, Thread* thread) { NOT_PRODUCT( klasses_seen++; ) + // AOT does not support custom class loaders. + ClassLoaderData* cld = ik->class_loader_data(); + if (!cld->is_builtin_class_loader_data()) { + log_trace(aot, class, load)("skip class %s for custom classloader %s (%p) tid=" INTPTR_FORMAT, + ik->internal_name(), cld->loader_name(), cld, p2i(thread)); + return false; + } + AOTKlassData* klass_data = find_klass(ik); if (klass_data == NULL) { return false; @@ -759,9 +767,10 @@ bool AOTCodeHeap::load_klass_data(InstanceKlass* ik, Thread* thread) { assert(klass_data->_class_id < _class_count, "invalid class id"); AOTClass* aot_class = &_classes[klass_data->_class_id]; - if (aot_class->_classloader != NULL && aot_class->_classloader != ik->class_loader_data()) { - log_trace(aot, class, load)("class %s in %s already loaded for classloader %p vs %p tid=" INTPTR_FORMAT, - ik->internal_name(), _lib->name(), aot_class->_classloader, ik->class_loader_data(), p2i(thread)); + ClassLoaderData* aot_cld = aot_class->_classloader; + if (aot_cld != NULL && aot_cld != cld) { + log_trace(aot, class, load)("class %s in %s already loaded for classloader %s (%p) vs %s (%p) tid=" INTPTR_FORMAT, + ik->internal_name(), _lib->name(), aot_cld->loader_name(), aot_cld, cld->loader_name(), cld, p2i(thread)); NOT_PRODUCT( aot_klasses_cl_miss++; ) return false; } @@ -774,9 +783,9 @@ bool AOTCodeHeap::load_klass_data(InstanceKlass* ik, Thread* thread) { NOT_PRODUCT( aot_klasses_found++; ) - log_trace(aot, class, load)("found %s in %s for classloader %p tid=" INTPTR_FORMAT, ik->internal_name(), _lib->name(), ik->class_loader_data(), p2i(thread)); + log_trace(aot, class, load)("found %s in %s for classloader %s (%p) tid=" INTPTR_FORMAT, ik->internal_name(), _lib->name(), cld->loader_name(), cld, p2i(thread)); - aot_class->_classloader = ik->class_loader_data(); + aot_class->_classloader = cld; // Set klass's Resolve (second) got cell. _klasses_got[klass_data->_got_index] = ik; if (ik->is_initialized()) { From 57b516dd0e571366b3d2a09e5a1ff08c3b527ef7 Mon Sep 17 00:00:00 2001 From: Jiangli Zhou Date: Fri, 5 Oct 2018 18:56:11 -0400 Subject: [PATCH 020/124] 8202951: Implementation of JEP 341: Default CDS Archives 8210592: Convert CDS-mode test sets in tier5 and tier6 to non-CDS-mode tests 8209739: [TESTBUG] javax/imageio/plugins/png/ItxtUtf8Test.java fails with OutOfMemoryError when running in CDS mode Generate the default CDS archive at JDK build time. Co-authored-by: Erik Joelsson Co-authored-by: Calvin Cheung Reviewed-by: erikj, ihse, dholmes, iklam, ccheung, mseledtsov --- make/Images.gmk | 12 +++- make/autoconf/configure.ac | 1 + make/autoconf/jdk-options.m4 | 35 ++++++++++ make/autoconf/spec.gmk.in | 2 + make/scripts/compare.sh | 1 + src/hotspot/share/prims/whitebox.cpp | 17 +++++ src/hotspot/share/runtime/arguments.cpp | 30 +++++---- src/hotspot/share/runtime/arguments.hpp | 1 + test/TestCommon.gmk | 14 ---- ...-mode.txt => ProblemList-non-cds-mode.txt} | 2 +- .../CheckDefaultArchiveFile.java | 63 ++++++++++++++++++ .../CheckSharingWithDefaultArchive.java | 66 +++++++++++++++++++ ...stMutuallyExclusivePlatformPredicates.java | 5 +- .../imageio/plugins/png/ItxtUtf8Test.java | 2 +- test/lib/jdk/test/lib/Platform.java | 13 ++++ test/lib/sun/hotspot/WhiteBox.java | 2 + 16 files changed, 234 insertions(+), 32 deletions(-) rename test/hotspot/jtreg/{ProblemList-cds-mode.txt => ProblemList-non-cds-mode.txt} (94%) create mode 100644 test/hotspot/jtreg/runtime/SharedArchiveFile/CheckDefaultArchiveFile.java create mode 100644 test/hotspot/jtreg/runtime/SharedArchiveFile/CheckSharingWithDefaultArchive.java diff --git a/make/Images.gmk b/make/Images.gmk index 10e3dc2d827..a12970dd8e8 100644 --- a/make/Images.gmk +++ b/make/Images.gmk @@ -90,24 +90,32 @@ endif $(JDK_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(JMODS) \ $(call DependOnVariable, JDK_MODULES_LIST) $(BASE_RELEASE_FILE) - $(ECHO) Creating jdk image + $(call LogWarn, Creating jdk image) $(RM) -r $(JDK_IMAGE_DIR) $(call ExecuteWithLog, $(SUPPORT_OUTPUTDIR)/images/jdk, \ $(JLINK_TOOL) --add-modules $(JDK_MODULES_LIST) \ $(JLINK_JDK_EXTRA_OPTS) \ --output $(JDK_IMAGE_DIR) \ ) + ifeq ($(BUILD_CDS_ARCHIVE), true) + $(call LogWarn, Creating CDS archive for jdk image) + $(JDK_IMAGE_DIR)/bin/java -Xshare:dump -Xmx128M -Xms128M $(LOG_INFO) + endif $(TOUCH) $@ $(JRE_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(JMODS) \ $(call DependOnVariable, JRE_MODULES_LIST) $(BASE_RELEASE_FILE) - $(ECHO) Creating legacy jre image + $(call LogWarn, Creating legacy jre image) $(RM) -r $(JRE_IMAGE_DIR) $(call ExecuteWithLog, $(SUPPORT_OUTPUTDIR)/images/jre, \ $(JLINK_TOOL) --add-modules $(JRE_MODULES_LIST) \ $(JLINK_JRE_EXTRA_OPTS) \ --output $(JRE_IMAGE_DIR) \ ) + ifeq ($(BUILD_CDS_ARCHIVE), true) + $(call LogWarn, Creating CDS archive for jre image) + $(JRE_IMAGE_DIR)/bin/java -Xshare:dump -Xmx128M -Xms128M $(LOG_INFO) + endif $(TOUCH) $@ TOOL_JRE_TARGETS := $(JRE_IMAGE_DIR)/$(JIMAGE_TARGET_FILE) diff --git a/make/autoconf/configure.ac b/make/autoconf/configure.ac index a9edea8c2c1..b579af3e697 100644 --- a/make/autoconf/configure.ac +++ b/make/autoconf/configure.ac @@ -233,6 +233,7 @@ JDKOPT_ENABLE_DISABLE_FAILURE_HANDLER JDKOPT_ENABLE_DISABLE_GENERATE_CLASSLIST JDKOPT_EXCLUDE_TRANSLATIONS JDKOPT_ENABLE_DISABLE_MANPAGES +JDKOPT_ENABLE_DISABLE_CDS_ARCHIVE ############################################################################### # diff --git a/make/autoconf/jdk-options.m4 b/make/autoconf/jdk-options.m4 index e958eba27ad..4dcd3b86718 100644 --- a/make/autoconf/jdk-options.m4 +++ b/make/autoconf/jdk-options.m4 @@ -605,3 +605,38 @@ AC_DEFUN([JDKOPT_ENABLE_DISABLE_MANPAGES], AC_SUBST(BUILD_MANPAGES) ]) + +################################################################################ +# +# Disable the default CDS archive generation +# cross compilation - disabled +# zero - off by default (not a tested configuration) +# +AC_DEFUN([JDKOPT_ENABLE_DISABLE_CDS_ARCHIVE], +[ + AC_ARG_ENABLE([cds-archive], [AS_HELP_STRING([--disable-cds-archive], + [Set to disable generation of a default CDS archive in the product image @<:@enabled@:>@])]) + + AC_MSG_CHECKING([if a default CDS archive should be generated]) + if test "x$COMPILE_TYPE" = "xcross"; then + AC_MSG_RESULT([no, not possible with cross compilation]) + BUILD_CDS_ARCHIVE="false" + elif test "x$enable_cds_archive" = "xyes"; then + AC_MSG_RESULT([yes, forced]) + BUILD_CDS_ARCHIVE="true" + elif HOTSPOT_CHECK_JVM_VARIANT(zero); then + AC_MSG_RESULT([no]) + BUILD_CDS_ARCHIVE="false" + elif test "x$enable_cds_archive" = "x"; then + AC_MSG_RESULT([yes]) + BUILD_CDS_ARCHIVE="true" + elif test "x$enable_cds_archive" = "xno"; then + AC_MSG_RESULT([no, forced]) + BUILD_CDS_ARCHIVE="false" + else + AC_MSG_RESULT([no]) + AC_MSG_ERROR([--enable-cds_archive can only be yes/no or empty]) + fi + + AC_SUBST(BUILD_CDS_ARCHIVE) +]) diff --git a/make/autoconf/spec.gmk.in b/make/autoconf/spec.gmk.in index f95bd921391..aec35664ac9 100644 --- a/make/autoconf/spec.gmk.in +++ b/make/autoconf/spec.gmk.in @@ -309,6 +309,8 @@ EXCLUDE_TRANSLATIONS := @EXCLUDE_TRANSLATIONS@ BUILD_MANPAGES := @BUILD_MANPAGES@ +BUILD_CDS_ARCHIVE := @BUILD_CDS_ARCHIVE@ + # The boot jdk to use. This is overridden in bootcycle-spec.gmk. Make sure to keep # it in sync. BOOT_JDK:=@BOOT_JDK@ diff --git a/make/scripts/compare.sh b/make/scripts/compare.sh index 8a99e4bb4a6..2cfc820b0b1 100644 --- a/make/scripts/compare.sh +++ b/make/scripts/compare.sh @@ -385,6 +385,7 @@ compare_general_files() { ! -name "JavaUpdater" ! -name "JavaWSApplicationStub" \ ! -name "jspawnhelper" ! -name "JavawsLauncher" ! -name "*.a" \ ! -name "finish_installation" ! -name "Sparkle" ! -name "*.tar.gz" \ + ! -name "classes.jsa" \ | $GREP -v "./bin/" | $SORT | $FILTER) echo Other files with binary differences... diff --git a/src/hotspot/share/prims/whitebox.cpp b/src/hotspot/share/prims/whitebox.cpp index 984ce83dd3f..5aea49e0ea0 100644 --- a/src/hotspot/share/prims/whitebox.cpp +++ b/src/hotspot/share/prims/whitebox.cpp @@ -1749,6 +1749,20 @@ WB_ENTRY(jobject, WB_GetMethodStringOption(JNIEnv* env, jobject wb, jobject meth return NULL; WB_END +WB_ENTRY(jobject, WB_GetDefaultArchivePath(JNIEnv* env, jobject wb)) + const char* p = Arguments::get_default_shared_archive_path(); + ThreadToNativeFromVM ttn(thread); + jstring path_string = env->NewStringUTF(p); + + CHECK_JNI_EXCEPTION_(env, NULL); + + return path_string; +WB_END + +WB_ENTRY(jboolean, WB_IsSharingEnabled(JNIEnv* env, jobject wb)) + return UseSharedSpaces; +WB_END + WB_ENTRY(jboolean, WB_IsShared(JNIEnv* env, jobject wb, jobject obj)) oop obj_oop = JNIHandles::resolve(obj); return MetaspaceShared::is_archive_object(obj_oop); @@ -2185,6 +2199,9 @@ static JNINativeMethod methods[] = { {CC"getMethodStringOption", CC"(Ljava/lang/reflect/Executable;Ljava/lang/String;)Ljava/lang/String;", (void*)&WB_GetMethodStringOption}, + {CC"getDefaultArchivePath", CC"()Ljava/lang/String;", + (void*)&WB_GetDefaultArchivePath}, + {CC"isSharingEnabled", CC"()Z", (void*)&WB_IsSharingEnabled}, {CC"isShared", CC"(Ljava/lang/Object;)Z", (void*)&WB_IsShared }, {CC"isSharedClass", CC"(Ljava/lang/Class;)Z", (void*)&WB_IsSharedClass }, {CC"areSharedStringsIgnored", CC"()Z", (void*)&WB_AreSharedStringsIgnored }, diff --git a/src/hotspot/share/runtime/arguments.cpp b/src/hotspot/share/runtime/arguments.cpp index cd7761e9044..6347b287358 100644 --- a/src/hotspot/share/runtime/arguments.cpp +++ b/src/hotspot/share/runtime/arguments.cpp @@ -3450,21 +3450,27 @@ void Arguments::set_shared_spaces_flags() { // Sharing support // Construct the path to the archive +char* Arguments::get_default_shared_archive_path() { + char *default_archive_path; + char jvm_path[JVM_MAXPATHLEN]; + os::jvm_path(jvm_path, sizeof(jvm_path)); + char *end = strrchr(jvm_path, *os::file_separator()); + if (end != NULL) *end = '\0'; + size_t jvm_path_len = strlen(jvm_path); + size_t file_sep_len = strlen(os::file_separator()); + const size_t len = jvm_path_len + file_sep_len + 20; + default_archive_path = NEW_C_HEAP_ARRAY(char, len, mtArguments); + if (default_archive_path != NULL) { + jio_snprintf(default_archive_path, len, "%s%sclasses.jsa", + jvm_path, os::file_separator()); + } + return default_archive_path; +} + static char* get_shared_archive_path() { char *shared_archive_path; if (SharedArchiveFile == NULL) { - char jvm_path[JVM_MAXPATHLEN]; - os::jvm_path(jvm_path, sizeof(jvm_path)); - char *end = strrchr(jvm_path, *os::file_separator()); - if (end != NULL) *end = '\0'; - size_t jvm_path_len = strlen(jvm_path); - size_t file_sep_len = strlen(os::file_separator()); - const size_t len = jvm_path_len + file_sep_len + 20; - shared_archive_path = NEW_C_HEAP_ARRAY(char, len, mtArguments); - if (shared_archive_path != NULL) { - jio_snprintf(shared_archive_path, len, "%s%sclasses.jsa", - jvm_path, os::file_separator()); - } + shared_archive_path = Arguments::get_default_shared_archive_path(); } else { shared_archive_path = os::strdup_check_oom(SharedArchiveFile, mtArguments); } diff --git a/src/hotspot/share/runtime/arguments.hpp b/src/hotspot/share/runtime/arguments.hpp index 72bfd2bf9e3..3bb983e6cd0 100644 --- a/src/hotspot/share/runtime/arguments.hpp +++ b/src/hotspot/share/runtime/arguments.hpp @@ -633,6 +633,7 @@ class Arguments : AllStatic { static char* get_appclasspath() { return _java_class_path->value(); } static void fix_appclasspath(); + static char* get_default_shared_archive_path(); // Operation modi static Mode mode() { return _mode; } diff --git a/test/TestCommon.gmk b/test/TestCommon.gmk index a51ce82c7b5..79c9f30f0a4 100644 --- a/test/TestCommon.gmk +++ b/test/TestCommon.gmk @@ -178,20 +178,6 @@ ifeq ($(USE_FAILURE_HANDLER), true) endif endif - -# Optionally create a CDS archive before running tests -ifeq ($(GENERATE_CDS_ARCHIVE), true) - CDS_ARCHIVE_FILE := $(ABS_TEST_OUTPUT_DIR)/cds_archive.jsa - - $(CDS_ARCHIVE_FILE): $(PRODUCT_HOME) - $(PRODUCT_HOME)/bin/java -XX:+UnlockDiagnosticVMOptions \ - -XX:SharedArchiveFile=$(shell $(GETMIXEDPATH) "$(CDS_ARCHIVE_FILE)") -Xshare:dump - - CDS_VM_ARGS := -XX:+UnlockDiagnosticVMOptions -XX:SharedArchiveFile=$(shell $(GETMIXEDPATH) "$(CDS_ARCHIVE_FILE)") - JTREG_TEST_OPTIONS += $(addprefix -vmoption:, $(CDS_VM_ARGS)) - TEST_PREREQS += $(CDS_ARCHIVE_FILE) -endif - # How to create the test bundle (pass or fail, we want to create this) # Follow command with ";$(BUNDLE_UP_AND_EXIT)", so it always gets executed. ifneq ($(ARCHIVE_BUNDLE), ) diff --git a/test/hotspot/jtreg/ProblemList-cds-mode.txt b/test/hotspot/jtreg/ProblemList-non-cds-mode.txt similarity index 94% rename from test/hotspot/jtreg/ProblemList-cds-mode.txt rename to test/hotspot/jtreg/ProblemList-non-cds-mode.txt index 8fbc756f0b5..912f4c05cd1 100644 --- a/test/hotspot/jtreg/ProblemList-cds-mode.txt +++ b/test/hotspot/jtreg/ProblemList-non-cds-mode.txt @@ -23,7 +23,7 @@ ############################################################################# # -# Additional list of quarantined tests when CDS mode enabled. +# Additional list of quarantined tests when non-CDS mode enabled. # ############################################################################# diff --git a/test/hotspot/jtreg/runtime/SharedArchiveFile/CheckDefaultArchiveFile.java b/test/hotspot/jtreg/runtime/SharedArchiveFile/CheckDefaultArchiveFile.java new file mode 100644 index 00000000000..191471255f9 --- /dev/null +++ b/test/hotspot/jtreg/runtime/SharedArchiveFile/CheckDefaultArchiveFile.java @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2018, 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. + * + * 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 Default CDS archive file + * @summary JDK platforms/binaries do not support default CDS archive should + * not contain classes.jsa in the default location. + * @library /test/lib + * @modules java.base/jdk.internal.misc + * java.management + * @build sun.hotspot.WhiteBox + * @run driver ClassFileInstaller sun.hotspot.WhiteBox + * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions + * -XX:+WhiteBoxAPI CheckDefaultArchiveFile + */ +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import jdk.test.lib.Platform; +import jdk.test.lib.cds.CDSTestUtils; +import jtreg.SkippedException; +import sun.hotspot.WhiteBox; + +public class CheckDefaultArchiveFile { + public static void main(String[] args) throws Exception { + WhiteBox wb = WhiteBox.getWhiteBox(); + String osArch = Platform.getOsArch(); + String vmName = System.getProperty("java.vm.name"); + String vmString = vmName + "(" + osArch + ")"; + String jsaString = wb.getDefaultArchivePath(); + Path jsa = Paths.get(jsaString); + if (Platform.isDefaultCDSArchiveSupported()) { + if (Files.exists(jsa)) { + System.out.println("Passed. " + vmString + + ": has default classes.jsa file"); + } else { + throw new RuntimeException(vmString + "has no " + jsaString); + } + } else { + throw new SkippedException("Default CDS archive is not supported"); + } + } +} diff --git a/test/hotspot/jtreg/runtime/SharedArchiveFile/CheckSharingWithDefaultArchive.java b/test/hotspot/jtreg/runtime/SharedArchiveFile/CheckSharingWithDefaultArchive.java new file mode 100644 index 00000000000..d25331c11a4 --- /dev/null +++ b/test/hotspot/jtreg/runtime/SharedArchiveFile/CheckSharingWithDefaultArchive.java @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2018, 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. + * + * 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 Default CDS archive + * @summary Sharing should be enabled by default on supported platform/binaries. + * No -Xshare:dump is needed. No -Xshare:auto or -Xshare:on in needed. + * Verify a set of well-known shared classes. + * @requires vm.cds + * @library /test/lib + * @modules java.base/jdk.internal.misc + * java.management + * @build sun.hotspot.WhiteBox + * @run driver ClassFileInstaller sun.hotspot.WhiteBox + * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions + * -XX:+WhiteBoxAPI CheckSharingWithDefaultArchive -showversion + */ +import jdk.test.lib.Platform; +import jtreg.SkippedException; +import sun.hotspot.WhiteBox; + +public class CheckSharingWithDefaultArchive { + public static void main(String[] args) throws Exception { + if (!Platform.isDefaultCDSArchiveSupported()) { + throw new SkippedException("Supported platform"); + } + + WhiteBox wb = WhiteBox.getWhiteBox(); + String classes[] = {"java.lang.Object", + "java.lang.String", + "java.lang.Class"}; + // If maping fails, sharing is disabled + if (wb.isSharingEnabled()) { + for (int i = 0; i < classes.length; i++) { + Class c = Class.forName(classes[i]); + if (wb.isSharedClass(c)) { + System.out.println(classes[i] + " is shared."); + } else { + throw new RuntimeException(classes[i] + " is not shared"); + } + } + } else { + throw new SkippedException("Sharing is not enabled."); + } + } +} diff --git a/test/hotspot/jtreg/testlibrary_tests/TestMutuallyExclusivePlatformPredicates.java b/test/hotspot/jtreg/testlibrary_tests/TestMutuallyExclusivePlatformPredicates.java index a016f233e7d..211b0b3384b 100644 --- a/test/hotspot/jtreg/testlibrary_tests/TestMutuallyExclusivePlatformPredicates.java +++ b/test/hotspot/jtreg/testlibrary_tests/TestMutuallyExclusivePlatformPredicates.java @@ -50,8 +50,9 @@ public class TestMutuallyExclusivePlatformPredicates { OS("isAix", "isLinux", "isOSX", "isSolaris", "isWindows"), VM_TYPE("isClient", "isServer", "isGraal", "isMinimal", "isZero", "isEmbedded"), MODE("isInt", "isMixed", "isComp"), - IGNORED("isEmulatedClient", "isDebugBuild", "isFastDebugBuild", "isSlowDebugBuild", - "hasSA", "shouldSAAttach", "isTieredSupported", "areCustomLoadersSupportedForCDS"); + IGNORED("isEmulatedClient", "isDebugBuild", "isFastDebugBuild", + "isSlowDebugBuild", "hasSA", "shouldSAAttach", "isTieredSupported", + "areCustomLoadersSupportedForCDS", "isDefaultCDSArchiveSupported"); public final List methodNames; diff --git a/test/jdk/javax/imageio/plugins/png/ItxtUtf8Test.java b/test/jdk/javax/imageio/plugins/png/ItxtUtf8Test.java index 74938bcda18..6f2dbb247c5 100644 --- a/test/jdk/javax/imageio/plugins/png/ItxtUtf8Test.java +++ b/test/jdk/javax/imageio/plugins/png/ItxtUtf8Test.java @@ -30,7 +30,7 @@ * * @run main ItxtUtf8Test * - * @run main/othervm/timeout=10 -Xmx4m ItxtUtf8Test truncate + * @run main/othervm/timeout=10 -Xmx6m ItxtUtf8Test truncate */ import java.awt.image.BufferedImage; diff --git a/test/lib/jdk/test/lib/Platform.java b/test/lib/jdk/test/lib/Platform.java index 3b68d0d2868..a658fa0b720 100644 --- a/test/lib/jdk/test/lib/Platform.java +++ b/test/lib/jdk/test/lib/Platform.java @@ -325,6 +325,19 @@ public class Platform { } } + public static boolean isDefaultCDSArchiveSupported() { + return (is64bit() && + isServer() && + (isLinux() || + isOSX() || + isSolaris() || + isWindows()) && + !isZero() && + !isMinimal() && + !isAArch64() && + !isARM()); + } + /* * This should match the #if condition in ClassListParser::load_class_from_source(). */ diff --git a/test/lib/sun/hotspot/WhiteBox.java b/test/lib/sun/hotspot/WhiteBox.java index d3ce3b7b80d..1a8101304a5 100644 --- a/test/lib/sun/hotspot/WhiteBox.java +++ b/test/lib/sun/hotspot/WhiteBox.java @@ -512,6 +512,8 @@ public class WhiteBox { public native void assertMatchingSafepointCalls(boolean mutexSafepointValue, boolean attemptedNoSafepointValue); // Sharing & archiving + public native String getDefaultArchivePath(); + public native boolean isSharingEnabled(); public native boolean isShared(Object o); public native boolean isSharedClass(Class c); public native boolean areSharedStringsIgnored(); From e77e2d1df8b8221ac456292388745a90ded2e96e Mon Sep 17 00:00:00 2001 From: Roman Kennke Date: Thu, 27 Sep 2018 13:56:09 +0200 Subject: [PATCH 021/124] 8211219: Type inconsistency in LIRGenerator::atomic_cmpxchg(..) Reviewed-by: eosterlund, iveresov --- src/hotspot/cpu/x86/c1_LIRGenerator_x86.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hotspot/cpu/x86/c1_LIRGenerator_x86.cpp b/src/hotspot/cpu/x86/c1_LIRGenerator_x86.cpp index 1c0ecfa0126..a26a99cef97 100644 --- a/src/hotspot/cpu/x86/c1_LIRGenerator_x86.cpp +++ b/src/hotspot/cpu/x86/c1_LIRGenerator_x86.cpp @@ -688,7 +688,7 @@ LIR_Opr LIRGenerator::atomic_cmpxchg(BasicType type, LIR_Opr addr, LIRItem& cmp_ } LIR_Opr result = new_register(T_INT); __ cmove(lir_cond_equal, LIR_OprFact::intConst(1), LIR_OprFact::intConst(0), - result, type); + result, T_INT); return result; } From 2223e083ba15c151b84bd5a967a6d82c39dd121a Mon Sep 17 00:00:00 2001 From: Vaibhav Choudhary Date: Fri, 5 Oct 2018 18:25:15 +0100 Subject: [PATCH 022/124] 8210376: [TESTBUG] @requires vm.cds should be replaced by @requires vm.cds.archived.java.heap and documentation is required for vm.gc==null @requires vm.cds should be replaced by @requires vm.cds.archived.java.heap and documentation is required for vm.gc==null Reviewed-by: iklam, jiangli --- test/hotspot/jtreg/runtime/appcds/CommandLineFlagCombo.java | 5 ++++- .../jtreg/runtime/appcds/cacheObject/DifferentHeapSizes.java | 1 - .../jtreg/runtime/appcds/cacheObject/OpenArchiveRegion.java | 3 +++ .../runtime/appcds/sharedStrings/IncompatibleOptions.java | 3 +++ .../sharedStrings/IncompatibleOptions_noCompactStrings.java | 3 +++ .../sharedStrings/IncompatibleOptions_stringDedup.java | 3 +++ .../jtreg/runtime/appcds/sharedStrings/SysDictCrash.java | 3 +-- 7 files changed, 17 insertions(+), 4 deletions(-) diff --git a/test/hotspot/jtreg/runtime/appcds/CommandLineFlagCombo.java b/test/hotspot/jtreg/runtime/appcds/CommandLineFlagCombo.java index 4c0fdf64dee..a8d08d10641 100644 --- a/test/hotspot/jtreg/runtime/appcds/CommandLineFlagCombo.java +++ b/test/hotspot/jtreg/runtime/appcds/CommandLineFlagCombo.java @@ -24,7 +24,10 @@ /* * @test CommandLineFlagCombo - * @requires vm.cds + * @requires vm.cds.archived.java.heap + * @comment This test explicitly chooses the type of GC to be used by sub-processes. It may conflict with the GC type set + * via the -vmoptions command line option of JTREG. vm.gc==null will help the test case to discard the explicitly passed + * vm options. * @requires (vm.gc=="null") * @summary Test command line flag combinations that * could likely affect the behaviour of AppCDS diff --git a/test/hotspot/jtreg/runtime/appcds/cacheObject/DifferentHeapSizes.java b/test/hotspot/jtreg/runtime/appcds/cacheObject/DifferentHeapSizes.java index 70387b1d7f1..37a8857c1de 100644 --- a/test/hotspot/jtreg/runtime/appcds/cacheObject/DifferentHeapSizes.java +++ b/test/hotspot/jtreg/runtime/appcds/cacheObject/DifferentHeapSizes.java @@ -26,7 +26,6 @@ * @test * @summary Test automatic relocation of archive heap regions dur to heap size changes. * @requires vm.cds.archived.java.heap - * @requires (vm.gc=="null") * @library /test/lib /test/hotspot/jtreg/runtime/appcds * @modules jdk.jartool/sun.tools.jar * @compile ../test-classes/Hello.java diff --git a/test/hotspot/jtreg/runtime/appcds/cacheObject/OpenArchiveRegion.java b/test/hotspot/jtreg/runtime/appcds/cacheObject/OpenArchiveRegion.java index 7228d8310e9..eb3020286a8 100644 --- a/test/hotspot/jtreg/runtime/appcds/cacheObject/OpenArchiveRegion.java +++ b/test/hotspot/jtreg/runtime/appcds/cacheObject/OpenArchiveRegion.java @@ -26,6 +26,9 @@ * @test * @summary Test open archive heap regions * @requires vm.cds.archived.java.heap + * @comment This test explicitly chooses the type of GC to be used by sub-processes. It may conflict with the GC type set + * via the -vmoptions command line option of JTREG. vm.gc==null will help the test case to discard the explicitly passed + * vm options. * @requires (vm.gc=="null") * @library /test/lib /test/hotspot/jtreg/runtime/appcds * @modules java.base/jdk.internal.misc diff --git a/test/hotspot/jtreg/runtime/appcds/sharedStrings/IncompatibleOptions.java b/test/hotspot/jtreg/runtime/appcds/sharedStrings/IncompatibleOptions.java index d6feb24a077..fa8473ccc5e 100644 --- a/test/hotspot/jtreg/runtime/appcds/sharedStrings/IncompatibleOptions.java +++ b/test/hotspot/jtreg/runtime/appcds/sharedStrings/IncompatibleOptions.java @@ -27,6 +27,9 @@ * @summary Test options that are incompatible with use of shared strings * Also test mismatch in oops encoding between dump time and run time * @requires vm.cds.archived.java.heap + * @comment This test explicitly chooses the type of GC to be used by sub-processes. It may conflict with the GC type set + * via the -vmoptions command line option of JTREG. vm.gc==null will help the test case to discard the explicitly passed + * vm options. * @requires (vm.gc=="null") * @library /test/lib /test/hotspot/jtreg/runtime/appcds * @modules jdk.jartool/sun.tools.jar diff --git a/test/hotspot/jtreg/runtime/appcds/sharedStrings/IncompatibleOptions_noCompactStrings.java b/test/hotspot/jtreg/runtime/appcds/sharedStrings/IncompatibleOptions_noCompactStrings.java index 5d354600608..67963957cfd 100644 --- a/test/hotspot/jtreg/runtime/appcds/sharedStrings/IncompatibleOptions_noCompactStrings.java +++ b/test/hotspot/jtreg/runtime/appcds/sharedStrings/IncompatibleOptions_noCompactStrings.java @@ -27,6 +27,9 @@ * @summary Test options that are incompatible with use of shared strings * Also test mismatch in oops encoding between dump time and run time * @requires vm.cds.archived.java.heap + * @comment This test explicitly chooses the type of GC to be used by sub-processes. It may conflict with the GC type set + * via the -vmoptions command line option of JTREG. vm.gc==null will help the test case to discard the explicitly passed + * vm options. * @requires (vm.gc=="null") * @library /test/lib /test/hotspot/jtreg/runtime/appcds * @modules jdk.jartool/sun.tools.jar diff --git a/test/hotspot/jtreg/runtime/appcds/sharedStrings/IncompatibleOptions_stringDedup.java b/test/hotspot/jtreg/runtime/appcds/sharedStrings/IncompatibleOptions_stringDedup.java index d22b7ab1406..5ab3ff6433c 100644 --- a/test/hotspot/jtreg/runtime/appcds/sharedStrings/IncompatibleOptions_stringDedup.java +++ b/test/hotspot/jtreg/runtime/appcds/sharedStrings/IncompatibleOptions_stringDedup.java @@ -27,6 +27,9 @@ * @summary Test options that are incompatible with use of shared strings * Also test mismatch in oops encoding between dump time and run time * @requires vm.cds.archived.java.heap + * @comment This test explicitly chooses the type of GC to be used by sub-processes. It may conflict with the GC type set + * via the -vmoptions command line option of JTREG. vm.gc==null will help the test case to discard the explicitly passed + * vm options. * @requires (vm.gc=="null") * @library /test/lib /test/hotspot/jtreg/runtime/appcds * @modules jdk.jartool/sun.tools.jar diff --git a/test/hotspot/jtreg/runtime/appcds/sharedStrings/SysDictCrash.java b/test/hotspot/jtreg/runtime/appcds/sharedStrings/SysDictCrash.java index 6ed6dbcc151..3e726e1217b 100644 --- a/test/hotspot/jtreg/runtime/appcds/sharedStrings/SysDictCrash.java +++ b/test/hotspot/jtreg/runtime/appcds/sharedStrings/SysDictCrash.java @@ -26,8 +26,7 @@ * @test * @summary Regression test for JDK-8098821 * @bug 8098821 - * @requires vm.cds - * @requires vm.gc.G1 + * @requires vm.cds.archived.java.heap * @library /test/lib /test/hotspot/jtreg/runtime/appcds * @modules java.base/jdk.internal.misc * @modules java.management From 548eb6860a39e6ebd06af4f211f081af0a63b52d Mon Sep 17 00:00:00 2001 From: Doug Simon Date: Fri, 5 Oct 2018 20:03:14 +0200 Subject: [PATCH 023/124] 8208686: [AOT] JVMTI ResourceExhausted event repeated for same allocation Reviewed-by: never, kvn, sspitsyn --- src/hotspot/share/aot/aotCodeHeap.cpp | 7 +- src/hotspot/share/gc/shared/memAllocator.cpp | 23 ++- src/hotspot/share/jvmci/jvmciRuntime.cpp | 97 ++++++++++-- src/hotspot/share/jvmci/jvmciRuntime.hpp | 34 ++++- src/hotspot/share/jvmci/vmStructs_jvmci.cpp | 6 + src/hotspot/share/memory/universe.cpp | 9 +- src/hotspot/share/memory/universe.hpp | 3 + src/hotspot/share/oops/arrayKlass.cpp | 9 +- src/hotspot/share/oops/instanceKlass.cpp | 9 +- src/hotspot/share/oops/klass.cpp | 14 ++ src/hotspot/share/oops/klass.hpp | 3 + src/hotspot/share/oops/objArrayKlass.cpp | 17 +-- src/hotspot/share/oops/typeArrayKlass.cpp | 17 +-- src/hotspot/share/runtime/thread.cpp | 1 + src/hotspot/share/runtime/thread.hpp | 17 ++- .../jaotc/binformat/BinaryContainer.java | 15 +- .../hotspot/GraalHotSpotVMConfig.java | 27 +++- .../compiler/hotspot/HotSpotBackend.java | 21 ++- .../meta/HotSpotHostForeignCallsProvider.java | 16 +- .../replacements/NewObjectSnippets.java | 144 ++++++++++++------ 20 files changed, 348 insertions(+), 141 deletions(-) diff --git a/src/hotspot/share/aot/aotCodeHeap.cpp b/src/hotspot/share/aot/aotCodeHeap.cpp index 9b456e29149..e493f37d790 100644 --- a/src/hotspot/share/aot/aotCodeHeap.cpp +++ b/src/hotspot/share/aot/aotCodeHeap.cpp @@ -436,14 +436,19 @@ void AOTCodeHeap::link_graal_runtime_symbols() { SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_jvmci_runtime_new_instance", address, JVMCIRuntime::new_instance); SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_jvmci_runtime_new_array", address, JVMCIRuntime::new_array); SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_jvmci_runtime_new_multi_array", address, JVMCIRuntime::new_multi_array); + SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_jvmci_runtime_dynamic_new_instance", address, JVMCIRuntime::dynamic_new_instance); SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_jvmci_runtime_dynamic_new_array", address, JVMCIRuntime::dynamic_new_array); + SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_jvmci_runtime_new_instance_or_null", address, JVMCIRuntime::new_instance_or_null); + SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_jvmci_runtime_new_array_or_null", address, JVMCIRuntime::new_array_or_null); + SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_jvmci_runtime_new_multi_array_or_null", address, JVMCIRuntime::new_multi_array_or_null); + SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_jvmci_runtime_dynamic_new_instance_or_null", address, JVMCIRuntime::dynamic_new_instance_or_null); + SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_jvmci_runtime_dynamic_new_array_or_null", address, JVMCIRuntime::dynamic_new_array_or_null); SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_jvmci_runtime_validate_object", address, JVMCIRuntime::validate_object); #if INCLUDE_G1GC SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_jvmci_runtime_write_barrier_pre", address, JVMCIRuntime::write_barrier_pre); SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_jvmci_runtime_write_barrier_post", address, JVMCIRuntime::write_barrier_post); #endif SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_jvmci_runtime_identity_hash_code", address, JVMCIRuntime::identity_hash_code); - SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_jvmci_runtime_dynamic_new_instance", address, JVMCIRuntime::dynamic_new_instance); SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_jvmci_runtime_thread_is_interrupted", address, JVMCIRuntime::thread_is_interrupted); SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_jvmci_runtime_exception_handler_for_pc", address, JVMCIRuntime::exception_handler_for_pc); SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_jvmci_runtime_test_deoptimize_call_int", address, JVMCIRuntime::test_deoptimize_call_int); diff --git a/src/hotspot/share/gc/shared/memAllocator.cpp b/src/hotspot/share/gc/shared/memAllocator.cpp index 4b9d1d311ce..5012e6b8ee1 100644 --- a/src/hotspot/share/gc/shared/memAllocator.cpp +++ b/src/hotspot/share/gc/shared/memAllocator.cpp @@ -120,27 +120,22 @@ bool MemAllocator::Allocation::check_out_of_memory() { return false; } - if (!_overhead_limit_exceeded) { + const char* message = _overhead_limit_exceeded ? "GC overhead limit exceeded" : "Java heap space"; + if (!THREAD->in_retryable_allocation()) { // -XX:+HeapDumpOnOutOfMemoryError and -XX:OnOutOfMemoryError support - report_java_out_of_memory("Java heap space"); + report_java_out_of_memory(message); if (JvmtiExport::should_post_resource_exhausted()) { JvmtiExport::post_resource_exhausted( JVMTI_RESOURCE_EXHAUSTED_OOM_ERROR | JVMTI_RESOURCE_EXHAUSTED_JAVA_HEAP, - "Java heap space"); + message); } - THROW_OOP_(Universe::out_of_memory_error_java_heap(), true); + oop exception = _overhead_limit_exceeded ? + Universe::out_of_memory_error_gc_overhead_limit() : + Universe::out_of_memory_error_java_heap(); + THROW_OOP_(exception, true); } else { - // -XX:+HeapDumpOnOutOfMemoryError and -XX:OnOutOfMemoryError support - report_java_out_of_memory("GC overhead limit exceeded"); - - if (JvmtiExport::should_post_resource_exhausted()) { - JvmtiExport::post_resource_exhausted( - JVMTI_RESOURCE_EXHAUSTED_OOM_ERROR | JVMTI_RESOURCE_EXHAUSTED_JAVA_HEAP, - "GC overhead limit exceeded"); - } - - THROW_OOP_(Universe::out_of_memory_error_gc_overhead_limit(), true); + THROW_OOP_(Universe::out_of_memory_error_retry(), true); } } diff --git a/src/hotspot/share/jvmci/jvmciRuntime.cpp b/src/hotspot/share/jvmci/jvmciRuntime.cpp index 98ad6947c91..418df4d440f 100644 --- a/src/hotspot/share/jvmci/jvmciRuntime.cpp +++ b/src/hotspot/share/jvmci/jvmciRuntime.cpp @@ -109,22 +109,72 @@ static void deopt_caller() { } } -JRT_BLOCK_ENTRY(void, JVMCIRuntime::new_instance(JavaThread* thread, Klass* klass)) +// Manages a scope for a JVMCI runtime call that attempts a heap allocation. +// If there is a pending exception upon closing the scope and the runtime +// call is of the variety where allocation failure returns NULL without an +// exception, the following action is taken: +// 1. The pending exception is cleared +// 2. NULL is written to JavaThread::_vm_result +// 3. Checks that an OutOfMemoryError is Universe::out_of_memory_error_retry(). +class RetryableAllocationMark: public StackObj { + private: + JavaThread* _thread; + public: + RetryableAllocationMark(JavaThread* thread, bool activate) { + if (activate) { + assert(!thread->in_retryable_allocation(), "retryable allocation scope is non-reentrant"); + _thread = thread; + _thread->set_in_retryable_allocation(true); + } else { + _thread = NULL; + } + } + ~RetryableAllocationMark() { + if (_thread != NULL) { + _thread->set_in_retryable_allocation(false); + JavaThread* THREAD = _thread; + if (HAS_PENDING_EXCEPTION) { + oop ex = PENDING_EXCEPTION; + CLEAR_PENDING_EXCEPTION; + oop retry_oome = Universe::out_of_memory_error_retry(); + if (ex->is_a(retry_oome->klass()) && retry_oome != ex) { + ResourceMark rm; + fatal("Unexpected exception in scope of retryable allocation: " INTPTR_FORMAT " of type %s", p2i(ex), ex->klass()->external_name()); + } + _thread->set_vm_result(NULL); + } + } + } +}; + +JRT_BLOCK_ENTRY(void, JVMCIRuntime::new_instance_common(JavaThread* thread, Klass* klass, bool null_on_fail)) JRT_BLOCK; assert(klass->is_klass(), "not a class"); Handle holder(THREAD, klass->klass_holder()); // keep the klass alive InstanceKlass* ik = InstanceKlass::cast(klass); - ik->check_valid_for_instantiation(true, CHECK); - // make sure klass is initialized - ik->initialize(CHECK); - // allocate instance and return via TLS - oop obj = ik->allocate_instance(CHECK); - thread->set_vm_result(obj); + { + RetryableAllocationMark ram(thread, null_on_fail); + ik->check_valid_for_instantiation(true, CHECK); + oop obj; + if (null_on_fail) { + if (!ik->is_initialized()) { + // Cannot re-execute class initialization without side effects + // so return without attempting the initialization + return; + } + } else { + // make sure klass is initialized + ik->initialize(CHECK); + } + // allocate instance and return via TLS + obj = ik->allocate_instance(CHECK); + thread->set_vm_result(obj); + } JRT_BLOCK_END; SharedRuntime::on_slowpath_allocation_exit(thread); JRT_END -JRT_BLOCK_ENTRY(void, JVMCIRuntime::new_array(JavaThread* thread, Klass* array_klass, jint length)) +JRT_BLOCK_ENTRY(void, JVMCIRuntime::new_array_common(JavaThread* thread, Klass* array_klass, jint length, bool null_on_fail)) JRT_BLOCK; // Note: no handle for klass needed since they are not used // anymore after new_objArray() and no GC can happen before. @@ -133,10 +183,12 @@ JRT_BLOCK_ENTRY(void, JVMCIRuntime::new_array(JavaThread* thread, Klass* array_k oop obj; if (array_klass->is_typeArray_klass()) { BasicType elt_type = TypeArrayKlass::cast(array_klass)->element_type(); + RetryableAllocationMark ram(thread, null_on_fail); obj = oopFactory::new_typeArray(elt_type, length, CHECK); } else { Handle holder(THREAD, array_klass->klass_holder()); // keep the klass alive Klass* elem_klass = ObjArrayKlass::cast(array_klass)->element_klass(); + RetryableAllocationMark ram(thread, null_on_fail); obj = oopFactory::new_objArray(elem_klass, length, CHECK); } thread->set_vm_result(obj); @@ -146,8 +198,12 @@ JRT_BLOCK_ENTRY(void, JVMCIRuntime::new_array(JavaThread* thread, Klass* array_k static int deopts = 0; // Alternate between deoptimizing and raising an error (which will also cause a deopt) if (deopts++ % 2 == 0) { - ResourceMark rm(THREAD); - THROW(vmSymbols::java_lang_OutOfMemoryError()); + if (null_on_fail) { + return; + } else { + ResourceMark rm(THREAD); + THROW(vmSymbols::java_lang_OutOfMemoryError()); + } } else { deopt_caller(); } @@ -156,32 +212,43 @@ JRT_BLOCK_ENTRY(void, JVMCIRuntime::new_array(JavaThread* thread, Klass* array_k SharedRuntime::on_slowpath_allocation_exit(thread); JRT_END -JRT_ENTRY(void, JVMCIRuntime::new_multi_array(JavaThread* thread, Klass* klass, int rank, jint* dims)) +JRT_ENTRY(void, JVMCIRuntime::new_multi_array_common(JavaThread* thread, Klass* klass, int rank, jint* dims, bool null_on_fail)) assert(klass->is_klass(), "not a class"); assert(rank >= 1, "rank must be nonzero"); Handle holder(THREAD, klass->klass_holder()); // keep the klass alive + RetryableAllocationMark ram(thread, null_on_fail); oop obj = ArrayKlass::cast(klass)->multi_allocate(rank, dims, CHECK); thread->set_vm_result(obj); JRT_END -JRT_ENTRY(void, JVMCIRuntime::dynamic_new_array(JavaThread* thread, oopDesc* element_mirror, jint length)) +JRT_ENTRY(void, JVMCIRuntime::dynamic_new_array_common(JavaThread* thread, oopDesc* element_mirror, jint length, bool null_on_fail)) + RetryableAllocationMark ram(thread, null_on_fail); oop obj = Reflection::reflect_new_array(element_mirror, length, CHECK); thread->set_vm_result(obj); JRT_END -JRT_ENTRY(void, JVMCIRuntime::dynamic_new_instance(JavaThread* thread, oopDesc* type_mirror)) +JRT_ENTRY(void, JVMCIRuntime::dynamic_new_instance_common(JavaThread* thread, oopDesc* type_mirror, bool null_on_fail)) InstanceKlass* klass = InstanceKlass::cast(java_lang_Class::as_Klass(type_mirror)); if (klass == NULL) { ResourceMark rm(THREAD); THROW(vmSymbols::java_lang_InstantiationException()); } + RetryableAllocationMark ram(thread, null_on_fail); // Create new instance (the receiver) klass->check_valid_for_instantiation(false, CHECK); - // Make sure klass gets initialized - klass->initialize(CHECK); + if (null_on_fail) { + if (!klass->is_initialized()) { + // Cannot re-execute class initialization without side effects + // so return without attempting the initialization + return; + } + } else { + // Make sure klass gets initialized + klass->initialize(CHECK); + } oop obj = klass->allocate_instance(CHECK); thread->set_vm_result(obj); diff --git a/src/hotspot/share/jvmci/jvmciRuntime.hpp b/src/hotspot/share/jvmci/jvmciRuntime.hpp index dcfe2ef869e..e031e7d0a47 100644 --- a/src/hotspot/share/jvmci/jvmciRuntime.hpp +++ b/src/hotspot/share/jvmci/jvmciRuntime.hpp @@ -121,13 +121,35 @@ class JVMCIRuntime: public AllStatic { static BasicType kindToBasicType(Handle kind, TRAPS); - // The following routines are all called from compiled JVMCI code + static void new_instance_common(JavaThread* thread, Klass* klass, bool null_on_fail); + static void new_array_common(JavaThread* thread, Klass* klass, jint length, bool null_on_fail); + static void new_multi_array_common(JavaThread* thread, Klass* klass, int rank, jint* dims, bool null_on_fail); + static void dynamic_new_array_common(JavaThread* thread, oopDesc* element_mirror, jint length, bool null_on_fail); + static void dynamic_new_instance_common(JavaThread* thread, oopDesc* type_mirror, bool null_on_fail); + + // The following routines are called from compiled JVMCI code + + // When allocation fails, these stubs: + // 1. Exercise -XX:+HeapDumpOnOutOfMemoryError and -XX:OnOutOfMemoryError handling and also + // post a JVMTI_EVENT_RESOURCE_EXHAUSTED event if the failure is an OutOfMemroyError + // 2. Return NULL with a pending exception. + // Compiled code must ensure these stubs are not called twice for the same allocation + // site due to the non-repeatable side effects in the case of OOME. + static void new_instance(JavaThread* thread, Klass* klass) { new_instance_common(thread, klass, false); } + static void new_array(JavaThread* thread, Klass* klass, jint length) { new_array_common(thread, klass, length, false); } + static void new_multi_array(JavaThread* thread, Klass* klass, int rank, jint* dims) { new_multi_array_common(thread, klass, rank, dims, false); } + static void dynamic_new_array(JavaThread* thread, oopDesc* element_mirror, jint length) { dynamic_new_array_common(thread, element_mirror, length, false); } + static void dynamic_new_instance(JavaThread* thread, oopDesc* type_mirror) { dynamic_new_instance_common(thread, type_mirror, false); } + + // When allocation fails, these stubs return NULL and have no pending exception. Compiled code + // can use these stubs if a failed allocation will be retried (e.g., by deoptimizing and + // re-executing in the interpreter). + static void new_instance_or_null(JavaThread* thread, Klass* klass) { new_instance_common(thread, klass, true); } + static void new_array_or_null(JavaThread* thread, Klass* klass, jint length) { new_array_common(thread, klass, length, true); } + static void new_multi_array_or_null(JavaThread* thread, Klass* klass, int rank, jint* dims) { new_multi_array_common(thread, klass, rank, dims, true); } + static void dynamic_new_array_or_null(JavaThread* thread, oopDesc* element_mirror, jint length) { dynamic_new_array_common(thread, element_mirror, length, true); } + static void dynamic_new_instance_or_null(JavaThread* thread, oopDesc* type_mirror) { dynamic_new_instance_common(thread, type_mirror, true); } - static void new_instance(JavaThread* thread, Klass* klass); - static void new_array(JavaThread* thread, Klass* klass, jint length); - static void new_multi_array(JavaThread* thread, Klass* klass, int rank, jint* dims); - static void dynamic_new_array(JavaThread* thread, oopDesc* element_mirror, jint length); - static void dynamic_new_instance(JavaThread* thread, oopDesc* type_mirror); static jboolean thread_is_interrupted(JavaThread* thread, oopDesc* obj, jboolean clear_interrupted); static void vm_message(jboolean vmError, jlong format, jlong v1, jlong v2, jlong v3); static jint identity_hash_code(JavaThread* thread, oopDesc* obj); diff --git a/src/hotspot/share/jvmci/vmStructs_jvmci.cpp b/src/hotspot/share/jvmci/vmStructs_jvmci.cpp index de2a444a0b2..2008bff1182 100644 --- a/src/hotspot/share/jvmci/vmStructs_jvmci.cpp +++ b/src/hotspot/share/jvmci/vmStructs_jvmci.cpp @@ -622,6 +622,12 @@ declare_function(JVMCIRuntime::dynamic_new_array) \ declare_function(JVMCIRuntime::dynamic_new_instance) \ \ + declare_function(JVMCIRuntime::new_instance_or_null) \ + declare_function(JVMCIRuntime::new_array_or_null) \ + declare_function(JVMCIRuntime::new_multi_array_or_null) \ + declare_function(JVMCIRuntime::dynamic_new_array_or_null) \ + declare_function(JVMCIRuntime::dynamic_new_instance_or_null) \ + \ declare_function(JVMCIRuntime::thread_is_interrupted) \ declare_function(JVMCIRuntime::vm_message) \ declare_function(JVMCIRuntime::identity_hash_code) \ diff --git a/src/hotspot/share/memory/universe.cpp b/src/hotspot/share/memory/universe.cpp index 82e737867f0..c1801e3f164 100644 --- a/src/hotspot/share/memory/universe.cpp +++ b/src/hotspot/share/memory/universe.cpp @@ -113,6 +113,7 @@ oop Universe::_out_of_memory_error_class_metaspace = NULL; oop Universe::_out_of_memory_error_array_size = NULL; oop Universe::_out_of_memory_error_gc_overhead_limit = NULL; oop Universe::_out_of_memory_error_realloc_objects = NULL; +oop Universe::_out_of_memory_error_retry = NULL; oop Universe::_delayed_stack_overflow_error_message = NULL; objArrayOop Universe::_preallocated_out_of_memory_error_array = NULL; volatile jint Universe::_preallocated_out_of_memory_error_avail_count = 0; @@ -195,6 +196,7 @@ void Universe::oops_do(OopClosure* f) { f->do_oop((oop*)&_out_of_memory_error_array_size); f->do_oop((oop*)&_out_of_memory_error_gc_overhead_limit); f->do_oop((oop*)&_out_of_memory_error_realloc_objects); + f->do_oop((oop*)&_out_of_memory_error_retry); f->do_oop((oop*)&_delayed_stack_overflow_error_message); f->do_oop((oop*)&_preallocated_out_of_memory_error_array); f->do_oop((oop*)&_null_ptr_exception_instance); @@ -565,7 +567,8 @@ bool Universe::should_fill_in_stack_trace(Handle throwable) { (!oopDesc::equals(throwable(), Universe::_out_of_memory_error_class_metaspace)) && (!oopDesc::equals(throwable(), Universe::_out_of_memory_error_array_size)) && (!oopDesc::equals(throwable(), Universe::_out_of_memory_error_gc_overhead_limit)) && - (!oopDesc::equals(throwable(), Universe::_out_of_memory_error_realloc_objects))); + (!oopDesc::equals(throwable(), Universe::_out_of_memory_error_realloc_objects)) && + (!oopDesc::equals(throwable(), Universe::_out_of_memory_error_retry))); } @@ -974,6 +977,7 @@ bool universe_post_init() { Universe::_out_of_memory_error_gc_overhead_limit = ik->allocate_instance(CHECK_false); Universe::_out_of_memory_error_realloc_objects = ik->allocate_instance(CHECK_false); + Universe::_out_of_memory_error_retry = ik->allocate_instance(CHECK_false); // Setup preallocated cause message for delayed StackOverflowError if (StackReservedPages > 0) { @@ -1019,6 +1023,9 @@ bool universe_post_init() { msg = java_lang_String::create_from_str("Java heap space: failed reallocation of scalar replaced objects", CHECK_false); java_lang_Throwable::set_message(Universe::_out_of_memory_error_realloc_objects, msg()); + msg = java_lang_String::create_from_str("Java heap space: failed retryable allocation", CHECK_false); + java_lang_Throwable::set_message(Universe::_out_of_memory_error_retry, msg()); + msg = java_lang_String::create_from_str("/ by zero", CHECK_false); java_lang_Throwable::set_message(Universe::_arithmetic_exception_instance, msg()); diff --git a/src/hotspot/share/memory/universe.hpp b/src/hotspot/share/memory/universe.hpp index ae28b6f5030..0acc16a7917 100644 --- a/src/hotspot/share/memory/universe.hpp +++ b/src/hotspot/share/memory/universe.hpp @@ -148,6 +148,7 @@ class Universe: AllStatic { static oop _out_of_memory_error_array_size; static oop _out_of_memory_error_gc_overhead_limit; static oop _out_of_memory_error_realloc_objects; + static oop _out_of_memory_error_retry; // preallocated cause message for delayed StackOverflowError static oop _delayed_stack_overflow_error_message; @@ -363,6 +364,8 @@ class Universe: AllStatic { static oop out_of_memory_error_array_size() { return gen_out_of_memory_error(_out_of_memory_error_array_size); } static oop out_of_memory_error_gc_overhead_limit() { return gen_out_of_memory_error(_out_of_memory_error_gc_overhead_limit); } static oop out_of_memory_error_realloc_objects() { return gen_out_of_memory_error(_out_of_memory_error_realloc_objects); } + // Throw default _out_of_memory_error_retry object as it will never propagate out of the VM + static oop out_of_memory_error_retry() { return _out_of_memory_error_retry; } static oop delayed_stack_overflow_error_message() { return _delayed_stack_overflow_error_message; } // The particular choice of collected heap. diff --git a/src/hotspot/share/oops/arrayKlass.cpp b/src/hotspot/share/oops/arrayKlass.cpp index de046aac202..0c1a163e9ae 100644 --- a/src/hotspot/share/oops/arrayKlass.cpp +++ b/src/hotspot/share/oops/arrayKlass.cpp @@ -130,14 +130,7 @@ bool ArrayKlass::compute_is_subtype_of(Klass* k) { } objArrayOop ArrayKlass::allocate_arrayArray(int n, int length, TRAPS) { - if (length < 0) { - THROW_MSG_0(vmSymbols::java_lang_NegativeArraySizeException(), err_msg("%d", length)); - } - if (length > arrayOopDesc::max_array_length(T_ARRAY)) { - report_java_out_of_memory("Requested array size exceeds VM limit"); - JvmtiExport::post_array_size_exhausted(); - THROW_OOP_0(Universe::out_of_memory_error_array_size()); - } + check_array_allocation_length(length, arrayOopDesc::max_array_length(T_ARRAY), CHECK_0); int size = objArrayOopDesc::object_size(length); Klass* k = array_klass(n+dimension(), CHECK_0); ArrayKlass* ak = ArrayKlass::cast(k); diff --git a/src/hotspot/share/oops/instanceKlass.cpp b/src/hotspot/share/oops/instanceKlass.cpp index d648b5ad6cf..319cfce81e6 100644 --- a/src/hotspot/share/oops/instanceKlass.cpp +++ b/src/hotspot/share/oops/instanceKlass.cpp @@ -1201,14 +1201,7 @@ bool InstanceKlass::is_same_or_direct_interface(Klass *k) const { } objArrayOop InstanceKlass::allocate_objArray(int n, int length, TRAPS) { - if (length < 0) { - THROW_MSG_0(vmSymbols::java_lang_NegativeArraySizeException(), err_msg("%d", length)); - } - if (length > arrayOopDesc::max_array_length(T_OBJECT)) { - report_java_out_of_memory("Requested array size exceeds VM limit"); - JvmtiExport::post_array_size_exhausted(); - THROW_OOP_0(Universe::out_of_memory_error_array_size()); - } + check_array_allocation_length(length, arrayOopDesc::max_array_length(T_OBJECT), CHECK_NULL); int size = objArrayOopDesc::object_size(length); Klass* ak = array_klass(n, CHECK_NULL); objArrayOop o = (objArrayOop)Universe::heap()->array_allocate(ak, size, length, diff --git a/src/hotspot/share/oops/klass.cpp b/src/hotspot/share/oops/klass.cpp index 07898b0fc81..db6bf64ea70 100644 --- a/src/hotspot/share/oops/klass.cpp +++ b/src/hotspot/share/oops/klass.cpp @@ -611,6 +611,20 @@ Klass* Klass::array_klass_impl(bool or_null, TRAPS) { return NULL; } +void Klass::check_array_allocation_length(int length, int max_length, TRAPS) { + if (length > max_length) { + if (!THREAD->in_retryable_allocation()) { + report_java_out_of_memory("Requested array size exceeds VM limit"); + JvmtiExport::post_array_size_exhausted(); + THROW_OOP(Universe::out_of_memory_error_array_size()); + } else { + THROW_OOP(Universe::out_of_memory_error_retry()); + } + } else if (length < 0) { + THROW_MSG(vmSymbols::java_lang_NegativeArraySizeException(), err_msg("%d", length)); + } +} + oop Klass::class_loader() const { return class_loader_data()->class_loader(); } // In product mode, this function doesn't have virtual function calls so diff --git a/src/hotspot/share/oops/klass.hpp b/src/hotspot/share/oops/klass.hpp index d428e5b0e34..aabde977082 100644 --- a/src/hotspot/share/oops/klass.hpp +++ b/src/hotspot/share/oops/klass.hpp @@ -514,6 +514,9 @@ protected: virtual Klass* array_klass_impl(bool or_null, int rank, TRAPS); virtual Klass* array_klass_impl(bool or_null, TRAPS); + // Error handling when length > max_length or length < 0 + static void check_array_allocation_length(int length, int max_length, TRAPS); + void set_vtable_length(int len) { _vtable_len= len; } vtableEntry* start_of_vtable() const; diff --git a/src/hotspot/share/oops/objArrayKlass.cpp b/src/hotspot/share/oops/objArrayKlass.cpp index 3feacb89280..8138a0a9437 100644 --- a/src/hotspot/share/oops/objArrayKlass.cpp +++ b/src/hotspot/share/oops/objArrayKlass.cpp @@ -170,19 +170,10 @@ int ObjArrayKlass::oop_size(oop obj) const { } objArrayOop ObjArrayKlass::allocate(int length, TRAPS) { - if (length >= 0) { - if (length <= arrayOopDesc::max_array_length(T_OBJECT)) { - int size = objArrayOopDesc::object_size(length); - return (objArrayOop)Universe::heap()->array_allocate(this, size, length, - /* do_zero */ true, THREAD); - } else { - report_java_out_of_memory("Requested array size exceeds VM limit"); - JvmtiExport::post_array_size_exhausted(); - THROW_OOP_0(Universe::out_of_memory_error_array_size()); - } - } else { - THROW_MSG_0(vmSymbols::java_lang_NegativeArraySizeException(), err_msg("%d", length)); - } + check_array_allocation_length(length, arrayOopDesc::max_array_length(T_OBJECT), CHECK_0); + int size = objArrayOopDesc::object_size(length); + return (objArrayOop)Universe::heap()->array_allocate(this, size, length, + /* do_zero */ true, THREAD); } static int multi_alloc_counter = 0; diff --git a/src/hotspot/share/oops/typeArrayKlass.cpp b/src/hotspot/share/oops/typeArrayKlass.cpp index 0898b31e501..47e3f8661ac 100644 --- a/src/hotspot/share/oops/typeArrayKlass.cpp +++ b/src/hotspot/share/oops/typeArrayKlass.cpp @@ -99,19 +99,10 @@ TypeArrayKlass::TypeArrayKlass(BasicType type, Symbol* name) : ArrayKlass(name, typeArrayOop TypeArrayKlass::allocate_common(int length, bool do_zero, TRAPS) { assert(log2_element_size() >= 0, "bad scale"); - if (length >= 0) { - if (length <= max_length()) { - size_t size = typeArrayOopDesc::object_size(layout_helper(), length); - return (typeArrayOop)Universe::heap()->array_allocate(this, (int)size, length, - do_zero, CHECK_NULL); - } else { - report_java_out_of_memory("Requested array size exceeds VM limit"); - JvmtiExport::post_array_size_exhausted(); - THROW_OOP_0(Universe::out_of_memory_error_array_size()); - } - } else { - THROW_MSG_0(vmSymbols::java_lang_NegativeArraySizeException(), err_msg("%d", length)); - } + check_array_allocation_length(length, max_length(), CHECK_NULL); + size_t size = typeArrayOopDesc::object_size(layout_helper(), length); + return (typeArrayOop)Universe::heap()->array_allocate(this, (int)size, length, + do_zero, CHECK_NULL); } oop TypeArrayKlass::multi_allocate(int rank, jint* last_size, TRAPS) { diff --git a/src/hotspot/share/runtime/thread.cpp b/src/hotspot/share/runtime/thread.cpp index f354f6faefa..1c1ee13a388 100644 --- a/src/hotspot/share/runtime/thread.cpp +++ b/src/hotspot/share/runtime/thread.cpp @@ -1547,6 +1547,7 @@ void JavaThread::initialize() { _pending_failed_speculation = 0; _pending_transfer_to_interpreter = false; _adjusting_comp_level = false; + _in_retryable_allocation = false; _jvmci._alternate_call_target = NULL; assert(_jvmci._implicit_exception_pc == NULL, "must be"); if (JVMCICounterSize > 0) { diff --git a/src/hotspot/share/runtime/thread.hpp b/src/hotspot/share/runtime/thread.hpp index ce25684a034..3a212d85c26 100644 --- a/src/hotspot/share/runtime/thread.hpp +++ b/src/hotspot/share/runtime/thread.hpp @@ -281,6 +281,14 @@ class Thread: public ThreadShadow { void leave_signal_handler() { _num_nested_signal--; } bool is_inside_signal_handler() const { return _num_nested_signal > 0; } + // Determines if a heap allocation failure will be retried + // (e.g., by deoptimizing and re-executing in the interpreter). + // In this case, the failed allocation must raise + // Universe::out_of_memory_error_retry() and omit side effects + // such as JVMTI events and handling -XX:+HeapDumpOnOutOfMemoryError + // and -XX:OnOutOfMemoryError. + virtual bool in_retryable_allocation() const { return false; } + #ifdef ASSERT void set_suspendible_thread() { _suspendible_thread = true; @@ -1048,6 +1056,10 @@ class JavaThread: public Thread { // Guard for re-entrant call to JVMCIRuntime::adjust_comp_level bool _adjusting_comp_level; + // True if in a runtime call from compiled code that will deoptimize + // and re-execute a failed heap allocation in the interpreter. + bool _in_retryable_allocation; + // An id of a speculation that JVMCI compiled code can use to further describe and // uniquely identify the speculative optimization guarded by the uncommon trap long _pending_failed_speculation; @@ -1458,7 +1470,7 @@ class JavaThread: public Thread { #if INCLUDE_JVMCI int pending_deoptimization() const { return _pending_deoptimization; } - long pending_failed_speculation() const { return _pending_failed_speculation; } + long pending_failed_speculation() const { return _pending_failed_speculation; } bool adjusting_comp_level() const { return _adjusting_comp_level; } void set_adjusting_comp_level(bool b) { _adjusting_comp_level = b; } bool has_pending_monitorenter() const { return _pending_monitorenter; } @@ -1468,6 +1480,9 @@ class JavaThread: public Thread { void set_pending_transfer_to_interpreter(bool b) { _pending_transfer_to_interpreter = b; } void set_jvmci_alternate_call_target(address a) { assert(_jvmci._alternate_call_target == NULL, "must be"); _jvmci._alternate_call_target = a; } void set_jvmci_implicit_exception_pc(address a) { assert(_jvmci._implicit_exception_pc == NULL, "must be"); _jvmci._implicit_exception_pc = a; } + + virtual bool in_retryable_allocation() const { return _in_retryable_allocation; } + void set_in_retryable_allocation(bool b) { _in_retryable_allocation = b; } #endif // INCLUDE_JVMCI // Exception handling for compiled methods diff --git a/src/jdk.aot/share/classes/jdk.tools.jaotc.binformat/src/jdk/tools/jaotc/binformat/BinaryContainer.java b/src/jdk.aot/share/classes/jdk.tools.jaotc.binformat/src/jdk/tools/jaotc/binformat/BinaryContainer.java index e19248cf59b..3c6fbdcfa65 100644 --- a/src/jdk.aot/share/classes/jdk.tools.jaotc.binformat/src/jdk/tools/jaotc/binformat/BinaryContainer.java +++ b/src/jdk.aot/share/classes/jdk.tools.jaotc.binformat/src/jdk/tools/jaotc/binformat/BinaryContainer.java @@ -240,14 +240,20 @@ public final class BinaryContainer implements SymbolTable { {"JVMCIRuntime::log_printf", "_aot_jvmci_runtime_log_printf"}, {"JVMCIRuntime::vm_message", "_aot_jvmci_runtime_vm_message"}, {"JVMCIRuntime::new_instance", "_aot_jvmci_runtime_new_instance"}, - {"JVMCIRuntime::log_primitive", "_aot_jvmci_runtime_log_primitive"}, + {"JVMCIRuntime::new_array", "_aot_jvmci_runtime_new_array"}, {"JVMCIRuntime::new_multi_array", "_aot_jvmci_runtime_new_multi_array"}, - {"JVMCIRuntime::validate_object", "_aot_jvmci_runtime_validate_object"}, + {"JVMCIRuntime::dynamic_new_instance", "_aot_jvmci_runtime_dynamic_new_instance"}, {"JVMCIRuntime::dynamic_new_array", "_aot_jvmci_runtime_dynamic_new_array"}, + {"JVMCIRuntime::new_instance_or_null", "_aot_jvmci_runtime_new_instance_or_null"}, + {"JVMCIRuntime::new_array_or_null", "_aot_jvmci_runtime_new_array_or_null"}, + {"JVMCIRuntime::new_multi_array_or_null", "_aot_jvmci_runtime_new_multi_array_or_null"}, + {"JVMCIRuntime::dynamic_new_instance_or_null", "_aot_jvmci_runtime_dynamic_new_instance_or_null"}, + {"JVMCIRuntime::dynamic_new_array_or_null", "_aot_jvmci_runtime_dynamic_new_array_or_null"}, + {"JVMCIRuntime::log_primitive", "_aot_jvmci_runtime_log_primitive"}, + {"JVMCIRuntime::validate_object", "_aot_jvmci_runtime_validate_object"}, {"JVMCIRuntime::write_barrier_pre", "_aot_jvmci_runtime_write_barrier_pre"}, {"JVMCIRuntime::identity_hash_code", "_aot_jvmci_runtime_identity_hash_code"}, {"JVMCIRuntime::write_barrier_post", "_aot_jvmci_runtime_write_barrier_post"}, - {"JVMCIRuntime::dynamic_new_instance", "_aot_jvmci_runtime_dynamic_new_instance"}, {"JVMCIRuntime::thread_is_interrupted", "_aot_jvmci_runtime_thread_is_interrupted"}, {"JVMCIRuntime::exception_handler_for_pc", "_aot_jvmci_runtime_exception_handler_for_pc"}, {"JVMCIRuntime::test_deoptimize_call_int", "_aot_jvmci_runtime_test_deoptimize_call_int"}, @@ -256,8 +262,7 @@ public final class BinaryContainer implements SymbolTable { {"JVMCIRuntime::throw_klass_external_name_exception", "_aot_jvmci_runtime_throw_klass_external_name_exception"}, {"JVMCIRuntime::throw_class_cast_exception", "_aot_jvmci_runtime_throw_class_cast_exception"}, - {"JVMCIRuntime::vm_error", "_aot_jvmci_runtime_vm_error"}, - {"JVMCIRuntime::new_array", "_aot_jvmci_runtime_new_array"} + {"JVMCIRuntime::vm_error", "_aot_jvmci_runtime_vm_error"} }; //@formatter:on diff --git a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/GraalHotSpotVMConfig.java b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/GraalHotSpotVMConfig.java index f8b8109d5f0..80db6566fb2 100644 --- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/GraalHotSpotVMConfig.java +++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/GraalHotSpotVMConfig.java @@ -648,11 +648,33 @@ public class GraalHotSpotVMConfig extends GraalHotSpotVMConfigBase { public final long unsafeArraycopy = getFieldValue("StubRoutines::_unsafe_arraycopy", Long.class, "address"); public final long genericArraycopy = getFieldValue("StubRoutines::_generic_arraycopy", Long.class, "address"); + // Allocation stubs that throw an exception when allocation fails public final long newInstanceAddress = getAddress("JVMCIRuntime::new_instance"); public final long newArrayAddress = getAddress("JVMCIRuntime::new_array"); public final long newMultiArrayAddress = getAddress("JVMCIRuntime::new_multi_array"); - public final long dynamicNewArrayAddress = getAddress("JVMCIRuntime::dynamic_new_array"); - public final long dynamicNewInstanceAddress = getAddress("JVMCIRuntime::dynamic_new_instance"); + + // Allocation stubs that return null when allocation fails + public final long newInstanceOrNullAddress = getAddress("JVMCIRuntime::new_instance_or_null", 0L); + public final long newArrayOrNullAddress = getAddress("JVMCIRuntime::new_array_or_null", 0L); + public final long newMultiArrayOrNullAddress = getAddress("JVMCIRuntime::new_multi_array_or_null", 0L); + + public boolean areNullAllocationStubsAvailable() { + return newInstanceOrNullAddress != 0L; + } + + /** + * Checks that HotSpot implements all or none of the allocate-or-null stubs. + */ + private boolean checkNullAllocationStubs() { + if (newInstanceOrNullAddress == 0L) { + assert newArrayOrNullAddress == 0L; + assert newMultiArrayOrNullAddress == 0L; + } else { + assert newArrayOrNullAddress != 0L; + assert newMultiArrayOrNullAddress != 0L; + } + return true; + } public final long threadIsInterruptedAddress = getAddress("JVMCIRuntime::thread_is_interrupted"); public final long vmMessageAddress = getAddress("JVMCIRuntime::vm_message"); @@ -757,6 +779,7 @@ public class GraalHotSpotVMConfig extends GraalHotSpotVMConfigBase { } assert codeEntryAlignment > 0 : codeEntryAlignment; + assert checkNullAllocationStubs(); return true; } } diff --git a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotBackend.java b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotBackend.java index 3ffa610a363..a08613f534c 100644 --- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotBackend.java +++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotBackend.java @@ -279,20 +279,35 @@ public abstract class HotSpotBackend extends Backend implements FrameMap.Referen public static final ForeignCallDescriptor VM_ERROR = new ForeignCallDescriptor("vm_error", void.class, Object.class, Object.class, long.class); /** - * New multi array stub call. + * New multi array stub that throws an {@link OutOfMemoryError} on allocation failure. */ public static final ForeignCallDescriptor NEW_MULTI_ARRAY = new ForeignCallDescriptor("new_multi_array", Object.class, KlassPointer.class, int.class, Word.class); /** - * New array stub. + * New multi array stub that will return null on allocation failure. + */ + public static final ForeignCallDescriptor NEW_MULTI_ARRAY_OR_NULL = new ForeignCallDescriptor("new_multi_array_or_null", Object.class, KlassPointer.class, int.class, Word.class); + + /** + * New array stub that throws an {@link OutOfMemoryError} on allocation failure. */ public static final ForeignCallDescriptor NEW_ARRAY = new ForeignCallDescriptor("new_array", Object.class, KlassPointer.class, int.class); /** - * New instance stub. + * New array stub that will return null on allocation failure. + */ + public static final ForeignCallDescriptor NEW_ARRAY_OR_NULL = new ForeignCallDescriptor("new_array_or_null", Object.class, KlassPointer.class, int.class); + + /** + * New instance stub that throws an {@link OutOfMemoryError} on allocation failure. */ public static final ForeignCallDescriptor NEW_INSTANCE = new ForeignCallDescriptor("new_instance", Object.class, KlassPointer.class); + /** + * New instance stub that will return null on allocation failure. + */ + public static final ForeignCallDescriptor NEW_INSTANCE_OR_NULL = new ForeignCallDescriptor("new_instance_or_null", Object.class, KlassPointer.class); + /** * @see ResolveConstantStubCall */ diff --git a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotHostForeignCallsProvider.java b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotHostForeignCallsProvider.java index 4afc1f71c02..990c0d14bdb 100644 --- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotHostForeignCallsProvider.java +++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotHostForeignCallsProvider.java @@ -45,8 +45,11 @@ import static org.graalvm.compiler.hotspot.HotSpotBackend.MONTGOMERY_SQUARE; import static org.graalvm.compiler.hotspot.HotSpotBackend.MULTIPLY_TO_LEN; import static org.graalvm.compiler.hotspot.HotSpotBackend.MUL_ADD; import static org.graalvm.compiler.hotspot.HotSpotBackend.NEW_ARRAY; +import static org.graalvm.compiler.hotspot.HotSpotBackend.NEW_ARRAY_OR_NULL; import static org.graalvm.compiler.hotspot.HotSpotBackend.NEW_INSTANCE; +import static org.graalvm.compiler.hotspot.HotSpotBackend.NEW_INSTANCE_OR_NULL; import static org.graalvm.compiler.hotspot.HotSpotBackend.NEW_MULTI_ARRAY; +import static org.graalvm.compiler.hotspot.HotSpotBackend.NEW_MULTI_ARRAY_OR_NULL; import static org.graalvm.compiler.hotspot.HotSpotBackend.RESOLVE_DYNAMIC_INVOKE; import static org.graalvm.compiler.hotspot.HotSpotBackend.RESOLVE_KLASS_BY_SYMBOL; import static org.graalvm.compiler.hotspot.HotSpotBackend.RESOLVE_METHOD_BY_SYMBOL_AND_LOAD_COUNTERS; @@ -78,8 +81,6 @@ import static org.graalvm.compiler.hotspot.replacements.HotSpotReplacementsUtil. import static org.graalvm.compiler.hotspot.replacements.HotSpotReplacementsUtil.TLAB_TOP_LOCATION; import static org.graalvm.compiler.hotspot.replacements.MonitorSnippets.MONITORENTER; import static org.graalvm.compiler.hotspot.replacements.MonitorSnippets.MONITOREXIT; -import static org.graalvm.compiler.hotspot.replacements.NewObjectSnippets.DYNAMIC_NEW_ARRAY; -import static org.graalvm.compiler.hotspot.replacements.NewObjectSnippets.DYNAMIC_NEW_INSTANCE; import static org.graalvm.compiler.hotspot.replacements.ThreadSubstitutions.THREAD_IS_INTERRUPTED; import static org.graalvm.compiler.hotspot.replacements.WriteBarrierSnippets.G1WBPOSTCALL; import static org.graalvm.compiler.hotspot.replacements.WriteBarrierSnippets.G1WBPRECALL; @@ -288,6 +289,14 @@ public abstract class HotSpotHostForeignCallsProvider extends HotSpotForeignCall linkForeignCall(options, providers, NEW_INSTANCE, c.newInstanceAddress, PREPEND_THREAD, SAFEPOINT, REEXECUTABLE, TLAB_TOP_LOCATION, TLAB_END_LOCATION); linkForeignCall(options, providers, NEW_ARRAY, c.newArrayAddress, PREPEND_THREAD, SAFEPOINT, REEXECUTABLE, TLAB_TOP_LOCATION, TLAB_END_LOCATION); + linkForeignCall(options, providers, NEW_MULTI_ARRAY, c.newMultiArrayAddress, PREPEND_THREAD, SAFEPOINT, REEXECUTABLE, TLAB_TOP_LOCATION, TLAB_END_LOCATION); + + if (c.areNullAllocationStubsAvailable()) { + linkForeignCall(options, providers, NEW_INSTANCE_OR_NULL, c.newInstanceOrNullAddress, PREPEND_THREAD, SAFEPOINT, REEXECUTABLE, TLAB_TOP_LOCATION, TLAB_END_LOCATION); + linkForeignCall(options, providers, NEW_ARRAY_OR_NULL, c.newArrayOrNullAddress, PREPEND_THREAD, SAFEPOINT, REEXECUTABLE, TLAB_TOP_LOCATION, TLAB_END_LOCATION); + linkForeignCall(options, providers, NEW_MULTI_ARRAY_OR_NULL, c.newMultiArrayOrNullAddress, PREPEND_THREAD, SAFEPOINT, REEXECUTABLE, TLAB_TOP_LOCATION, TLAB_END_LOCATION); + } + link(new ExceptionHandlerStub(options, providers, foreignCalls.get(EXCEPTION_HANDLER))); link(new UnwindExceptionToCallerStub(options, providers, registerStubCall(UNWIND_EXCEPTION_TO_CALLER, SAFEPOINT, REEXECUTABLE_ONLY_AFTER_EXCEPTION, any()))); link(new VerifyOopStub(options, providers, registerStubCall(VERIFY_OOP, LEAF_NOFP, REEXECUTABLE, NO_LOCATIONS))); @@ -305,11 +314,8 @@ public abstract class HotSpotHostForeignCallsProvider extends HotSpotForeignCall linkForeignCall(options, providers, REGISTER_FINALIZER, c.registerFinalizerAddress, PREPEND_THREAD, SAFEPOINT, REEXECUTABLE_ONLY_AFTER_EXCEPTION, any()); linkForeignCall(options, providers, MONITORENTER, c.monitorenterAddress, PREPEND_THREAD, SAFEPOINT, REEXECUTABLE_ONLY_AFTER_EXCEPTION, any()); linkForeignCall(options, providers, MONITOREXIT, c.monitorexitAddress, PREPEND_THREAD, STACK_INSPECTABLE_LEAF, REEXECUTABLE_ONLY_AFTER_EXCEPTION, any()); - linkForeignCall(options, providers, NEW_MULTI_ARRAY, c.newMultiArrayAddress, PREPEND_THREAD, SAFEPOINT, REEXECUTABLE, TLAB_TOP_LOCATION, TLAB_END_LOCATION); linkForeignCall(options, providers, NOTIFY, c.notifyAddress, PREPEND_THREAD, SAFEPOINT, REEXECUTABLE_ONLY_AFTER_EXCEPTION, any()); linkForeignCall(options, providers, NOTIFY_ALL, c.notifyAllAddress, PREPEND_THREAD, SAFEPOINT, REEXECUTABLE_ONLY_AFTER_EXCEPTION, any()); - linkForeignCall(options, providers, DYNAMIC_NEW_ARRAY, c.dynamicNewArrayAddress, PREPEND_THREAD, SAFEPOINT, REEXECUTABLE); - linkForeignCall(options, providers, DYNAMIC_NEW_INSTANCE, c.dynamicNewInstanceAddress, PREPEND_THREAD, SAFEPOINT, REEXECUTABLE); linkForeignCall(options, providers, LOG_PRINTF, c.logPrintfAddress, PREPEND_THREAD, LEAF, REEXECUTABLE, NO_LOCATIONS); linkForeignCall(options, providers, LOG_OBJECT, c.logObjectAddress, PREPEND_THREAD, LEAF, REEXECUTABLE, NO_LOCATIONS); linkForeignCall(options, providers, LOG_PRIMITIVE, c.logPrimitiveAddress, PREPEND_THREAD, LEAF, REEXECUTABLE, NO_LOCATIONS); diff --git a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/NewObjectSnippets.java b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/NewObjectSnippets.java index a7946c78b8f..2beb6e63edf 100644 --- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/NewObjectSnippets.java +++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/NewObjectSnippets.java @@ -24,9 +24,17 @@ package org.graalvm.compiler.hotspot.replacements; +import static jdk.vm.ci.meta.DeoptimizationAction.None; +import static jdk.vm.ci.meta.DeoptimizationReason.RuntimeConstraint; import static org.graalvm.compiler.core.common.GraalOptions.GeneratePIC; import static org.graalvm.compiler.core.common.calc.UnsignedMath.belowThan; -import static org.graalvm.compiler.hotspot.GraalHotSpotVMConfig.INJECTED_VMCONFIG; +import static org.graalvm.compiler.hotspot.GraalHotSpotVMConfigBase.INJECTED_VMCONFIG; +import static org.graalvm.compiler.hotspot.HotSpotBackend.NEW_ARRAY; +import static org.graalvm.compiler.hotspot.HotSpotBackend.NEW_ARRAY_OR_NULL; +import static org.graalvm.compiler.hotspot.HotSpotBackend.NEW_INSTANCE; +import static org.graalvm.compiler.hotspot.HotSpotBackend.NEW_INSTANCE_OR_NULL; +import static org.graalvm.compiler.hotspot.HotSpotBackend.NEW_MULTI_ARRAY; +import static org.graalvm.compiler.hotspot.HotSpotBackend.NEW_MULTI_ARRAY_OR_NULL; import static org.graalvm.compiler.hotspot.replacements.HotSpotReplacementsUtil.CLASS_ARRAY_KLASS_LOCATION; import static org.graalvm.compiler.hotspot.replacements.HotSpotReplacementsUtil.HUB_WRITE_LOCATION; import static org.graalvm.compiler.hotspot.replacements.HotSpotReplacementsUtil.MARK_WORD_LOCATION; @@ -70,6 +78,7 @@ import static org.graalvm.compiler.replacements.nodes.CStringConstant.cstring; import static org.graalvm.compiler.replacements.nodes.ExplodeLoopNode.explodeLoop; import org.graalvm.compiler.api.replacements.Fold; +import org.graalvm.compiler.api.replacements.Fold.InjectedParameter; import org.graalvm.compiler.api.replacements.Snippet; import org.graalvm.compiler.api.replacements.Snippet.ConstantParameter; import org.graalvm.compiler.api.replacements.Snippet.VarargsParameter; @@ -80,7 +89,6 @@ import org.graalvm.compiler.debug.GraalError; import org.graalvm.compiler.graph.Node.ConstantNodeParameter; import org.graalvm.compiler.graph.Node.NodeIntrinsic; import org.graalvm.compiler.hotspot.GraalHotSpotVMConfig; -import org.graalvm.compiler.hotspot.HotSpotBackend; import org.graalvm.compiler.hotspot.meta.HotSpotProviders; import org.graalvm.compiler.hotspot.meta.HotSpotRegistersProvider; import org.graalvm.compiler.hotspot.nodes.DimensionsNode; @@ -126,8 +134,6 @@ import jdk.vm.ci.code.MemoryBarriers; import jdk.vm.ci.code.Register; import jdk.vm.ci.code.TargetDescription; import jdk.vm.ci.hotspot.HotSpotResolvedObjectType; -import jdk.vm.ci.meta.DeoptimizationAction; -import jdk.vm.ci.meta.DeoptimizationReason; import jdk.vm.ci.meta.JavaKind; import jdk.vm.ci.meta.ResolvedJavaType; @@ -220,14 +226,25 @@ public class NewObjectSnippets implements Snippets { if (counters != null && counters.stub != null) { counters.stub.inc(); } - result = newInstance(HotSpotBackend.NEW_INSTANCE, hub); + result = newInstanceStub(hub); } profileAllocation("instance", size, typeContext, options); return verifyOop(result); } + public static Object newInstanceStub(KlassPointer hub) { + if (useNullAllocationStubs(INJECTED_VMCONFIG)) { + return nonNullOrDeopt(newInstanceOrNull(NEW_INSTANCE_OR_NULL, hub)); + } else { + return newInstance(NEW_INSTANCE, hub); + } + } + @NodeIntrinsic(value = ForeignCallNode.class, injectedStampIsNonNull = true) - public static native Object newInstance(@ConstantNodeParameter ForeignCallDescriptor descriptor, KlassPointer hub); + private static native Object newInstance(@ConstantNodeParameter ForeignCallDescriptor descriptor, KlassPointer hub); + + @NodeIntrinsic(value = ForeignCallNode.class, injectedStampIsNonNull = false) + private static native Object newInstanceOrNull(@ConstantNodeParameter ForeignCallDescriptor descriptor, KlassPointer hub); @Snippet public static Object allocateInstancePIC(@ConstantParameter int size, KlassPointer hub, Word prototypeMarkWord, @ConstantParameter boolean fillContents, @@ -244,18 +261,18 @@ public class NewObjectSnippets implements Snippets { public static Object allocateInstanceDynamic(Class type, Class classClass, @ConstantParameter boolean fillContents, @ConstantParameter Register threadRegister, @ConstantParameter OptionValues options, @ConstantParameter Counters counters) { if (probability(SLOW_PATH_PROBABILITY, type == null)) { - DeoptimizeNode.deopt(DeoptimizationAction.None, DeoptimizationReason.RuntimeConstraint); + DeoptimizeNode.deopt(None, RuntimeConstraint); } Class nonNullType = PiNode.piCastNonNullClass(type, SnippetAnchorNode.anchor()); if (probability(SLOW_PATH_PROBABILITY, DynamicNewInstanceNode.throwsInstantiationException(type, classClass))) { - DeoptimizeNode.deopt(DeoptimizationAction.None, DeoptimizationReason.RuntimeConstraint); + DeoptimizeNode.deopt(None, RuntimeConstraint); } - return PiNode.piCastToSnippetReplaceeStamp(allocateInstanceDynamicHelper(type, fillContents, threadRegister, options, counters, nonNullType)); + return PiNode.piCastToSnippetReplaceeStamp(allocateInstanceDynamicHelper(fillContents, threadRegister, options, counters, nonNullType)); } - private static Object allocateInstanceDynamicHelper(Class type, boolean fillContents, Register threadRegister, OptionValues options, Counters counters, Class nonNullType) { + private static Object allocateInstanceDynamicHelper(boolean fillContents, Register threadRegister, OptionValues options, Counters counters, Class nonNullType) { KlassPointer hub = ClassGetHubNode.readClass(nonNullType); if (probability(FAST_PATH_PROBABILITY, !hub.isNull())) { KlassPointer nonNullHub = ClassGetHubNode.piCastNonNull(hub, SnippetAnchorNode.anchor()); @@ -277,10 +294,11 @@ public class NewObjectSnippets implements Snippets { return allocateInstanceHelper(layoutHelper, nonNullHub, prototypeMarkWord, fillContents, threadRegister, false, "", options, counters); } } else { - DeoptimizeNode.deopt(DeoptimizationAction.None, DeoptimizationReason.RuntimeConstraint); + DeoptimizeNode.deopt(None, RuntimeConstraint); } } - return dynamicNewInstanceStub(type); + DeoptimizeNode.deopt(None, RuntimeConstraint); + return null; } /** @@ -307,13 +325,30 @@ public class NewObjectSnippets implements Snippets { } @Snippet - public static Object allocateArray(KlassPointer hub, int length, Word prototypeMarkWord, @ConstantParameter int headerSize, @ConstantParameter int log2ElementSize, - @ConstantParameter boolean fillContents, @ConstantParameter Register threadRegister, @ConstantParameter boolean maybeUnroll, @ConstantParameter String typeContext, - @ConstantParameter OptionValues options, @ConstantParameter Counters counters) { + public static Object allocateArray(KlassPointer hub, + int length, + Word prototypeMarkWord, + @ConstantParameter int headerSize, + @ConstantParameter int log2ElementSize, + @ConstantParameter boolean fillContents, + @ConstantParameter Register threadRegister, + @ConstantParameter boolean maybeUnroll, + @ConstantParameter String typeContext, + @ConstantParameter OptionValues options, + @ConstantParameter Counters counters) { Object result = allocateArrayImpl(hub, length, prototypeMarkWord, headerSize, log2ElementSize, fillContents, threadRegister, maybeUnroll, typeContext, false, options, counters); return piArrayCastToSnippetReplaceeStamp(verifyOop(result), length); } + /** + * When allocating on the slow path, determines whether to use a version of the runtime call + * that returns {@code null} on a failed allocation instead of raising an OutOfMemoryError. + */ + @Fold + static boolean useNullAllocationStubs(@InjectedParameter GraalHotSpotVMConfig config) { + return config.areNullAllocationStubsAvailable(); + } + private static Object allocateArrayImpl(KlassPointer hub, int length, Word prototypeMarkWord, int headerSize, int log2ElementSize, boolean fillContents, Register threadRegister, boolean maybeUnroll, String typeContext, boolean skipNegativeCheck, OptionValues options, Counters counters) { Object result; @@ -331,27 +366,41 @@ public class NewObjectSnippets implements Snippets { } result = formatArray(hub, allocationSize, length, headerSize, top, prototypeMarkWord, fillContents, maybeUnroll, counters); } else { - result = newArray(HotSpotBackend.NEW_ARRAY, hub, length); + result = newArrayStub(hub, length); } profileAllocation("array", allocationSize, typeContext, options); return result; } - @NodeIntrinsic(value = ForeignCallNode.class, injectedStampIsNonNull = true) - public static native Object newArray(@ConstantNodeParameter ForeignCallDescriptor descriptor, KlassPointer hub, int length); - - public static final ForeignCallDescriptor DYNAMIC_NEW_ARRAY = new ForeignCallDescriptor("dynamic_new_array", Object.class, Class.class, int.class); - public static final ForeignCallDescriptor DYNAMIC_NEW_INSTANCE = new ForeignCallDescriptor("dynamic_new_instance", Object.class, Class.class); - - @NodeIntrinsic(value = ForeignCallNode.class, injectedStampIsNonNull = true) - public static native Object dynamicNewArrayStub(@ConstantNodeParameter ForeignCallDescriptor descriptor, Class elementType, int length); - - public static Object dynamicNewInstanceStub(Class elementType) { - return dynamicNewInstanceStubCall(DYNAMIC_NEW_INSTANCE, elementType); + public static Object newArrayStub(KlassPointer hub, int length) { + if (useNullAllocationStubs(INJECTED_VMCONFIG)) { + return nonNullOrDeopt(newArrayOrNull(NEW_ARRAY_OR_NULL, hub, length)); + } else { + return newArray(NEW_ARRAY, hub, length); + } } @NodeIntrinsic(value = ForeignCallNode.class, injectedStampIsNonNull = true) - public static native Object dynamicNewInstanceStubCall(@ConstantNodeParameter ForeignCallDescriptor descriptor, Class elementType); + private static native Object newArray(@ConstantNodeParameter ForeignCallDescriptor descriptor, KlassPointer hub, int length); + + @NodeIntrinsic(value = ForeignCallNode.class, injectedStampIsNonNull = false) + private static native Object newArrayOrNull(@ConstantNodeParameter ForeignCallDescriptor descriptor, KlassPointer hub, int length); + + /** + * Deoptimizes if {@code obj == null} otherwise returns {@code obj}. + */ + private static Object nonNullOrDeopt(Object obj) { + if (obj == null) { + DeoptimizeNode.deopt(None, RuntimeConstraint); + } + return obj; + } + + @NodeIntrinsic(value = ForeignCallNode.class, injectedStampIsNonNull = true) + public static native Object dynamicNewInstance(@ConstantNodeParameter ForeignCallDescriptor descriptor, Class elementType); + + @NodeIntrinsic(value = ForeignCallNode.class, injectedStampIsNonNull = false) + public static native Object dynamicNewInstanceOrNull(@ConstantNodeParameter ForeignCallDescriptor descriptor, Class elementType); @Snippet public static Object allocateArrayDynamic(Class elementType, Class voidClass, int length, @ConstantParameter boolean fillContents, @ConstantParameter Register threadRegister, @@ -369,17 +418,17 @@ public class NewObjectSnippets implements Snippets { */ staticAssert(knownElementKind != JavaKind.Void, "unsupported knownElementKind"); if (knownElementKind == JavaKind.Illegal && probability(SLOW_PATH_PROBABILITY, elementType == null || DynamicNewArrayNode.throwsIllegalArgumentException(elementType, voidClass))) { - DeoptimizeNode.deopt(DeoptimizationAction.None, DeoptimizationReason.RuntimeConstraint); + DeoptimizeNode.deopt(None, RuntimeConstraint); } KlassPointer klass = loadKlassFromObject(elementType, arrayKlassOffset(INJECTED_VMCONFIG), CLASS_ARRAY_KLASS_LOCATION); if (klass.isNull()) { - DeoptimizeNode.deopt(DeoptimizationAction.None, DeoptimizationReason.RuntimeConstraint); + DeoptimizeNode.deopt(None, RuntimeConstraint); } KlassPointer nonNullKlass = ClassGetHubNode.piCastNonNull(klass, SnippetAnchorNode.anchor()); if (length < 0) { - DeoptimizeNode.deopt(DeoptimizationAction.None, DeoptimizationReason.RuntimeConstraint); + DeoptimizeNode.deopt(None, RuntimeConstraint); } int layoutHelper; if (knownElementKind == JavaKind.Illegal) { @@ -412,24 +461,35 @@ public class NewObjectSnippets implements Snippets { * Calls the runtime stub for implementing MULTIANEWARRAY. */ @Snippet - public static Object newmultiarray(KlassPointer hub, @ConstantParameter int rank, @VarargsParameter int[] dimensions) { + private static Object newmultiarray(KlassPointer hub, @ConstantParameter int rank, @VarargsParameter int[] dimensions) { Word dims = DimensionsNode.allocaDimsArray(rank); ExplodeLoopNode.explodeLoop(); for (int i = 0; i < rank; i++) { dims.writeInt(i * 4, dimensions[i], LocationIdentity.init()); } - return newArrayCall(HotSpotBackend.NEW_MULTI_ARRAY, hub, rank, dims); + return newMultiArrayStub(hub, rank, dims); + } + + private static Object newMultiArrayStub(KlassPointer hub, int rank, Word dims) { + if (useNullAllocationStubs(INJECTED_VMCONFIG)) { + return nonNullOrDeopt(newMultiArrayOrNull(NEW_MULTI_ARRAY_OR_NULL, hub, rank, dims)); + } else { + return newMultiArray(NEW_MULTI_ARRAY, hub, rank, dims); + } } @Snippet - public static Object newmultiarrayPIC(KlassPointer hub, @ConstantParameter int rank, @VarargsParameter int[] dimensions) { + private static Object newmultiarrayPIC(KlassPointer hub, @ConstantParameter int rank, @VarargsParameter int[] dimensions) { // Array type would be resolved by dominating resolution. KlassPointer picHub = LoadConstantIndirectlyFixedNode.loadKlass(hub); return newmultiarray(picHub, rank, dimensions); } @NodeIntrinsic(value = ForeignCallNode.class, injectedStampIsNonNull = true) - public static native Object newArrayCall(@ConstantNodeParameter ForeignCallDescriptor descriptor, KlassPointer hub, int rank, Word dims); + private static native Object newMultiArray(@ConstantNodeParameter ForeignCallDescriptor descriptor, KlassPointer hub, int rank, Word dims); + + @NodeIntrinsic(value = ForeignCallNode.class, injectedStampIsNonNull = false) + private static native Object newMultiArrayOrNull(@ConstantNodeParameter ForeignCallDescriptor descriptor, KlassPointer hub, int rank, Word dims); /** * Maximum number of long stores to emit when zeroing an object with a constant size. Larger @@ -508,18 +568,10 @@ public class NewObjectSnippets implements Snippets { fillMemory(0xfefefefefefefefeL, size, memory, constantSize, startOffset, manualUnroll, counters); } - /** - * Formats some allocated memory with an object header and zeroes out the rest. Disables asserts - * since they can't be compiled in stubs. - */ - public static Object formatObjectForStub(KlassPointer hub, int size, Word memory, Word compileTimePrototypeMarkWord) { - return formatObject(hub, size, memory, compileTimePrototypeMarkWord, true, false, null); - } - /** * Formats some allocated memory with an object header and zeroes out the rest. */ - protected static Object formatObject(KlassPointer hub, int size, Word memory, Word compileTimePrototypeMarkWord, boolean fillContents, boolean constantSize, Counters counters) { + private static Object formatObject(KlassPointer hub, int size, Word memory, Word compileTimePrototypeMarkWord, boolean fillContents, boolean constantSize, Counters counters) { Word prototypeMarkWord = useBiasedLocking(INJECTED_VMCONFIG) ? hub.readWord(prototypeMarkWordOffset(INJECTED_VMCONFIG), PROTOTYPE_MARK_WORD_LOCATION) : compileTimePrototypeMarkWord; initializeObjectHeader(memory, prototypeMarkWord, hub); if (fillContents) { @@ -532,7 +584,7 @@ public class NewObjectSnippets implements Snippets { } @Snippet - protected static void verifyHeap(@ConstantParameter Register threadRegister) { + private static void verifyHeap(@ConstantParameter Register threadRegister) { Word thread = registerAsWord(threadRegister); Word topValue = readTlabTop(thread); if (!topValue.equal(WordFactory.zero())) { @@ -546,7 +598,7 @@ public class NewObjectSnippets implements Snippets { /** * Formats some allocated memory with an object header and zeroes out the rest. */ - public static Object formatArray(KlassPointer hub, int allocationSize, int length, int headerSize, Word memory, Word prototypeMarkWord, boolean fillContents, boolean maybeUnroll, + private static Object formatArray(KlassPointer hub, int allocationSize, int length, int headerSize, Word memory, Word prototypeMarkWord, boolean fillContents, boolean maybeUnroll, Counters counters) { memory.writeInt(arrayLengthOffset(INJECTED_VMCONFIG), length, LocationIdentity.init()); /* From 4cd9401815f65157eb7a26b5319a57ec2e81e6d2 Mon Sep 17 00:00:00 2001 From: Jaikiran Pai Date: Sun, 7 Oct 2018 14:35:00 -0400 Subject: [PATCH 024/124] 8211765: JarFile constructor throws undocumented exception Reviewed-by: lancea, sherman, alanb, chegar --- .../share/classes/java/util/zip/ZipFile.java | 12 +++++++++--- test/jdk/java/util/jar/JarFile/Constructor.java | 12 ++++++++++-- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/src/java.base/share/classes/java/util/zip/ZipFile.java b/src/java.base/share/classes/java/util/zip/ZipFile.java index 2c928086e27..601f8375e3f 100644 --- a/src/java.base/share/classes/java/util/zip/ZipFile.java +++ b/src/java.base/share/classes/java/util/zip/ZipFile.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 2018, 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 @@ -35,6 +35,7 @@ import java.io.UncheckedIOException; import java.lang.ref.Cleaner.Cleanable; import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; +import java.nio.file.InvalidPathException; import java.nio.file.attribute.BasicFileAttributes; import java.nio.file.Files; import java.util.ArrayDeque; @@ -1218,8 +1219,13 @@ class ZipFile implements ZipConstants, Closeable { static Source get(File file, boolean toDelete) throws IOException { - Key key = new Key(file, - Files.readAttributes(file.toPath(), BasicFileAttributes.class)); + final Key key; + try { + key = new Key(file, + Files.readAttributes(file.toPath(), BasicFileAttributes.class)); + } catch (InvalidPathException ipe) { + throw new IOException(ipe); + } Source src; synchronized (files) { src = files.get(key); diff --git a/test/jdk/java/util/jar/JarFile/Constructor.java b/test/jdk/java/util/jar/JarFile/Constructor.java index eb935cd048a..dda7c2b6676 100644 --- a/test/jdk/java/util/jar/JarFile/Constructor.java +++ b/test/jdk/java/util/jar/JarFile/Constructor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2018 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 @@ -23,7 +23,7 @@ /** * @test - * @bug 4842702 + * @bug 4842702 8211765 * @summary Check that constructors throw specified exceptions * @author Martin Buchholz */ @@ -63,5 +63,13 @@ public class Constructor { try { Unreached (new JarFile (new File ("NoSuchJar.jar"))); } catch (IOException e) {} + + // Test that an IOExcception is thrown when an invalid charater + // is part of the path on Windows and Unix + final String invalidOSPath = System.getProperty("os.name") + .startsWith("Windows") ? "C:\\*" : "foo\u0000bar"; + + try { Unreached (new JarFile (invalidOSPath)); } + catch (IOException e) {} } } From 5cf91fc60e90bf03e113966760666adaf6d65798 Mon Sep 17 00:00:00 2001 From: Weijun Wang Date: Mon, 8 Oct 2018 13:25:39 +0800 Subject: [PATCH 025/124] 8210395: Add doc to SecurityTools.java Reviewed-by: mullan --- test/lib/jdk/test/lib/SecurityTools.java | 84 +++++++++++++++++++++--- test/lib/jdk/test/lib/util/JarUtils.java | 5 +- 2 files changed, 79 insertions(+), 10 deletions(-) diff --git a/test/lib/jdk/test/lib/SecurityTools.java b/test/lib/jdk/test/lib/SecurityTools.java index 240801fb87f..d6889402349 100644 --- a/test/lib/jdk/test/lib/SecurityTools.java +++ b/test/lib/jdk/test/lib/SecurityTools.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2018, 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 @@ -28,7 +28,6 @@ import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; -import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; import java.util.stream.Stream; @@ -36,10 +35,23 @@ import java.util.stream.Stream; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; +/** + * Run security tools (including jarsigner and keytool) in a new process. + * The en_US locale is always used so a test can always match output to + * English text. {@code /dev/urandom} is used as entropy source so tool will + * not block because of entropy scarcity. {@code -Jvm-options} is supported + * as an argument. + */ public class SecurityTools { + /** + * The response file name for keytool. Use {@link #setResponse} to + * create one. Do NOT manipulate it directly. + */ public static final String RESPONSE_FILE = "security_tools_response.txt"; + private SecurityTools() {} + private static ProcessBuilder getProcessBuilder(String tool, List args) { JDKToolLauncher launcher = JDKToolLauncher.createUsingTestJDK(tool) .addVMArg("-Duser.language=en") @@ -57,8 +69,13 @@ public class SecurityTools { return new ProcessBuilder(launcher.getCommand()); } - // keytool - + /** + * Runs keytool. + * + * @param args arguments to keytool + * @return an {@link OutputAnalyzer} object + * @throws Exception if there is an error + */ public static OutputAnalyzer keytool(List args) throws Exception { @@ -77,15 +94,46 @@ public class SecurityTools { } } - // Only call this if there is no white space in every argument + /** + * Runs keytool. + * + * @param args arguments to keytool in a single string. Only call this if + * there is no white space inside an argument. This string will + * be split with {@code \s+}. + * @return an {@link OutputAnalyzer} object + * @throws Exception if there is an error + */ public static OutputAnalyzer keytool(String args) throws Exception { return keytool(args.split("\\s+")); } + /** + * Runs keytool. + * + * @param args arguments to keytool + * @return an {@link OutputAnalyzer} object + * @throws Exception if there is an error + */ public static OutputAnalyzer keytool(String... args) throws Exception { return keytool(List.of(args)); } + + /** + * Sets the responses (user input) for keytool. + *

+ * For example, if keytool requires entering a password twice, call + * {@code setResponse("password", "password")}. Do NOT append a newline + * character to each response. If there are useless responses at the end, + * they will be discarded silently. If there are less responses than + * necessary, keytool will read EOF. The responses will be written into + * {@linkplain #RESPONSE_FILE a local file} and will only be used by the + * next keytool run. After the run, the file is removed. Calling this + * method will always overwrite the previous response file (if exists). + * + * @param responses response to keytool + * @throws IOException if there is an error + */ public static void setResponse(String... responses) throws IOException { String text; if (responses.length > 0) { @@ -97,8 +145,13 @@ public class SecurityTools { Files.write(Paths.get(RESPONSE_FILE), text.getBytes()); } - // jarsigner - + /** + * Runs jarsigner. + * + * @param args arguments to jarsigner + * @return an {@link OutputAnalyzer} object + * @throws Exception if there is an error + */ public static OutputAnalyzer jarsigner(List args) throws Exception { return execute(getProcessBuilder("jarsigner", args)); @@ -118,12 +171,27 @@ public class SecurityTools { } } - // Only call this if there is no white space in every argument + /** + * Runs jarsigner. + * + * @param args arguments to jarsigner in a single string. Only call this if + * there is no white space inside an argument. This string will + * be split with {@code \s+}. + * @return an {@link OutputAnalyzer} object + * @throws Exception if there is an error + */ public static OutputAnalyzer jarsigner(String args) throws Exception { return jarsigner(args.split("\\s+")); } + /** + * Runs jarsigner. + * + * @param args arguments to jarsigner + * @return an {@link OutputAnalyzer} object + * @throws Exception if there is an error + */ public static OutputAnalyzer jarsigner(String... args) throws Exception { return jarsigner(List.of(args)); } diff --git a/test/lib/jdk/test/lib/util/JarUtils.java b/test/lib/jdk/test/lib/util/JarUtils.java index f86c3cfcf8d..6e89b2090fc 100644 --- a/test/lib/jdk/test/lib/util/JarUtils.java +++ b/test/lib/jdk/test/lib/util/JarUtils.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2018, 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 @@ -222,6 +222,7 @@ public final class JarUtils { * be either updated or added. The files in the 2nd group * will be removed. If no "-" exists, all files belong to * the 1st group. + * @throws IOException if there is an error */ @Deprecated public static void updateJar(String src, String dest, String... files) @@ -259,7 +260,7 @@ public final class JarUtils { * Value can be Path, byte[] or String. If key exists in * src but value is Boolean FALSE. The entry is removed. * Existing entries in src not a key is unmodified. - * @throws IOException + * @throws IOException if there is an error */ @Deprecated public static void updateJar(String src, String dest, From 90d6bbd01a8153f3fef514efeefdd2edbba79b77 Mon Sep 17 00:00:00 2001 From: Roland Westrelin Date: Fri, 5 Oct 2018 16:47:27 +0200 Subject: [PATCH 026/124] 8211776: 8210887 broke arraycopy optimization when ZGC is enabled Reviewed-by: kvn --- src/hotspot/share/gc/z/c2/zBarrierSetC2.cpp | 4 ++++ src/hotspot/share/gc/z/c2/zBarrierSetC2.hpp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/hotspot/share/gc/z/c2/zBarrierSetC2.cpp b/src/hotspot/share/gc/z/c2/zBarrierSetC2.cpp index 73817624fda..e20d7ae0036 100644 --- a/src/hotspot/share/gc/z/c2/zBarrierSetC2.cpp +++ b/src/hotspot/share/gc/z/c2/zBarrierSetC2.cpp @@ -1427,6 +1427,10 @@ Node* ZBarrierSetC2::step_over_gc_barrier(Node* c) const { return c; } +bool ZBarrierSetC2::array_copy_requires_gc_barriers(bool tightly_coupled_alloc, BasicType type, bool is_clone, ArrayCopyPhase phase) const { + return type == T_OBJECT || type == T_ARRAY; +} + // == Verification == #ifdef ASSERT diff --git a/src/hotspot/share/gc/z/c2/zBarrierSetC2.hpp b/src/hotspot/share/gc/z/c2/zBarrierSetC2.hpp index a273360df71..fd90a9de4d4 100644 --- a/src/hotspot/share/gc/z/c2/zBarrierSetC2.hpp +++ b/src/hotspot/share/gc/z/c2/zBarrierSetC2.hpp @@ -194,7 +194,7 @@ public: virtual void enqueue_useful_gc_barrier(Unique_Node_List &worklist, Node* node) const; virtual void register_potential_barrier_node(Node* node) const; virtual void unregister_potential_barrier_node(Node* node) const; - virtual bool array_copy_requires_gc_barriers(bool tightly_coupled_alloc, BasicType type, bool is_clone, ArrayCopyPhase phase) const { return true; } + virtual bool array_copy_requires_gc_barriers(bool tightly_coupled_alloc, BasicType type, bool is_clone, ArrayCopyPhase phase) const; virtual Node* step_over_gc_barrier(Node* c) const; // If the BarrierSetC2 state has kept macro nodes in its compilation unit state to be // expanded later, then now is the time to do so. From b658954d7e1273665380472af9d3da209af95847 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20=C3=96sterlund?= Date: Mon, 8 Oct 2018 14:48:12 +0200 Subject: [PATCH 027/124] 8211718: Supporting multiple concurrent OopStorage iterators Reviewed-by: pliden, kbarrett --- src/hotspot/share/gc/shared/oopStorage.cpp | 18 +++++++-------- src/hotspot/share/gc/shared/oopStorage.hpp | 2 +- .../share/gc/shared/oopStorageParState.hpp | 23 +++++++------------ 3 files changed, 18 insertions(+), 25 deletions(-) diff --git a/src/hotspot/share/gc/shared/oopStorage.cpp b/src/hotspot/share/gc/shared/oopStorage.cpp index ad1e10799e2..f69305032e2 100644 --- a/src/hotspot/share/gc/shared/oopStorage.cpp +++ b/src/hotspot/share/gc/shared/oopStorage.cpp @@ -727,7 +727,7 @@ OopStorage::OopStorage(const char* name, _allocation_mutex(allocation_mutex), _active_mutex(active_mutex), _allocation_count(0), - _concurrent_iteration_active(false) + _concurrent_iteration_count(0) { _active_array->increment_refcount(); assert(_active_mutex->rank() < _allocation_mutex->rank(), @@ -769,7 +769,7 @@ void OopStorage::delete_empty_blocks_safepoint() { // blocks available for deletion. while (reduce_deferred_updates()) {} // Don't interfere with a concurrent iteration. - if (_concurrent_iteration_active) return; + if (_concurrent_iteration_count > 0) return; // Delete empty (and otherwise deletable) blocks from end of _allocation_list. for (Block* block = _allocation_list.tail(); (block != NULL) && block->is_deletable(); @@ -804,7 +804,7 @@ void OopStorage::delete_empty_blocks_concurrent() { { MutexLockerEx aml(_active_mutex, Mutex::_no_safepoint_check_flag); // Don't interfere with a concurrent iteration. - if (_concurrent_iteration_active) return; + if (_concurrent_iteration_count > 0) return; _active_array->remove(block); } // Remove block from _allocation_list and delete it. @@ -875,7 +875,7 @@ OopStorage::BasicParState::BasicParState(const OopStorage* storage, _concurrent(concurrent) { assert(estimated_thread_count > 0, "estimated thread count must be positive"); - update_iteration_state(true); + update_concurrent_iteration_count(1); // Get the block count *after* iteration state updated, so concurrent // empty block deletion is suppressed and can't reduce the count. But // ensure the count we use was written after the block with that count @@ -885,14 +885,14 @@ OopStorage::BasicParState::BasicParState(const OopStorage* storage, OopStorage::BasicParState::~BasicParState() { _storage->relinquish_block_array(_active_array); - update_iteration_state(false); + update_concurrent_iteration_count(-1); } -void OopStorage::BasicParState::update_iteration_state(bool value) { +void OopStorage::BasicParState::update_concurrent_iteration_count(int value) { if (_concurrent) { MutexLockerEx ml(_storage->_active_mutex, Mutex::_no_safepoint_check_flag); - assert(_storage->_concurrent_iteration_active != value, "precondition"); - _storage->_concurrent_iteration_active = value; + _storage->_concurrent_iteration_count += value; + assert(_storage->_concurrent_iteration_count >= 0, "invariant"); } } @@ -954,7 +954,7 @@ void OopStorage::print_on(outputStream* st) const { st->print("%s: " SIZE_FORMAT " entries in " SIZE_FORMAT " blocks (%.F%%), " SIZE_FORMAT " bytes", name(), allocations, blocks, alloc_percentage, total_memory_usage()); - if (_concurrent_iteration_active) { + if (_concurrent_iteration_count > 0) { st->print(", concurrent iteration active"); } } diff --git a/src/hotspot/share/gc/shared/oopStorage.hpp b/src/hotspot/share/gc/shared/oopStorage.hpp index 67216180839..a6415f75490 100644 --- a/src/hotspot/share/gc/shared/oopStorage.hpp +++ b/src/hotspot/share/gc/shared/oopStorage.hpp @@ -220,7 +220,7 @@ private: mutable SingleWriterSynchronizer _protect_active; // mutable because this gets set even for const iteration. - mutable bool _concurrent_iteration_active; + mutable int _concurrent_iteration_count; Block* find_block_or_null(const oop* ptr) const; void delete_empty_block(const Block& block); diff --git a/src/hotspot/share/gc/shared/oopStorageParState.hpp b/src/hotspot/share/gc/shared/oopStorageParState.hpp index bbeffde98ff..cc5a649d585 100644 --- a/src/hotspot/share/gc/shared/oopStorageParState.hpp +++ b/src/hotspot/share/gc/shared/oopStorageParState.hpp @@ -31,22 +31,16 @@ ////////////////////////////////////////////////////////////////////////////// // Support for parallel and optionally concurrent state iteration. // -// Parallel iteration is for the exclusive use of the GC. Other iteration -// clients must use serial iteration. -// // Concurrent Iteration // // Iteration involves the _active_array (an ActiveArray), which contains all // of the blocks owned by a storage object. // -// At most one concurrent ParState can exist at a time for a given storage -// object. -// -// A concurrent ParState sets the associated storage's -// _concurrent_iteration_active flag true when the state is constructed, and -// sets it false when the state is destroyed. These assignments are made with +// A concurrent ParState increments the associated storage's +// _concurrent_iteration_count when the state is constructed, and +// decrements it when the state is destroyed. These assignments are made with // _active_mutex locked. Meanwhile, empty block deletion is not done while -// _concurrent_iteration_active is true. The flag check and the dependent +// _concurrent_iteration_count is non-zero. The counter check and the dependent // removal of a block from the _active_array is performed with _active_mutex // locked. This prevents concurrent iteration and empty block deletion from // interfering with with each other. @@ -83,8 +77,8 @@ // scheduling both operations to run at the same time. // // ParState -// concurrent must be true if iteration is concurrent with the -// mutator, false if iteration is at a safepoint. +// concurrent must be true if iteration may be concurrent with the +// mutators. // // is_const must be true if the iteration is over a constant storage // object, false if the iteration may modify the storage object. @@ -92,8 +86,7 @@ // ParState([const] OopStorage* storage) // Construct an object for managing an iteration over storage. For a // concurrent ParState, empty block deletion for the associated storage -// is inhibited for the life of the ParState. There can be no more -// than one live concurrent ParState at a time for a given storage object. +// is inhibited for the life of the ParState. // // template void iterate(F f) // Repeatedly claims a block from the associated storage that has @@ -152,7 +145,7 @@ class OopStorage::BasicParState { struct IterationData; - void update_iteration_state(bool value); + void update_concurrent_iteration_count(int value); bool claim_next_segment(IterationData* data); bool finish_iteration(const IterationData* data) const; From 1ed6b88a9965efb2992f158bdb96b86d38cb9a45 Mon Sep 17 00:00:00 2001 From: Vicente Romero Date: Mon, 8 Oct 2018 06:52:41 -0700 Subject: [PATCH 028/124] 8209407: VerifyError is thrown for inner class with lambda Reviewed-by: mcimadamore --- .../com/sun/tools/javac/comp/Lower.java | 12 ++++-- .../VerifierErrorInnerPlusLambda.java | 42 +++++++++++++++++++ 2 files changed, 50 insertions(+), 4 deletions(-) create mode 100644 test/langtools/tools/javac/lambda/T8209407/VerifierErrorInnerPlusLambda.java diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Lower.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Lower.java index 9faffe19c5e..c211a2afcbe 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Lower.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Lower.java @@ -1130,10 +1130,14 @@ public class Lower extends TreeTranslator { make.at(tree.pos); return makeLit(sym.type, cv); } - // Otherwise replace the variable by its proxy. - sym = proxies.get(sym); - Assert.check(sym != null && (sym.flags_field & FINAL) != 0); - tree = make.at(tree.pos).Ident(sym); + if (lambdaTranslationMap != null && lambdaTranslationMap.get(sym) != null) { + return make.at(tree.pos).Ident(lambdaTranslationMap.get(sym)); + } else { + // Otherwise replace the variable by its proxy. + sym = proxies.get(sym); + Assert.check(sym != null && (sym.flags_field & FINAL) != 0); + tree = make.at(tree.pos).Ident(sym); + } } JCExpression base = (tree.hasTag(SELECT)) ? ((JCFieldAccess) tree).selected : null; switch (sym.kind) { diff --git a/test/langtools/tools/javac/lambda/T8209407/VerifierErrorInnerPlusLambda.java b/test/langtools/tools/javac/lambda/T8209407/VerifierErrorInnerPlusLambda.java new file mode 100644 index 00000000000..892f1bb3d9c --- /dev/null +++ b/test/langtools/tools/javac/lambda/T8209407/VerifierErrorInnerPlusLambda.java @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2018, 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. + * + * 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 8209407 + * @summary VerifyError is thrown for inner class with lambda + */ + +import java.util.function.Supplier; + +public class VerifierErrorInnerPlusLambda { + public static void main(String[] args) { + Object a = new Object(); + class Local { Object ref = a; } + new Object() { + void unused() { + Supplier s = () -> new Local(); + } + }; + } +} From 8791ea8dc07ea3ae3b7de9307113e89a9affd6ff Mon Sep 17 00:00:00 2001 From: Volker Simonis Date: Mon, 8 Oct 2018 17:41:44 +0200 Subject: [PATCH 029/124] 8211837: Creation of the default CDS Archive should depend on ENABLE_CDS Reviewed-by: shade, goetz, mdoerr, iklam --- make/autoconf/hotspot.m4 | 36 ++++++++++++++++++++++++++++-------- make/autoconf/jdk-options.m4 | 11 +++++------ 2 files changed, 33 insertions(+), 14 deletions(-) diff --git a/make/autoconf/hotspot.m4 b/make/autoconf/hotspot.m4 index 92616649df1..39b681085fd 100644 --- a/make/autoconf/hotspot.m4 +++ b/make/autoconf/hotspot.m4 @@ -252,14 +252,6 @@ AC_DEFUN_ONCE([HOTSPOT_ENABLE_DISABLE_CDS], AC_MSG_ERROR([Invalid value for --enable-cds: $enable_cds]) fi - # Disable CDS on AIX. - if test "x$OPENJDK_TARGET_OS" = "xaix"; then - ENABLE_CDS="false" - if test "x$enable_cds" = "xyes"; then - AC_MSG_ERROR([CDS is currently not supported on AIX. Remove --enable-cds.]) - fi - fi - AC_SUBST(ENABLE_CDS) ]) @@ -489,6 +481,34 @@ AC_DEFUN_ONCE([HOTSPOT_SETUP_JVM_FEATURES], # All variants but minimal (and custom) get these features NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES cmsgc g1gc parallelgc serialgc epsilongc jni-check jvmti management nmt services vm-structs" + # Disable CDS on AIX. + if test "x$OPENJDK_TARGET_OS" = "xaix"; then + ENABLE_CDS="false" + if test "x$enable_cds" = "xyes"; then + AC_MSG_ERROR([CDS is currently not supported on AIX. Remove --enable-cds.]) + fi + fi + + # Disable CDS if user requested it with --with-jvm-features=-cds. + DISABLE_CDS=`$ECHO $DISABLED_JVM_FEATURES | $GREP cds` + if test "x$DISABLE_CDS" = "xcds"; then + ENABLE_CDS="false" + if test "x$enable_cds" = "xyes"; then + AC_MSG_ERROR([CDS was disabled by --with-jvm-features=-cds. Remove --enable-cds.]) + fi + fi + + # Disable CDS for zero, minimal, core.. + if HOTSPOT_CHECK_JVM_VARIANT(zero) || HOTSPOT_CHECK_JVM_VARIANT(minimal) || HOTSPOT_CHECK_JVM_VARIANT(core); then + # ..except when the user explicitely requested it with --enable-jvm-features + if ! HOTSPOT_CHECK_JVM_FEATURE(cds); then + ENABLE_CDS="false" + if test "x$enable_cds" = "xyes"; then + AC_MSG_ERROR([CDS not implemented for variants zero, minimal, core. Remove --enable-cds.]) + fi + fi + fi + AC_MSG_CHECKING([if cds should be enabled]) if test "x$ENABLE_CDS" = "xtrue"; then if test "x$enable_cds" = "xyes"; then diff --git a/make/autoconf/jdk-options.m4 b/make/autoconf/jdk-options.m4 index 4dcd3b86718..c6198e63a1a 100644 --- a/make/autoconf/jdk-options.m4 +++ b/make/autoconf/jdk-options.m4 @@ -527,7 +527,7 @@ AC_DEFUN_ONCE([JDKOPT_ENABLE_DISABLE_GENERATE_CLASSLIST], # Check if it's likely that it's possible to generate the classlist. Depending # on exact jvm configuration it could be possible anyway. - if test "x$ENABLE_CDS" = "xtrue" && (HOTSPOT_CHECK_JVM_VARIANT(server) || HOTSPOT_CHECK_JVM_VARIANT(client)); then + if test "x$ENABLE_CDS" = "xtrue" && (HOTSPOT_CHECK_JVM_VARIANT(server) || HOTSPOT_CHECK_JVM_VARIANT(client) || HOTSPOT_CHECK_JVM_FEATURE(cds)); then ENABLE_GENERATE_CLASSLIST_POSSIBLE="true" else ENABLE_GENERATE_CLASSLIST_POSSIBLE="false" @@ -610,7 +610,6 @@ AC_DEFUN([JDKOPT_ENABLE_DISABLE_MANPAGES], # # Disable the default CDS archive generation # cross compilation - disabled -# zero - off by default (not a tested configuration) # AC_DEFUN([JDKOPT_ENABLE_DISABLE_CDS_ARCHIVE], [ @@ -618,15 +617,15 @@ AC_DEFUN([JDKOPT_ENABLE_DISABLE_CDS_ARCHIVE], [Set to disable generation of a default CDS archive in the product image @<:@enabled@:>@])]) AC_MSG_CHECKING([if a default CDS archive should be generated]) - if test "x$COMPILE_TYPE" = "xcross"; then + if test "x$ENABLE_CDS" = "xfalse"; then + AC_MSG_RESULT([no, because CDS is disabled]) + BUILD_CDS_ARCHIVE="false" + elif test "x$COMPILE_TYPE" = "xcross"; then AC_MSG_RESULT([no, not possible with cross compilation]) BUILD_CDS_ARCHIVE="false" elif test "x$enable_cds_archive" = "xyes"; then AC_MSG_RESULT([yes, forced]) BUILD_CDS_ARCHIVE="true" - elif HOTSPOT_CHECK_JVM_VARIANT(zero); then - AC_MSG_RESULT([no]) - BUILD_CDS_ARCHIVE="false" elif test "x$enable_cds_archive" = "x"; then AC_MSG_RESULT([yes]) BUILD_CDS_ARCHIVE="true" From d5d74f0e260d361a5a9e794abb847f06848671f6 Mon Sep 17 00:00:00 2001 From: Claes Redestad Date: Mon, 8 Oct 2018 18:16:03 +0200 Subject: [PATCH 030/124] 8211860: Avoid reading security properties eagerly on Manifest class initialization Reviewed-by: mullan, alanb --- src/java.base/share/classes/java/util/jar/Manifest.java | 7 ++----- .../classes/sun/security/util/SecurityProperties.java | 3 +++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/java.base/share/classes/java/util/jar/Manifest.java b/src/java.base/share/classes/java/util/jar/Manifest.java index a6eb27129fe..384da5c622f 100644 --- a/src/java.base/share/classes/java/util/jar/Manifest.java +++ b/src/java.base/share/classes/java/util/jar/Manifest.java @@ -49,9 +49,6 @@ import sun.security.util.SecurityProperties; */ public class Manifest implements Cloneable { - private static final boolean jarInfoInExceptionText = - SecurityProperties.includedInExceptions("jar"); - // manifest main attributes private Attributes attr = new Attributes(); @@ -203,10 +200,10 @@ public class Manifest implements Cloneable { } static String getErrorPosition(String filename, final int lineNumber) { - if (filename == null || !jarInfoInExceptionText) { + if (filename == null || + !SecurityProperties.INCLUDE_JAR_NAME_IN_EXCEPTIONS) { return "line " + lineNumber; } - return "manifest of " + filename + ":" + lineNumber; } diff --git a/src/java.base/share/classes/sun/security/util/SecurityProperties.java b/src/java.base/share/classes/sun/security/util/SecurityProperties.java index 763060632d1..9acad209e00 100644 --- a/src/java.base/share/classes/sun/security/util/SecurityProperties.java +++ b/src/java.base/share/classes/sun/security/util/SecurityProperties.java @@ -32,6 +32,9 @@ import java.security.Security; public class SecurityProperties { + public static final boolean INCLUDE_JAR_NAME_IN_EXCEPTIONS + = includedInExceptions("jar"); + /** * Returns the value of the security property propName, which can be overridden * by a system property of the same name From a95d0ac2d18343a1a6c31d038d577ab6e334bd68 Mon Sep 17 00:00:00 2001 From: Chris Hegarty Date: Mon, 8 Oct 2018 18:29:41 +0100 Subject: [PATCH 031/124] 8211863: Problem list test/jdk/javax/naming/module/RunBasic.java Reviewed-by: lancea --- test/jdk/ProblemList.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/jdk/ProblemList.txt b/test/jdk/ProblemList.txt index b373980f18c..91fe51f3600 100644 --- a/test/jdk/ProblemList.txt +++ b/test/jdk/ProblemList.txt @@ -866,6 +866,8 @@ com/sun/jndi/ldap/LdapTimeoutTest.java 8151678 linux-al javax/rmi/ssl/SSLSocketParametersTest.sh 8162906 generic-all +javax/naming/module/RunBasic.java 8211850 generic-all + ############################################################################ ########################################################################### From 40d81d4bcc61206798c21b46a1cf8469b0c37d42 Mon Sep 17 00:00:00 2001 From: Gary Adams Date: Mon, 8 Oct 2018 07:18:40 -0400 Subject: [PATCH 032/124] 8036026: nsk/jvmti/scenarios/capability/CM02/cm02t001 fails intermittently Reviewed-by: cjplummer, dcubed --- .../nsk/jvmti/scenarios/capability/CM02/cm02t001.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM02/cm02t001.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM02/cm02t001.java index b4ff3e8ddbe..e2d5581dd20 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM02/cm02t001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM02/cm02t001.java @@ -81,8 +81,8 @@ public class cm02t001 extends DebugeeClass { return status; thread.letFinish(); - // pause to provoke contention - Thread.sleep(100); + // pause to provoke contention on thread.endingMonitor + Thread.sleep(1000); } catch (InterruptedException e) { throw new Failure(e); } From f8d8a72a27ce669ebcca551f05e6d59faf1fb7f5 Mon Sep 17 00:00:00 2001 From: Jonathan Gibbons Date: Mon, 8 Oct 2018 11:14:59 -0700 Subject: [PATCH 033/124] 8211407: Bad links to non-existent entries on serialized-form page Reviewed-by: jlahoda --- .../javadoc/internal/tool/JavadocTool.java | 16 +- .../doclet/testSerialTag/TestSerialTag.java | 145 ++++++++++++++++++ 2 files changed, 160 insertions(+), 1 deletion(-) create mode 100644 test/langtools/jdk/javadoc/doclet/testSerialTag/TestSerialTag.java diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/JavadocTool.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/JavadocTool.java index 1df3667dea6..f319a7affee 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/JavadocTool.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/JavadocTool.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2018, 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 @@ -34,6 +34,8 @@ import java.util.List; import java.util.Map; import java.util.Set; +import javax.lang.model.element.Element; +import javax.lang.model.element.ElementKind; import javax.tools.JavaFileObject; import javax.tools.StandardJavaFileManager; @@ -41,6 +43,7 @@ import com.sun.tools.javac.code.ClassFinder; import com.sun.tools.javac.code.DeferredCompletionFailureHandler; import com.sun.tools.javac.code.Symbol.Completer; import com.sun.tools.javac.code.Symbol.CompletionFailure; +import com.sun.tools.javac.code.Symbol.PackageSymbol; import com.sun.tools.javac.comp.Enter; import com.sun.tools.javac.tree.JCTree; import com.sun.tools.javac.tree.JCTree.JCClassDecl; @@ -213,6 +216,17 @@ public class JavadocTool extends com.sun.tools.javac.main.JavaCompiler { dcfh.setHandler(dcfh.userCodeHandler); etable.analyze(); + + // Ensure that package-info is read for all included packages + for (Element e : etable.getIncludedElements()) { + if (e.getKind() == ElementKind.PACKAGE) { + PackageSymbol packge = (PackageSymbol) e; + if (packge.package_info != null) { + packge.package_info.complete(); + } + } + } + } catch (CompletionFailure cf) { throw new ToolException(ABNORMAL, cf.getMessage(), cf); } catch (Abort abort) { diff --git a/test/langtools/jdk/javadoc/doclet/testSerialTag/TestSerialTag.java b/test/langtools/jdk/javadoc/doclet/testSerialTag/TestSerialTag.java new file mode 100644 index 00000000000..1c017a0760b --- /dev/null +++ b/test/langtools/jdk/javadoc/doclet/testSerialTag/TestSerialTag.java @@ -0,0 +1,145 @@ +/* + * Copyright (c) 2018, 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. + * + * 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 8207214 + * @summary Test package-level at-serial tags + * @library /tools/lib ../lib + * @modules jdk.javadoc/jdk.javadoc.internal.tool + * @build JavadocTester toolbox.ToolBox + * @run main TestSerialTag + */ + +import java.io.IOException; +import java.nio.file.Path; + +import toolbox.ToolBox; + +public class TestSerialTag extends JavadocTester { + public static void main(String... args) throws Exception { + TestSerialTag tester = new TestSerialTag(); + tester.runTests(m -> new Object[] { Path.of(m.getName()) }); + } + + private final ToolBox tb; + + TestSerialTag() { + tb = new ToolBox(); + } + + @Test + public void testCombo(Path base) throws IOException { + boolean[] moduleValues = { false, true }; + String[] tagValues = { "", "@serial include", "@serial exclude" }; + for (boolean module : moduleValues ) { + for (String tag : tagValues ) { + String name = (module ? "module-" : "") + + (tag.isEmpty() ? "default" : tag.replace("@serial ", "")); + Path dir = base.resolve(name); + test(dir, module, tag); + } + } + + } + + void test(Path base, boolean module, String tag) throws IOException { + out.println("Test: module:" + module + ", tag:" + tag); + + Path srcDir = generateSource(base, module, tag); + + Path outDir = base.resolve("out"); + if (module) { + javadoc("-d", outDir.toString(), + "--module-source-path", srcDir.toString(), + "--module", "m"); + } else { + javadoc("-d", outDir.toString(), + "-sourcepath", srcDir.toString(), + "p", "q"); + } + checkExit(Exit.OK); + + boolean expectLink = !tag.equals("@serial exclude"); + checkSeeSerializedForm(module, expectLink); + } + + /** + * Generates source for a test case. + * Two classes are generated, in two different packages. + * One package has a variable at-serial tag to test; + * The other package is a control and always has no special tag. + * + * @param base the working directory for the test case + * @param module whether or not to enclose the packages in a module + * @param tag the at-serial tag to be tested + * @return the directory in which the source was created + */ + Path generateSource(Path base, boolean module, String tag) throws IOException { + Path srcDir = base.resolve("src"); + + Path dir; + if (module) { + dir = srcDir.resolve("m"); + tb.writeJavaFiles(dir, + "module m { exports p; exports q; }"); + } else { + dir = srcDir; + } + + tb.writeJavaFiles(dir, + "/** This is package p;\n * " + tag + "\n */\n" + + "package p;", + "/** This is class p.C1;\n */\n" + + "package p; public class C1 implements java.io.Serializable { }", + "/** This is package q;\n */\n" + + "package q;", + "/** This is class q.C2;\n */\n" + + "package q; public class C2 implements java.io.Serializable { }" + ); + + return srcDir; + } + + /** + * Checks the link to the serialized form page, + * and whether classes are documented on that page. + * + * @param module whether or not the output is module-oriented + * @param b whether or not class p.C1 should be documented as serializable + */ + void checkSeeSerializedForm(boolean module, boolean b) { + String prefix = module ? "m/" : ""; + + checkOutput(prefix + "p/C1.html", b, + "serialized-form.html"); + checkOutput("serialized-form.html", b, + "C1"); + + checkOutput(prefix + "q/C2.html", true, + "serialized-form.html"); + checkOutput("serialized-form.html", true, + "C2"); + } +} + From 57622ed115530a88571786b775751119d92b0937 Mon Sep 17 00:00:00 2001 From: Jean Christophe Beyler Date: Mon, 8 Oct 2018 13:54:43 -0700 Subject: [PATCH 034/124] 8211261: Remove the NSK_CPP_STUB macros from vmTestbase for jvmti/[A-G]* Remove the NSK_CPP_STUB macros Reviewed-by: amenkov, cjplummer --- .../AddCapabilities/addcaps001/addcaps001.cpp | 10 +-- .../AddCapabilities/addcaps002/addcaps002.cpp | 13 ++-- .../AddCapabilities/addcaps003/addcaps003.cpp | 13 ++-- .../attach002/attach002Agent00.cpp | 8 +-- .../attach002a/attach002aAgent00.cpp | 4 +- .../attach008/attach008Agent00.cpp | 4 +- .../attach009/attach009Agent00.cpp | 5 +- .../attach012/attach012Agent00.cpp | 4 +- .../attach014/attach014Agent00.cpp | 4 +- .../attach015/attach015Agent00.cpp | 2 +- .../attach015/attach015Agent01.cpp | 2 +- .../attach015/attach015Target.cpp | 2 +- .../attach020/attach020Agent00.cpp | 25 +++---- .../attach021/attach021Agent00.cpp | 10 +-- .../attach022/attach022Agent00.cpp | 26 ++++---- .../attach037/attach037Agent00.cpp | 4 +- .../attach038/attach038Agent00.cpp | 2 +- .../attach039/attach039Agent00.cpp | 5 +- .../attach040/attach040Agent00.cpp | 11 ++-- .../attach041/attach041Agent00.cpp | 8 +-- .../attach042/attach042Agent00.cpp | 6 +- .../attach045/attach045Agent00.cpp | 9 ++- .../attach045/attach045Agent01.cpp | 11 ++-- .../attach045/attach045Agent02.cpp | 11 ++-- .../attach045/attach045Agent03.cpp | 13 ++-- .../attach046/attach046Agent00.cpp | 4 +- .../breakpoint001/breakpoint001.cpp | 54 +++++---------- .../classfloadhk001/classfloadhk001.cpp | 6 +- .../classfloadhk002/classfloadhk002.cpp | 27 +++----- .../classfloadhk003/classfloadhk003.cpp | 39 +++++------ .../classfloadhk004/classfloadhk004.cpp | 24 +++---- .../classfloadhk005/classfloadhk005.cpp | 24 +++---- .../classfloadhk006/classfloadhk006.cpp | 42 +++++------- .../classfloadhk007/classfloadhk007.cpp | 46 +++++-------- .../classfloadhk008/classfloadhk008.cpp | 40 +++++------- .../classfloadhk009/classfloadhk009.cpp | 40 +++++------- .../ClassLoad/classload001/classload001.cpp | 24 +++---- .../compmethload001/compmethload001.cpp | 24 +++---- .../compmethunload001/compmethunload001.cpp | 31 ++++----- .../datadumpreq001/datadumpreq001.cpp | 6 +- .../disposeenv001/disposeenv001.cpp | 3 +- .../disposeenv002/disposeenv002.cpp | 13 ++-- .../dyncodgen001/dyncodgen001.cpp | 7 +- .../ForceEarlyReturn001.cpp | 65 +++---------------- .../forcegc001/forcegc001.cpp | 3 +- .../forcegc002/forcegc002.cpp | 9 +-- .../gcfinish001/gcfinish001.cpp | 42 ++++-------- .../gcstart001/gcstart001.cpp | 18 ++--- .../gcstart002/gcstart002.cpp | 42 ++++-------- .../genevents001/genevents001.cpp | 13 ++-- 50 files changed, 308 insertions(+), 550 deletions(-) diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddCapabilities/addcaps001/addcaps001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddCapabilities/addcaps001/addcaps001.cpp index 84582f82f9c..86626181ea3 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddCapabilities/addcaps001/addcaps001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddCapabilities/addcaps001/addcaps001.cpp @@ -192,8 +192,7 @@ static int checkCapabilities(jvmtiEnv* jvmti, jvmtiCapabilities* initCaps, const memset(&caps, 0, sizeof(jvmtiCapabilities)); NSK_DISPLAY0("GetCapabilities() for current JVMTI env\n"); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GetCapabilities, jvmti, &caps))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps))) { return NSK_FALSE; } @@ -216,8 +215,7 @@ static int checkCapabilities(jvmtiEnv* jvmti, jvmtiCapabilities* initCaps, const */ static int addCapabilities(jvmtiEnv* jvmti, jvmtiCapabilities* caps, const char where[]) { NSK_DISPLAY0("AddCapabilities() for current JVMTI env\n"); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, caps))) { + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(caps))) { return NSK_FALSE; } NSK_DISPLAY0(" ... set\n"); @@ -314,9 +312,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&eventCallbacks, 0, sizeof(eventCallbacks)); eventCallbacks.VMInit = callbackVMInit; eventCallbacks.VMDeath = callbackVMDeath; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, - &eventCallbacks, sizeof(eventCallbacks)))) { + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks)))) { return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddCapabilities/addcaps002/addcaps002.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddCapabilities/addcaps002/addcaps002.cpp index 26be8b94978..54b85588f5c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddCapabilities/addcaps002/addcaps002.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddCapabilities/addcaps002/addcaps002.cpp @@ -192,8 +192,7 @@ static int checkCapabilities(jvmtiEnv* jvmti, jvmtiCapabilities* initCaps, const memset(&caps, 0, sizeof(jvmtiCapabilities)); NSK_DISPLAY0("GetCapabilities() for current JVMTI env\n"); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GetCapabilities, jvmti, &caps))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps))) { return NSK_FALSE; } @@ -216,8 +215,7 @@ static int checkCapabilities(jvmtiEnv* jvmti, jvmtiCapabilities* initCaps, const */ static int addCapabilities(jvmtiEnv* jvmti, jvmtiCapabilities* caps, const char where[]) { NSK_DISPLAY0("AddCapabilities() for current JVMTI env\n"); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, caps))) { + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(caps))) { return NSK_FALSE; } NSK_DISPLAY0(" ... set\n"); @@ -231,8 +229,7 @@ static int addCapabilities(jvmtiEnv* jvmti, jvmtiCapabilities* caps, const char */ static int getPotentialCapabilities(jvmtiEnv* jvmti, jvmtiCapabilities* caps) { NSK_DISPLAY0("GetPotentialCapabilities() for current JVMTI env\n"); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GetPotentialCapabilities, jvmti, caps))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetPotentialCapabilities(caps))) { return NSK_FALSE; } @@ -334,9 +331,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&eventCallbacks, 0, sizeof(eventCallbacks)); eventCallbacks.VMInit = callbackVMInit; eventCallbacks.VMDeath = callbackVMDeath; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, - &eventCallbacks, sizeof(eventCallbacks)))) { + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks)))) { return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddCapabilities/addcaps003/addcaps003.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddCapabilities/addcaps003/addcaps003.cpp index c991a153efd..0f5476edc1d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddCapabilities/addcaps003/addcaps003.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AddCapabilities/addcaps003/addcaps003.cpp @@ -57,8 +57,7 @@ static int checkCapabilities(jvmtiEnv* jvmti, jvmtiCapabilities* initCaps, const memset(&caps, 0, sizeof(jvmtiCapabilities)); NSK_DISPLAY0("GetCapabilities() for current JVMTI env\n"); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GetCapabilities, jvmti, &caps))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps))) { return NSK_FALSE; } @@ -71,8 +70,7 @@ static int checkCapabilities(jvmtiEnv* jvmti, jvmtiCapabilities* initCaps, const */ static int addCapabilities(jvmtiEnv* jvmti, jvmtiCapabilities* caps, const char where[]) { NSK_DISPLAY0("AddCapabilities() for current JVMTI env\n"); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, caps))) { + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(caps))) { return NSK_FALSE; } NSK_DISPLAY0(" ... set\n"); @@ -86,8 +84,7 @@ static int addCapabilities(jvmtiEnv* jvmti, jvmtiCapabilities* caps, const char */ static int getPotentialCapabilities(jvmtiEnv* jvmti, jvmtiCapabilities* caps) { NSK_DISPLAY0("GetPotentialCapabilities() for current JVMTI env\n"); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GetPotentialCapabilities, jvmti, caps))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetPotentialCapabilities(caps))) { return NSK_FALSE; } @@ -183,9 +180,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&eventCallbacks, 0, sizeof(eventCallbacks)); eventCallbacks.VMInit = callbackVMInit; eventCallbacks.VMDeath = callbackVMDeath; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, - &eventCallbacks, sizeof(eventCallbacks)))) { + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks)))) { return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach002/attach002Agent00.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach002/attach002Agent00.cpp index 59773e7391c..e1e7ef19768 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach002/attach002Agent00.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach002/attach002Agent00.cpp @@ -74,12 +74,12 @@ int registerNativeMethods(JNIEnv* jni) { jint nativeMethodsNumber = 1; if (!NSK_JNI_VERIFY(jni, (appClass = - NSK_CPP_STUB2(FindClass, jni, ATTACH002_TARGET_APP_CLASS_NAME)) != NULL)) { + jni->FindClass(ATTACH002_TARGET_APP_CLASS_NAME)) != NULL)) { return NSK_FALSE; } if (!NSK_JNI_VERIFY(jni, - (NSK_CPP_STUB4(RegisterNatives, jni, appClass, nativeMethods, nativeMethodsNumber) == 0))) { + (jni->RegisterNatives(appClass, nativeMethods, nativeMethodsNumber) == 0))) { return NSK_FALSE; } @@ -205,7 +205,7 @@ Agent_OnAttach(JavaVM *vm, char *optionsString, void *reserved) memset(&caps, 0, sizeof(caps)); caps.can_generate_all_class_hook_events = 1; caps.can_redefine_classes = 1; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)) ) { + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)) ) { /* * If VM is run with -Xshare:on agent can't get required capabilities (see 6718407) */ @@ -222,7 +222,7 @@ Agent_OnAttach(JavaVM *vm, char *optionsString, void *reserved) eventCallbacks.ClassLoad = classLoadHandler; eventCallbacks.ClassPrepare = classPrepareHandler; eventCallbacks.ClassFileLoadHook = classFileLoadHoockHandler; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetEventCallbacks, jvmti, &eventCallbacks, sizeof(eventCallbacks))) ) { + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks))) ) { return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach002a/attach002aAgent00.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach002a/attach002aAgent00.cpp index a87df8a8150..7cc40cc82fd 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach002a/attach002aAgent00.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach002a/attach002aAgent00.cpp @@ -106,13 +106,13 @@ Agent_OnAttach(JavaVM *vm, char *optionsString, void *reserved) memset(&caps, 0, sizeof(caps)); caps.can_redefine_classes = 1; caps.can_generate_vm_object_alloc_events = 1; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)) ) { + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)) ) { return JNI_ERR; } memset(&eventCallbacks,0, sizeof(eventCallbacks)); eventCallbacks.VMObjectAlloc = vmObjectAllocHandler; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetEventCallbacks, jvmti, &eventCallbacks, sizeof(eventCallbacks))) ) { + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks))) ) { return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach008/attach008Agent00.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach008/attach008Agent00.cpp index db609331bcf..f46eccf0cf1 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach008/attach008Agent00.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach008/attach008Agent00.cpp @@ -123,14 +123,14 @@ Agent_OnAttach(JavaVM *vm, char *optionsString, void *reserved) memset(&caps, 0, sizeof(caps)); caps.can_generate_monitor_events = 1; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)) ) { + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)) ) { return JNI_ERR; } memset(&eventCallbacks,0, sizeof(eventCallbacks)); eventCallbacks.MonitorContendedEntered = monitorContentedEnteredHandler; eventCallbacks.MonitorContendedEnter = monitorContentedEnterHandler; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetEventCallbacks, jvmti, &eventCallbacks, sizeof(eventCallbacks))) ) { + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks))) ) { return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach009/attach009Agent00.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach009/attach009Agent00.cpp index 7f8159c4aa2..7a5be6d5784 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach009/attach009Agent00.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach009/attach009Agent00.cpp @@ -82,8 +82,7 @@ classLoadHandler(jvmtiEnv *jvmti, return; } - if (!NSK_JVMTI_VERIFY( NSK_CPP_STUB4( - SetEventNotificationMode, jvmti, JVMTI_ENABLE, JVMTI_EVENT_CLASS_LOAD, thread) ) ) { + if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_CLASS_LOAD, thread) ) ) { NSK_COMPLAIN1("Failed to enable events for thread '%s'\n", mainThreadName); nsk_aod_agentFinished(jni, agentName, 0); return; @@ -142,7 +141,7 @@ Agent_OnAttach(JavaVM *vm, char *optionsString, void *reserved) memset(&eventCallbacks,0, sizeof(eventCallbacks)); eventCallbacks.ClassLoad = classLoadHandler; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetEventCallbacks, jvmti, &eventCallbacks, sizeof(eventCallbacks))) ) { + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks))) ) { return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach012/attach012Agent00.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach012/attach012Agent00.cpp index effc70e40f3..17ef6332a21 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach012/attach012Agent00.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach012/attach012Agent00.cpp @@ -65,7 +65,7 @@ Agent_OnAttach(JavaVM *vm, char *optionsString, void *reserved) if (!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(vm, reserved)) != NULL)) return JNI_ERR; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPotentialCapabilities, jvmti, &caps)) ) { + if (!NSK_JVMTI_VERIFY(jvmti->GetPotentialCapabilities(&caps)) ) { return JNI_ERR; } @@ -75,7 +75,7 @@ Agent_OnAttach(JavaVM *vm, char *optionsString, void *reserved) NSK_DISPLAY1("%s: trying to get all potential capabilities:\n", agentName); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)) ) { + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)) ) { return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach014/attach014Agent00.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach014/attach014Agent00.cpp index 657f61a2103..67c5b53970b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach014/attach014Agent00.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach014/attach014Agent00.cpp @@ -62,7 +62,7 @@ classLoadHandler(jvmtiEnv *jvmti, if (!nsk_jvmti_aod_disableEvent(jvmti, JVMTI_EVENT_CLASS_LOAD)) success = 0; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB1(DisposeEnvironment, jvmti))) { + if (!NSK_JVMTI_VERIFY(jvmti->DisposeEnvironment())) { success = 0; NSK_COMPLAIN1("%s: failed to dispose environment\n", agentName); } else { @@ -104,7 +104,7 @@ Agent_OnAttach(JavaVM *vm, char *optionsString, void *reserved) memset(&eventCallbacks,0, sizeof(eventCallbacks)); eventCallbacks.ClassLoad = classLoadHandler; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetEventCallbacks, jvmti, &eventCallbacks, sizeof(eventCallbacks))) ) { + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks))) ) { return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach015/attach015Agent00.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach015/attach015Agent00.cpp index e6d6178a2f7..562d36c4338 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach015/attach015Agent00.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach015/attach015Agent00.cpp @@ -97,7 +97,7 @@ Agent_OnAttach(JavaVM *vm, char *optionsString, void *reserved) memset(&eventCallbacks,0, sizeof(eventCallbacks)); eventCallbacks.ClassPrepare = classPrepareHandler; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetEventCallbacks, jvmti, &eventCallbacks, sizeof(eventCallbacks))) ) { + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks))) ) { return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach015/attach015Agent01.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach015/attach015Agent01.cpp index c0343f515b7..26f92d03a5b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach015/attach015Agent01.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach015/attach015Agent01.cpp @@ -97,7 +97,7 @@ Agent_OnAttach(JavaVM *vm, char *optionsString, void *reserved) memset(&eventCallbacks,0, sizeof(eventCallbacks)); eventCallbacks.ClassLoad = classLoadHandler; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetEventCallbacks, jvmti, &eventCallbacks, sizeof(eventCallbacks))) ) { + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks))) ) { return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach015/attach015Target.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach015/attach015Target.cpp index f94e3553f5b..f54427e3607 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach015/attach015Target.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach015/attach015Target.cpp @@ -37,7 +37,7 @@ extern "C" { */ JNIEXPORT jboolean JNICALL Java_nsk_jvmti_AttachOnDemand_attach015_attach015Target_loadClassFromNative(JNIEnv * jni, jclass klass) { - return NSK_CPP_STUB2(FindClass, jni, LOADED_CLASS_NAME) ? JNI_TRUE : JNI_FALSE; + return jni->FindClass(LOADED_CLASS_NAME) ? JNI_TRUE : JNI_FALSE; } } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach020/attach020Agent00.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach020/attach020Agent00.cpp index 7fff53ec853..6f12b7c26d5 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach020/attach020Agent00.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach020/attach020Agent00.cpp @@ -71,17 +71,15 @@ void JNICALL garbageCollectionFinishHandler(jvmtiEnv *jvmti) { success = 0; } - if (NSK_JVMTI_VERIFY(NSK_CPP_STUB2( - RawMonitorEnter, jvmti, gcFinishMonitor))) { + if (NSK_JVMTI_VERIFY(jvmti->RawMonitorEnter(gcFinishMonitor))) { gcFinishEventReceived = 1; - if (NSK_JVMTI_VERIFY(NSK_CPP_STUB2( - RawMonitorNotify, jvmti, gcFinishMonitor))) { + if (NSK_JVMTI_VERIFY(jvmti->RawMonitorNotify(gcFinishMonitor))) { auxiliaryThreadNotified = 1; } - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorExit, jvmti, gcFinishMonitor))) { + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorExit(gcFinishMonitor))) { success = 0; } } else { @@ -96,17 +94,15 @@ void JNICALL garbageCollectionFinishHandler(jvmtiEnv *jvmti) { void JNICALL auxiliaryThreadFunction(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY1("%s: auxiliary thread is running\n", agentName); - if (NSK_JVMTI_VERIFY(NSK_CPP_STUB2( - RawMonitorEnter, jvmti, gcFinishMonitor))) { + if (NSK_JVMTI_VERIFY(jvmti->RawMonitorEnter(gcFinishMonitor))) { if (!gcFinishEventReceived) { - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3( - RawMonitorWait, jvmti, gcFinishMonitor, 0))) { + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorWait(gcFinishMonitor, 0))) { success = 0; } } - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorExit, jvmti, gcFinishMonitor))) { + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorExit(gcFinishMonitor))) { success = 0; } } else { @@ -122,8 +118,7 @@ int startAuxiliaryThread(jvmtiEnv* jvmti, JNIEnv* jni) { if (!NSK_VERIFY((thread = nsk_jvmti_aod_createThread(jni)) != NULL)) return NSK_FALSE; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5( - RunAgentThread, jvmti, thread, auxiliaryThreadFunction, NULL, JVMTI_THREAD_NORM_PRIORITY ))) { + if (!NSK_JVMTI_VERIFY(jvmti->RunAgentThread(thread, auxiliaryThreadFunction, NULL, JVMTI_THREAD_NORM_PRIORITY ))) { return NSK_FALSE; } @@ -161,7 +156,7 @@ Agent_OnAttach(JavaVM *vm, char *optionsString, void *reserved) if (!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(vm, reserved)) != NULL)) return JNI_ERR; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(CreateRawMonitor, jvmti, "GCFinishMonitor", &gcFinishMonitor))) { + if (!NSK_JVMTI_VERIFY(jvmti->CreateRawMonitor("GCFinishMonitor", &gcFinishMonitor))) { return JNI_ERR; } @@ -170,14 +165,14 @@ Agent_OnAttach(JavaVM *vm, char *optionsString, void *reserved) memset(&caps, 0, sizeof(caps)); caps.can_generate_garbage_collection_events = 1; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)) ) { + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)) ) { return JNI_ERR; } memset(&eventCallbacks,0, sizeof(eventCallbacks)); eventCallbacks.GarbageCollectionStart = garbageCollectionStartHandler; eventCallbacks.GarbageCollectionFinish = garbageCollectionFinishHandler; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetEventCallbacks, jvmti, &eventCallbacks, sizeof(eventCallbacks))) ) { + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks))) ) { return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach021/attach021Agent00.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach021/attach021Agent00.cpp index 4c4a0b32337..0428050acc4 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach021/attach021Agent00.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach021/attach021Agent00.cpp @@ -56,7 +56,7 @@ volatile int success = 0; JNIEXPORT jboolean JNICALL Java_nsk_jvmti_AttachOnDemand_attach021_attach021Target_setTagFor(JNIEnv * jni, jclass klass, jobject obj) { - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetTag, jvmti, obj, TAG_VALUE))) { + if (!NSK_JVMTI_VERIFY(jvmti->SetTag(obj, TAG_VALUE))) { return JNI_FALSE; } @@ -95,12 +95,12 @@ int registerNativeMethods(JNIEnv* jni) { jint nativeMethodsNumber = 2; if (!NSK_JNI_VERIFY(jni, (appClass = - NSK_CPP_STUB2(FindClass, jni, ATTACH021_TARGET_APP_CLASS_NAME)) != NULL)) { + jni->FindClass(ATTACH021_TARGET_APP_CLASS_NAME)) != NULL)) { return NSK_FALSE; } if (!NSK_JNI_VERIFY(jni, - (NSK_CPP_STUB4(RegisterNatives, jni, appClass, nativeMethods, nativeMethodsNumber) == 0))) { + (jni->RegisterNatives(appClass, nativeMethods, nativeMethodsNumber) == 0))) { return NSK_FALSE; } @@ -142,13 +142,13 @@ Agent_OnAttach(JavaVM *vm, char *optionsString, void *reserved) memset(&caps, 0, sizeof(caps)); caps.can_tag_objects = 1; caps.can_generate_object_free_events = 1; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)) ) { + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)) ) { return JNI_ERR; } memset(&eventCallbacks,0, sizeof(eventCallbacks)); eventCallbacks.ObjectFree = objectFreeHandler; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetEventCallbacks, jvmti, &eventCallbacks, sizeof(eventCallbacks))) ) { + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks))) ) { return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach022/attach022Agent00.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach022/attach022Agent00.cpp index 456772afc9a..fe99b80dc03 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach022/attach022Agent00.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach022/attach022Agent00.cpp @@ -84,12 +84,10 @@ Java_nsk_jvmti_AttachOnDemand_attach022_attach022Target_shutdownAgent(JNIEnv * j void JNICALL objectFreeHandler(jvmtiEnv *jvmti, jlong tag) { NSK_DISPLAY2("%s: ObjectFree event received (object tag: %ld)\n", agentName, tag); - if (NSK_JVMTI_VERIFY(NSK_CPP_STUB2( - RawMonitorEnter, jvmti, objectFreeMonitor))) { - + if (NSK_JVMTI_VERIFY(jvmti->RawMonitorEnter(objectFreeMonitor))) { freedObjectsCounter++; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorExit, jvmti, objectFreeMonitor))) { + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorExit(objectFreeMonitor))) { success = 0; } } else { @@ -107,12 +105,12 @@ int registerNativeMethods(JNIEnv* jni) { jint nativeMethodsNumber = 1; if (!NSK_JNI_VERIFY(jni, (appClass = - NSK_CPP_STUB2(FindClass, jni, ATTACH022_TARGET_APP_CLASS_NAME)) != NULL)) { + jni->FindClass(ATTACH022_TARGET_APP_CLASS_NAME)) != NULL)) { return NSK_FALSE; } if (!NSK_JNI_VERIFY(jni, - (NSK_CPP_STUB4(RegisterNatives, jni, appClass, nativeMethods, nativeMethodsNumber) == 0))) { + (jni->RegisterNatives(appClass, nativeMethods, nativeMethodsNumber) == 0))) { return NSK_FALSE; } @@ -136,12 +134,10 @@ void JNICALL vmObjectAllocHandler(jvmtiEnv * jvmti, NSK_DISPLAY2("%s: ObjectAlloc event received (object class: %s)\n", agentName, className); if (!strcmp(className, OBJECTS_FOR_ALLOCATION_TEST_CLASS_NAME)) { - if (NSK_JVMTI_VERIFY(NSK_CPP_STUB2( - RawMonitorEnter, jvmti, objectTagMonitor))) { + if (NSK_JVMTI_VERIFY(jvmti->RawMonitorEnter(objectTagMonitor))) { jlong tagValue = taggedObjectsCounter + 1; - - if (!NSK_JVMTI_VERIFY( NSK_CPP_STUB3(SetTag, jvmti, object, tagValue))) { + if (!NSK_JVMTI_VERIFY(jvmti->SetTag(object, tagValue))) { NSK_COMPLAIN1("%s: failed to set tag\n", agentName); success = 0; } else { @@ -149,7 +145,7 @@ void JNICALL vmObjectAllocHandler(jvmtiEnv * jvmti, taggedObjectsCounter++; } - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorExit, jvmti, objectTagMonitor))) { + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorExit(objectTagMonitor))) { success = 0; } } else { @@ -195,11 +191,11 @@ Agent_OnAttach(JavaVM *vm, char *optionsString, void *reserved) return JNI_ERR; } - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(CreateRawMonitor, jvmti, "ObjectTagMonitor", &objectTagMonitor))) { + if (!NSK_JVMTI_VERIFY(jvmti->CreateRawMonitor("ObjectTagMonitor", &objectTagMonitor))) { return JNI_ERR; } - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(CreateRawMonitor, jvmti, "ObjectFreeMonitor", &objectFreeMonitor))) { + if (!NSK_JVMTI_VERIFY(jvmti->CreateRawMonitor("ObjectFreeMonitor", &objectFreeMonitor))) { return JNI_ERR; } @@ -207,14 +203,14 @@ Agent_OnAttach(JavaVM *vm, char *optionsString, void *reserved) caps.can_tag_objects = 1; caps.can_generate_object_free_events = 1; caps.can_generate_vm_object_alloc_events = 1; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)) ) { + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)) ) { return JNI_ERR; } memset(&eventCallbacks,0, sizeof(eventCallbacks)); eventCallbacks.ObjectFree = objectFreeHandler; eventCallbacks.VMObjectAlloc = vmObjectAllocHandler; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetEventCallbacks, jvmti, &eventCallbacks, sizeof(eventCallbacks))) ) { + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks))) ) { return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach037/attach037Agent00.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach037/attach037Agent00.cpp index 242fc2439eb..b56383f6c96 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach037/attach037Agent00.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach037/attach037Agent00.cpp @@ -122,14 +122,14 @@ Agent_OnAttach(JavaVM *vm, char *optionsString, void *reserved) memset(&caps, 0, sizeof(caps)); caps.can_generate_monitor_events = 1; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)) ) { + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)) ) { return JNI_ERR; } memset(&eventCallbacks,0, sizeof(eventCallbacks)); eventCallbacks.MonitorWaited = monitorWaitedHandler; eventCallbacks.MonitorWait = monitorWaitHandler; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetEventCallbacks, jvmti, &eventCallbacks, sizeof(eventCallbacks))) ) { + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks))) ) { return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach038/attach038Agent00.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach038/attach038Agent00.cpp index 4400bc9771f..b6b24a5331e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach038/attach038Agent00.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach038/attach038Agent00.cpp @@ -119,7 +119,7 @@ Agent_OnAttach(JavaVM *vm, char *optionsString, void *reserved) memset(&eventCallbacks,0, sizeof(eventCallbacks)); eventCallbacks.ThreadEnd = threadEndHandler; eventCallbacks.ThreadStart = threadStartHandler; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetEventCallbacks, jvmti, &eventCallbacks, sizeof(eventCallbacks))) ) { + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks))) ) { return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach039/attach039Agent00.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach039/attach039Agent00.cpp index 97498e3c632..52178d35085 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach039/attach039Agent00.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach039/attach039Agent00.cpp @@ -68,8 +68,7 @@ int startNewThread(jvmtiEnv* jvmti, JNIEnv* jni) { if (!NSK_VERIFY((thread = nsk_jvmti_aod_createThreadWithName(jni, STARTED_THREAD_NAME)) != NULL)) return NSK_FALSE; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5( - RunAgentThread, jvmti, thread, startedThreadFunction, NULL, JVMTI_THREAD_NORM_PRIORITY ))) { + if (!NSK_JVMTI_VERIFY(jvmti->RunAgentThread(thread, startedThreadFunction, NULL, JVMTI_THREAD_NORM_PRIORITY ))) { return NSK_FALSE; } @@ -155,7 +154,7 @@ Agent_OnAttach(JavaVM *vm, char *optionsString, void *reserved) memset(&eventCallbacks,0, sizeof(eventCallbacks)); eventCallbacks.ThreadEnd = threadEndHandler; eventCallbacks.ThreadStart = threadStartHandler; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetEventCallbacks, jvmti, &eventCallbacks, sizeof(eventCallbacks))) ) { + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks))) ) { return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach040/attach040Agent00.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach040/attach040Agent00.cpp index 69d18add5af..bf3aa7b4f1e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach040/attach040Agent00.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach040/attach040Agent00.cpp @@ -66,7 +66,7 @@ void JNICALL threadStartHandler(jvmtiEnv *jvmti, NSK_DISPLAY2("%s: ThreadStart event was received for thread '%s'\n", agentName, startedThreadName); - if (NSK_JVMTI_VERIFY(NSK_CPP_STUB3(GetAllThreads, jvmti, &threadsCount, &threads))) { + if (NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threadsCount, &threads))) { int startedThreadWasFound = 0; for (i = 0; i < threadsCount; i++) { @@ -94,8 +94,7 @@ void JNICALL threadStartHandler(jvmtiEnv *jvmti, } if (strstr(startedThreadName, TEST_THREAD_NAME_PREFIX)) { - if (NSK_JVMTI_VERIFY(NSK_CPP_STUB2( - RawMonitorEnter, jvmti, threadsCounterMonitor))) { + if (NSK_JVMTI_VERIFY(jvmti->RawMonitorEnter(threadsCounterMonitor))) { testThreadsCounter++; @@ -103,7 +102,7 @@ void JNICALL threadStartHandler(jvmtiEnv *jvmti, nsk_jvmti_aod_disableEventAndFinish(agentName, JVMTI_EVENT_THREAD_START, success, jvmti, jni); } - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorExit, jvmti, threadsCounterMonitor))) { + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorExit(threadsCounterMonitor))) { success = 0; } } else { @@ -145,13 +144,13 @@ Agent_OnAttach(JavaVM *vm, char *optionsString, void *reserved) if (!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(vm, reserved)) != NULL)) return JNI_ERR; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(CreateRawMonitor, jvmti, "threadsCounterMonitor", &threadsCounterMonitor))) { + if (!NSK_JVMTI_VERIFY(jvmti->CreateRawMonitor("threadsCounterMonitor", &threadsCounterMonitor))) { return JNI_ERR; } memset(&eventCallbacks,0, sizeof(eventCallbacks)); eventCallbacks.ThreadStart = threadStartHandler; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetEventCallbacks, jvmti, &eventCallbacks, sizeof(eventCallbacks))) ) { + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks))) ) { return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach041/attach041Agent00.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach041/attach041Agent00.cpp index 33154062acb..e1129d05095 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach041/attach041Agent00.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach041/attach041Agent00.cpp @@ -52,7 +52,7 @@ int tryFindThread(jvmtiEnv *jvmti, jthreadGroup group, const char* threadNameToF int i; char threadGroupName[MAX_STRING_LENGTH]; - if(!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(GetThreadGroupInfo, jvmti, group, &groupInfo))) { + if(!NSK_JVMTI_VERIFY(jvmti->GetThreadGroupInfo(group, &groupInfo))) { return 0; } @@ -61,7 +61,7 @@ int tryFindThread(jvmtiEnv *jvmti, jthreadGroup group, const char* threadNameToF NSK_DISPLAY3("%s: trying to find thread '%s' in group '%s'\n", agentName, threadNameToFind, threadGroupName); - if(!NSK_JVMTI_VERIFY(NSK_CPP_STUB6(GetThreadGroupChildren, jvmti, group, &threadsCount, &threads, &groupsCount, &groups))) { + if(!NSK_JVMTI_VERIFY(jvmti->GetThreadGroupChildren(group, &threadsCount, &threads, &groupsCount, &groups))) { return 0; } @@ -118,7 +118,7 @@ void JNICALL threadStartHandler(jvmtiEnv *jvmti, jthreadGroup *topGroups; int i; - if(!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(GetTopThreadGroups, jvmti, &groupsCount, &topGroups))) { + if(!NSK_JVMTI_VERIFY(jvmti->GetTopThreadGroups(&groupsCount, &topGroups))) { NSK_COMPLAIN1("%s: failed to get top thread groups\n", agentName); nsk_jvmti_aod_disableEventAndFinish(agentName, JVMTI_EVENT_THREAD_START, 0, jvmti, jni); return; @@ -172,7 +172,7 @@ Agent_OnAttach(JavaVM *vm, char *optionsString, void *reserved) memset(&eventCallbacks,0, sizeof(eventCallbacks)); eventCallbacks.ThreadStart = threadStartHandler; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetEventCallbacks, jvmti, &eventCallbacks, sizeof(eventCallbacks))) ) { + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks))) ) { return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach042/attach042Agent00.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach042/attach042Agent00.cpp index 1c87c3389c4..df8dc63ed8b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach042/attach042Agent00.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach042/attach042Agent00.cpp @@ -62,7 +62,7 @@ void JNICALL threadStartHandler(jvmtiEnv *jvmti, int i; int startedThreadWasFound = 0; - if(!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(GetAllThreads, jvmti, &threadsCount, &threads))) { + if(!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threadsCount, &threads))) { NSK_COMPLAIN1("%s: failed to get all threads\n", agentName); nsk_jvmti_aod_disableEventAndFinish(agentName, JVMTI_EVENT_THREAD_START, 0, jvmti, jni); return; @@ -85,7 +85,7 @@ void JNICALL threadStartHandler(jvmtiEnv *jvmti, startedThreadWasFound = 1; } - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(GetThreadState, jvmti, threads[i], &threadState))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetThreadState(threads[i], &threadState))) { NSK_COMPLAIN2("%s: failed to get status of thread '%s'\n", agentName, threadName); nsk_jvmti_aod_deallocate(jvmti, (unsigned char*)threads); nsk_jvmti_aod_disableEventAndFinish(agentName, JVMTI_EVENT_THREAD_START, 0, jvmti, jni); @@ -136,7 +136,7 @@ Agent_OnAttach(JavaVM *vm, char *optionsString, void *reserved) memset(&eventCallbacks,0, sizeof(eventCallbacks)); eventCallbacks.ThreadStart = threadStartHandler; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetEventCallbacks, jvmti, &eventCallbacks, sizeof(eventCallbacks))) ) { + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks))) ) { return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach045/attach045Agent00.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach045/attach045Agent00.cpp index 1e850f6559d..31369ce892e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach045/attach045Agent00.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach045/attach045Agent00.cpp @@ -57,8 +57,7 @@ void JNICALL classLoadHandler( return; } - if (NSK_JVMTI_VERIFY(NSK_CPP_STUB2( - RawMonitorEnter, jvmti, eventsCounterMonitor))) { + if (NSK_JVMTI_VERIFY(jvmti->RawMonitorEnter(eventsCounterMonitor))) { eventsCounter++; @@ -69,7 +68,7 @@ void JNICALL classLoadHandler( nsk_jvmti_aod_disableEventAndFinish(agentName, JVMTI_EVENT_CLASS_LOAD, success, jvmti, jni); } - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorExit, jvmti, eventsCounterMonitor))) { + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorExit(eventsCounterMonitor))) { success = 0; } } else { @@ -109,13 +108,13 @@ Agent_OnAttach(JavaVM *vm, char *optionsString, void *reserved) if (!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(vm, reserved)) != NULL)) return JNI_ERR; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(CreateRawMonitor, jvmti, "attach045-agent00-eventsCounterMonitor", &eventsCounterMonitor))) { + if (!NSK_JVMTI_VERIFY(jvmti->CreateRawMonitor("attach045-agent00-eventsCounterMonitor", &eventsCounterMonitor))) { return JNI_ERR; } memset(&eventCallbacks,0, sizeof(eventCallbacks)); eventCallbacks.ClassLoad = classLoadHandler; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetEventCallbacks, jvmti, &eventCallbacks, sizeof(eventCallbacks))) ) { + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks))) ) { return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach045/attach045Agent01.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach045/attach045Agent01.cpp index 8cad9b3b5cd..93ec8bc6d10 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach045/attach045Agent01.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach045/attach045Agent01.cpp @@ -59,7 +59,7 @@ void JNICALL classPrepareHandler( return; } - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(GetLoadedClasses, jvmti, &loadedClassesCount, &loadedClasses))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetLoadedClasses(&loadedClassesCount, &loadedClasses))) { NSK_COMPLAIN1("%s: failed to get loaded classes\n", agentName); nsk_jvmti_aod_disableEventAndFinish(agentName, JVMTI_EVENT_CLASS_PREPARE, 0, jvmti, jni); return; @@ -67,8 +67,7 @@ void JNICALL classPrepareHandler( nsk_jvmti_aod_deallocate(jvmti, (unsigned char*)loadedClasses); - if (NSK_JVMTI_VERIFY(NSK_CPP_STUB2( - RawMonitorEnter, jvmti, eventsCounterMonitor))) { + if (NSK_JVMTI_VERIFY(jvmti->RawMonitorEnter(eventsCounterMonitor))) { eventsCounter++; @@ -80,7 +79,7 @@ void JNICALL classPrepareHandler( nsk_jvmti_aod_disableEventAndFinish(agentName, JVMTI_EVENT_CLASS_PREPARE, success, jvmti, jni); } - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorExit, jvmti, eventsCounterMonitor))) { + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorExit(eventsCounterMonitor))) { success = 0; } } else { @@ -120,13 +119,13 @@ Agent_OnAttach(JavaVM *vm, char *optionsString, void *reserved) if (!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(vm, reserved)) != NULL)) return JNI_ERR; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(CreateRawMonitor, jvmti, "attach045-agent01-eventsCounterMonitor", &eventsCounterMonitor))) { + if (!NSK_JVMTI_VERIFY(jvmti->CreateRawMonitor("attach045-agent01-eventsCounterMonitor", &eventsCounterMonitor))) { return JNI_ERR; } memset(&eventCallbacks,0, sizeof(eventCallbacks)); eventCallbacks.ClassPrepare = classPrepareHandler; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetEventCallbacks, jvmti, &eventCallbacks, sizeof(eventCallbacks))) ) { + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks))) ) { return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach045/attach045Agent02.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach045/attach045Agent02.cpp index 370c270acbb..c18df3e7264 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach045/attach045Agent02.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach045/attach045Agent02.cpp @@ -62,7 +62,7 @@ void eventHandler(jvmtiEnv *jvmti, return; } - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(GetAllThreads, jvmti, &threadsCount, &threads))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threadsCount, &threads))) { NSK_COMPLAIN1("%s: failed to get all threads\n", agentName); nsk_jvmti_aod_disableEventsAndFinish(agentName, testEvents, testEventsNumber, 0, jvmti, jni); return; @@ -70,8 +70,7 @@ void eventHandler(jvmtiEnv *jvmti, nsk_jvmti_aod_deallocate(jvmti, (unsigned char*)threads); - if (NSK_JVMTI_VERIFY(NSK_CPP_STUB2( - RawMonitorEnter, jvmti, eventsCounterMonitor))) { + if (NSK_JVMTI_VERIFY(jvmti->RawMonitorEnter(eventsCounterMonitor))) { eventsCounter++; @@ -86,7 +85,7 @@ void eventHandler(jvmtiEnv *jvmti, nsk_jvmti_aod_disableEventsAndFinish(agentName, testEvents, testEventsNumber, success, jvmti, jni); } - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorExit, jvmti, eventsCounterMonitor))) { + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorExit(eventsCounterMonitor))) { success = 0; } } else { @@ -140,14 +139,14 @@ Agent_OnAttach(JavaVM *vm, char *optionsString, void *reserved) if (!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(vm, reserved)) != NULL)) return JNI_ERR; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(CreateRawMonitor, jvmti, "attach045-agent02-eventsCounterMonitor", &eventsCounterMonitor))) { + if (!NSK_JVMTI_VERIFY(jvmti->CreateRawMonitor("attach045-agent02-eventsCounterMonitor", &eventsCounterMonitor))) { return JNI_ERR; } memset(&eventCallbacks,0, sizeof(eventCallbacks)); eventCallbacks.ThreadStart = threadStartHandler; eventCallbacks.ThreadEnd = threadEndHandler; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetEventCallbacks, jvmti, &eventCallbacks, sizeof(eventCallbacks))) ) { + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks))) ) { return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach045/attach045Agent03.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach045/attach045Agent03.cpp index 6042462e31c..6db7f98556b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach045/attach045Agent03.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach045/attach045Agent03.cpp @@ -68,8 +68,7 @@ VMObjectAllocHandler(jvmtiEnv *jvmti, return; } - if (NSK_JVMTI_VERIFY(NSK_CPP_STUB2( - RawMonitorEnter, jvmti, eventsCounterMonitor))) { + if (NSK_JVMTI_VERIFY(jvmti->RawMonitorEnter(eventsCounterMonitor))) { eventsCounter++; @@ -79,7 +78,7 @@ VMObjectAllocHandler(jvmtiEnv *jvmti, if ((eventsCounter % 10) == 0) { NSK_DISPLAY1("%s: force garbage collection\n", agentName); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB1(ForceGarbageCollection, jvmti))) + if (!NSK_JVMTI_VERIFY(jvmti->ForceGarbageCollection())) success = 0; } @@ -89,7 +88,7 @@ VMObjectAllocHandler(jvmtiEnv *jvmti, nsk_jvmti_aod_disableEventsAndFinish(agentName, testEvents, testEventsNumber, success, jvmti, jni); } - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorExit, jvmti, eventsCounterMonitor))) { + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorExit(eventsCounterMonitor))) { success = 0; } } else { @@ -130,19 +129,19 @@ Agent_OnAttach(JavaVM *vm, char *optionsString, void *reserved) if (!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(vm, reserved)) != NULL)) return JNI_ERR; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(CreateRawMonitor, jvmti, "attach045-agent03-eventsCounterMonitor", &eventsCounterMonitor))) { + if (!NSK_JVMTI_VERIFY(jvmti->CreateRawMonitor("attach045-agent03-eventsCounterMonitor", &eventsCounterMonitor))) { return JNI_ERR; } memset(&caps, 0, sizeof(caps)); caps.can_generate_vm_object_alloc_events = 1; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)) ) { + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)) ) { return JNI_ERR; } memset(&eventCallbacks,0, sizeof(eventCallbacks)); eventCallbacks.VMObjectAlloc = VMObjectAllocHandler; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetEventCallbacks, jvmti, &eventCallbacks, sizeof(eventCallbacks))) ) { + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks))) ) { return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach046/attach046Agent00.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach046/attach046Agent00.cpp index ba4a31c8125..2325e16b38b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach046/attach046Agent00.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach046/attach046Agent00.cpp @@ -113,13 +113,13 @@ Agent_OnAttach(JavaVM *vm, char *optionsString, void *reserved) memset(&caps, 0, sizeof(caps)); caps.can_redefine_classes = 1; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)) ) { + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)) ) { return JNI_ERR; } memset(&eventCallbacks,0, sizeof(eventCallbacks)); eventCallbacks.ClassLoad = classLoadHandler; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetEventCallbacks, jvmti, &eventCallbacks, sizeof(eventCallbacks))) ) { + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks))) ) { return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/Breakpoint/breakpoint001/breakpoint001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/Breakpoint/breakpoint001/breakpoint001.cpp index a9e7360f65b..636040d2a51 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/Breakpoint/breakpoint001/breakpoint001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/Breakpoint/breakpoint001/breakpoint001.cpp @@ -67,15 +67,11 @@ static void setBP(jvmtiEnv *jvmti_env, JNIEnv *env, jclass klass) { int i; for (i=0; iGetMethodID(klass, METHODS[i][0], METHODS[i][1])) != NULL)) + env->FatalError("failed to get ID for the java method\n"); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetBreakpoint, - jvmti_env, mid, 0))) - NSK_CPP_STUB2(FatalError, env, - "failed to set breakpoint\n"); + if (!NSK_JVMTI_VERIFY(jvmti_env->SetBreakpoint(mid, 0))) + env->FatalError("failed to set breakpoint\n"); } } @@ -88,10 +84,8 @@ ClassLoad(jvmtiEnv *jvmti_env, JNIEnv *env, jthread thread, jclass klass) { if (vm_started) { // GetClassSignature may be called only during the start or the live phase - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(GetClassSignature, - jvmti_env, klass, &sig, &generic))) - NSK_CPP_STUB2(FatalError, env, - "failed to obtain a class signature\n"); + if (!NSK_JVMTI_VERIFY(jvmti_env->GetClassSignature(klass, &sig, &generic))) + env->FatalError("failed to obtain a class signature\n"); if (sig != NULL && (strcmp(sig, CLASS_SIG) == 0)) { NSK_DISPLAY1( @@ -117,8 +111,7 @@ Breakpoint(jvmtiEnv *jvmti_env, JNIEnv* jni_env, jthread thread, NSK_DISPLAY0(">>>> Breakpoint event received\n"); /* checking thread info */ - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(GetThreadInfo, - jvmti_env, thread, &thr_info))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->GetThreadInfo(thread, &thr_info))) { result = STATUS_FAILED; NSK_COMPLAIN0("TEST FAILED: unable to get thread info during Breakpoint callback\n\n"); return; @@ -148,14 +141,12 @@ Breakpoint(jvmtiEnv *jvmti_env, JNIEnv* jni_env, jthread thread, (long) location); /* checking method info */ - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(GetMethodDeclaringClass, - jvmti_env, method, &klass))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->GetMethodDeclaringClass(method, &klass))) { result = checkStatus = STATUS_FAILED; NSK_COMPLAIN0("TEST FAILED: unable to get method declaring class during Breakpoint callback\n\n"); return; } - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(GetClassSignature, - jvmti_env, klass, &clsSig, &generic))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->GetClassSignature(klass, &clsSig, &generic))) { result = checkStatus = STATUS_FAILED; NSK_COMPLAIN0("TEST FAILED: unable to obtain a class signature during Breakpoint callback\n\n"); return; @@ -172,8 +163,7 @@ Breakpoint(jvmtiEnv *jvmti_env, JNIEnv* jni_env, jthread thread, NSK_DISPLAY1("CHECK PASSED: class signature: \"%s\"\n", clsSig); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(GetMethodName, - jvmti_env, method, &methNam, &methSig, NULL))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->GetMethodName(method, &methNam, &methSig, NULL))) { result = checkStatus = STATUS_FAILED; NSK_COMPLAIN0("TEST FAILED: unable to get method name during Breakpoint callback\n\n"); return; @@ -189,13 +179,11 @@ Breakpoint(jvmtiEnv *jvmti_env, JNIEnv* jni_env, jthread thread, break; } - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(Deallocate, - jvmti_env, (unsigned char*) methNam))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->Deallocate((unsigned char*) methNam))) { result = STATUS_FAILED; NSK_COMPLAIN0("TEST FAILED: unable to deallocate memory pointed to method name\n\n"); } - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(Deallocate, - jvmti_env, (unsigned char*) methSig))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->Deallocate((unsigned char*) methSig))) { result = STATUS_FAILED; NSK_COMPLAIN0("TEST FAILED: unable to deallocate memory pointed to method signature\n\n"); } @@ -265,12 +253,10 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { /* add capability to generate compiled method events */ memset(&caps, 0, sizeof(jvmtiCapabilities)); caps.can_generate_breakpoint_events = 1; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, - jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) return JNI_ERR; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, - jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps))) return JNI_ERR; if (!caps.can_generate_single_step_events) @@ -282,20 +268,16 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { callbacks.ClassLoad = &ClassLoad; callbacks.Breakpoint = &Breakpoint; callbacks.VMStart = &VMStart; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetEventCallbacks, - jvmti, &callbacks, sizeof(callbacks)))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, sizeof(callbacks)))) return JNI_ERR; NSK_DISPLAY0("setting event callbacks done\nenabling JVMTI events ...\n"); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode, - jvmti, JVMTI_ENABLE, JVMTI_EVENT_VM_START, NULL))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_VM_START, NULL))) return JNI_ERR; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode, - jvmti, JVMTI_ENABLE, JVMTI_EVENT_CLASS_LOAD, NULL))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_CLASS_LOAD, NULL))) return JNI_ERR; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode, - jvmti, JVMTI_ENABLE, JVMTI_EVENT_BREAKPOINT, NULL))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_BREAKPOINT, NULL))) return JNI_ERR; NSK_DISPLAY0("enabling the events done\n\n"); diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ClassFileLoadHook/classfloadhk001/classfloadhk001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ClassFileLoadHook/classfloadhk001/classfloadhk001.cpp index 3a4ba0a5090..ef6c10fc9fc 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ClassFileLoadHook/classfloadhk001/classfloadhk001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ClassFileLoadHook/classfloadhk001/classfloadhk001.cpp @@ -93,13 +93,11 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { NSK_DISPLAY0("setting event callbacks ...\n"); (void) memset(&callbacks, 0, sizeof(callbacks)); callbacks.ClassFileLoadHook = &ClassFileLoadHook; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetEventCallbacks, - jvmti, &callbacks, sizeof(callbacks)))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, sizeof(callbacks)))) return JNI_ERR; NSK_DISPLAY0("setting event callbacks done\nenabling ClassFileLoadHook event ...\n"); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode, - jvmti, JVMTI_ENABLE, JVMTI_EVENT_CLASS_FILE_LOAD_HOOK, NULL))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_CLASS_FILE_LOAD_HOOK, NULL))) return JNI_ERR; NSK_DISPLAY0("enabling ClassFileLoadHook event done\n"); diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ClassFileLoadHook/classfloadhk002/classfloadhk002.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ClassFileLoadHook/classfloadhk002/classfloadhk002.cpp index c4b2d25c9e4..520563f459f 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ClassFileLoadHook/classfloadhk002/classfloadhk002.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ClassFileLoadHook/classfloadhk002/classfloadhk002.cpp @@ -122,7 +122,7 @@ static int getBytecode(jvmtiEnv* jvmti, JNIEnv* jni, jclass cls, NSK_DISPLAY1("Find static field: %s\n", fieldName); if (!NSK_JNI_VERIFY(jni, (fieldID = - NSK_CPP_STUB4(GetStaticFieldID, jni, cls, fieldName, fieldSig)) != NULL)) { + jni->GetStaticFieldID(cls, fieldName, fieldSig)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -130,14 +130,13 @@ static int getBytecode(jvmtiEnv* jvmti, JNIEnv* jni, jclass cls, NSK_DISPLAY1("Get classfile bytes array from static field: %s\n", fieldName); if (!NSK_JNI_VERIFY(jni, (array = (jbyteArray) - NSK_CPP_STUB3(GetStaticObjectField, jni, cls, fieldID)) != NULL)) { + jni->GetStaticObjectField(cls, fieldID)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } NSK_DISPLAY1(" ... got array object: 0x%p\n", (void*)array); - if (!NSK_JNI_VERIFY(jni, (*size = - NSK_CPP_STUB2(GetArrayLength, jni, array)) > 0)) { + if (!NSK_JNI_VERIFY(jni, (*size = jni->GetArrayLength(array)) > 0)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -145,17 +144,14 @@ static int getBytecode(jvmtiEnv* jvmti, JNIEnv* jni, jclass cls, { jboolean isCopy; - if (!NSK_JNI_VERIFY(jni, (elements = - NSK_CPP_STUB3(GetByteArrayElements, jni, array, - &isCopy)) != NULL)) { + if (!NSK_JNI_VERIFY(jni, (elements = jni->GetByteArrayElements(array, &isCopy)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } } NSK_DISPLAY1(" ... got elements list: 0x%p\n", (void*)elements); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(Allocate, jvmti, *size, bytes))) { + if (!NSK_JVMTI_VERIFY(jvmti->Allocate(*size, bytes))) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -167,7 +163,7 @@ static int getBytecode(jvmtiEnv* jvmti, JNIEnv* jni, jclass cls, NSK_DISPLAY1(" ... copied bytecode: %d bytes\n", (int)*size); NSK_DISPLAY1("Release elements list: 0x%p\n", (void*)elements); - NSK_TRACE(NSK_CPP_STUB4(ReleaseByteArrayElements, jni, array, elements, JNI_ABORT)); + NSK_TRACE(jni->ReleaseByteArrayElements(array, elements, JNI_ABORT)); NSK_DISPLAY0(" ... released\n"); return NSK_TRUE; @@ -190,7 +186,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY1("Find debugee class: %s\n", DEBUGEE_CLASS_NAME); if (!NSK_JNI_VERIFY(jni, (debugeeClass = - NSK_CPP_STUB2(FindClass, jni, DEBUGEE_CLASS_NAME)) != NULL)) { + jni->FindClass(DEBUGEE_CLASS_NAME)) != NULL)) { nsk_jvmti_setFailStatus(); return; } @@ -240,8 +236,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY0(">>> Clean used data\n"); { NSK_DISPLAY1("Deallocate bytecode array: 0x%p\n", (void*)origClassBytes); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, origClassBytes))) { + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate(origClassBytes))) { nsk_jvmti_setFailStatus(); } } @@ -318,8 +313,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(caps)); caps.can_generate_all_class_hook_events = 1; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) { return JNI_ERR; } } @@ -332,8 +326,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&callbacks, 0, sizeof(callbacks)); callbacks.ClassFileLoadHook = callbackClassFileLoadHook; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, &callbacks, size))) { + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, size))) { return JNI_ERR; } } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ClassFileLoadHook/classfloadhk003/classfloadhk003.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ClassFileLoadHook/classfloadhk003/classfloadhk003.cpp index f7091dadfef..b9a11398753 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ClassFileLoadHook/classfloadhk003/classfloadhk003.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ClassFileLoadHook/classfloadhk003/classfloadhk003.cpp @@ -127,7 +127,7 @@ static int getBytecode(jvmtiEnv* jvmti, JNIEnv* jni, jclass cls, NSK_DISPLAY1("Find static field: %s\n", fieldName); if (!NSK_JNI_VERIFY(jni, (fieldID = - NSK_CPP_STUB4(GetStaticFieldID, jni, cls, fieldName, fieldSig)) != NULL)) { + jni->GetStaticFieldID(cls, fieldName, fieldSig)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -135,14 +135,13 @@ static int getBytecode(jvmtiEnv* jvmti, JNIEnv* jni, jclass cls, NSK_DISPLAY1("Get classfile bytes array from static field: %s\n", fieldName); if (!NSK_JNI_VERIFY(jni, (array = (jbyteArray) - NSK_CPP_STUB3(GetStaticObjectField, jni, cls, fieldID)) != NULL)) { + jni->GetStaticObjectField(cls, fieldID)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } NSK_DISPLAY1(" ... got array object: 0x%p\n", (void*)array); - if (!NSK_JNI_VERIFY(jni, (*size = - NSK_CPP_STUB2(GetArrayLength, jni, array)) > 0)) { + if (!NSK_JNI_VERIFY(jni, (*size = jni->GetArrayLength(array)) > 0)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -150,17 +149,14 @@ static int getBytecode(jvmtiEnv* jvmti, JNIEnv* jni, jclass cls, { jboolean isCopy; - if (!NSK_JNI_VERIFY(jni, (elements = - NSK_CPP_STUB3(GetByteArrayElements, jni, array, - &isCopy)) != NULL)) { + if (!NSK_JNI_VERIFY(jni, (elements = jni->GetByteArrayElements(array, &isCopy)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } } NSK_DISPLAY1(" ... got elements list: 0x%p\n", (void*)elements); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(Allocate, jvmti, *size, bytes))) { + if (!NSK_JVMTI_VERIFY(jvmti->Allocate(*size, bytes))) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -172,7 +168,7 @@ static int getBytecode(jvmtiEnv* jvmti, JNIEnv* jni, jclass cls, NSK_DISPLAY1(" ... copied bytecode: %d bytes\n", (int)*size); NSK_DISPLAY1("Release elements list: 0x%p\n", (void*)elements); - NSK_TRACE(NSK_CPP_STUB4(ReleaseByteArrayElements, jni, array, elements, JNI_ABORT)); + NSK_TRACE(jni->ReleaseByteArrayElements(array, elements, JNI_ABORT)); NSK_DISPLAY0(" ... released\n"); return NSK_TRUE; @@ -187,23 +183,21 @@ static jobject getObject(jvmtiEnv* jvmti, JNIEnv* jni, jclass cls, NSK_DISPLAY1("Find static field: %s\n", fieldName); if (!NSK_JNI_VERIFY(jni, (fieldID = - NSK_CPP_STUB4(GetStaticFieldID, jni, cls, fieldName, fieldSig)) != NULL)) { + jni->GetStaticFieldID(cls, fieldName, fieldSig)) != NULL)) { nsk_jvmti_setFailStatus(); return NULL; } NSK_DISPLAY1(" ... got fieldID: 0x%p\n", (void*)fieldID); NSK_DISPLAY1("Get object from static field: %s\n", fieldName); - if (!NSK_JNI_VERIFY(jni, (obj = - NSK_CPP_STUB3(GetStaticObjectField, jni, cls, fieldID)) != NULL)) { + if (!NSK_JNI_VERIFY(jni, (obj = jni->GetStaticObjectField(cls, fieldID)) != NULL)) { nsk_jvmti_setFailStatus(); return NULL; } NSK_DISPLAY1(" ... got object: 0x%p\n", (void*)obj); NSK_DISPLAY1("Make global reference to object: 0x%p\n", obj); - if (!NSK_JNI_VERIFY(jni, (obj = - NSK_CPP_STUB2(NewGlobalRef, jni, obj)) != NULL)) { + if (!NSK_JNI_VERIFY(jni, (obj = jni->NewGlobalRef(obj)) != NULL)) { nsk_jvmti_setFailStatus(); return NULL; } @@ -229,7 +223,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY0(">>> Obtain debuggee class\n"); NSK_DISPLAY1("Find debugee class: %s\n", DEBUGEE_CLASS_NAME); if (!NSK_JNI_VERIFY(jni, (debugeeClass = - NSK_CPP_STUB2(FindClass, jni, DEBUGEE_CLASS_NAME)) != NULL)) { + jni->FindClass(DEBUGEE_CLASS_NAME)) != NULL)) { nsk_jvmti_setFailStatus(); return; } @@ -286,11 +280,10 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY0(">>> Clean used data\n"); { NSK_DISPLAY1("Delete global reference to classloader object: 0x%p\n", (void*)classLoader); - NSK_CPP_STUB2(DeleteGlobalRef, jni, classLoader); + jni->DeleteGlobalRef(classLoader); NSK_DISPLAY1("Deallocate classfile bytes array: 0x%p\n", (void*)origClassBytes); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, origClassBytes))) { + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate(origClassBytes))) { nsk_jvmti_setFailStatus(); } } @@ -331,7 +324,7 @@ callbackClassFileLoadHook(jvmtiEnv *jvmti, JNIEnv *jni, NSK_COMPLAIN1("Unexpected NULL classloader in CLASS_FILE_LOAD_HOOK: 0x%p\n", (void*)loader); nsk_jvmti_setFailStatus(); - } else if (!NSK_CPP_STUB3(IsSameObject, jni, loader, classLoader)) { + } else if (!jni->IsSameObject(loader, classLoader)) { NSK_COMPLAIN2("Unexpected classloader in CLASS_FILE_LOAD_HOOK for tested class:\n" "# got classloder: 0x%p\n" "# expected same as: 0x%p\n", @@ -380,8 +373,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(caps)); caps.can_generate_all_class_hook_events = 1; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) { return JNI_ERR; } } @@ -394,8 +386,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&callbacks, 0, sizeof(callbacks)); callbacks.ClassFileLoadHook = callbackClassFileLoadHook; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, &callbacks, size))) { + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, size))) { return JNI_ERR; } } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ClassFileLoadHook/classfloadhk004/classfloadhk004.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ClassFileLoadHook/classfloadhk004/classfloadhk004.cpp index 236729dfc5a..7fe5d9b89d1 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ClassFileLoadHook/classfloadhk004/classfloadhk004.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ClassFileLoadHook/classfloadhk004/classfloadhk004.cpp @@ -61,7 +61,7 @@ static int getBytecode(jvmtiEnv* jvmti, JNIEnv* jni, jclass cls, NSK_DISPLAY1("Find static field: %s\n", fieldName); if (!NSK_JNI_VERIFY(jni, (fieldID = - NSK_CPP_STUB4(GetStaticFieldID, jni, cls, fieldName, fieldSig)) != NULL)) { + jni->GetStaticFieldID(cls, fieldName, fieldSig)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -69,14 +69,13 @@ static int getBytecode(jvmtiEnv* jvmti, JNIEnv* jni, jclass cls, NSK_DISPLAY1("Get classfile bytes array from static field: %s\n", fieldName); if (!NSK_JNI_VERIFY(jni, (array = (jbyteArray) - NSK_CPP_STUB3(GetStaticObjectField, jni, cls, fieldID)) != NULL)) { + jni->GetStaticObjectField(cls, fieldID)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } NSK_DISPLAY1(" ... got array object: 0x%p\n", (void*)array); - if (!NSK_JNI_VERIFY(jni, (*size = - NSK_CPP_STUB2(GetArrayLength, jni, array)) > 0)) { + if (!NSK_JNI_VERIFY(jni, (*size = jni->GetArrayLength(array)) > 0)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -84,17 +83,14 @@ static int getBytecode(jvmtiEnv* jvmti, JNIEnv* jni, jclass cls, { jboolean isCopy; - if (!NSK_JNI_VERIFY(jni, (elements = - NSK_CPP_STUB3(GetByteArrayElements, jni, array, - &isCopy)) != NULL)) { + if (!NSK_JNI_VERIFY(jni, (elements = jni->GetByteArrayElements(array, &isCopy)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } } NSK_DISPLAY1(" ... got elements list: 0x%p\n", (void*)elements); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(Allocate, jvmti, *size, bytes))) { + if (!NSK_JVMTI_VERIFY(jvmti->Allocate(*size, bytes))) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -106,7 +102,7 @@ static int getBytecode(jvmtiEnv* jvmti, JNIEnv* jni, jclass cls, NSK_DISPLAY1(" ... copied bytecode: %d bytes\n", (int)*size); NSK_DISPLAY1("Release elements list: 0x%p\n", (void*)elements); - NSK_TRACE(NSK_CPP_STUB4(ReleaseByteArrayElements, jni, array, elements, JNI_ABORT)); + NSK_TRACE(jni->ReleaseByteArrayElements(array, elements, JNI_ABORT)); NSK_DISPLAY0(" ... released\n"); return NSK_TRUE; @@ -129,7 +125,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY1("Find debugee class: %s\n", DEBUGEE_CLASS_NAME); if (!NSK_JNI_VERIFY(jni, (debugeeClass = - NSK_CPP_STUB2(FindClass, jni, DEBUGEE_CLASS_NAME)) != NULL)) { + jni->FindClass(DEBUGEE_CLASS_NAME)) != NULL)) { nsk_jvmti_setFailStatus(); return; } @@ -271,8 +267,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(caps)); caps.can_generate_all_class_hook_events = 1; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) { return JNI_ERR; } } @@ -285,8 +280,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&callbacks, 0, sizeof(callbacks)); callbacks.ClassFileLoadHook = callbackClassFileLoadHook; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, &callbacks, size))) { + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, size))) { return JNI_ERR; } } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ClassFileLoadHook/classfloadhk005/classfloadhk005.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ClassFileLoadHook/classfloadhk005/classfloadhk005.cpp index 34e47603e34..937d8d4a3e2 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ClassFileLoadHook/classfloadhk005/classfloadhk005.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ClassFileLoadHook/classfloadhk005/classfloadhk005.cpp @@ -123,7 +123,7 @@ static int getBytecode(jvmtiEnv* jvmti, JNIEnv* jni, jclass cls, NSK_DISPLAY1("Find static field: %s\n", fieldName); if (!NSK_JNI_VERIFY(jni, (fieldID = - NSK_CPP_STUB4(GetStaticFieldID, jni, cls, fieldName, fieldSig)) != NULL)) { + jni->GetStaticFieldID(cls, fieldName, fieldSig)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -131,14 +131,13 @@ static int getBytecode(jvmtiEnv* jvmti, JNIEnv* jni, jclass cls, NSK_DISPLAY1("Get classfile bytes array from static field: %s\n", fieldName); if (!NSK_JNI_VERIFY(jni, (array = (jbyteArray) - NSK_CPP_STUB3(GetStaticObjectField, jni, cls, fieldID)) != NULL)) { + jni->GetStaticObjectField(cls, fieldID)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } NSK_DISPLAY1(" ... got array object: 0x%p\n", (void*)array); - if (!NSK_JNI_VERIFY(jni, (*size = - NSK_CPP_STUB2(GetArrayLength, jni, array)) > 0)) { + if (!NSK_JNI_VERIFY(jni, (*size = jni->GetArrayLength(array)) > 0)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -146,17 +145,14 @@ static int getBytecode(jvmtiEnv* jvmti, JNIEnv* jni, jclass cls, { jboolean isCopy; - if (!NSK_JNI_VERIFY(jni, (elements = - NSK_CPP_STUB3(GetByteArrayElements, jni, array, - &isCopy)) != NULL)) { + if (!NSK_JNI_VERIFY(jni, (elements = jni->GetByteArrayElements(array, &isCopy)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } } NSK_DISPLAY1(" ... got elements list: 0x%p\n", (void*)elements); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(Allocate, jvmti, *size, bytes))) { + if (!NSK_JVMTI_VERIFY(jvmti->Allocate(*size, bytes))) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -168,7 +164,7 @@ static int getBytecode(jvmtiEnv* jvmti, JNIEnv* jni, jclass cls, NSK_DISPLAY1(" ... copied bytecode: %d bytes\n", (int)*size); NSK_DISPLAY1("Release elements list: 0x%p\n", (void*)elements); - NSK_TRACE(NSK_CPP_STUB4(ReleaseByteArrayElements, jni, array, elements, JNI_ABORT)); + NSK_TRACE(jni->ReleaseByteArrayElements(array, elements, JNI_ABORT)); NSK_DISPLAY0(" ... released\n"); return NSK_TRUE; @@ -191,7 +187,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY1("Find debugee class: %s\n", DEBUGEE_CLASS_NAME); if (!NSK_JNI_VERIFY(jni, (debugeeClass = - NSK_CPP_STUB2(FindClass, jni, DEBUGEE_CLASS_NAME)) != NULL)) { + jni->FindClass(DEBUGEE_CLASS_NAME)) != NULL)) { nsk_jvmti_setFailStatus(); return; } @@ -333,8 +329,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(caps)); caps.can_generate_all_class_hook_events = 1; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) { return JNI_ERR; } } @@ -347,8 +342,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&callbacks, 0, sizeof(callbacks)); callbacks.ClassFileLoadHook = callbackClassFileLoadHook; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, &callbacks, size))) { + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, size))) { return JNI_ERR; } } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ClassFileLoadHook/classfloadhk006/classfloadhk006.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ClassFileLoadHook/classfloadhk006/classfloadhk006.cpp index 4422f34f21b..41d48e5a484 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ClassFileLoadHook/classfloadhk006/classfloadhk006.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ClassFileLoadHook/classfloadhk006/classfloadhk006.cpp @@ -128,7 +128,7 @@ static int getBytecode(jvmtiEnv* jvmti, JNIEnv* jni, jclass cls, NSK_DISPLAY1("Find static field: %s\n", fieldName); if (!NSK_JNI_VERIFY(jni, (fieldID = - NSK_CPP_STUB4(GetStaticFieldID, jni, cls, fieldName, fieldSig)) != NULL)) { + jni->GetStaticFieldID(cls, fieldName, fieldSig)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -136,14 +136,13 @@ static int getBytecode(jvmtiEnv* jvmti, JNIEnv* jni, jclass cls, NSK_DISPLAY1("Get classfile bytes array from static field: %s\n", fieldName); if (!NSK_JNI_VERIFY(jni, (array = (jbyteArray) - NSK_CPP_STUB3(GetStaticObjectField, jni, cls, fieldID)) != NULL)) { + jni->GetStaticObjectField(cls, fieldID)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } NSK_DISPLAY1(" ... got array object: 0x%p\n", (void*)array); - if (!NSK_JNI_VERIFY(jni, (*size = - NSK_CPP_STUB2(GetArrayLength, jni, array)) > 0)) { + if (!NSK_JNI_VERIFY(jni, (*size = jni->GetArrayLength(array)) > 0)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -151,17 +150,14 @@ static int getBytecode(jvmtiEnv* jvmti, JNIEnv* jni, jclass cls, { jboolean isCopy; - if (!NSK_JNI_VERIFY(jni, (elements = - NSK_CPP_STUB3(GetByteArrayElements, jni, array, - &isCopy)) != NULL)) { + if (!NSK_JNI_VERIFY(jni, (elements = jni->GetByteArrayElements(array, &isCopy)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } } NSK_DISPLAY1(" ... got elements list: 0x%p\n", (void*)elements); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(Allocate, jvmti, *size, bytes))) { + if (!NSK_JVMTI_VERIFY(jvmti->Allocate(*size, bytes))) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -173,7 +169,7 @@ static int getBytecode(jvmtiEnv* jvmti, JNIEnv* jni, jclass cls, NSK_DISPLAY1(" ... copied bytecode: %d bytes\n", (int)*size); NSK_DISPLAY1("Release elements list: 0x%p\n", (void*)elements); - NSK_TRACE(NSK_CPP_STUB4(ReleaseByteArrayElements, jni, array, elements, JNI_ABORT)); + NSK_TRACE(jni->ReleaseByteArrayElements(array, elements, JNI_ABORT)); NSK_DISPLAY0(" ... released\n"); return NSK_TRUE; @@ -188,23 +184,21 @@ static jobject getObject(jvmtiEnv* jvmti, JNIEnv* jni, jclass cls, NSK_DISPLAY1("Find static field: %s\n", fieldName); if (!NSK_JNI_VERIFY(jni, (fieldID = - NSK_CPP_STUB4(GetStaticFieldID, jni, cls, fieldName, fieldSig)) != NULL)) { + jni->GetStaticFieldID(cls, fieldName, fieldSig)) != NULL)) { nsk_jvmti_setFailStatus(); return NULL; } NSK_DISPLAY1(" ... got fieldID: 0x%p\n", (void*)fieldID); NSK_DISPLAY1("Get object from static field: %s\n", fieldName); - if (!NSK_JNI_VERIFY(jni, (obj = - NSK_CPP_STUB3(GetStaticObjectField, jni, cls, fieldID)) != NULL)) { + if (!NSK_JNI_VERIFY(jni, (obj = jni->GetStaticObjectField(cls, fieldID)) != NULL)) { nsk_jvmti_setFailStatus(); return NULL; } NSK_DISPLAY1(" ... got object: 0x%p\n", (void*)obj); NSK_DISPLAY1("Make global reference to object: 0x%p\n", obj); - if (!NSK_JNI_VERIFY(jni, (obj = - NSK_CPP_STUB2(NewGlobalRef, jni, obj)) != NULL)) { + if (!NSK_JNI_VERIFY(jni, (obj = jni->NewGlobalRef(obj)) != NULL)) { nsk_jvmti_setFailStatus(); return NULL; } @@ -223,8 +217,7 @@ static int redefineClass(jvmtiEnv* jvmti, jclass klass, const char className[], classDef.class_bytes = bytes; NSK_DISPLAY1("Redefine class: %s\n", className); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(RedefineClasses, jvmti, 1, &classDef))) { + if (!NSK_JVMTI_VERIFY(jvmti->RedefineClasses(1, &classDef))) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -250,7 +243,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY0(">>> Obtain debuggee class\n"); NSK_DISPLAY1("Find debugee class: %s\n", DEBUGEE_CLASS_NAME); if (!NSK_JNI_VERIFY(jni, (debugeeClass = - NSK_CPP_STUB2(FindClass, jni, DEBUGEE_CLASS_NAME)) != NULL)) { + jni->FindClass(DEBUGEE_CLASS_NAME)) != NULL)) { nsk_jvmti_setFailStatus(); return; } @@ -309,11 +302,10 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY0(">>> Clean used data\n"); { NSK_DISPLAY1("Delete global reference to tested class object: 0x%p\n", (void*)testedClass); - NSK_CPP_STUB2(DeleteGlobalRef, jni, testedClass); + jni->DeleteGlobalRef(testedClass); NSK_DISPLAY1("Deallocate redefined bytecode array: 0x%p\n", (void*)redefClassBytes); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, redefClassBytes))) { + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate(redefClassBytes))) { nsk_jvmti_setFailStatus(); } } @@ -347,7 +339,7 @@ callbackClassFileLoadHook(jvmtiEnv *jvmti, JNIEnv *jni, NSK_COMPLAIN1("Unexpected NULL class_being_redefined in CLASS_FILE_LOAD_HOOK: 0x%p\n", (void*)class_being_redefined); nsk_jvmti_setFailStatus(); - } else if (!NSK_CPP_STUB3(IsSameObject, jni, class_being_redefined, testedClass)) { + } else if (!jni->IsSameObject(class_being_redefined, testedClass)) { NSK_COMPLAIN2("Unexpected class_being_redefined in CLASS_FILE_LOAD_HOOK:\n" "# got class: 0x%p\n" "# expected same as: 0x%p\n", @@ -397,8 +389,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(caps)); caps.can_generate_all_class_hook_events = 1; caps.can_redefine_classes = 1; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) { return JNI_ERR; } } @@ -411,8 +402,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&callbacks, 0, sizeof(callbacks)); callbacks.ClassFileLoadHook = callbackClassFileLoadHook; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, &callbacks, size))) { + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, size))) { return JNI_ERR; } } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ClassFileLoadHook/classfloadhk007/classfloadhk007.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ClassFileLoadHook/classfloadhk007/classfloadhk007.cpp index f0daec6533c..8c1f686361a 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ClassFileLoadHook/classfloadhk007/classfloadhk007.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ClassFileLoadHook/classfloadhk007/classfloadhk007.cpp @@ -132,7 +132,7 @@ static int getBytecode(jvmtiEnv* jvmti, JNIEnv* jni, jclass cls, NSK_DISPLAY1("Find static field: %s\n", fieldName); if (!NSK_JNI_VERIFY(jni, (fieldID = - NSK_CPP_STUB4(GetStaticFieldID, jni, cls, fieldName, fieldSig)) != NULL)) { + jni->GetStaticFieldID(cls, fieldName, fieldSig)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -140,14 +140,13 @@ static int getBytecode(jvmtiEnv* jvmti, JNIEnv* jni, jclass cls, NSK_DISPLAY1("Get classfile bytes array from static field: %s\n", fieldName); if (!NSK_JNI_VERIFY(jni, (array = (jbyteArray) - NSK_CPP_STUB3(GetStaticObjectField, jni, cls, fieldID)) != NULL)) { + jni->GetStaticObjectField(cls, fieldID)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } NSK_DISPLAY1(" ... got array object: 0x%p\n", (void*)array); - if (!NSK_JNI_VERIFY(jni, (*size = - NSK_CPP_STUB2(GetArrayLength, jni, array)) > 0)) { + if (!NSK_JNI_VERIFY(jni, (*size = jni->GetArrayLength(array)) > 0)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -155,17 +154,14 @@ static int getBytecode(jvmtiEnv* jvmti, JNIEnv* jni, jclass cls, { jboolean isCopy; - if (!NSK_JNI_VERIFY(jni, (elements = - NSK_CPP_STUB3(GetByteArrayElements, jni, array, - &isCopy)) != NULL)) { + if (!NSK_JNI_VERIFY(jni, (elements = jni->GetByteArrayElements(array, &isCopy)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } } NSK_DISPLAY1(" ... got elements list: 0x%p\n", (void*)elements); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(Allocate, jvmti, *size, bytes))) { + if (!NSK_JVMTI_VERIFY(jvmti->Allocate(*size, bytes))) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -177,7 +173,7 @@ static int getBytecode(jvmtiEnv* jvmti, JNIEnv* jni, jclass cls, NSK_DISPLAY1(" ... copied bytecode: %d bytes\n", (int)*size); NSK_DISPLAY1("Release elements list: 0x%p\n", (void*)elements); - NSK_TRACE(NSK_CPP_STUB4(ReleaseByteArrayElements, jni, array, elements, JNI_ABORT)); + NSK_TRACE(jni->ReleaseByteArrayElements(array, elements, JNI_ABORT)); NSK_DISPLAY0(" ... released\n"); return NSK_TRUE; @@ -192,23 +188,21 @@ static jobject getObject(jvmtiEnv* jvmti, JNIEnv* jni, jclass cls, NSK_DISPLAY1("Find static field: %s\n", fieldName); if (!NSK_JNI_VERIFY(jni, (fieldID = - NSK_CPP_STUB4(GetStaticFieldID, jni, cls, fieldName, fieldSig)) != NULL)) { + jni->GetStaticFieldID(cls, fieldName, fieldSig)) != NULL)) { nsk_jvmti_setFailStatus(); return NULL; } NSK_DISPLAY1(" ... got fieldID: 0x%p\n", (void*)fieldID); NSK_DISPLAY1("Get object from static field: %s\n", fieldName); - if (!NSK_JNI_VERIFY(jni, (obj = - NSK_CPP_STUB3(GetStaticObjectField, jni, cls, fieldID)) != NULL)) { + if (!NSK_JNI_VERIFY(jni, (obj = jni->GetStaticObjectField(cls, fieldID)) != NULL)) { nsk_jvmti_setFailStatus(); return NULL; } NSK_DISPLAY1(" ... got object: 0x%p\n", (void*)obj); NSK_DISPLAY1("Make global reference to object: 0x%p\n", obj); - if (!NSK_JNI_VERIFY(jni, (obj = - NSK_CPP_STUB2(NewGlobalRef, jni, obj)) != NULL)) { + if (!NSK_JNI_VERIFY(jni, (obj = jni->NewGlobalRef(obj)) != NULL)) { nsk_jvmti_setFailStatus(); return NULL; } @@ -227,8 +221,7 @@ static int redefineClass(jvmtiEnv* jvmti, jclass klass, const char className[], classDef.class_bytes = bytes; NSK_DISPLAY1("Redefine class: %s\n", className); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(RedefineClasses, jvmti, 1, &classDef))) { + if (!NSK_JVMTI_VERIFY(jvmti->RedefineClasses(1, &classDef))) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -254,7 +247,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY0(">>> Obtain debuggee class\n"); NSK_DISPLAY1("Find debugee class: %s\n", DEBUGEE_CLASS_NAME); if (!NSK_JNI_VERIFY(jni, (debugeeClass = - NSK_CPP_STUB2(FindClass, jni, DEBUGEE_CLASS_NAME)) != NULL)) { + jni->FindClass(DEBUGEE_CLASS_NAME)) != NULL)) { nsk_jvmti_setFailStatus(); return; } @@ -319,14 +312,13 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY0(">>> Clean used data\n"); { NSK_DISPLAY1("Delete global reference to classloader object: 0x%p\n", (void*)classLoader); - NSK_CPP_STUB2(DeleteGlobalRef, jni, classLoader); + jni->DeleteGlobalRef(classLoader); NSK_DISPLAY1("Delete global reference to tested class object: 0x%p\n", (void*)testedClass); - NSK_CPP_STUB2(DeleteGlobalRef, jni, testedClass); + jni->DeleteGlobalRef(testedClass); NSK_DISPLAY1("Deallocate redefined bytecode array: 0x%p\n", (void*)redefClassBytes); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, redefClassBytes))) { + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate(redefClassBytes))) { nsk_jvmti_setFailStatus(); } } @@ -360,7 +352,7 @@ callbackClassFileLoadHook(jvmtiEnv *jvmti, JNIEnv *jni, NSK_COMPLAIN1("Unexpected NULL classloader in CLASS_FILE_LOAD_HOOK: 0x%p\n", (void*)loader); nsk_jvmti_setFailStatus(); - } else if (!NSK_CPP_STUB3(IsSameObject, jni, loader, classLoader)) { + } else if (!jni->IsSameObject(loader, classLoader)) { NSK_COMPLAIN2("Unexpected classloader in CLASS_FILE_LOAD_HOOK:\n" "# got classloder: 0x%p\n" "# expected same as: 0x%p\n", @@ -373,7 +365,7 @@ callbackClassFileLoadHook(jvmtiEnv *jvmti, JNIEnv *jni, NSK_COMPLAIN1("Unexpected NULL class_being_redefined in CLASS_FILE_LOAD_HOOK: 0x%p\n", (void*)class_being_redefined); nsk_jvmti_setFailStatus(); - } else if (!NSK_CPP_STUB3(IsSameObject, jni, class_being_redefined, testedClass)) { + } else if (!jni->IsSameObject(class_being_redefined, testedClass)) { NSK_COMPLAIN2("Unexpected class_being_redefined in CLASS_FILE_LOAD_HOOK:\n" "# got class: 0x%p\n" "# expected same as: 0x%p\n", @@ -423,8 +415,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(caps)); caps.can_generate_all_class_hook_events = 1; caps.can_redefine_classes = 1; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) { return JNI_ERR; } } @@ -437,8 +428,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&callbacks, 0, sizeof(callbacks)); callbacks.ClassFileLoadHook = callbackClassFileLoadHook; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, &callbacks, size))) { + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, size))) { return JNI_ERR; } } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ClassFileLoadHook/classfloadhk008/classfloadhk008.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ClassFileLoadHook/classfloadhk008/classfloadhk008.cpp index d6d43cf07e3..7f18912194d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ClassFileLoadHook/classfloadhk008/classfloadhk008.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ClassFileLoadHook/classfloadhk008/classfloadhk008.cpp @@ -70,7 +70,7 @@ static int getBytecode(jvmtiEnv* jvmti, JNIEnv* jni, jclass cls, NSK_DISPLAY1("Find static field: %s\n", fieldName); if (!NSK_JNI_VERIFY(jni, (fieldID = - NSK_CPP_STUB4(GetStaticFieldID, jni, cls, fieldName, fieldSig)) != NULL)) { + jni->GetStaticFieldID(cls, fieldName, fieldSig)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -78,14 +78,13 @@ static int getBytecode(jvmtiEnv* jvmti, JNIEnv* jni, jclass cls, NSK_DISPLAY1("Get classfile bytes array from static field: %s\n", fieldName); if (!NSK_JNI_VERIFY(jni, (array = (jbyteArray) - NSK_CPP_STUB3(GetStaticObjectField, jni, cls, fieldID)) != NULL)) { + jni->GetStaticObjectField(cls, fieldID)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } NSK_DISPLAY1(" ... got array object: 0x%p\n", (void*)array); - if (!NSK_JNI_VERIFY(jni, (*size = - NSK_CPP_STUB2(GetArrayLength, jni, array)) > 0)) { + if (!NSK_JNI_VERIFY(jni, (*size = jni->GetArrayLength(array)) > 0)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -93,17 +92,14 @@ static int getBytecode(jvmtiEnv* jvmti, JNIEnv* jni, jclass cls, { jboolean isCopy; - if (!NSK_JNI_VERIFY(jni, (elements = - NSK_CPP_STUB3(GetByteArrayElements, jni, array, - &isCopy)) != NULL)) { + if (!NSK_JNI_VERIFY(jni, (elements = jni->GetByteArrayElements(array, &isCopy)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } } NSK_DISPLAY1(" ... got elements list: 0x%p\n", (void*)elements); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(Allocate, jvmti, *size, bytes))) { + if (!NSK_JVMTI_VERIFY(jvmti->Allocate(*size, bytes))) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -115,7 +111,7 @@ static int getBytecode(jvmtiEnv* jvmti, JNIEnv* jni, jclass cls, NSK_DISPLAY1(" ... copied bytecode: %d bytes\n", (int)*size); NSK_DISPLAY1("Release elements list: 0x%p\n", (void*)elements); - NSK_TRACE(NSK_CPP_STUB4(ReleaseByteArrayElements, jni, array, elements, JNI_ABORT)); + NSK_TRACE(jni->ReleaseByteArrayElements(array, elements, JNI_ABORT)); NSK_DISPLAY0(" ... released\n"); return NSK_TRUE; @@ -130,23 +126,21 @@ static jobject getObject(jvmtiEnv* jvmti, JNIEnv* jni, jclass cls, NSK_DISPLAY1("Find static field: %s\n", fieldName); if (!NSK_JNI_VERIFY(jni, (fieldID = - NSK_CPP_STUB4(GetStaticFieldID, jni, cls, fieldName, fieldSig)) != NULL)) { + jni->GetStaticFieldID(cls, fieldName, fieldSig)) != NULL)) { nsk_jvmti_setFailStatus(); return NULL; } NSK_DISPLAY1(" ... got fieldID: 0x%p\n", (void*)fieldID); NSK_DISPLAY1("Get object from static field: %s\n", fieldName); - if (!NSK_JNI_VERIFY(jni, (obj = - NSK_CPP_STUB3(GetStaticObjectField, jni, cls, fieldID)) != NULL)) { + if (!NSK_JNI_VERIFY(jni, (obj = jni->GetStaticObjectField(cls, fieldID)) != NULL)) { nsk_jvmti_setFailStatus(); return NULL; } NSK_DISPLAY1(" ... got object: 0x%p\n", (void*)obj); NSK_DISPLAY1("Make global reference to object: 0x%p\n", obj); - if (!NSK_JNI_VERIFY(jni, (obj = - NSK_CPP_STUB2(NewGlobalRef, jni, obj)) != NULL)) { + if (!NSK_JNI_VERIFY(jni, (obj = jni->NewGlobalRef(obj)) != NULL)) { nsk_jvmti_setFailStatus(); return NULL; } @@ -165,8 +159,7 @@ static int redefineClass(jvmtiEnv* jvmti, jclass klass, const char className[], classDef.class_bytes = bytes; NSK_DISPLAY1("Redefine class: %s\n", className); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(RedefineClasses, jvmti, 1, &classDef))) { + if (!NSK_JVMTI_VERIFY(jvmti->RedefineClasses(1, &classDef))) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -192,7 +185,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY0(">>> Obtain debuggee class\n"); NSK_DISPLAY1("Find debugee class: %s\n", DEBUGEE_CLASS_NAME); if (!NSK_JNI_VERIFY(jni, (debugeeClass = - NSK_CPP_STUB2(FindClass, jni, DEBUGEE_CLASS_NAME)) != NULL)) { + jni->FindClass(DEBUGEE_CLASS_NAME)) != NULL)) { nsk_jvmti_setFailStatus(); return; } @@ -258,11 +251,10 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY0(">>> Clean used data\n"); { NSK_DISPLAY1("Delete global reference to tested class object: 0x%p\n", (void*)testedClass); - NSK_CPP_STUB2(DeleteGlobalRef, jni, testedClass); + jni->DeleteGlobalRef(testedClass); NSK_DISPLAY1("Deallocate redefined bytecode array: 0x%p\n", (void*)redefClassBytes); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, redefClassBytes))) { + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate(redefClassBytes))) { nsk_jvmti_setFailStatus(); } } @@ -359,8 +351,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(caps)); caps.can_generate_all_class_hook_events = 1; caps.can_redefine_classes = 1; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) { return JNI_ERR; } } @@ -373,8 +364,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&callbacks, 0, sizeof(callbacks)); callbacks.ClassFileLoadHook = callbackClassFileLoadHook; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, &callbacks, size))) { + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, size))) { return JNI_ERR; } } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ClassFileLoadHook/classfloadhk009/classfloadhk009.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ClassFileLoadHook/classfloadhk009/classfloadhk009.cpp index 40572a3ef6a..e4a2067772c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ClassFileLoadHook/classfloadhk009/classfloadhk009.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ClassFileLoadHook/classfloadhk009/classfloadhk009.cpp @@ -70,7 +70,7 @@ static int getBytecode(jvmtiEnv* jvmti, JNIEnv* jni, jclass cls, NSK_DISPLAY1("Find static field: %s\n", fieldName); if (!NSK_JNI_VERIFY(jni, (fieldID = - NSK_CPP_STUB4(GetStaticFieldID, jni, cls, fieldName, fieldSig)) != NULL)) { + jni->GetStaticFieldID(cls, fieldName, fieldSig)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -78,14 +78,13 @@ static int getBytecode(jvmtiEnv* jvmti, JNIEnv* jni, jclass cls, NSK_DISPLAY1("Get classfile bytes array from static field: %s\n", fieldName); if (!NSK_JNI_VERIFY(jni, (array = (jbyteArray) - NSK_CPP_STUB3(GetStaticObjectField, jni, cls, fieldID)) != NULL)) { + jni->GetStaticObjectField(cls, fieldID)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } NSK_DISPLAY1(" ... got array object: 0x%p\n", (void*)array); - if (!NSK_JNI_VERIFY(jni, (*size = - NSK_CPP_STUB2(GetArrayLength, jni, array)) > 0)) { + if (!NSK_JNI_VERIFY(jni, (*size = jni->GetArrayLength(array)) > 0)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -93,17 +92,14 @@ static int getBytecode(jvmtiEnv* jvmti, JNIEnv* jni, jclass cls, { jboolean isCopy; - if (!NSK_JNI_VERIFY(jni, (elements = - NSK_CPP_STUB3(GetByteArrayElements, jni, array, - &isCopy)) != NULL)) { + if (!NSK_JNI_VERIFY(jni, (elements = jni->GetByteArrayElements(array, &isCopy)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } } NSK_DISPLAY1(" ... got elements list: 0x%p\n", (void*)elements); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(Allocate, jvmti, *size, bytes))) { + if (!NSK_JVMTI_VERIFY(jvmti->Allocate(*size, bytes))) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -115,7 +111,7 @@ static int getBytecode(jvmtiEnv* jvmti, JNIEnv* jni, jclass cls, NSK_DISPLAY1(" ... copied bytecode: %d bytes\n", (int)*size); NSK_DISPLAY1("Release elements list: 0x%p\n", (void*)elements); - NSK_TRACE(NSK_CPP_STUB4(ReleaseByteArrayElements, jni, array, elements, JNI_ABORT)); + NSK_TRACE(jni->ReleaseByteArrayElements(array, elements, JNI_ABORT)); NSK_DISPLAY0(" ... released\n"); return NSK_TRUE; @@ -130,23 +126,21 @@ static jobject getObject(jvmtiEnv* jvmti, JNIEnv* jni, jclass cls, NSK_DISPLAY1("Find static field: %s\n", fieldName); if (!NSK_JNI_VERIFY(jni, (fieldID = - NSK_CPP_STUB4(GetStaticFieldID, jni, cls, fieldName, fieldSig)) != NULL)) { + jni->GetStaticFieldID(cls, fieldName, fieldSig)) != NULL)) { nsk_jvmti_setFailStatus(); return NULL; } NSK_DISPLAY1(" ... got fieldID: 0x%p\n", (void*)fieldID); NSK_DISPLAY1("Get object from static field: %s\n", fieldName); - if (!NSK_JNI_VERIFY(jni, (obj = - NSK_CPP_STUB3(GetStaticObjectField, jni, cls, fieldID)) != NULL)) { + if (!NSK_JNI_VERIFY(jni, (obj = jni->GetStaticObjectField(cls, fieldID)) != NULL)) { nsk_jvmti_setFailStatus(); return NULL; } NSK_DISPLAY1(" ... got object: 0x%p\n", (void*)obj); NSK_DISPLAY1("Make global reference to object: 0x%p\n", obj); - if (!NSK_JNI_VERIFY(jni, (obj = - NSK_CPP_STUB2(NewGlobalRef, jni, obj)) != NULL)) { + if (!NSK_JNI_VERIFY(jni, (obj = jni->NewGlobalRef(obj)) != NULL)) { nsk_jvmti_setFailStatus(); return NULL; } @@ -165,8 +159,7 @@ static int redefineClass(jvmtiEnv* jvmti, jclass klass, const char className[], classDef.class_bytes = bytes; NSK_DISPLAY1("Redefine class: %s\n", className); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(RedefineClasses, jvmti, 1, &classDef))) { + if (!NSK_JVMTI_VERIFY(jvmti->RedefineClasses(1, &classDef))) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -192,7 +185,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY0(">>> Obtain debuggee class\n"); NSK_DISPLAY1("Find debugee class: %s\n", DEBUGEE_CLASS_NAME); if (!NSK_JNI_VERIFY(jni, (debugeeClass = - NSK_CPP_STUB2(FindClass, jni, DEBUGEE_CLASS_NAME)) != NULL)) { + jni->FindClass(DEBUGEE_CLASS_NAME)) != NULL)) { nsk_jvmti_setFailStatus(); return; } @@ -258,11 +251,10 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY0(">>> Clean used data\n"); { NSK_DISPLAY1("Delete global reference to tested class object: 0x%p\n", (void*)testedClass); - NSK_CPP_STUB2(DeleteGlobalRef, jni, testedClass); + jni->DeleteGlobalRef(testedClass); NSK_DISPLAY1("Deallocate redefined bytecode array: 0x%p\n", (void*)redefClassBytes); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, redefClassBytes))) { + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate(redefClassBytes))) { nsk_jvmti_setFailStatus(); } } @@ -359,8 +351,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(caps)); caps.can_generate_all_class_hook_events = 1; caps.can_redefine_classes = 1; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) { return JNI_ERR; } } @@ -373,8 +364,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&callbacks, 0, sizeof(callbacks)); callbacks.ClassFileLoadHook = callbackClassFileLoadHook; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, &callbacks, size))) { + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, size))) { return JNI_ERR; } } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ClassLoad/classload001/classload001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ClassLoad/classload001/classload001.cpp index e6650ea6d1c..2b90eb8df46 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ClassLoad/classload001/classload001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ClassLoad/classload001/classload001.cpp @@ -98,17 +98,13 @@ static int findSig(char *sig, int expected) { } static void lock(jvmtiEnv *jvmti_env, JNIEnv *jni_env) { - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorEnter, - jvmti_env, countLock))) - NSK_CPP_STUB2(FatalError, jni_env, - "failed to enter a raw monitor\n"); + if (!NSK_JVMTI_VERIFY(jvmti_env->RawMonitorEnter(countLock))) + jni_env->FatalError("failed to enter a raw monitor\n"); } static void unlock(jvmtiEnv *jvmti_env, JNIEnv *jni_env) { - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorExit, - jvmti_env, countLock))) - NSK_CPP_STUB2(FatalError, jni_env, - "failed to exit a raw monitor\n"); + if (!NSK_JVMTI_VERIFY(jvmti_env->RawMonitorExit(countLock))) + jni_env->FatalError("failed to exit a raw monitor\n"); } /** callback functions **/ @@ -119,8 +115,7 @@ ClassLoad(jvmtiEnv *jvmti_env, JNIEnv *env, jthread thread, jclass klass) { lock(jvmti_env, env); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(GetClassSignature, - jvmti_env, klass, &sig, &generic))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->GetClassSignature(klass, &sig, &generic))) { result = STATUS_FAILED; NSK_COMPLAIN0("TEST FAILURE: unable to obtain a class signature\n"); } @@ -185,20 +180,17 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { initCounters(); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(CreateRawMonitor, - jvmti, "_counter_lock", &countLock))) + if (!NSK_JVMTI_VERIFY(jvmti->CreateRawMonitor("_counter_lock", &countLock))) return JNI_ERR; NSK_DISPLAY0("setting event callbacks ...\n"); (void) memset(&callbacks, 0, sizeof(callbacks)); callbacks.ClassLoad = &ClassLoad; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetEventCallbacks, - jvmti, &callbacks, sizeof(callbacks)))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, sizeof(callbacks)))) return JNI_ERR; NSK_DISPLAY0("setting event callbacks done\nenabling ClassLoad event ...\n"); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode, - jvmti, JVMTI_ENABLE, JVMTI_EVENT_CLASS_LOAD, NULL))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_CLASS_LOAD, NULL))) return JNI_ERR; NSK_DISPLAY0("the event enabled\n"); diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/CompiledMethodLoad/compmethload001/compmethload001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/CompiledMethodLoad/compmethload001/compmethload001.cpp index 3abd4af50fb..fda4fcf00a9 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/CompiledMethodLoad/compmethload001/compmethload001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/CompiledMethodLoad/compmethload001/compmethload001.cpp @@ -45,8 +45,7 @@ void JNICALL VMInit(jvmtiEnv *jvmti_env, JNIEnv *env, jthread thr) { NSK_DISPLAY0("VMInit event received\n\n"); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GenerateEvents, - jvmti_env, JVMTI_EVENT_COMPILED_METHOD_LOAD))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->GenerateEvents(JVMTI_EVENT_COMPILED_METHOD_LOAD))) { NSK_COMPLAIN0("TEST FAILED: unable to generate events to represent the current state of the VM\n"); result = STATUS_FAILED; } @@ -63,8 +62,7 @@ CompiledMethodLoad(jvmtiEnv *jvmti_env, jmethodID method, jint code_size, NSK_DISPLAY0("CompiledMethodLoad event received for:\n"); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(GetMethodName, - jvmti_env, method, &name, &sig, &generic))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->GetMethodName(method, &name, &sig, &generic))) { result = STATUS_FAILED; NSK_COMPLAIN0("TEST FAILURE: unable to obtain method info\n"); return; @@ -72,8 +70,7 @@ CompiledMethodLoad(jvmtiEnv *jvmti_env, jmethodID method, jint code_size, NSK_DISPLAY4("\tmethod: name=\"%s\" signature=\"%s\"\n\tcompiled code size=%d\n\tnumber of address location map entries=%d\n", name, sig, code_size, map_length); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPhase, - jvmti_env, &phase))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->GetPhase(&phase))) { result = STATUS_FAILED; NSK_COMPLAIN0("TEST FAILURE: unable to obtain phase of the VM execution\n"); return; @@ -122,12 +119,10 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { /* add capability to generate compiled method events */ memset(&caps, 0, sizeof(jvmtiCapabilities)); caps.can_generate_compiled_method_load_events = 1; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, - jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) return JNI_ERR; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, - jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps))) return JNI_ERR; if (!caps.can_generate_compiled_method_load_events) @@ -138,16 +133,13 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { (void) memset(&callbacks, 0, sizeof(callbacks)); callbacks.VMInit = &VMInit; callbacks.CompiledMethodLoad = &CompiledMethodLoad; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetEventCallbacks, - jvmti, &callbacks, sizeof(callbacks)))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, sizeof(callbacks)))) return JNI_ERR; NSK_DISPLAY0("setting event callbacks done\nenabling VMInit, CompiledMethodLoad event ...\n"); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode, - jvmti, JVMTI_ENABLE, JVMTI_EVENT_VM_INIT, NULL))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_VM_INIT, NULL))) return JNI_ERR; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode, - jvmti, JVMTI_ENABLE, JVMTI_EVENT_COMPILED_METHOD_LOAD, NULL))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_COMPILED_METHOD_LOAD, NULL))) return JNI_ERR; NSK_DISPLAY0("enabling the events done\n\n"); diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/CompiledMethodUnload/compmethunload001/compmethunload001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/CompiledMethodUnload/compmethunload001/compmethunload001.cpp index 968f0f24a0b..c5cc7e21d16 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/CompiledMethodUnload/compmethunload001/compmethunload001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/CompiledMethodUnload/compmethunload001/compmethunload001.cpp @@ -47,8 +47,7 @@ void JNICALL VMInit(jvmtiEnv *jvmti_env, JNIEnv *env, jthread thr) { NSK_DISPLAY0("VMInit event received\n\n"); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GenerateEvents, - jvmti_env, JVMTI_EVENT_COMPILED_METHOD_LOAD))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->GenerateEvents(JVMTI_EVENT_COMPILED_METHOD_LOAD))) { NSK_COMPLAIN0("TEST FAILED: unable to generate events to represent the current state of the VM\n"); result = STATUS_FAILED; } @@ -64,8 +63,7 @@ CompiledMethodLoad(jvmtiEnv *jvmti_env, jmethodID method, jint code_size, NSK_DISPLAY0("CompiledMethodLoad event received for:\n"); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(GetMethodName, - jvmti_env, method, &name, &sig, &generic))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->GetMethodName(method, &name, &sig, &generic))) { result = STATUS_FAILED; NSK_COMPLAIN0("TEST FAILURE: unable to obtain method info\n\n"); return; @@ -94,8 +92,8 @@ CompiledMethodUnload(jvmtiEnv *jvmti_env, jmethodID method, if (err == JVMTI_ERROR_NONE) { NSK_DISPLAY3("for: \tmethod: name=\"%s\" signature=\"%s\"\n\tnative address=0x%p\n", name, sig, code_addr); - NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)name); - NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)sig); + jvmti_env->Deallocate((unsigned char*)name); + jvmti_env->Deallocate((unsigned char*)sig); } else { // The class metadata has been completely unloaded so the name is not available. NSK_DISPLAY0("for: \tmethod: name=\n"); @@ -104,8 +102,7 @@ CompiledMethodUnload(jvmtiEnv *jvmti_env, jmethodID method, // Count unloaded events class_unloaded++; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPhase, - jvmti_env, &phase))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->GetPhase(&phase))) { result = STATUS_FAILED; NSK_COMPLAIN0("TEST FAILURE: unable to obtain phase of the VM execution\n"); return; @@ -166,12 +163,10 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { /* add capability to generate compiled method events */ memset(&caps, 0, sizeof(jvmtiCapabilities)); caps.can_generate_compiled_method_load_events = 1; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, - jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) return JNI_ERR; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, - jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps))) return JNI_ERR; if (!caps.can_generate_compiled_method_load_events) @@ -183,19 +178,15 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { callbacks.VMInit = &VMInit; callbacks.CompiledMethodLoad = &CompiledMethodLoad; callbacks.CompiledMethodUnload = &CompiledMethodUnload; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetEventCallbacks, - jvmti, &callbacks, sizeof(callbacks)))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, sizeof(callbacks)))) return JNI_ERR; NSK_DISPLAY0("setting event callbacks done\nenabling JVMTI events ...\n"); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode, - jvmti, JVMTI_ENABLE, JVMTI_EVENT_VM_INIT, NULL))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_VM_INIT, NULL))) return JNI_ERR; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode, - jvmti, JVMTI_ENABLE, JVMTI_EVENT_COMPILED_METHOD_LOAD, NULL))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_COMPILED_METHOD_LOAD, NULL))) return JNI_ERR; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode, - jvmti, JVMTI_ENABLE, JVMTI_EVENT_COMPILED_METHOD_UNLOAD, NULL))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_COMPILED_METHOD_UNLOAD, NULL))) return JNI_ERR; NSK_DISPLAY0("enabling the events done\n\n"); diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/DataDumpRequest/datadumpreq001/datadumpreq001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/DataDumpRequest/datadumpreq001/datadumpreq001.cpp index e2ad959ddc7..61994f9b6a6 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/DataDumpRequest/datadumpreq001/datadumpreq001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/DataDumpRequest/datadumpreq001/datadumpreq001.cpp @@ -118,13 +118,11 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { NSK_DISPLAY0("setting event callbacks ...\n"); (void) memset(&callbacks, 0, sizeof(callbacks)); callbacks.DataDumpRequest = &DataDumpRequest; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetEventCallbacks, - jvmti, &callbacks, sizeof(callbacks)))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, sizeof(callbacks)))) return JNI_ERR; NSK_DISPLAY0("setting event callbacks done\nenabling JVMTI events ...\n"); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode, - jvmti, JVMTI_ENABLE, JVMTI_EVENT_DATA_DUMP_REQUEST, NULL))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_DATA_DUMP_REQUEST, NULL))) return JNI_ERR; NSK_DISPLAY0("enabling the events done\n\n"); diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/DisposeEnvironment/disposeenv001/disposeenv001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/DisposeEnvironment/disposeenv001/disposeenv001.cpp index 68b5ac416c1..43dc539ab3f 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/DisposeEnvironment/disposeenv001/disposeenv001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/DisposeEnvironment/disposeenv001/disposeenv001.cpp @@ -54,8 +54,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { return JNI_ERR; NSK_DISPLAY0(">>> Testcase #1: Dispose JVMTI environment in Agent_OnLoad()\n"); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB1(DisposeEnvironment, jvmti))) { + if (!NSK_JVMTI_VERIFY(jvmti->DisposeEnvironment())) { return JNI_ERR; } NSK_DISPLAY0(" ... disposed\n"); diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/DisposeEnvironment/disposeenv002/disposeenv002.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/DisposeEnvironment/disposeenv002/disposeenv002.cpp index 066d71390c7..c804a2ca64c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/DisposeEnvironment/disposeenv002/disposeenv002.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/DisposeEnvironment/disposeenv002/disposeenv002.cpp @@ -45,16 +45,14 @@ callbackVMDeath(jvmtiEnv* jvmti, JNIEnv* jni) { NSK_DISPLAY0("Disable VM_DEATH event in VM_DEATH callback\n"); if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(SetEventNotificationMode, jvmti, JVMTI_DISABLE, - JVMTI_EVENT_VM_DEATH, NULL))) { + jvmti->SetEventNotificationMode(JVMTI_DISABLE, JVMTI_EVENT_VM_DEATH, NULL))) { success = NSK_FALSE; } else { NSK_DISPLAY0(" ... disabled\n"); } NSK_DISPLAY0(">>> Testcase #1: Dispose JVMTI environment in VM_DEATH callback\n"); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB1(DisposeEnvironment, jvmti))) { + if (!NSK_JVMTI_VERIFY(jvmti->DisposeEnvironment())) { success = NSK_FALSE; } else { NSK_DISPLAY0(" ... disposed\n"); @@ -95,16 +93,13 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&eventCallbacks, 0, sizeof(eventCallbacks)); eventCallbacks.VMDeath = callbackVMDeath; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, - &eventCallbacks, sizeof(eventCallbacks)))) { + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks)))) { return JNI_ERR; } NSK_DISPLAY0("Enable VM_DEATH event in JVM_OnLoad()\n"); if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(SetEventNotificationMode, jvmti, JVMTI_ENABLE, - JVMTI_EVENT_VM_DEATH, NULL))) { + jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_VM_DEATH, NULL))) { return JNI_ERR; } NSK_DISPLAY0(" ... enabled\n"); diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/DynamicCodeGenerated/dyncodgen001/dyncodgen001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/DynamicCodeGenerated/dyncodgen001/dyncodgen001.cpp index 02f162a9f52..9de2b542633 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/DynamicCodeGenerated/dyncodgen001/dyncodgen001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/DynamicCodeGenerated/dyncodgen001/dyncodgen001.cpp @@ -116,15 +116,12 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&callbacks, 0, sizeof(callbacks)); callbacks.DynamicCodeGenerated = &DynamicCodeGenerated; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, - &callbacks, sizeof(callbacks)))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, sizeof(callbacks)))) return JNI_ERR; /* enable DynamicCodeGenerated event */ if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(SetEventNotificationMode, jvmti, JVMTI_ENABLE, - JVMTI_EVENT_DYNAMIC_CODE_GENERATED, NULL))) + jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_DYNAMIC_CODE_GENERATED, NULL))) return JNI_ERR; /* register agent proc and arg */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ForceEarlyReturn/ForceEarlyReturn001/ForceEarlyReturn001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ForceEarlyReturn/ForceEarlyReturn001/ForceEarlyReturn001.cpp index b3ae2cb79b9..dac37905695 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ForceEarlyReturn/ForceEarlyReturn001/ForceEarlyReturn001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ForceEarlyReturn/ForceEarlyReturn001/ForceEarlyReturn001.cpp @@ -45,11 +45,7 @@ Java_nsk_jvmti_ForceEarlyReturn_ForceEarlyReturn001_suspendThread ( ) { if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2( - SuspendThread - , jvmti - , earlyReturnThread - ) + jvmti ->SuspendThread (earlyReturnThread ) ) ) return JNI_FALSE; @@ -67,11 +63,7 @@ Java_nsk_jvmti_ForceEarlyReturn_ForceEarlyReturn001_resumeThread ( ) { if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2( - ResumeThread - , jvmti - , earlyReturnThread - ) + jvmti ->ResumeThread (earlyReturnThread ) ) ) return JNI_FALSE; @@ -90,12 +82,7 @@ Java_nsk_jvmti_ForceEarlyReturn_ForceEarlyReturn001_doForceEarlyReturnObject ( ) { if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3( - ForceEarlyReturnObject - , jvmti - , earlyReturnThread - , valueToReturn - ) + jvmti ->ForceEarlyReturnObject (earlyReturnThread , valueToReturn ) ) ) return JNI_FALSE; @@ -114,12 +101,7 @@ Java_nsk_jvmti_ForceEarlyReturn_ForceEarlyReturn001_doForceEarlyReturnInt( ) { if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3( - ForceEarlyReturnInt - , jvmti - , earlyReturnThread - , valueToReturn - ) + jvmti ->ForceEarlyReturnInt (earlyReturnThread , valueToReturn ) ) ) return JNI_FALSE; @@ -138,12 +120,7 @@ Java_nsk_jvmti_ForceEarlyReturn_ForceEarlyReturn001_doForceEarlyReturnLong ( ) { if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3( - ForceEarlyReturnLong - , jvmti - , earlyReturnThread - , valueToReturn - ) + jvmti ->ForceEarlyReturnLong (earlyReturnThread , valueToReturn ) ) ) return JNI_FALSE; @@ -162,12 +139,7 @@ Java_nsk_jvmti_ForceEarlyReturn_ForceEarlyReturn001_doForceEarlyReturnFloat ( ) { if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3( - ForceEarlyReturnFloat - , jvmti - , earlyReturnThread - , valueToReturn - ) + jvmti ->ForceEarlyReturnFloat (earlyReturnThread , valueToReturn ) ) ) return JNI_FALSE; @@ -186,12 +158,7 @@ Java_nsk_jvmti_ForceEarlyReturn_ForceEarlyReturn001_doForceEarlyReturnDouble ( ) { if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3( - ForceEarlyReturnDouble - , jvmti - , earlyReturnThread - , valueToReturn - ) + jvmti ->ForceEarlyReturnDouble (earlyReturnThread , valueToReturn ) ) ) return JNI_FALSE; @@ -209,11 +176,7 @@ Java_nsk_jvmti_ForceEarlyReturn_ForceEarlyReturn001_doForceEarlyReturnVoid ( ) { if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2( - ForceEarlyReturnVoid - , jvmti - , earlyReturnThread - ) + jvmti ->ForceEarlyReturnVoid (earlyReturnThread ) ) ) return JNI_FALSE; @@ -245,11 +208,7 @@ jint Agent_Initialize(JavaVM *vm, char *options, void *reserved) ) return JNI_ERR; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2( - GetCapabilities - , jvmti - , &caps) + if (!NSK_JVMTI_VERIFY(jvmti ->GetCapabilities (&caps) ) ) return JNI_ERR; @@ -258,11 +217,7 @@ jint Agent_Initialize(JavaVM *vm, char *options, void *reserved) caps.can_force_early_return = 1; caps.can_suspend = 1; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2( - AddCapabilities - , jvmti - , &caps) + if (!NSK_JVMTI_VERIFY(jvmti ->AddCapabilities (&caps) ) ) return JNI_ERR; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ForceGarbageCollection/forcegc001/forcegc001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ForceGarbageCollection/forcegc001/forcegc001.cpp index ae2e6400698..d7d1d712550 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ForceGarbageCollection/forcegc001/forcegc001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ForceGarbageCollection/forcegc001/forcegc001.cpp @@ -45,8 +45,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY0(">>> Testcase #1: force GC to collect sofly reachable objects\n"); { NSK_DISPLAY0("Call ForceGarbageCollection()\n"); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB1(ForceGarbageCollection, jvmti))) { + if (!NSK_JVMTI_VERIFY(jvmti->ForceGarbageCollection())) { nsk_jvmti_setFailStatus(); return; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ForceGarbageCollection/forcegc002/forcegc002.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ForceGarbageCollection/forcegc002/forcegc002.cpp index 0502ac8279f..a069c099e50 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ForceGarbageCollection/forcegc002/forcegc002.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ForceGarbageCollection/forcegc002/forcegc002.cpp @@ -54,8 +54,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { return; NSK_DISPLAY0("Call ForceGarbageCollection()\n"); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB1(ForceGarbageCollection, jvmti))) { + if (!NSK_JVMTI_VERIFY(jvmti->ForceGarbageCollection())) { nsk_jvmti_setFailStatus(); return; } @@ -114,7 +113,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { jvmtiCapabilities caps; memset(&caps, 0, sizeof(caps)); caps.can_generate_garbage_collection_events = 1; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) return JNI_ERR; } @@ -122,9 +121,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { jvmtiEventCallbacks eventCallbacks; memset(&eventCallbacks, 0, sizeof(eventCallbacks)); eventCallbacks.GarbageCollectionStart = callbackGarbageCollectionStart; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, - &eventCallbacks, sizeof(eventCallbacks)))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks)))) return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GarbageCollectionFinish/gcfinish001/gcfinish001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GarbageCollectionFinish/gcfinish001/gcfinish001.cpp index c81ff96e98a..e247fbdbd00 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GarbageCollectionFinish/gcfinish001/gcfinish001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GarbageCollectionFinish/gcfinish001/gcfinish001.cpp @@ -51,8 +51,7 @@ static void rawMonitorFunc(jvmtiEnv *jvmti_env, const char *msg) { NSK_DISPLAY1("%s: creating a raw monitor ...\n", msg); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(CreateRawMonitor, - jvmti_env, "_lock", &_lock))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->CreateRawMonitor("_lock", &_lock))) { result = STATUS_FAILED; NSK_COMPLAIN1("TEST FAILED: %s: unable to create a raw monitor\n\n", msg); @@ -63,8 +62,7 @@ static void rawMonitorFunc(jvmtiEnv *jvmti_env, const char *msg) { NSK_DISPLAY1("%s: entering the raw monitor ...\n", msg); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorEnter, - jvmti_env, _lock))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->RawMonitorEnter(_lock))) { result = STATUS_FAILED; NSK_COMPLAIN1("TEST FAILED: %s: unable to enter the raw monitor\n\n", msg); @@ -75,8 +73,7 @@ static void rawMonitorFunc(jvmtiEnv *jvmti_env, const char *msg) { NSK_DISPLAY1("%s: waiting the raw monitor ...\n", msg); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(RawMonitorWait, - jvmti_env, _lock, (jlong)10))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->RawMonitorWait(_lock, (jlong)10))) { result = STATUS_FAILED; NSK_COMPLAIN1("TEST FAILED: %s: unable to wait the raw monitor\n\n", msg); @@ -87,8 +84,7 @@ static void rawMonitorFunc(jvmtiEnv *jvmti_env, const char *msg) { NSK_DISPLAY1("%s: notifying a single thread waiting on the raw monitor ...\n", msg); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorNotify, - jvmti_env, _lock))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->RawMonitorNotify(_lock))) { result = STATUS_FAILED; NSK_COMPLAIN1("TEST FAILED: %s: unable to notify single thread\n\n", msg); @@ -99,8 +95,7 @@ static void rawMonitorFunc(jvmtiEnv *jvmti_env, const char *msg) { NSK_DISPLAY1("%s: notifying all threads waiting on the raw monitor ...\n", msg); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorNotifyAll, - jvmti_env, _lock))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->RawMonitorNotifyAll(_lock))) { result = STATUS_FAILED; NSK_COMPLAIN1("TEST FAILED: %s: unable to notify all threads\n\n", msg); @@ -111,8 +106,7 @@ static void rawMonitorFunc(jvmtiEnv *jvmti_env, const char *msg) { NSK_DISPLAY1("%s: exiting the raw monitor ...\n", msg); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorExit, - jvmti_env, _lock))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->RawMonitorExit(_lock))) { result = STATUS_FAILED; NSK_COMPLAIN1("TEST FAILED: %s: unable to exit the raw monitor\n\n", msg); @@ -123,8 +117,7 @@ static void rawMonitorFunc(jvmtiEnv *jvmti_env, const char *msg) { NSK_DISPLAY1("%s: destroying the raw monitor ...\n", msg); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(DestroyRawMonitor, - jvmti_env, _lock))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->DestroyRawMonitor(_lock))) { result = STATUS_FAILED; NSK_COMPLAIN1("TEST FAILED: %s: unable to destroy a raw monitor\n", msg); @@ -137,8 +130,7 @@ static void rawMonitorFunc(jvmtiEnv *jvmti_env, const char *msg) { static void memoryFunc(jvmtiEnv *jvmti_env, const char *msg) { NSK_DISPLAY1("%s: allocating memory ...\n", msg); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(Allocate, - jvmti_env, MEM_SIZE, &mem))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->Allocate(MEM_SIZE, &mem))) { result = STATUS_FAILED; NSK_COMPLAIN1("TEST FAILED: %s: unable to allocate memory\n\n", msg); @@ -150,8 +142,7 @@ static void memoryFunc(jvmtiEnv *jvmti_env, const char *msg) { NSK_DISPLAY1("%s: deallocating memory ...\n", msg); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(Deallocate, - jvmti_env, mem))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->Deallocate(mem))) { result = STATUS_FAILED; NSK_COMPLAIN1("TEST FAILED: %s: unable to deallocate memory\n\n", msg); @@ -209,12 +200,10 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { /* add capability to generate compiled method events */ memset(&caps, 0, sizeof(jvmtiCapabilities)); caps.can_generate_garbage_collection_events = 1; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, - jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) return JNI_ERR; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, - jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps))) return JNI_ERR; if (!caps.can_generate_garbage_collection_events) @@ -225,16 +214,13 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { (void) memset(&callbacks, 0, sizeof(callbacks)); callbacks.VMDeath = &VMDeath; callbacks.GarbageCollectionFinish = &GarbageCollectionFinish; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetEventCallbacks, - jvmti, &callbacks, sizeof(callbacks)))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, sizeof(callbacks)))) return JNI_ERR; NSK_DISPLAY0("setting event callbacks done\nenabling JVMTI events ...\n"); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode, - jvmti, JVMTI_ENABLE, JVMTI_EVENT_VM_DEATH, NULL))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_VM_DEATH, NULL))) return JNI_ERR; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode, - jvmti, JVMTI_ENABLE, JVMTI_EVENT_GARBAGE_COLLECTION_FINISH, NULL))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_GARBAGE_COLLECTION_FINISH, NULL))) return JNI_ERR; NSK_DISPLAY0("enabling the events done\n\n"); diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GarbageCollectionStart/gcstart001/gcstart001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GarbageCollectionStart/gcstart001/gcstart001.cpp index b771e021901..d9dab1b0c7d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GarbageCollectionStart/gcstart001/gcstart001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GarbageCollectionStart/gcstart001/gcstart001.cpp @@ -120,12 +120,10 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { /* add capability to generate compiled method events */ memset(&caps, 0, sizeof(jvmtiCapabilities)); caps.can_generate_garbage_collection_events = 1; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, - jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) return JNI_ERR; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, - jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps))) return JNI_ERR; if (!caps.can_generate_garbage_collection_events) @@ -137,19 +135,15 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { callbacks.VMDeath = &VMDeath; callbacks.GarbageCollectionStart = &GarbageCollectionStart; callbacks.GarbageCollectionFinish = &GarbageCollectionFinish; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetEventCallbacks, - jvmti, &callbacks, sizeof(callbacks)))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, sizeof(callbacks)))) return JNI_ERR; NSK_DISPLAY0("setting event callbacks done\nenabling JVMTI events ...\n"); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode, - jvmti, JVMTI_ENABLE, JVMTI_EVENT_VM_DEATH, NULL))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_VM_DEATH, NULL))) return JNI_ERR; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode, - jvmti, JVMTI_ENABLE, JVMTI_EVENT_GARBAGE_COLLECTION_START, NULL))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_GARBAGE_COLLECTION_START, NULL))) return JNI_ERR; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode, - jvmti, JVMTI_ENABLE, JVMTI_EVENT_GARBAGE_COLLECTION_FINISH, NULL))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_GARBAGE_COLLECTION_FINISH, NULL))) return JNI_ERR; NSK_DISPLAY0("enabling the events done\n\n"); diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GarbageCollectionStart/gcstart002/gcstart002.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GarbageCollectionStart/gcstart002/gcstart002.cpp index fa1a6319916..fb9d69ddd08 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GarbageCollectionStart/gcstart002/gcstart002.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GarbageCollectionStart/gcstart002/gcstart002.cpp @@ -51,8 +51,7 @@ static void rawMonitorFunc(jvmtiEnv *jvmti_env, const char *msg) { NSK_DISPLAY1("%s: creating a raw monitor ...\n", msg); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(CreateRawMonitor, - jvmti_env, "_lock", &_lock))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->CreateRawMonitor("_lock", &_lock))) { result = STATUS_FAILED; NSK_COMPLAIN1("TEST FAILED: %s: unable to create a raw monitor\n\n", msg); @@ -63,8 +62,7 @@ static void rawMonitorFunc(jvmtiEnv *jvmti_env, const char *msg) { NSK_DISPLAY1("%s: entering the raw monitor ...\n", msg); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorEnter, - jvmti_env, _lock))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->RawMonitorEnter(_lock))) { result = STATUS_FAILED; NSK_COMPLAIN1("TEST FAILED: %s: unable to enter the raw monitor\n\n", msg); @@ -76,8 +74,7 @@ static void rawMonitorFunc(jvmtiEnv *jvmti_env, const char *msg) { NSK_DISPLAY1("%s: waiting the raw monitor ...\n", msg); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(RawMonitorWait, - jvmti_env, _lock, (jlong)10))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->RawMonitorWait(_lock, (jlong)10))) { result = STATUS_FAILED; NSK_COMPLAIN1("TEST FAILED: %s: unable to wait the raw monitor\n\n", msg); @@ -88,8 +85,7 @@ static void rawMonitorFunc(jvmtiEnv *jvmti_env, const char *msg) { NSK_DISPLAY1("%s: notifying a single thread waiting on the raw monitor ...\n", msg); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorNotify, - jvmti_env, _lock))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->RawMonitorNotify(_lock))) { result = STATUS_FAILED; NSK_COMPLAIN1("TEST FAILED: %s: unable to notify single thread\n\n", msg); @@ -100,8 +96,7 @@ static void rawMonitorFunc(jvmtiEnv *jvmti_env, const char *msg) { NSK_DISPLAY1("%s: notifying all threads waiting on the raw monitor ...\n", msg); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorNotifyAll, - jvmti_env, _lock))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->RawMonitorNotifyAll(_lock))) { result = STATUS_FAILED; NSK_COMPLAIN1("TEST FAILED: %s: unable to notify all threads\n\n", msg); @@ -112,8 +107,7 @@ static void rawMonitorFunc(jvmtiEnv *jvmti_env, const char *msg) { NSK_DISPLAY1("%s: exiting the raw monitor ...\n", msg); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorExit, - jvmti_env, _lock))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->RawMonitorExit(_lock))) { result = STATUS_FAILED; NSK_COMPLAIN1("TEST FAILED: %s: unable to exit the raw monitor\n\n", msg); @@ -124,8 +118,7 @@ static void rawMonitorFunc(jvmtiEnv *jvmti_env, const char *msg) { NSK_DISPLAY1("%s: destroying the raw monitor ...\n", msg); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(DestroyRawMonitor, - jvmti_env, _lock))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->DestroyRawMonitor(_lock))) { result = STATUS_FAILED; NSK_COMPLAIN1("TEST FAILED: %s: unable to destroy a raw monitor\n", msg); @@ -138,8 +131,7 @@ static void rawMonitorFunc(jvmtiEnv *jvmti_env, const char *msg) { static void memoryFunc(jvmtiEnv *jvmti_env, const char *msg) { NSK_DISPLAY1("%s: allocating memory ...\n", msg); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(Allocate, - jvmti_env, MEM_SIZE, &mem))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->Allocate(MEM_SIZE, &mem))) { result = STATUS_FAILED; NSK_COMPLAIN1("TEST FAILED: %s: unable to allocate memory\n\n", msg); @@ -151,8 +143,7 @@ static void memoryFunc(jvmtiEnv *jvmti_env, const char *msg) { NSK_DISPLAY1("%s: deallocating memory ...\n", msg); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(Deallocate, - jvmti_env, mem))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->Deallocate(mem))) { result = STATUS_FAILED; NSK_COMPLAIN1("TEST FAILED: %s: unable to deallocate memory\n\n", msg); @@ -210,12 +201,10 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { /* add capability to generate compiled method events */ memset(&caps, 0, sizeof(jvmtiCapabilities)); caps.can_generate_garbage_collection_events = 1; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, - jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) return JNI_ERR; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, - jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps))) return JNI_ERR; if (!caps.can_generate_garbage_collection_events) @@ -226,16 +215,13 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { (void) memset(&callbacks, 0, sizeof(callbacks)); callbacks.VMDeath = &VMDeath; callbacks.GarbageCollectionStart = &GarbageCollectionStart; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetEventCallbacks, - jvmti, &callbacks, sizeof(callbacks)))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, sizeof(callbacks)))) return JNI_ERR; NSK_DISPLAY0("setting event callbacks done\nenabling JVMTI events ...\n"); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode, - jvmti, JVMTI_ENABLE, JVMTI_EVENT_VM_DEATH, NULL))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_VM_DEATH, NULL))) return JNI_ERR; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode, - jvmti, JVMTI_ENABLE, JVMTI_EVENT_GARBAGE_COLLECTION_START, NULL))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_GARBAGE_COLLECTION_START, NULL))) return JNI_ERR; NSK_DISPLAY0("enabling the events done\n\n"); diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GenerateEvents/genevents001/genevents001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GenerateEvents/genevents001/genevents001.cpp index b4acfb038b5..f208bcdfb42 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GenerateEvents/genevents001/genevents001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GenerateEvents/genevents001/genevents001.cpp @@ -99,13 +99,11 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { } NSK_DISPLAY0("Call GenerateEvents() to send missed events\n"); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GenerateEvents, jvmti, JVMTI_EVENT_COMPILED_METHOD_LOAD))) { + if (!NSK_JVMTI_VERIFY(jvmti->GenerateEvents(JVMTI_EVENT_COMPILED_METHOD_LOAD))) { nsk_jvmti_setFailStatus(); } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GenerateEvents, jvmti, JVMTI_EVENT_DYNAMIC_CODE_GENERATED))) { + if (!NSK_JVMTI_VERIFY(jvmti->GenerateEvents(JVMTI_EVENT_DYNAMIC_CODE_GENERATED))) { nsk_jvmti_setFailStatus(); } @@ -195,8 +193,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { jvmtiCapabilities caps; memset(&caps, 0, sizeof(caps)); caps.can_generate_compiled_method_load_events = 1; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) return JNI_ERR; } @@ -207,9 +204,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { eventCallbacks.CompiledMethodLoad = callbackCompiledMethodLoad; eventCallbacks.CompiledMethodUnload = callbackCompiledMethodUnload; eventCallbacks.DynamicCodeGenerated = callbackDynamicCodeGenerated; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, - &eventCallbacks, sizeof(eventCallbacks)))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks)))) return JNI_ERR; } From 85c6642e38aed1b42732355f20790d397d9f9a70 Mon Sep 17 00:00:00 2001 From: Jean Christophe Beyler Date: Mon, 8 Oct 2018 13:56:28 -0700 Subject: [PATCH 035/124] 8211131: Remove the NSK_CPP_STUB macros from vmTestbase for jvmti/[G-I]* Remove the NSK_CPP_STUB macros Reviewed-by: amenkov, sspitsyn --- .../getavailproc001/getavailproc001.cpp | 7 +- .../GetCapabilities/getcaps002/getcaps002.cpp | 7 +- .../clsldrclss002/clsldrclss002.cpp | 34 ++++----- .../getclsig006/getclsig006.cpp | 12 ++-- .../curthrcputime001/curthrcputime001.cpp | 16 ++--- .../curthrtimerinfo001/curthrtimerinfo001.cpp | 7 +- .../nsk/jvmti/GetEnv/GetEnv001/GetEnv001.cpp | 45 ++---------- .../getenvstor001/getenvstor001.cpp | 7 +- .../geterrname001/geterrname001.cpp | 31 ++++---- .../geterrname002/geterrname002.cpp | 4 +- .../extevents001/extevents001.cpp | 6 +- .../extfuncs001/extfuncs001.cpp | 6 +- .../GetFieldName/getfldnm005/getfldnm005.cpp | 23 ++---- .../getjlocfmt001/getjlocfmt001.cpp | 34 ++++----- .../getjlocfmt002/getjlocfmt002.cpp | 3 +- .../loadedclss002/loadedclss002.cpp | 12 ++-- .../localtab004/localtab004.cpp | 20 ++---- .../localtab005/localtab005.cpp | 23 ++---- .../GetMethodName/methname003/methname003.cpp | 23 ++---- .../objhashcode001/objhashcode001.cpp | 22 +++--- .../GetObjectSize/objsize001/objsize001.cpp | 23 +++--- .../objwithtags001/objwithtags001.cpp | 50 +++++-------- .../GetPhase/getphase001/getphase001.cpp | 71 +++++++++---------- .../GetPhase/getphase002/getphase002.cpp | 2 +- .../getpotcaps001/getpotcaps001.cpp | 5 +- .../getsysprops001/getsysprops001.cpp | 4 +- .../getsysprops002/getsysprops002.cpp | 4 +- .../getsysprop001/getsysprop001.cpp | 8 +-- .../getsysprop002/getsysprop002.cpp | 4 +- .../nsk/jvmti/GetTag/gettag001/gettag001.cpp | 16 ++--- .../thrcputime001/thrcputime001.cpp | 11 ++- .../thrcputime002/thrcputime002.cpp | 21 ++---- .../thrtimerinfo001/thrtimerinfo001.cpp | 7 +- .../getthrdgrpchld001/getthrdgrpchld001.cpp | 29 ++++---- .../getthrdstor001/getthrdstor001.cpp | 6 +- .../jvmti/GetTime/gettime001/gettime001.cpp | 5 +- .../timerinfo001/timerinfo001.cpp | 5 +- .../intrpthrd001/intrpthrd001.cpp | 17 ++--- .../isobsolete001/isobsolete001.cpp | 51 ++++++------- .../iterheap001/iterheap001.cpp | 42 +++++------ .../iterheap002/iterheap002.cpp | 42 +++++------ .../iterheap003/iterheap003.cpp | 42 +++++------ .../iterheap004/iterheap004.cpp | 33 +++------ .../iterheap005/iterheap005.cpp | 26 +++---- .../iterheap006/iterheap006.cpp | 12 ++-- .../iterheap007/iterheap007.cpp | 16 ++--- .../iterinstcls001/iterinstcls001.cpp | 48 +++++-------- .../iterinstcls002/iterinstcls002.cpp | 48 +++++-------- .../iterinstcls003/iterinstcls003.cpp | 48 +++++-------- .../iterinstcls004/iterinstcls004.cpp | 23 ++---- 50 files changed, 393 insertions(+), 668 deletions(-) diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetAvailableProcessors/getavailproc001/getavailproc001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetAvailableProcessors/getavailproc001/getavailproc001.cpp index 88aab5d2786..28d4ad2a91a 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetAvailableProcessors/getavailproc001/getavailproc001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetAvailableProcessors/getavailproc001/getavailproc001.cpp @@ -53,8 +53,7 @@ static int checkProcessors(jvmtiEnv* jvmti, const char where[]) { jint processors = 0; NSK_DISPLAY0("GetAvailableProcessors() for current JVMTI env\n"); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GetAvailableProcessors, jvmti, &processors))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetAvailableProcessors(&processors))) { return NSK_FALSE; } NSK_DISPLAY1(" ... got processors: %d\n", (int)processors); @@ -157,9 +156,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&eventCallbacks, 0, sizeof(eventCallbacks)); eventCallbacks.VMInit = callbackVMInit; eventCallbacks.VMDeath = callbackVMDeath; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, - &eventCallbacks, sizeof(eventCallbacks)))) { + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks)))) { return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetCapabilities/getcaps002/getcaps002.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetCapabilities/getcaps002/getcaps002.cpp index 3c18ded3ec6..d3ddec8ad80 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetCapabilities/getcaps002/getcaps002.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetCapabilities/getcaps002/getcaps002.cpp @@ -190,8 +190,7 @@ static int checkCapabilities(jvmtiEnv* jvmti, const char where[]) { memset(&caps, 0, sizeof(jvmtiCapabilities)); NSK_DISPLAY0("GetCapabilities() for current JVMTI env\n"); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GetCapabilities, jvmti, &caps))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps))) { return NSK_FALSE; } @@ -297,9 +296,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&eventCallbacks, 0, sizeof(eventCallbacks)); eventCallbacks.VMInit = callbackVMInit; eventCallbacks.VMDeath = callbackVMDeath; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, - &eventCallbacks, sizeof(eventCallbacks)))) { + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks)))) { return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetClassLoaderClasses/clsldrclss002/clsldrclss002.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetClassLoaderClasses/clsldrclss002/clsldrclss002.cpp index 2efd2d8dd2e..65116a118a3 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetClassLoaderClasses/clsldrclss002/clsldrclss002.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetClassLoaderClasses/clsldrclss002/clsldrclss002.cpp @@ -58,18 +58,15 @@ static int prepare(JNIEnv* jni) { NSK_DISPLAY0("Obtain tested object from a static field of debugee class\n"); NSK_DISPLAY1("Find class: %s\n", CLASS_NAME); - if (!NSK_JNI_VERIFY(jni, (testedClass = - NSK_CPP_STUB2(FindClass, jni, CLASS_NAME)) != NULL)) + if (!NSK_JNI_VERIFY(jni, (testedClass = jni->FindClass(CLASS_NAME)) != NULL)) return NSK_FALSE; - if (!NSK_JNI_VERIFY(jni, (testedClass = (jclass) - NSK_CPP_STUB2(NewGlobalRef, jni, testedClass)) != NULL)) + if (!NSK_JNI_VERIFY(jni, (testedClass = (jclass) jni->NewGlobalRef(testedClass)) != NULL)) return NSK_FALSE; NSK_DISPLAY2("Find field: %s:%s\n", FIELD_NAME, FIELD_SIGNATURE); if (!NSK_JNI_VERIFY(jni, (testedFieldID = - NSK_CPP_STUB4(GetStaticFieldID, jni, testedClass, - FIELD_NAME, FIELD_SIGNATURE)) != NULL)) + jni->GetStaticFieldID(testedClass, FIELD_NAME, FIELD_SIGNATURE)) != NULL)) return NSK_FALSE; return NSK_TRUE; @@ -82,8 +79,7 @@ static int lookup(jvmtiEnv* jvmti, jint i; for (i = 0; i < classCount && !found; i++) { - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(GetClassSignature, jvmti, - classes[i], &signature, &generic))) + if (!NSK_JVMTI_VERIFY(jvmti->GetClassSignature(classes[i], &signature, &generic))) break; if (signature != NULL && strcmp(signature, exp_sig) == 0) { @@ -92,10 +88,10 @@ static int lookup(jvmtiEnv* jvmti, } if (signature != NULL) - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)signature); + jvmti->Deallocate((unsigned char*)signature); if (generic != NULL) - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)generic); + jvmti->Deallocate((unsigned char*)generic); } return found; @@ -119,13 +115,11 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY0("Testcase #1: check on default classloader\n"); if (!NSK_JNI_VERIFY(jni, (testedClassLoader = - NSK_CPP_STUB3(GetStaticObjectField, jni, - testedClass, testedFieldID)) != NULL)) { + jni->GetStaticObjectField(testedClass, testedFieldID)) != NULL)) { nsk_jvmti_setFailStatus(); return; } - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(GetClassLoaderClasses, jvmti, - testedClassLoader, &classCount, &classes))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetClassLoaderClasses(testedClassLoader, &classCount, &classes))) { nsk_jvmti_setFailStatus(); return; } @@ -143,7 +137,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { return; } if (classes != NULL) - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)classes); + jvmti->Deallocate((unsigned char*)classes); if (!nsk_jvmti_resumeSync()) return; @@ -152,13 +146,11 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY0("Testcase #2: check on custom classloader\n"); if (!NSK_JNI_VERIFY(jni, (testedClassLoader = - NSK_CPP_STUB3(GetStaticObjectField, jni, - testedClass, testedFieldID)) != NULL)) { + jni->GetStaticObjectField(testedClass, testedFieldID)) != NULL)) { nsk_jvmti_setFailStatus(); return; } - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(GetClassLoaderClasses, jvmti, - testedClassLoader, &classCount, &classes))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetClassLoaderClasses(testedClassLoader, &classCount, &classes))) { nsk_jvmti_setFailStatus(); return; } @@ -183,9 +175,9 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { nsk_jvmti_setFailStatus(); } if (classes != NULL) - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)classes); + jvmti->Deallocate((unsigned char*)classes); - NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, testedClass)); + NSK_TRACE(jni->DeleteGlobalRef(testedClass)); if (!nsk_jvmti_resumeSync()) return; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetClassSignature/getclsig006/getclsig006.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetClassSignature/getclsig006/getclsig006.cpp index fb9f45b75b2..7364a3a7cf9 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetClassSignature/getclsig006/getclsig006.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetClassSignature/getclsig006/getclsig006.cpp @@ -58,8 +58,7 @@ static int checkSig(JNIEnv *jni_env, jclass testedCls, int idx) { char *sign; char *gen_sign; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(GetClassSignature, - jvmti, testedCls, &sign, &gen_sign))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetClassSignature(testedCls, &sign, &gen_sign))) { NSK_COMPLAIN1("TEST FAILED: unable to get class signature for \"%s\"\n\n", class_sig[idx][0]); return STATUS_FAILED; @@ -85,13 +84,11 @@ static int checkSig(JNIEnv *jni_env, jclass testedCls, int idx) { sign, (gen_sign==NULL)?"NULL":gen_sign); NSK_DISPLAY0("Deallocating the signature array\n"); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(Deallocate, - jvmti, (unsigned char*) sign))) { + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*) sign))) { totRes = STATUS_FAILED; } if (gen_sign!=NULL) - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(Deallocate, - jvmti, (unsigned char*) gen_sign))) { + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*) gen_sign))) { totRes = STATUS_FAILED; } @@ -108,8 +105,7 @@ Java_nsk_jvmti_GetClassSignature_getclsig006_check( jclass testedCls; for (i=0; iFindClass(class_sig[i][1])) != NULL)) { NSK_COMPLAIN1("TEST FAILURE: unable to find class \"%s\"\n\n", class_sig[i][0]); res = STATUS_FAILED; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetCurrentThreadCpuTime/curthrcputime001/curthrcputime001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetCurrentThreadCpuTime/curthrcputime001/curthrcputime001.cpp index e2264774b55..3e7fcdd1b17 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetCurrentThreadCpuTime/curthrcputime001/curthrcputime001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetCurrentThreadCpuTime/curthrcputime001/curthrcputime001.cpp @@ -70,8 +70,7 @@ static int checkCpuTime(jvmtiEnv* jvmti, jthread thread, julong* time, int success = NSK_TRUE; NSK_DISPLAY1("GetCurrentThreadCpuTime() for current thread: 0x%p\n", (void*)thread); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GetCurrentThreadCpuTime, jvmti, (jlong *)time))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetCurrentThreadCpuTime((jlong *)time))) { return NSK_FALSE; } NSK_DISPLAY1(" ... got cpu time: %s\n", julong_to_string(*time, buf)); @@ -260,8 +259,7 @@ callbackThreadStart(jvmtiEnv* jvmti, JNIEnv* jni, jthread thread) { jvmtiThreadInfo threadInfo; { - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetThreadInfo, jvmti, thread, &threadInfo))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(thread, &threadInfo))) { nsk_jvmti_setFailStatus(); return; } @@ -284,8 +282,7 @@ callbackThreadEnd(jvmtiEnv* jvmti, JNIEnv* jni, jthread thread) { jvmtiThreadInfo threadInfo; { - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetThreadInfo, jvmti, thread, &threadInfo))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(thread, &threadInfo))) { nsk_jvmti_setFailStatus(); return; } @@ -337,8 +334,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(caps)); caps.can_get_current_thread_cpu_time = 1; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) { return JNI_ERR; } } @@ -353,9 +349,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { eventCallbacks.VMDeath = callbackVMDeath; eventCallbacks.ThreadStart = callbackThreadStart; eventCallbacks.ThreadEnd = callbackThreadEnd; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, - &eventCallbacks, sizeof(eventCallbacks)))) { + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks)))) { return JNI_ERR; } } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetCurrentThreadCpuTimerInfo/curthrtimerinfo001/curthrtimerinfo001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetCurrentThreadCpuTimerInfo/curthrtimerinfo001/curthrtimerinfo001.cpp index 5173e6d2b29..cf22a491b08 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetCurrentThreadCpuTimerInfo/curthrtimerinfo001/curthrtimerinfo001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetCurrentThreadCpuTimerInfo/curthrtimerinfo001/curthrtimerinfo001.cpp @@ -66,7 +66,7 @@ static int checkTimerInfo(jvmtiEnv* jvmti, jvmtiTimerInfo* info, NSK_DISPLAY0("GetCurrentThreadCpuTimerInfo() for current JVMTI env\n"); if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GetCurrentThreadCpuTimerInfo, jvmti, info))) { + jvmti->GetCurrentThreadCpuTimerInfo(info))) { return NSK_FALSE; } NSK_DISPLAY0("Got timer info:\n"); @@ -260,7 +260,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(caps)); caps.can_get_current_thread_cpu_time = 1; if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + jvmti->AddCapabilities(&caps))) { return JNI_ERR; } } @@ -276,8 +276,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { eventCallbacks.ThreadStart = callbackThreadStart; eventCallbacks.ThreadEnd = callbackThreadEnd; if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, - &eventCallbacks, sizeof(eventCallbacks)))) { + jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks)))) { return JNI_ERR; } } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetEnv/GetEnv001/GetEnv001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetEnv/GetEnv001/GetEnv001.cpp index 41d27f20235..0a6ba80bf70 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetEnv/GetEnv001/GetEnv001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetEnv/GetEnv001/GetEnv001.cpp @@ -87,64 +87,29 @@ jint Agent_Initialize(JavaVM *vm, char *options, void *reserved) return JNI_ERR; } - if (NSK_CPP_STUB3( - GetEnv - , vm - , (void **) &jvmti - , JVMTI_VERSION_1_1 - ) != JNI_OK || jvmti == NULL) - { + if (vm->GetEnv((void **) &jvmti, JVMTI_VERSION_1_1) != JNI_OK || jvmti == NULL) { NSK_COMPLAIN0("JVMTI_VERSION_1_1 isn't supported."); return JNI_OK; } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2( - GetCapabilities - , jvmti - , &caps) - ) - ) + if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps))) return JNI_ERR; caps.can_retransform_classes = 1; // Register all necessary JVM capabilities - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2( - AddCapabilities - , jvmti - , &caps) - ) - ) + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) return JNI_ERR; // Register all necessary event callbacks memset(&callbacks, 0, sizeof(callbacks)); callbacks.ClassFileLoadHook = &ClassFileLoadHook; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3( - SetEventCallbacks - , jvmti - , &callbacks - , sizeof(callbacks) - ) - ) - ) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, sizeof(callbacks)))) return JNI_ERR; // Enable class retransformation - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4( - SetEventNotificationMode - , jvmti - , JVMTI_ENABLE - , JVMTI_EVENT_CLASS_FILE_LOAD_HOOK - , NULL - ) - ) - ) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_CLASS_FILE_LOAD_HOOK, NULL))) return JNI_ERR; return JNI_OK; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetEnvironmentLocalStorage/getenvstor001/getenvstor001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetEnvironmentLocalStorage/getenvstor001/getenvstor001.cpp index 28a671ff64f..c196ea89f1d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetEnvironmentLocalStorage/getenvstor001/getenvstor001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetEnvironmentLocalStorage/getenvstor001/getenvstor001.cpp @@ -53,8 +53,7 @@ static int checkEnvStorage(jvmtiEnv* jvmti, const char where[]) { void* storage = NULL; NSK_DISPLAY0("GetEnvironmentLocalStorage() for current JVMTI env\n"); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GetEnvironmentLocalStorage, jvmti, &storage))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetEnvironmentLocalStorage(&storage))) { return NSK_FALSE; } NSK_DISPLAY1(" ... got storage: 0x%p\n", (void*)storage); @@ -158,9 +157,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&eventCallbacks, 0, sizeof(eventCallbacks)); eventCallbacks.VMInit = callbackVMInit; eventCallbacks.VMDeath = callbackVMDeath; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, - &eventCallbacks, sizeof(eventCallbacks)))) { + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks)))) { return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetErrorName/geterrname001/geterrname001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetErrorName/geterrname001/geterrname001.cpp index 4fd7f4364c9..cc0aa8ba792 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetErrorName/geterrname001/geterrname001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetErrorName/geterrname001/geterrname001.cpp @@ -152,15 +152,14 @@ static int checkGetErrorName(jvmtiEnv *jvmti) { for (i = 0; i < sizeof(errors)/sizeof(error_info); i++) { if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetErrorName, jvmti, errors[i].err, &name))) + jvmti->GetErrorName(errors[i].err, &name))) return NSK_FALSE; if (strcmp(name, errors[i].name) != 0) { NSK_COMPLAIN2("Error: function returns \"%s\", expected \"%s\"\n", name, errors[i].name); return_value = NSK_FALSE; } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)name))) + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)name))) return NSK_FALSE; } @@ -172,7 +171,7 @@ static int checkGetErrorName(jvmtiEnv *jvmti) { void JNICALL VMInit(jvmtiEnv *jvmti, JNIEnv* jni, jthread thread) { - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPhase, jvmti, &phase))) + if (!NSK_JVMTI_VERIFY(jvmti->GetPhase(&phase))) nsk_jvmti_setFailStatus(); NSK_DISPLAY1("Phase: %s\n", TranslatePhase(phase)); @@ -194,10 +193,10 @@ ClassFileLoadHook(jvmtiEnv *jvmti, JNIEnv *jni, unsigned char** new_class_data) { jvmtiPhase curr_phase; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorEnter, jvmti, access_lock))) + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorEnter(access_lock))) nsk_jvmti_setFailStatus(); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPhase, jvmti, &curr_phase))) + if (!NSK_JVMTI_VERIFY(jvmti->GetPhase(&curr_phase))) nsk_jvmti_setFailStatus(); if (phase != curr_phase) { @@ -210,7 +209,7 @@ ClassFileLoadHook(jvmtiEnv *jvmti, JNIEnv *jni, nsk_jvmti_setFailStatus(); } - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorExit, jvmti, access_lock))) + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorExit(access_lock))) nsk_jvmti_setFailStatus(); } @@ -224,7 +223,7 @@ agentProc(jvmtiEnv *jvmti, JNIEnv* jni, void* arg) { if (!nsk_jvmti_waitForSync(timeout)) return; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPhase, jvmti, &phase))) + if (!NSK_JVMTI_VERIFY(jvmti->GetPhase(&phase))) nsk_jvmti_setFailStatus(); NSK_DISPLAY1("Phase: %s\n", TranslatePhase(phase)); @@ -270,12 +269,10 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { return JNI_ERR; /* Create data access lock */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(CreateRawMonitor, jvmti, - "_access_lock", &access_lock))) + if (!NSK_JVMTI_VERIFY(jvmti->CreateRawMonitor("_access_lock", &access_lock))) return JNI_ERR; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPhase, jvmti, &phase))) + if (!NSK_JVMTI_VERIFY(jvmti->GetPhase(&phase))) return JNI_ERR; NSK_DISPLAY1("Phase: %s\n", TranslatePhase(phase)); @@ -288,21 +285,17 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&callbacks, 0, sizeof(callbacks)); callbacks.VMInit = &VMInit; callbacks.ClassFileLoadHook = &ClassFileLoadHook; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, - &callbacks, sizeof(callbacks)))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, sizeof(callbacks)))) return JNI_ERR; /* enable VMInit event */ if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(SetEventNotificationMode, jvmti, JVMTI_ENABLE, - JVMTI_EVENT_VM_INIT, NULL))) + jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_VM_INIT, NULL))) return JNI_ERR; /* enable ClassFileLoadHook event */ if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(SetEventNotificationMode, jvmti, JVMTI_ENABLE, - JVMTI_EVENT_CLASS_FILE_LOAD_HOOK, NULL))) + jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_CLASS_FILE_LOAD_HOOK, NULL))) return JNI_ERR; /* register agent proc and arg */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetErrorName/geterrname002/geterrname002.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetErrorName/geterrname002/geterrname002.cpp index 79e19d0bd58..05937d62892 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetErrorName/geterrname002/geterrname002.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetErrorName/geterrname002/geterrname002.cpp @@ -48,12 +48,12 @@ agentProc(jvmtiEnv *jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY0("Testcase #1: check on JVMTI_ERROR_ILLEGAL_ARGUMENT\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_ILLEGAL_ARGUMENT, - NSK_CPP_STUB3(GetErrorName, jvmti, (jvmtiError)(-1), &name))) + jvmti->GetErrorName((jvmtiError)(-1), &name))) nsk_jvmti_setFailStatus(); NSK_DISPLAY0("Testcase #2: check on JVMTI_ERROR_NULL_POINTER\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_NULL_POINTER, - NSK_CPP_STUB3(GetErrorName, jvmti, JVMTI_ERROR_NONE, NULL))) + jvmti->GetErrorName(JVMTI_ERROR_NONE, NULL))) nsk_jvmti_setFailStatus(); /* resume debugee after last sync */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetExtensionEvents/extevents001/extevents001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetExtensionEvents/extevents001/extevents001.cpp index b06ee126480..24edbbbd494 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetExtensionEvents/extevents001/extevents001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetExtensionEvents/extevents001/extevents001.cpp @@ -54,8 +54,7 @@ static int checkExtensions(jvmtiEnv* jvmti, const char phase[]) { int i; NSK_DISPLAY0("Get extension events list\n"); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetExtensionEvents, jvmti, &extCount, &extList))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetExtensionEvents(&extCount, &extList))) { return NSK_FALSE; } NSK_DISPLAY1(" ... got count: %d\n", (int)extCount); @@ -219,8 +218,7 @@ static int checkExtensions(jvmtiEnv* jvmti, const char phase[]) { } NSK_DISPLAY1("Deallocate extension events list: 0x%p\n", (void*)extList); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)extList))) { + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)extList))) { return NSK_FALSE; } NSK_DISPLAY0(" ... deallocated\n"); diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetExtensionFunctions/extfuncs001/extfuncs001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetExtensionFunctions/extfuncs001/extfuncs001.cpp index 522a21f7cc5..60f573c2b71 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetExtensionFunctions/extfuncs001/extfuncs001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetExtensionFunctions/extfuncs001/extfuncs001.cpp @@ -53,8 +53,7 @@ static int checkExtensions(jvmtiEnv* jvmti, const char phase[]) { int i; NSK_DISPLAY0("Get extension functions list\n"); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetExtensionFunctions, jvmti, &extCount, &extList))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetExtensionFunctions(&extCount, &extList))) { return NSK_FALSE; } NSK_DISPLAY1(" ... got count: %d\n", (int)extCount); @@ -230,8 +229,7 @@ static int checkExtensions(jvmtiEnv* jvmti, const char phase[]) { } NSK_DISPLAY1("Deallocate extension functions list: 0x%p\n", (void*)extList); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)extList))) { + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)extList))) { return NSK_FALSE; } NSK_DISPLAY0(" ... deallocated\n"); diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetFieldName/getfldnm005/getfldnm005.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetFieldName/getfldnm005/getfldnm005.cpp index c28d5a2e8ba..262702b3165 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetFieldName/getfldnm005/getfldnm005.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetFieldName/getfldnm005/getfldnm005.cpp @@ -92,8 +92,7 @@ static int checkSig(JNIEnv *jni_env, jclass testedCls, char *sign; char *gen_sign; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB6(GetFieldName, - jvmti, testedCls, testedFld, &name, &sign, &gen_sign))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetFieldName(testedCls, testedFld, &name, &sign, &gen_sign))) { NSK_COMPLAIN1("TEST FAILED: unable to get field name & signature for \"%s\"\n\n", fld_sig[idx][0]); return STATUS_FAILED; @@ -120,15 +119,12 @@ static int checkSig(JNIEnv *jni_env, jclass testedCls, sign, (gen_sign==NULL)?"NULL":gen_sign); NSK_DISPLAY0("Deallocating name & signature arrays\n"); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(Deallocate, - jvmti, (unsigned char*) name))) + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*) name))) totRes = STATUS_FAILED; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(Deallocate, - jvmti, (unsigned char*) sign))) + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*) sign))) totRes = STATUS_FAILED; if (gen_sign!=NULL) - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(Deallocate, - jvmti, (unsigned char*) gen_sign))) + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*) gen_sign))) totRes = STATUS_FAILED; } @@ -140,8 +136,7 @@ Java_nsk_jvmti_GetFieldName_getfldnm005_check( JNIEnv *jni, jobject obj) { int res = PASSED, i, instance; jfieldID testedFld = NULL; - jclass objCls = NSK_CPP_STUB2(GetObjectClass, - jni, obj); + jclass objCls = jni->GetObjectClass(obj); for (i=0; iGetFieldID(objCls, fld_sig[i][0], fld_sig[i][2])) != NULL)) { NSK_COMPLAIN1("TEST FAILERE: unable to get field ID for \"%s\"\n\n", fld_sig[i][0]); res = STATUS_FAILED; @@ -160,9 +153,7 @@ Java_nsk_jvmti_GetFieldName_getfldnm005_check( } } else - if (!NSK_JNI_VERIFY(jni, (testedFld = NSK_CPP_STUB4( - GetStaticFieldID, jni, objCls, - fld_sig[i][0], fld_sig[i][2])) != NULL)) { + if (!NSK_JNI_VERIFY(jni, (testedFld = jni->GetStaticFieldID(objCls, fld_sig[i][0], fld_sig[i][2])) != NULL)) { NSK_COMPLAIN1("TEST FAILERE: unable to get field ID for \"%s\"\n\n", fld_sig[i][0]); res = STATUS_FAILED; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetJLocationFormat/getjlocfmt001/getjlocfmt001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetJLocationFormat/getjlocfmt001/getjlocfmt001.cpp index a111e8e1f03..b604af51f8a 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetJLocationFormat/getjlocfmt001/getjlocfmt001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetJLocationFormat/getjlocfmt001/getjlocfmt001.cpp @@ -57,14 +57,14 @@ void JNICALL VMInit(jvmtiEnv *jvmti, JNIEnv* jni, jthread thread) { jvmtiJlocationFormat format; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPhase, jvmti, &phase))) + if (!NSK_JVMTI_VERIFY(jvmti->GetPhase(&phase))) nsk_jvmti_setFailStatus(); NSK_DISPLAY1("Phase: %s\n", TranslatePhase(phase)); /* testcase #3: check GetJLocationFormat in VMInit */ NSK_DISPLAY0("Testcase #3: check GetJLocationFormat in VMInit\n"); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetJLocationFormat, jvmti, &format))) + if (!NSK_JVMTI_VERIFY(jvmti->GetJLocationFormat(&format))) nsk_jvmti_setFailStatus(); if (!NSK_VERIFY((format == JVMTI_JLOCATION_JVMBCI) || (format == JVMTI_JLOCATION_MACHINEPC) @@ -85,10 +85,10 @@ ClassFileLoadHook(jvmtiEnv *jvmti, JNIEnv *jni, jvmtiJlocationFormat format; jvmtiPhase curr_phase; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorEnter, jvmti, access_lock))) + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorEnter(access_lock))) nsk_jvmti_setFailStatus(); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPhase, jvmti, &curr_phase))) + if (!NSK_JVMTI_VERIFY(jvmti->GetPhase(&curr_phase))) nsk_jvmti_setFailStatus(); if (phase != curr_phase) { @@ -97,7 +97,7 @@ ClassFileLoadHook(jvmtiEnv *jvmti, JNIEnv *jni, /* testcase #2: check GetJLocationFormat in ClassFileLoadHook */ NSK_DISPLAY0("Testcase #2: check GetJLocationFormat in ClassFileLoadHook\n"); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetJLocationFormat, jvmti, &format))) + if (!NSK_JVMTI_VERIFY(jvmti->GetJLocationFormat(&format))) nsk_jvmti_setFailStatus(); if (!NSK_VERIFY((format == JVMTI_JLOCATION_JVMBCI) || (format == JVMTI_JLOCATION_MACHINEPC) @@ -106,7 +106,7 @@ ClassFileLoadHook(jvmtiEnv *jvmti, JNIEnv *jni, NSK_DISPLAY1("JlocationFormat: %s\n", TranslateJlocationFormat(format)); } - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorExit, jvmti, access_lock))) + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorExit(access_lock))) nsk_jvmti_setFailStatus(); } @@ -121,14 +121,14 @@ agentProc(jvmtiEnv *jvmti, JNIEnv* jni, void* arg) { if (!nsk_jvmti_waitForSync(timeout)) return; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPhase, jvmti, &phase))) + if (!NSK_JVMTI_VERIFY(jvmti->GetPhase(&phase))) nsk_jvmti_setFailStatus(); NSK_DISPLAY1("Phase: %s\n", TranslatePhase(phase)); /* testcase #4: check GetJLocationFormat in agentProc */ NSK_DISPLAY0("Testcase #4: check GetJLocationFormat in agentProc\n"); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetJLocationFormat, jvmti, &format))) + if (!NSK_JVMTI_VERIFY(jvmti->GetJLocationFormat(&format))) nsk_jvmti_setFailStatus(); if (!NSK_VERIFY((format == JVMTI_JLOCATION_JVMBCI) || (format == JVMTI_JLOCATION_MACHINEPC) @@ -173,19 +173,17 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { return JNI_ERR; /* Create data access lock */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(CreateRawMonitor, jvmti, - "_access_lock", &access_lock))) + if (!NSK_JVMTI_VERIFY(jvmti->CreateRawMonitor("_access_lock", &access_lock))) return JNI_ERR; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPhase, jvmti, &phase))) + if (!NSK_JVMTI_VERIFY(jvmti->GetPhase(&phase))) return JNI_ERR; NSK_DISPLAY1("Phase: %s\n", TranslatePhase(phase)); /* testcase #1: check GetJLocationFormat in Agent_OnLoad */ NSK_DISPLAY0("Testcase #1: check GetJLocationFormat in Agent_OnLoad\n"); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetJLocationFormat, jvmti, &format))) + if (!NSK_JVMTI_VERIFY(jvmti->GetJLocationFormat(&format))) nsk_jvmti_setFailStatus(); if (!NSK_VERIFY((format == JVMTI_JLOCATION_JVMBCI) || (format == JVMTI_JLOCATION_MACHINEPC) @@ -196,21 +194,17 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&callbacks, 0, sizeof(callbacks)); callbacks.VMInit = &VMInit; callbacks.ClassFileLoadHook = &ClassFileLoadHook; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, - &callbacks, sizeof(callbacks)))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, sizeof(callbacks)))) return JNI_ERR; /* enable VMInit event */ if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(SetEventNotificationMode, jvmti, JVMTI_ENABLE, - JVMTI_EVENT_VM_INIT, NULL))) + jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_VM_INIT, NULL))) return JNI_ERR; /* enable ClassFileLoadHook event */ if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(SetEventNotificationMode, jvmti, JVMTI_ENABLE, - JVMTI_EVENT_CLASS_FILE_LOAD_HOOK, NULL))) + jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_CLASS_FILE_LOAD_HOOK, NULL))) return JNI_ERR; /* register agent proc and arg */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetJLocationFormat/getjlocfmt002/getjlocfmt002.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetJLocationFormat/getjlocfmt002/getjlocfmt002.cpp index fca44365614..b8125340a95 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetJLocationFormat/getjlocfmt002/getjlocfmt002.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetJLocationFormat/getjlocfmt002/getjlocfmt002.cpp @@ -46,8 +46,7 @@ agentProc(jvmtiEnv *jvmti, JNIEnv* jni, void* arg) { return; NSK_DISPLAY0("Check if GetJLocationFormat(NULL) returns JVMTI_ERROR_NULL_POINTER\n"); - if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_NULL_POINTER, - NSK_CPP_STUB2(GetJLocationFormat, jvmti, NULL))) + if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_NULL_POINTER, jvmti->GetJLocationFormat(NULL))) nsk_jvmti_setFailStatus(); /* resume debugee after last sync */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetLoadedClasses/loadedclss002/loadedclss002.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetLoadedClasses/loadedclss002/loadedclss002.cpp index 5af7c06c77a..8a65e34cfd4 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetLoadedClasses/loadedclss002/loadedclss002.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetLoadedClasses/loadedclss002/loadedclss002.cpp @@ -60,8 +60,7 @@ static int lookup(jvmtiEnv* jvmti, jint i; for (i = 0; i < classCount && !found; i++) { - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(GetClassSignature, jvmti, - classes[i], &signature, &generic))) + if (!NSK_JVMTI_VERIFY(jvmti->GetClassSignature(classes[i], &signature, &generic))) break; if (signature != NULL && strcmp(signature, exp_sig) == 0) { @@ -70,10 +69,10 @@ static int lookup(jvmtiEnv* jvmti, } if (signature != NULL) - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)signature); + jvmti->Deallocate((unsigned char*)signature); if (generic != NULL) - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)generic); + jvmti->Deallocate((unsigned char*)generic); } return found; @@ -91,8 +90,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { if (!nsk_jvmti_waitForSync(timeout)) return; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(GetLoadedClasses, jvmti, - &classCount, &classes))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetLoadedClasses(&classCount, &classes))) { nsk_jvmti_setFailStatus(); return; } @@ -124,7 +122,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { } if (classes != NULL) - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)classes); + jvmti->Deallocate((unsigned char*)classes); if (!nsk_jvmti_resumeSync()) return; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetLocalVariableTable/localtab004/localtab004.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetLocalVariableTable/localtab004/localtab004.cpp index ccbe7fe9bd5..d53c9aba4be 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetLocalVariableTable/localtab004/localtab004.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetLocalVariableTable/localtab004/localtab004.cpp @@ -99,13 +99,9 @@ static int checkAttr(JNIEnv *jni_env, jclass testedCls) { /* get the JNI method ID for a method with name m_name and signature m_sign */ if (methInfo[i].inst) /* an instance method */ - methInfo[i].mid = NSK_CPP_STUB4(GetMethodID, - jni_env, testedCls, - methInfo[i].m_name, methInfo[i].m_sign); + methInfo[i].mid = jni_env->GetMethodID(testedCls, methInfo[i].m_name, methInfo[i].m_sign); else /* a static method */ - methInfo[i].mid = NSK_CPP_STUB4(GetStaticMethodID, - jni_env, testedCls, - methInfo[i].m_name, methInfo[i].m_sign); + methInfo[i].mid = jni_env->GetStaticMethodID(testedCls, methInfo[i].m_name, methInfo[i].m_sign); if (methInfo[i].mid == NULL) { NSK_COMPLAIN3("TEST FAILURE: unable to get the method ID for the %s method \"%s\", signature \"%s\"\n\n", methInfo[i].inst?"instance":"static", @@ -114,8 +110,7 @@ static int checkAttr(JNIEnv *jni_env, jclass testedCls) { } /* get the LocalVariableTable attribute */ - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(GetLocalVariableTable, - jvmti, methInfo[i].mid, &count, &lv_table))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetLocalVariableTable(methInfo[i].mid, &count, &lv_table))) { NSK_COMPLAIN3("TEST FAILED: unable to get local variable table\n\tfor the %s method \"%s\", signature \"%s\"\n\n", methInfo[i].inst?"instance":"static", methInfo[i].m_name, methInfo[i].m_sign); @@ -175,8 +170,7 @@ static int checkAttr(JNIEnv *jni_env, jclass testedCls) { JNIEXPORT jint JNICALL Java_nsk_jvmti_GetLocalVariableTable_localtab004_check( JNIEnv *env, jobject obj, jobject testedObj) { - jclass testedCls = NSK_CPP_STUB2(GetObjectClass, - env, testedObj); + jclass testedCls = env->GetObjectClass(testedObj); if (!caps.can_access_local_variables) return PASSED; @@ -208,12 +202,10 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { /* add capability to access local variables */ memset(&caps, 0, sizeof(jvmtiCapabilities)); caps.can_access_local_variables = 1; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, - jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) return JNI_ERR; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, - jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps))) return JNI_ERR; if (!caps.can_access_local_variables) diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetLocalVariableTable/localtab005/localtab005.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetLocalVariableTable/localtab005/localtab005.cpp index b1ea519a7a0..db54e33fc73 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetLocalVariableTable/localtab005/localtab005.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetLocalVariableTable/localtab005/localtab005.cpp @@ -107,13 +107,9 @@ static int checkAttr(JNIEnv *jni_env, jclass testedCls) { /* get the JNI method ID for a method with name m_name and signature m_sign */ if (methInfo[i].inst) /* an instance method */ - methInfo[i].mid = NSK_CPP_STUB4(GetMethodID, - jni_env, testedCls, - methInfo[i].m_name, methInfo[i].m_sign); + methInfo[i].mid = jni_env->GetMethodID(testedCls, methInfo[i].m_name, methInfo[i].m_sign); else /* a static method */ - methInfo[i].mid = NSK_CPP_STUB4(GetStaticMethodID, - jni_env, testedCls, - methInfo[i].m_name, methInfo[i].m_sign); + methInfo[i].mid = jni_env->GetStaticMethodID(testedCls, methInfo[i].m_name, methInfo[i].m_sign); if (methInfo[i].mid == NULL) { NSK_COMPLAIN3("TEST FAILURE: unable to get the method ID for the %s method \"%s\", signature \"%s\"\n\n", methInfo[i].inst?"instance":"static", @@ -122,8 +118,7 @@ static int checkAttr(JNIEnv *jni_env, jclass testedCls) { } /* get the LocalVariableTable attribute */ - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(GetLocalVariableTable, - jvmti, methInfo[i].mid, &count, &lv_table))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetLocalVariableTable(methInfo[i].mid, &count, &lv_table))) { NSK_COMPLAIN3("TEST FAILED: unable to get local variable table\n\tfor the %s method \"%s\", signature \"%s\"\n\n", methInfo[i].inst?"instance":"static", methInfo[i].m_name, methInfo[i].m_sign); @@ -185,8 +180,7 @@ static int checkAttr(JNIEnv *jni_env, jclass testedCls) { } } NSK_DISPLAY0("Deallocating the local variable table entries\n"); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(Deallocate, - jvmti, (unsigned char*) lv_table))) { + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*) lv_table))) { totRes = STATUS_FAILED; } @@ -200,8 +194,7 @@ static int checkAttr(JNIEnv *jni_env, jclass testedCls) { JNIEXPORT jint JNICALL Java_nsk_jvmti_GetLocalVariableTable_localtab005_check( JNIEnv *env, jobject obj, jobject testedObj) { - jclass testedCls = NSK_CPP_STUB2(GetObjectClass, - env, testedObj); + jclass testedCls = env->GetObjectClass(testedObj); if (!caps.can_access_local_variables) return PASSED; @@ -233,12 +226,10 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { /* add capability to access local variables */ memset(&caps, 0, sizeof(jvmtiCapabilities)); caps.can_access_local_variables = 1; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, - jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) return JNI_ERR; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, - jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps))) return JNI_ERR; if (!caps.can_access_local_variables) diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetMethodName/methname003/methname003.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetMethodName/methname003/methname003.cpp index 35724ac4511..eb6243de54c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetMethodName/methname003/methname003.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetMethodName/methname003/methname003.cpp @@ -89,8 +89,7 @@ static int checkSig(JNIEnv *jni_env, jmethodID testedMeth, char *sign; char *gen_sign; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(GetMethodName, - jvmti, testedMeth, &name, &sign, &gen_sign))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetMethodName(testedMeth, &name, &sign, &gen_sign))) { NSK_COMPLAIN1("TEST FAILED: unable to get class signature for \"%s\"\n\n", meth_sig[clsIdx][methIdx][0]); return STATUS_FAILED; @@ -112,17 +111,14 @@ has\n\tsignature: \"%s\"\n\tgeneric signature: \"%s\"\n\n\tExpected: \"%s\"\n\t\ sign, (gen_sign==NULL)?"NULL":gen_sign); NSK_DISPLAY0("Deallocating name & signature arrays\n"); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(Deallocate, - jvmti, (unsigned char*) name))) { + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*) name))) { totRes = STATUS_FAILED; } - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(Deallocate, - jvmti, (unsigned char*) sign))) { + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*) sign))) { totRes = STATUS_FAILED; } if (gen_sign!=NULL) - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(Deallocate, - jvmti, (unsigned char*) gen_sign))) { + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*) gen_sign))) { totRes = STATUS_FAILED; } } @@ -135,8 +131,7 @@ Java_nsk_jvmti_GetMethodName_methname003_check( JNIEnv *jni, jobject obj, jobject testedObj, jint clsIdx) { int res = PASSED, i, instance; jmethodID testedMeth = NULL; - jclass objCls = NSK_CPP_STUB2(GetObjectClass, - jni, testedObj); + jclass objCls = jni->GetObjectClass(testedObj); for (i=0; iGetMethodID(objCls, meth_sig[clsIdx][i][0], meth_sig[clsIdx][i][2])) != NULL)) { NSK_COMPLAIN2("TEST FAILERE: unable to get method ID for \"%s\" \"%s\"\n\n", meth_sig[clsIdx][i][0], meth_sig[clsIdx][i][2]); res = STATUS_FAILED; @@ -155,9 +148,7 @@ Java_nsk_jvmti_GetMethodName_methname003_check( } } else - if (!NSK_JNI_VERIFY(jni, (testedMeth = NSK_CPP_STUB4(GetStaticMethodID, - jni, objCls, meth_sig[clsIdx][i][0], - meth_sig[clsIdx][i][2])) != NULL)) { + if (!NSK_JNI_VERIFY(jni, (testedMeth = jni->GetStaticMethodID(objCls, meth_sig[clsIdx][i][0], meth_sig[clsIdx][i][2])) != NULL)) { NSK_COMPLAIN2("TEST FAILERE: unable to get method ID for \"%s\" \"%s\"\n\n", meth_sig[clsIdx][i][0], meth_sig[clsIdx][i][2]); res = STATUS_FAILED; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetObjectHashCode/objhashcode001/objhashcode001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetObjectHashCode/objhashcode001/objhashcode001.cpp index d60bcc0645f..da85ff4c539 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetObjectHashCode/objhashcode001/objhashcode001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetObjectHashCode/objhashcode001/objhashcode001.cpp @@ -60,8 +60,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { jfieldID objectField = NULL; NSK_DISPLAY1("Find debugee class: %s\n", DEBUGEE_CLASS_NAME); - if (!NSK_JNI_VERIFY(jni, (debugeeClass = - NSK_CPP_STUB2(FindClass, jni, DEBUGEE_CLASS_NAME)) != NULL)) { + if (!NSK_JNI_VERIFY(jni, (debugeeClass = jni->FindClass(DEBUGEE_CLASS_NAME)) != NULL)) { nsk_jvmti_setFailStatus(); return; } @@ -69,8 +68,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY1("Find static field: %s\n", OBJECT_FIELD_NAME); if (!NSK_JNI_VERIFY(jni, (objectField = - NSK_CPP_STUB4(GetStaticFieldID, jni, debugeeClass, - OBJECT_FIELD_NAME, OBJECT_CLASS_SIG)) != NULL)) { + jni->GetStaticFieldID(debugeeClass, OBJECT_FIELD_NAME, OBJECT_CLASS_SIG)) != NULL)) { nsk_jvmti_setFailStatus(); return; } @@ -78,16 +76,14 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY1("Get object from static field: %s\n", OBJECT_FIELD_NAME); if (!NSK_JNI_VERIFY(jni, (testedObject = - NSK_CPP_STUB3(GetStaticObjectField, jni, debugeeClass, - objectField)) != NULL)) { + jni->GetStaticObjectField(debugeeClass, objectField)) != NULL)) { nsk_jvmti_setFailStatus(); return; } NSK_DISPLAY1(" ... got object: %p\n", (void*)testedObject); NSK_DISPLAY1("Create global reference for object: %p\n", (void*)testedObject); - if (!NSK_JNI_VERIFY(jni, (testedObject = - NSK_CPP_STUB2(NewGlobalRef, jni, testedObject)) != NULL)) { + if (!NSK_JNI_VERIFY(jni, (testedObject = jni->NewGlobalRef(testedObject)) != NULL)) { nsk_jvmti_setFailStatus(); return; } @@ -97,8 +93,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY0(">>> Testcase #1: get initial hash code of the object\n"); { NSK_DISPLAY1("Get hashcode for object: %p\n", (void*)testedObject); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetObjectHashCode, jvmti, testedObject, &objectHashCode))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetObjectHashCode(testedObject, &objectHashCode))) { nsk_jvmti_setFailStatus(); return; } @@ -110,8 +105,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { jint hashCode = 0; NSK_DISPLAY1("Get hashcode for object: %p\n", (void*)testedObject); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetObjectHashCode, jvmti, testedObject, &hashCode))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetObjectHashCode(testedObject, &hashCode))) { nsk_jvmti_setFailStatus(); return; } @@ -141,7 +135,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY1("Get hashcode for object: %p\n", (void*)testedObject); if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetObjectHashCode, jvmti, testedObject, &hashCode))) { + jvmti->GetObjectHashCode(testedObject, &hashCode))) { nsk_jvmti_setFailStatus(); return; } @@ -162,7 +156,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY0(">>> Clean used data\n"); { NSK_DISPLAY1("Delete object reference: %p\n", (void*)testedObject); - NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, testedObject)); + NSK_TRACE(jni->DeleteGlobalRef(testedObject)); } } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetObjectSize/objsize001/objsize001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetObjectSize/objsize001/objsize001.cpp index 79150b73f50..10860792e17 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetObjectSize/objsize001/objsize001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetObjectSize/objsize001/objsize001.cpp @@ -57,8 +57,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { jfieldID objectField = NULL; NSK_DISPLAY1("Find debugee class: %s\n", DEBUGEE_CLASS_NAME); - if (!NSK_JNI_VERIFY(jni, (debugeeClass = - NSK_CPP_STUB2(FindClass, jni, DEBUGEE_CLASS_NAME)) != NULL)) { + if (!NSK_JNI_VERIFY(jni, (debugeeClass = jni->FindClass(DEBUGEE_CLASS_NAME)) != NULL)) { nsk_jvmti_setFailStatus(); return; } @@ -66,8 +65,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY1("Find static field: %s\n", OBJECT_FIELD_NAME); if (!NSK_JNI_VERIFY(jni, (objectField = - NSK_CPP_STUB4(GetStaticFieldID, jni, debugeeClass, - OBJECT_FIELD_NAME, OBJECT_CLASS_SIG)) != NULL)) { + jni->GetStaticFieldID(debugeeClass, OBJECT_FIELD_NAME, OBJECT_CLASS_SIG)) != NULL)) { nsk_jvmti_setFailStatus(); return; } @@ -75,16 +73,14 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY1("Get object from static field: %s\n", OBJECT_FIELD_NAME); if (!NSK_JNI_VERIFY(jni, (testedObject = - NSK_CPP_STUB3(GetStaticObjectField, jni, debugeeClass, - objectField)) != NULL)) { + jni->GetStaticObjectField(debugeeClass, objectField)) != NULL)) { nsk_jvmti_setFailStatus(); return; } NSK_DISPLAY1(" ... got object: 0x%p\n", (void*)testedObject); NSK_DISPLAY1("Create global reference for object: 0x%p\n", (void*)testedObject); - if (!NSK_JNI_VERIFY(jni, (testedObject = - NSK_CPP_STUB2(NewGlobalRef, jni, testedObject)) != NULL)) { + if (!NSK_JNI_VERIFY(jni, (testedObject = jni->NewGlobalRef(testedObject)) != NULL)) { nsk_jvmti_setFailStatus(); return; } @@ -94,8 +90,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY0(">>> Testcase #1: get initial size of the object\n"); { NSK_DISPLAY1("Get size for object: 0x%p\n", (void*)testedObject); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetObjectSize, jvmti, testedObject, &objectSize))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetObjectSize(testedObject, &objectSize))) { nsk_jvmti_setFailStatus(); return; } @@ -113,8 +108,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { jlong size = 0; NSK_DISPLAY1("Get size for object: 0x%p\n", (void*)testedObject); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetObjectSize, jvmti, testedObject, &size))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetObjectSize(testedObject, &size))) { nsk_jvmti_setFailStatus(); return; } @@ -142,8 +136,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { return; NSK_DISPLAY1("Get size for object: 0x%p\n", (void*)testedObject); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetObjectSize, jvmti, testedObject, &size))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetObjectSize(testedObject, &size))) { nsk_jvmti_setFailStatus(); return; } @@ -163,7 +156,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY0(">>> Clean used data\n"); { NSK_DISPLAY1("Delete object reference: 0x%p\n", (void*)testedObject); - NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, testedObject)); + NSK_TRACE(jni->DeleteGlobalRef(testedObject)); } } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetObjectsWithTags/objwithtags001/objwithtags001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetObjectsWithTags/objwithtags001/objwithtags001.cpp index aa8dc7c15c0..d6ea8445774 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetObjectsWithTags/objwithtags001/objwithtags001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetObjectsWithTags/objwithtags001/objwithtags001.cpp @@ -63,17 +63,13 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int tagsCount, int obj NSK_DISPLAY2("Allocate memory for lists: %d objects for %d tags\n", objectsCount, tagsCount); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(Allocate, jvmti, (size * sizeof(jobject)), - (unsigned char**)objects))) { + if (!NSK_JVMTI_VERIFY(jvmti->Allocate((size * sizeof(jobject)), (unsigned char**)objects))) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } NSK_DISPLAY1(" ... allocated objects list: 0x%p\n", (void*)objects); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(Allocate, jvmti, (tagsCount * sizeof(jlong)), - (unsigned char**)tags))) { + if (!NSK_JVMTI_VERIFY(jvmti->Allocate((tagsCount * sizeof(jlong)), (unsigned char**)tags))) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -91,8 +87,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int tagsCount, int obj } NSK_DISPLAY1("Find debugee class: %s\n", DEBUGEE_CLASS_NAME); - if (!NSK_JNI_VERIFY(jni, (debugeeClass = - NSK_CPP_STUB2(FindClass, jni, DEBUGEE_CLASS_NAME)) != NULL)) { + if (!NSK_JNI_VERIFY(jni, (debugeeClass = jni->FindClass(DEBUGEE_CLASS_NAME)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -100,8 +95,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int tagsCount, int obj NSK_DISPLAY1("Find static field: %s\n", OBJECTS_FIELD_NAME); if (!NSK_JNI_VERIFY(jni, (objectField = - NSK_CPP_STUB4(GetStaticFieldID, jni, debugeeClass, - OBJECTS_FIELD_NAME, OBJECTS_FIELD_SIG)) != NULL)) { + jni->GetStaticFieldID(debugeeClass, OBJECTS_FIELD_NAME, OBJECTS_FIELD_SIG)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -109,8 +103,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int tagsCount, int obj NSK_DISPLAY1("Get objects array from static field: %s\n", OBJECTS_FIELD_NAME); if (!NSK_JNI_VERIFY(jni, (arrayObject = (jobjectArray) - NSK_CPP_STUB3(GetStaticObjectField, jni, debugeeClass, - objectField)) != NULL)) { + jni->GetStaticObjectField(debugeeClass, objectField)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -120,8 +113,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int tagsCount, int obj jsize arrayLen = 0; jsize k; - if (!NSK_JNI_VERIFY(jni, (arrayLen = - NSK_CPP_STUB2(GetArrayLength, jni, arrayObject)) == size)) { + if (!NSK_JNI_VERIFY(jni, (arrayLen = jni->GetArrayLength(arrayObject)) == size)) { NSK_DISPLAY1(" ... got array length: %d\n", (int)size); nsk_jvmti_setFailStatus(); return NSK_FALSE; @@ -131,13 +123,11 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int tagsCount, int obj for (k = 0; k < size; k++) { jobject object = NULL; - if (!NSK_JNI_VERIFY(jni, (object = - NSK_CPP_STUB3(GetObjectArrayElement, jni, arrayObject, k)) != NULL)) { + if (!NSK_JNI_VERIFY(jni, (object = jni->GetObjectArrayElement(arrayObject, k)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } - if (!NSK_JNI_VERIFY(jni, (object = - NSK_CPP_STUB2(NewGlobalRef, jni, object)) != NULL)) { + if (!NSK_JNI_VERIFY(jni, (object = jni->NewGlobalRef(object)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -162,14 +152,14 @@ static int releaseTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int tagsCount, int NSK_DISPLAY1("Release objects references: %d objects\n", size); for (k = 0; k < size; k++) { if (objects[k] != NULL) { - NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, objects[k])); + NSK_TRACE(jni->DeleteGlobalRef(objects[k])); } } NSK_DISPLAY1(" ... object references released: %d objects\n", size); NSK_DISPLAY1("Deallocate objects list: 0x%p\n", (void*)objects); if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)objects))) { + jvmti->Deallocate((unsigned char*)objects))) { nsk_jvmti_setFailStatus(); } @@ -178,7 +168,7 @@ static int releaseTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int tagsCount, int NSK_DISPLAY1("Deallocate tags list: 0x%p\n", (void*)tags); if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)tags))) { + jvmti->Deallocate((unsigned char*)tags))) { nsk_jvmti_setFailStatus(); } @@ -197,8 +187,7 @@ static int checkTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int tagsCount, int o NSK_DISPLAY1("Get tagged objects: %d tags\n", tagsCount); if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB6(GetObjectsWithTags, jvmti, tagsCount, tags, - &taggedObjectsCount, &taggedObjectsList, &taggedObjectsTags))) { + jvmti->GetObjectsWithTags(tagsCount, tags, &taggedObjectsCount, &taggedObjectsList, &taggedObjectsTags))) { nsk_jvmti_setFailStatus(); return NSK_TRUE; } @@ -258,7 +247,7 @@ static int checkTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int tagsCount, int o for (j = 0; j < objectsCount; j++) { jobject foundObject = ITEM(objects, i, j); - if (NSK_CPP_STUB3(IsSameObject, jni, object, foundObject)) { + if (jni->IsSameObject(object, foundObject)) { objectsFound++; if (expectedCount > 0) @@ -295,12 +284,12 @@ static int checkTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int tagsCount, int o NSK_DISPLAY1("Deallocate got objects list: 0x%p\n", (void*)taggedObjectsList); if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)taggedObjectsList))) { + jvmti->Deallocate((unsigned char*)taggedObjectsList))) { nsk_jvmti_setFailStatus(); } NSK_DISPLAY1("Deallocate got tags list: 0x%p\n", (void*)taggedObjectsTags); if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)taggedObjectsTags))) { + jvmti->Deallocate((unsigned char*)taggedObjectsTags))) { nsk_jvmti_setFailStatus(); } @@ -338,8 +327,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY3(" #%d: object: 0x%p, tag: %ld\n", j, (void*)object, (long)tags[i]); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetTag, jvmti, object, tags[i]))) { + if (!NSK_JVMTI_VERIFY(jvmti->SetTag(object, tags[i]))) { nsk_jvmti_setFailStatus(); return; } @@ -384,8 +372,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY3(" #%d: object: 0x%p, tag: %ld\n", j, (void*)object, (long)tag); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetTag, jvmti, object, tag))) { + if (!NSK_JVMTI_VERIFY(jvmti->SetTag(object, tag))) { nsk_jvmti_setFailStatus(); return; } @@ -455,8 +442,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(caps)); caps.can_tag_objects = 1; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) { return JNI_ERR; } } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetPhase/getphase001/getphase001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetPhase/getphase001/getphase001.cpp index 45062daeadd..e3c4df42cba 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetPhase/getphase001/getphase001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetPhase/getphase001/getphase001.cpp @@ -45,14 +45,14 @@ static void JNICALL VMStart(jvmtiEnv *jvmti, JNIEnv* jni) { jvmtiPhase phase; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorEnter, jvmti, access_lock))) + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorEnter(access_lock))) nsk_jvmti_setFailStatus(); NSK_DISPLAY0("VMStart\n"); /* testcase #2: check JVMTI_PHASE_START */ NSK_DISPLAY0("Testcase #2: check if GetPhase returns JVMTI_PHASE_START\n"); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPhase, jvmti, &phase))) + if (!NSK_JVMTI_VERIFY(jvmti->GetPhase(&phase))) nsk_jvmti_setFailStatus(); if (!NSK_VERIFY(phase == JVMTI_PHASE_START)) @@ -60,7 +60,7 @@ VMStart(jvmtiEnv *jvmti, JNIEnv* jni) { was_VMStart = JNI_TRUE; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorExit, jvmti, access_lock))) + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorExit(access_lock))) nsk_jvmti_setFailStatus(); } @@ -68,14 +68,14 @@ static void JNICALL VMInit(jvmtiEnv *jvmti, JNIEnv* jni, jthread thread) { jvmtiPhase phase; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorEnter, jvmti, access_lock))) + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorEnter(access_lock))) nsk_jvmti_setFailStatus(); NSK_DISPLAY0("VMInit\n"); /* testcase #3: check JVMTI_PHASE_LIVE */ NSK_DISPLAY0("Testcase #3: check if GetPhase returns JVMTI_PHASE_LIVE\n"); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPhase, jvmti, &phase))) + if (!NSK_JVMTI_VERIFY(jvmti->GetPhase(&phase))) nsk_jvmti_setFailStatus(); if (!NSK_VERIFY(phase == JVMTI_PHASE_LIVE)) @@ -83,7 +83,7 @@ VMInit(jvmtiEnv *jvmti, JNIEnv* jni, jthread thread) { was_VMInit = JNI_TRUE; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorExit, jvmti, access_lock))) + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorExit(access_lock))) nsk_jvmti_setFailStatus(); } @@ -93,7 +93,7 @@ NativeMethodBind(jvmtiEnv* jvmti, JNIEnv *jni, void* address, void** new_address_ptr) { jvmtiPhase phase; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorEnter, jvmti, access_lock))) + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorEnter(access_lock))) nsk_jvmti_setFailStatus(); NSK_DISPLAY0("NativeMethodBind\n"); @@ -102,7 +102,7 @@ NativeMethodBind(jvmtiEnv* jvmti, JNIEnv *jni, /* testcase #5: check JVMTI_PHASE_PRIMORDIAL */ NSK_DISPLAY0("Testcase #2: check if GetPhase returns JVMTI_PHASE_PRIMORDIAL\n"); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPhase, jvmti, &phase))) + if (!NSK_JVMTI_VERIFY(jvmti->GetPhase(&phase))) nsk_jvmti_setFailStatus(); if (!NSK_VERIFY(phase == JVMTI_PHASE_PRIMORDIAL)) @@ -112,7 +112,7 @@ NativeMethodBind(jvmtiEnv* jvmti, JNIEnv *jni, /* testcase #2: check JVMTI_PHASE_START */ NSK_DISPLAY0("Testcase #2: check if GetPhase returns JVMTI_PHASE_START\n"); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPhase, jvmti, &phase))) + if (!NSK_JVMTI_VERIFY(jvmti->GetPhase(&phase))) nsk_jvmti_setFailStatus(); if (!NSK_VERIFY(phase == JVMTI_PHASE_START)) @@ -122,7 +122,7 @@ NativeMethodBind(jvmtiEnv* jvmti, JNIEnv *jni, /* testcase #3: check JVMTI_PHASE_LIVE */ NSK_DISPLAY0("Testcase #3: check if GetPhase returns JVMTI_PHASE_LIVE\n"); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPhase, jvmti, &phase))) + if (!NSK_JVMTI_VERIFY(jvmti->GetPhase(&phase))) nsk_jvmti_setFailStatus(); if (!NSK_VERIFY(phase == JVMTI_PHASE_LIVE)) @@ -132,14 +132,14 @@ NativeMethodBind(jvmtiEnv* jvmti, JNIEnv *jni, /* testcase #4: check JVMTI_PHASE_DEAD */ NSK_DISPLAY0("Testcase #4: check if GetPhase returns JVMTI_PHASE_DEAD\n"); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPhase, jvmti, &phase))) + if (!NSK_JVMTI_VERIFY(jvmti->GetPhase(&phase))) nsk_jvmti_setFailStatus(); if (!NSK_VERIFY(phase == JVMTI_PHASE_DEAD)) nsk_jvmti_setFailStatus(); } - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorExit, jvmti, access_lock))) + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorExit(access_lock))) nsk_jvmti_setFailStatus(); } @@ -154,7 +154,7 @@ ClassFileLoadHook(jvmtiEnv *jvmti, JNIEnv *jni, unsigned char** new_class_data) { jvmtiPhase phase; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorEnter, jvmti, access_lock))) + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorEnter(access_lock))) nsk_jvmti_setFailStatus(); NSK_DISPLAY1("ClassFileLoadHook: %s\n", name); @@ -163,7 +163,7 @@ ClassFileLoadHook(jvmtiEnv *jvmti, JNIEnv *jni, /* testcase #5: check JVMTI_PHASE_PRIMORDIAL */ NSK_DISPLAY0("Testcase #2: check if GetPhase returns JVMTI_PHASE_PRIMORDIAL\n"); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPhase, jvmti, &phase))) + if (!NSK_JVMTI_VERIFY(jvmti->GetPhase(&phase))) nsk_jvmti_setFailStatus(); if (!NSK_VERIFY(phase == JVMTI_PHASE_PRIMORDIAL)) @@ -173,7 +173,7 @@ ClassFileLoadHook(jvmtiEnv *jvmti, JNIEnv *jni, /* testcase #2: check JVMTI_PHASE_START */ NSK_DISPLAY0("Testcase #2: check if GetPhase returns JVMTI_PHASE_START\n"); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPhase, jvmti, &phase))) + if (!NSK_JVMTI_VERIFY(jvmti->GetPhase(&phase))) nsk_jvmti_setFailStatus(); if (!NSK_VERIFY(phase == JVMTI_PHASE_START)) @@ -183,7 +183,7 @@ ClassFileLoadHook(jvmtiEnv *jvmti, JNIEnv *jni, /* testcase #3: check JVMTI_PHASE_LIVE */ NSK_DISPLAY0("Testcase #3: check if GetPhase returns JVMTI_PHASE_LIVE\n"); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPhase, jvmti, &phase))) + if (!NSK_JVMTI_VERIFY(jvmti->GetPhase(&phase))) nsk_jvmti_setFailStatus(); if (!NSK_VERIFY(phase == JVMTI_PHASE_LIVE)) @@ -193,14 +193,14 @@ ClassFileLoadHook(jvmtiEnv *jvmti, JNIEnv *jni, /* testcase #4: check JVMTI_PHASE_DEAD */ NSK_DISPLAY0("Testcase #4: check if GetPhase returns JVMTI_PHASE_DEAD\n"); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPhase, jvmti, &phase))) + if (!NSK_JVMTI_VERIFY(jvmti->GetPhase(&phase))) nsk_jvmti_setFailStatus(); if (!NSK_VERIFY(phase == JVMTI_PHASE_DEAD)) nsk_jvmti_setFailStatus(); } - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorExit, jvmti, access_lock))) + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorExit(access_lock))) nsk_jvmti_setFailStatus(); } @@ -208,14 +208,14 @@ static void JNICALL VMDeath(jvmtiEnv *jvmti, JNIEnv* jni) { jvmtiPhase phase; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorEnter, jvmti, access_lock))) + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorEnter(access_lock))) nsk_jvmti_setFailStatus(); NSK_DISPLAY0("VMDeath\n"); /* testcase #3: check JVMTI_PHASE_LIVE */ NSK_DISPLAY0("Testcase #3: check if GetPhase returns JVMTI_PHASE_LIVE\n"); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPhase, jvmti, &phase))) + if (!NSK_JVMTI_VERIFY(jvmti->GetPhase(&phase))) nsk_jvmti_setFailStatus(); if (!NSK_VERIFY(phase == JVMTI_PHASE_LIVE)) @@ -223,7 +223,7 @@ VMDeath(jvmtiEnv *jvmti, JNIEnv* jni) { was_VMDeath = JNI_TRUE; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorExit, jvmti, access_lock))) + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorExit(access_lock))) nsk_jvmti_setFailStatus(); } @@ -242,7 +242,7 @@ agentProc(jvmtiEnv *jvmti, JNIEnv* jni, void* arg) { /* testcase #3: check JVMTI_PHASE_LIVE */ NSK_DISPLAY0("Testcase #3: check if GetPhase returns JVMTI_PHASE_LIVE\n"); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPhase, jvmti, &phase))) + if (!NSK_JVMTI_VERIFY(jvmti->GetPhase(&phase))) nsk_jvmti_setFailStatus(); if (!NSK_VERIFY(phase == JVMTI_PHASE_LIVE)) @@ -289,13 +289,12 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { /* Create data access lock */ if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(CreateRawMonitor, jvmti, - "_access_lock", &access_lock))) + jvmti->CreateRawMonitor("_access_lock", &access_lock))) return JNI_ERR; /* testcase #1: check JVMTI_PHASE_ONLOAD */ NSK_DISPLAY0("Testcase #1: check if GetPhase returns JVMTI_PHASE_ONLOAD\n"); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPhase, jvmti, &phase))) + if (!NSK_JVMTI_VERIFY(jvmti->GetPhase(&phase))) nsk_jvmti_setFailStatus(); if (!NSK_VERIFY(phase == JVMTI_PHASE_ONLOAD)) @@ -305,7 +304,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(caps)); caps.can_generate_all_class_hook_events = 1; caps.can_generate_native_method_bind_events = 1; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) return JNI_ERR; memset(&callbacks, 0, sizeof(callbacks)); @@ -315,38 +314,32 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { callbacks.NativeMethodBind = &NativeMethodBind; callbacks.ClassFileLoadHook = &ClassFileLoadHook; if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, - &callbacks, sizeof(callbacks)))) + jvmti->SetEventCallbacks(&callbacks, sizeof(callbacks)))) return JNI_ERR; /* enable VMStart event */ if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(SetEventNotificationMode, jvmti, JVMTI_ENABLE, - JVMTI_EVENT_VM_START, NULL))) + jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_VM_START, NULL))) return JNI_ERR; /* enable VMInit event */ if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(SetEventNotificationMode, jvmti, JVMTI_ENABLE, - JVMTI_EVENT_VM_INIT, NULL))) + jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_VM_INIT, NULL))) return JNI_ERR; /* enable NativeMethodBind event */ if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(SetEventNotificationMode, jvmti, JVMTI_ENABLE, - JVMTI_EVENT_NATIVE_METHOD_BIND, NULL))) + jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_NATIVE_METHOD_BIND, NULL))) return JNI_ERR; /* enable ClassFileLoadHook event */ if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(SetEventNotificationMode, jvmti, JVMTI_ENABLE, - JVMTI_EVENT_CLASS_FILE_LOAD_HOOK, NULL))) + jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_CLASS_FILE_LOAD_HOOK, NULL))) return JNI_ERR; /* enable VMDeath event */ if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(SetEventNotificationMode, jvmti, JVMTI_ENABLE, - JVMTI_EVENT_VM_DEATH, NULL))) + jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_VM_DEATH, NULL))) return JNI_ERR; /* register agent proc and arg */ @@ -373,7 +366,7 @@ Agent_OnUnload(JavaVM *jvm) /* testcase #4: check JVMTI_PHASE_DEAD */ NSK_DISPLAY0("Testcase #4: check if GetPhase returns JVMTI_PHASE_DEAD\n"); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPhase, jvmti, &phase))) + if (!NSK_JVMTI_VERIFY(jvmti->GetPhase(&phase))) exit(97); if (!NSK_VERIFY(phase == JVMTI_PHASE_DEAD)) diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetPhase/getphase002/getphase002.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetPhase/getphase002/getphase002.cpp index 9812b874d24..e1d03830f70 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetPhase/getphase002/getphase002.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetPhase/getphase002/getphase002.cpp @@ -47,7 +47,7 @@ agentProc(jvmtiEnv *jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY0("Check if GetPhase(NULL) returns JVMTI_ERROR_NULL_POINTER\n"); if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_NULL_POINTER, - NSK_CPP_STUB2(GetPhase, jvmti, NULL))) + jvmti->GetPhase(NULL))) nsk_jvmti_setFailStatus(); /* resume debugee after last sync */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetPotentialCapabilities/getpotcaps001/getpotcaps001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetPotentialCapabilities/getpotcaps001/getpotcaps001.cpp index ec2014da6fb..0e5d7159d27 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetPotentialCapabilities/getpotcaps001/getpotcaps001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetPotentialCapabilities/getpotcaps001/getpotcaps001.cpp @@ -130,7 +130,7 @@ static int checkCapabilities(jvmtiEnv* jvmti, const char where[]) { NSK_DISPLAY0("GetPotentialCapabilities() for current JVMTI env\n"); if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GetPotentialCapabilities, jvmti, &caps))) { + jvmti->GetPotentialCapabilities(&caps))) { return NSK_FALSE; } @@ -233,8 +233,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { eventCallbacks.VMInit = callbackVMInit; eventCallbacks.VMDeath = callbackVMDeath; if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, - &eventCallbacks, sizeof(eventCallbacks)))) { + jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks)))) { return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetSystemProperties/getsysprops001/getsysprops001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetSystemProperties/getsysprops001/getsysprops001.cpp index 5097087bd6e..ec770b75655 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetSystemProperties/getsysprops001/getsysprops001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetSystemProperties/getsysprops001/getsysprops001.cpp @@ -42,7 +42,7 @@ static int checkProperties(jvmtiEnv* jvmti, const char phase[]) { NSK_DISPLAY0("Invoke GetSystemProperties()\n"); if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetSystemProperties, jvmti, &count, &properties))) { + jvmti->GetSystemProperties(&count, &properties))) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -75,7 +75,7 @@ static int checkProperties(jvmtiEnv* jvmti, const char phase[]) { } NSK_DISPLAY0("Deallocate properties list\n"); if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)properties))) { + jvmti->Deallocate((unsigned char*)properties))) { return NSK_FALSE; } NSK_DISPLAY0(" ... deallocated\n"); diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetSystemProperties/getsysprops002/getsysprops002.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetSystemProperties/getsysprops002/getsysprops002.cpp index bdc12a3063a..acf1bee445e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetSystemProperties/getsysprops002/getsysprops002.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetSystemProperties/getsysprops002/getsysprops002.cpp @@ -56,7 +56,7 @@ static int checkProperties (jvmtiEnv* jvmti, const char phase[]) { NSK_DISPLAY0("Get system properties list\n"); if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetSystemProperties, jvmti, &count, &properties))) { + jvmti->GetSystemProperties(&count, &properties))) { return NSK_FALSE; } NSK_DISPLAY1(" ... got properties: %d\n", (int)count); @@ -108,7 +108,7 @@ static int checkProperties (jvmtiEnv* jvmti, const char phase[]) { NSK_DISPLAY0("Deallocate properties list\n"); if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)properties))) { + jvmti->Deallocate((unsigned char*)properties))) { return NSK_FALSE; } NSK_DISPLAY0(" ... deallocated\n"); diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetSystemProperty/getsysprop001/getsysprop001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetSystemProperty/getsysprop001/getsysprop001.cpp index 06cd87d2071..126712c66f8 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetSystemProperty/getsysprop001/getsysprop001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetSystemProperty/getsysprop001/getsysprop001.cpp @@ -42,7 +42,7 @@ static int checkProperties(jvmtiEnv* jvmti, const char phase[]) { NSK_DISPLAY0("Get system properties names\n"); if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetSystemProperties, jvmti, &count, &properties))) { + jvmti->GetSystemProperties(&count, &properties))) { return NSK_FALSE; } NSK_DISPLAY1(" ... got properties: %d\n", (int)count); @@ -65,7 +65,7 @@ static int checkProperties(jvmtiEnv* jvmti, const char phase[]) { } if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetSystemProperty, jvmti, properties[i], &value))) { + jvmti->GetSystemProperty(properties[i], &value))) { success = NSK_FALSE; continue; } @@ -81,7 +81,7 @@ static int checkProperties(jvmtiEnv* jvmti, const char phase[]) { } if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)value))) { + jvmti->Deallocate((unsigned char*)value))) { success = NSK_FALSE; } } @@ -90,7 +90,7 @@ static int checkProperties(jvmtiEnv* jvmti, const char phase[]) { NSK_DISPLAY0("Deallocate properties list\n"); if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)properties))) { + jvmti->Deallocate((unsigned char*)properties))) { success = NSK_FALSE; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetSystemProperty/getsysprop002/getsysprop002.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetSystemProperty/getsysprop002/getsysprop002.cpp index d25db73a4ba..7123214f201 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetSystemProperty/getsysprop002/getsysprop002.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetSystemProperty/getsysprop002/getsysprop002.cpp @@ -53,7 +53,7 @@ static int checkProperty(jvmtiEnv* jvmti, const char phase[], PropertyDesc* desc NSK_DISPLAY1("Get value of tested property: %s\n", desc->name); if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetSystemProperty, jvmti, desc->name, &value))) { + jvmti->GetSystemProperty(desc->name, &value))) { return NSK_FALSE; } NSK_DISPLAY1(" ... got value: \"%s\"\n", nsk_null_string(value)); @@ -73,7 +73,7 @@ static int checkProperty(jvmtiEnv* jvmti, const char phase[], PropertyDesc* desc } if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)value))) { + jvmti->Deallocate((unsigned char*)value))) { success = NSK_FALSE; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetTag/gettag001/gettag001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetTag/gettag001/gettag001.cpp index c03711cab02..801d210de35 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetTag/gettag001/gettag001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetTag/gettag001/gettag001.cpp @@ -61,7 +61,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY1("Find debugee class: %s\n", DEBUGEE_CLASS_NAME); if (!NSK_JNI_VERIFY(jni, (debugeeClass = - NSK_CPP_STUB2(FindClass, jni, DEBUGEE_CLASS_NAME)) != NULL)) { + jni->FindClass(DEBUGEE_CLASS_NAME)) != NULL)) { nsk_jvmti_setFailStatus(); return; } @@ -69,8 +69,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY1("Find static field: %s\n", OBJECT_FIELD_NAME); if (!NSK_JNI_VERIFY(jni, (objectField = - NSK_CPP_STUB4(GetStaticFieldID, jni, debugeeClass, - OBJECT_FIELD_NAME, OBJECT_CLASS_SIG)) != NULL)) { + jni->GetStaticFieldID(debugeeClass, OBJECT_FIELD_NAME, OBJECT_CLASS_SIG)) != NULL)) { nsk_jvmti_setFailStatus(); return; } @@ -78,8 +77,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY1("Get object from static field: %s\n", OBJECT_FIELD_NAME); if (!NSK_JNI_VERIFY(jni, (testedObject = - NSK_CPP_STUB3(GetStaticObjectField, jni, debugeeClass, - objectField)) != NULL)) { + jni->GetStaticObjectField(debugeeClass, objectField)) != NULL)) { nsk_jvmti_setFailStatus(); return; } @@ -87,7 +85,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY1("Create global reference for object: 0x%p\n", (void*)testedObject); if (!NSK_JNI_VERIFY(jni, (testedObject = - NSK_CPP_STUB2(NewGlobalRef, jni, testedObject)) != NULL)) { + jni->NewGlobalRef(testedObject)) != NULL)) { nsk_jvmti_setFailStatus(); return; } @@ -100,7 +98,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY1("Get tag for object: 0x%p\n", (void*)testedObject); if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetTag, jvmti, testedObject, &objectTag))) { + jvmti->GetTag(testedObject, &objectTag))) { nsk_jvmti_setFailStatus(); return; } @@ -120,7 +118,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY0(">>> Clean used data\n"); { NSK_DISPLAY1("Delete object reference: 0x%p\n", (void*)testedObject); - NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, testedObject)); + NSK_TRACE(jni->DeleteGlobalRef(testedObject)); } } @@ -164,7 +162,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(caps)); caps.can_tag_objects = 1; if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + jvmti->AddCapabilities(&caps))) { return JNI_ERR; } } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetThreadCpuTime/thrcputime001/thrcputime001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetThreadCpuTime/thrcputime001/thrcputime001.cpp index 81603c51ae7..4effa902072 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetThreadCpuTime/thrcputime001/thrcputime001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetThreadCpuTime/thrcputime001/thrcputime001.cpp @@ -71,7 +71,7 @@ static int checkCpuTime(jvmtiEnv* jvmti, jthread thread, julong* time, NSK_DISPLAY1("GetThreadCpuTime() for current thread (passing NULL): 0x%p\n", (void*)thread); if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetThreadCpuTime, jvmti, NULL, (jlong *)time))) { + jvmti->GetThreadCpuTime(NULL, (jlong *)time))) { return NSK_FALSE; } NSK_DISPLAY1(" ... got cpu time: %s\n", julong_to_string(*time, buf)); @@ -261,7 +261,7 @@ callbackThreadStart(jvmtiEnv* jvmti, JNIEnv* jni, jthread thread) { jvmtiThreadInfo threadInfo; { if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetThreadInfo, jvmti, thread, &threadInfo))) { + jvmti->GetThreadInfo(thread, &threadInfo))) { nsk_jvmti_setFailStatus(); return; } @@ -285,7 +285,7 @@ callbackThreadEnd(jvmtiEnv* jvmti, JNIEnv* jni, jthread thread) { jvmtiThreadInfo threadInfo; { if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetThreadInfo, jvmti, thread, &threadInfo))) { + jvmti->GetThreadInfo(thread, &threadInfo))) { nsk_jvmti_setFailStatus(); return; } @@ -338,7 +338,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(caps)); caps.can_get_thread_cpu_time = 1; if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + jvmti->AddCapabilities(&caps))) { return JNI_ERR; } } @@ -354,8 +354,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { eventCallbacks.ThreadStart = callbackThreadStart; eventCallbacks.ThreadEnd = callbackThreadEnd; if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, - &eventCallbacks, sizeof(eventCallbacks)))) { + jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks)))) { return JNI_ERR; } } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetThreadCpuTime/thrcputime002/thrcputime002.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetThreadCpuTime/thrcputime002/thrcputime002.cpp index 3c98719caa5..2782c060621 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetThreadCpuTime/thrcputime002/thrcputime002.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetThreadCpuTime/thrcputime002/thrcputime002.cpp @@ -73,8 +73,7 @@ static int checkCpuTime(jvmtiEnv* jvmti, jthread thread, julong* time, int success = NSK_TRUE; NSK_DISPLAY1("GetThreadCpuTime() for thread: 0x%p\n", (void*)thread); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetThreadCpuTime, jvmti, thread, (jlong *)time))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetThreadCpuTime(thread, (jlong *)time))) { return NSK_FALSE; } NSK_DISPLAY1(" ... got cpu time: %s\n", julong_to_string(*time, buf)); @@ -265,8 +264,7 @@ callbackThreadStart(jvmtiEnv* jvmti, JNIEnv* jni, jthread thread) { jvmtiThreadInfo threadInfo; { - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetThreadInfo, jvmti, thread, &threadInfo))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(thread, &threadInfo))) { nsk_jvmti_setFailStatus(); return; } @@ -282,8 +280,7 @@ callbackThreadStart(jvmtiEnv* jvmti, JNIEnv* jni, jthread thread) { } if (threadInfo.name != NULL && strcmp(threadInfo.name, TESTED_THREAD_NAME) == 0) { - if (!NSK_JNI_VERIFY(jni, (testedThread = - NSK_CPP_STUB2(NewGlobalRef, jni, thread)) != NULL)) { + if (!NSK_JNI_VERIFY(jni, (testedThread = jni->NewGlobalRef(thread)) != NULL)) { nsk_jvmti_setFailStatus(); } @@ -302,8 +299,7 @@ callbackThreadEnd(jvmtiEnv* jvmti, JNIEnv* jni, jthread thread) { jvmtiThreadInfo threadInfo; { - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetThreadInfo, jvmti, thread, &threadInfo))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(thread, &threadInfo))) { nsk_jvmti_setFailStatus(); return; } @@ -324,7 +320,7 @@ callbackThreadEnd(jvmtiEnv* jvmti, JNIEnv* jni, jthread thread) { if (!checkCpuTime(jvmti, thread, &time, &prevTestedThreadTime, "THREAD_END callback")) { nsk_jvmti_setFailStatus(); } - NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, testedThread)); + NSK_TRACE(jni->DeleteGlobalRef(testedThread)); testedThread = NULL; } } @@ -365,8 +361,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(caps)); caps.can_get_thread_cpu_time = 1; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) { return JNI_ERR; } } @@ -381,9 +376,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { eventCallbacks.VMDeath = callbackVMDeath; eventCallbacks.ThreadStart = callbackThreadStart; eventCallbacks.ThreadEnd = callbackThreadEnd; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, - &eventCallbacks, sizeof(eventCallbacks)))) { + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks)))) { return JNI_ERR; } } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetThreadCpuTimerInfo/thrtimerinfo001/thrtimerinfo001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetThreadCpuTimerInfo/thrtimerinfo001/thrtimerinfo001.cpp index 1eb594217e5..81bfb416b58 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetThreadCpuTimerInfo/thrtimerinfo001/thrtimerinfo001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetThreadCpuTimerInfo/thrtimerinfo001/thrtimerinfo001.cpp @@ -66,7 +66,7 @@ static int checkTimerInfo(jvmtiEnv* jvmti, jvmtiTimerInfo* info, NSK_DISPLAY0("GetThreadCpuTimerInfo() for current JVMTI env\n"); if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GetThreadCpuTimerInfo, jvmti, info))) { + jvmti->GetThreadCpuTimerInfo(info))) { return NSK_FALSE; } NSK_DISPLAY0("Got timer info:\n"); @@ -260,7 +260,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(caps)); caps.can_get_thread_cpu_time = 1; if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + jvmti->AddCapabilities(&caps))) { return JNI_ERR; } } @@ -276,8 +276,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { eventCallbacks.ThreadStart = callbackThreadStart; eventCallbacks.ThreadEnd = callbackThreadEnd; if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, - &eventCallbacks, sizeof(eventCallbacks)))) { + jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks)))) { return JNI_ERR; } } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetThreadGroupChildren/getthrdgrpchld001/getthrdgrpchld001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetThreadGroupChildren/getthrdgrpchld001/getthrdgrpchld001.cpp index 364f9b53158..c7d89289d0c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetThreadGroupChildren/getthrdgrpchld001/getthrdgrpchld001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetThreadGroupChildren/getthrdgrpchld001/getthrdgrpchld001.cpp @@ -81,7 +81,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY0("Get top level thread groups\n"); if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetTopThreadGroups, jvmti, &topGroupsCount, &topGroups))) { + jvmti->GetTopThreadGroups(&topGroupsCount, &topGroups))) { nsk_jvmti_setFailStatus(); return; } @@ -110,8 +110,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY1("Get children of root thread group: %p\n", (void*)rootGroup); if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB6(GetThreadGroupChildren, jvmti, rootGroup, - &threadsCount, &threads, &groupsCount, &groups))) { + jvmti->GetThreadGroupChildren(rootGroup, &threadsCount, &threads, &groupsCount, &groups))) { nsk_jvmti_setFailStatus(); return; } @@ -142,7 +141,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { jvmtiThreadGroupInfo info; if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetThreadGroupInfo, jvmti, groups[i], &info))) { + jvmti->GetThreadGroupInfo(groups[i], &info))) { nsk_jvmti_setFailStatus(); continue; } @@ -221,11 +220,11 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { /* deallocate arrays */ if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)groups))) { + jvmti->Deallocate((unsigned char*)groups))) { nsk_jvmti_setFailStatus(); } if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads))) { + jvmti->Deallocate((unsigned char*)threads))) { nsk_jvmti_setFailStatus(); } } @@ -258,8 +257,7 @@ static int checkThreadGroup(jvmtiEnv* jvmti, JNIEnv* jni, jthreadGroup* groups = NULL; if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB6(GetThreadGroupChildren, jvmti, group, - &threadsCount, &threads, &groupsCount, &groups))) { + jvmti->GetThreadGroupChildren(group, &threadsCount, &threads, &groupsCount, &groups))) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -290,7 +288,7 @@ static int checkThreadGroup(jvmtiEnv* jvmti, JNIEnv* jni, jvmtiThreadInfo info; if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info))) { + jvmti->GetThreadInfo(threads[i], &info))) { nsk_jvmti_setFailStatus(); continue; } @@ -314,11 +312,11 @@ static int checkThreadGroup(jvmtiEnv* jvmti, JNIEnv* jni, /* deallocate arrays */ if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)groups))) { + jvmti->Deallocate((unsigned char*)groups))) { nsk_jvmti_setFailStatus(); } if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads))) { + jvmti->Deallocate((unsigned char*)threads))) { nsk_jvmti_setFailStatus(); } } @@ -339,8 +337,7 @@ static jthreadGroup findThreadGroupByName(jvmtiEnv* jvmti, JNIEnv* jni, const ch jthreadGroup * groups = NULL; if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB6(GetThreadGroupChildren, jvmti, groupsList[i], - &threadsCount, &threads, &groupsCount, &groups))) { + jvmti->GetThreadGroupChildren(groupsList[i], &threadsCount, &threads, &groupsCount, &groups))) { nsk_jvmti_setFailStatus(); return NULL; } @@ -357,7 +354,7 @@ static jthreadGroup findThreadGroupByName(jvmtiEnv* jvmti, JNIEnv* jni, const ch if (groups[i] != NULL) { if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetThreadGroupInfo, jvmti, groups[i], &info))) { + jvmti->GetThreadGroupInfo(groups[i], &info))) { nsk_jvmti_setFailStatus(); continue; } @@ -376,11 +373,11 @@ static jthreadGroup findThreadGroupByName(jvmtiEnv* jvmti, JNIEnv* jni, const ch /* deallocate arrays */ if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)groups))) { + jvmti->Deallocate((unsigned char*)groups))) { nsk_jvmti_setFailStatus(); } if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads))) { + jvmti->Deallocate((unsigned char*)threads))) { nsk_jvmti_setFailStatus(); } } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetThreadLocalStorage/getthrdstor001/getthrdstor001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetThreadLocalStorage/getthrdstor001/getthrdstor001.cpp index 34d8badd412..a37007735d0 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetThreadLocalStorage/getthrdstor001/getthrdstor001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetThreadLocalStorage/getthrdstor001/getthrdstor001.cpp @@ -59,7 +59,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY1("GetThreadLocalStorage() for tested thread: %p\n", (void*)testedThread); if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetThreadLocalStorage, jvmti, testedThread, &storage))) { + jvmti->GetThreadLocalStorage(testedThread, &storage))) { nsk_jvmti_setFailStatus(); return; } @@ -76,7 +76,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY0("GetThreadLocalStorage() for current agent thread\n"); if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetThreadLocalStorage, jvmti, NULL, &storage))) { + jvmti->GetThreadLocalStorage(NULL, &storage))) { nsk_jvmti_setFailStatus(); return; } @@ -91,7 +91,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { } NSK_DISPLAY0("Delete thread reference\n"); - NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, testedThread)); + NSK_TRACE(jni->DeleteGlobalRef(testedThread)); } NSK_DISPLAY0("Let debugee to finish\n"); diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetTime/gettime001/gettime001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetTime/gettime001/gettime001.cpp index d41dbe2ad6b..e6bea8bef89 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetTime/gettime001/gettime001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetTime/gettime001/gettime001.cpp @@ -59,7 +59,7 @@ static int checkTime(jvmtiEnv* jvmti, julong* time, NSK_DISPLAY0("GetTime() for current JVMTI env\n"); if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GetTime, jvmti, (jlong *)time))) { + jvmti->GetTime((jlong *)time))) { return NSK_FALSE; } NSK_DISPLAY1(" ... got time: %s\n", julong_to_string(*time, buf)); @@ -186,8 +186,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { eventCallbacks.VMInit = callbackVMInit; eventCallbacks.VMDeath = callbackVMDeath; if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, - &eventCallbacks, sizeof(eventCallbacks)))) { + jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks)))) { return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetTimerInfo/timerinfo001/timerinfo001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetTimerInfo/timerinfo001/timerinfo001.cpp index 4584b4f922f..670a526e7a7 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetTimerInfo/timerinfo001/timerinfo001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetTimerInfo/timerinfo001/timerinfo001.cpp @@ -59,7 +59,7 @@ static int checkTimerInfo(jvmtiEnv* jvmti, jvmtiTimerInfo* info, NSK_DISPLAY0("GetTimerInfo() for current JVMTI env\n"); if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GetTimerInfo, jvmti, info))) { + jvmti->GetTimerInfo(info))) { return NSK_FALSE; } NSK_DISPLAY0("Got timer info:\n"); @@ -203,8 +203,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { eventCallbacks.VMInit = callbackVMInit; eventCallbacks.VMDeath = callbackVMDeath; if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, - &eventCallbacks, sizeof(eventCallbacks)))) { + jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks)))) { return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/InterruptThread/intrpthrd001/intrpthrd001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/InterruptThread/intrpthrd001/intrpthrd001.cpp index bb147cec424..2bdfea11a6f 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/InterruptThread/intrpthrd001/intrpthrd001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/InterruptThread/intrpthrd001/intrpthrd001.cpp @@ -57,7 +57,7 @@ static int prepare(jvmtiEnv* jvmti) { /* get all live threads */ if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads))) + jvmti->GetAllThreads(&threads_count, &threads))) return NSK_FALSE; if (!NSK_VERIFY(threads_count > 0 && threads != NULL)) @@ -70,7 +70,7 @@ static int prepare(jvmtiEnv* jvmti) { /* get thread information */ if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info))) + jvmti->GetThreadInfo(threads[i], &info))) return NSK_FALSE; NSK_DISPLAY3(" thread #%d (%s): %p\n", i, info.name, threads[i]); @@ -89,7 +89,7 @@ static int prepare(jvmtiEnv* jvmti) { /* deallocate threads list */ if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads))) + jvmti->Deallocate((unsigned char*)threads))) return NSK_FALSE; return NSK_TRUE; @@ -112,8 +112,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { if (!NSK_VERIFY(runningThread != NULL)) { nsk_jvmti_setFailStatus(); } else { - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(InterruptThread, - jvmti, runningThread))) + if (!NSK_JVMTI_VERIFY(jvmti->InterruptThread(runningThread))) nsk_jvmti_setFailStatus(); } @@ -121,8 +120,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { if (!NSK_VERIFY(waitingThread != NULL)) { nsk_jvmti_setFailStatus(); } else { - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(InterruptThread, - jvmti, waitingThread))) + if (!NSK_JVMTI_VERIFY(jvmti->InterruptThread(waitingThread))) nsk_jvmti_setFailStatus(); } @@ -130,8 +128,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { if (!NSK_VERIFY(sleepingThread != NULL)) { nsk_jvmti_setFailStatus(); } else { - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(InterruptThread, - jvmti, sleepingThread))) + if (!NSK_JVMTI_VERIFY(jvmti->InterruptThread(sleepingThread))) nsk_jvmti_setFailStatus(); } @@ -173,7 +170,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(caps)); caps.can_signal_thread = 1; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) { return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IsMethodObsolete/isobsolete001/isobsolete001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IsMethodObsolete/isobsolete001/isobsolete001.cpp index 1eca2ee30f7..399d894f9b4 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IsMethodObsolete/isobsolete001/isobsolete001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IsMethodObsolete/isobsolete001/isobsolete001.cpp @@ -60,7 +60,7 @@ static void checkMethodObsolete(jvmtiEnv* jvmti, jmethodID method, const char na NSK_DISPLAY3("Call IsObsolete() for %s method: %p (%s)\n", kind, (void*)method, name); if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(IsMethodObsolete, jvmti, method, &obsolete))) { + jvmti->IsMethodObsolete(method, &obsolete))) { nsk_jvmti_setFailStatus(); } NSK_DISPLAY1(" ... got obsolete: %d\n", (int)obsolete); @@ -83,8 +83,7 @@ static void checkStackMethodsObsolete(jvmtiEnv* jvmti, jthread thread, NSK_DISPLAY1("Get stack frames for thread: %p\n", (void*)thread); if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB6(GetStackTrace, jvmti, thread, 0, MAX_STACK_DEPTH, - frameStack, &frameCount))) { + jvmti->GetStackTrace(thread, 0, MAX_STACK_DEPTH, frameStack, &frameCount))) { nsk_jvmti_setFailStatus(); return; } @@ -104,8 +103,7 @@ static void checkStackMethodsObsolete(jvmtiEnv* jvmti, jthread thread, NSK_DISPLAY1(" frame #%i:\n", i); NSK_DISPLAY1(" methodID: %p\n", (void*)frameStack[i].method); if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB5(GetMethodName, jvmti, frameStack[i].method, - &name, &signature, &generic))) { + jvmti->GetMethodName(frameStack[i].method, &name, &signature, &generic))) { nsk_jvmti_setFailStatus(); continue; } @@ -122,15 +120,15 @@ static void checkStackMethodsObsolete(jvmtiEnv* jvmti, jthread thread, } if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)name))) { + jvmti->Deallocate((unsigned char*)name))) { nsk_jvmti_setFailStatus(); } if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)signature))) { + jvmti->Deallocate((unsigned char*)signature))) { nsk_jvmti_setFailStatus(); } if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)generic))) { + jvmti->Deallocate((unsigned char*)generic))) { nsk_jvmti_setFailStatus(); } } @@ -156,7 +154,7 @@ static int redefineClass(jvmtiEnv* jvmti, jclass klass, const char className[], NSK_DISPLAY1("Redefine class: %s\n", className); if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(RedefineClasses, jvmti, 1, &classDef))) { + jvmti->RedefineClasses(1, &classDef))) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -176,7 +174,7 @@ static int getClassfileBytes(JNIEnv* jni, jvmtiEnv* jvmti, NSK_DISPLAY1("Find debugee class: %s\n", DEBUGEE_CLASS_NAME); if (!NSK_JNI_VERIFY(jni, (debugeeClass = - NSK_CPP_STUB2(FindClass, jni, DEBUGEE_CLASS_NAME)) != NULL)) { + jni->FindClass(DEBUGEE_CLASS_NAME)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -184,8 +182,7 @@ static int getClassfileBytes(JNIEnv* jni, jvmtiEnv* jvmti, NSK_DISPLAY1("Find static field: %s\n", CLASSFILE_FIELD_NAME); if (!NSK_JNI_VERIFY(jni, (fieldID = - NSK_CPP_STUB4(GetStaticFieldID, jni, debugeeClass, - CLASSFILE_FIELD_NAME, CLASSFILE_FIELD_SIG)) != NULL)) { + jni->GetStaticFieldID(debugeeClass, CLASSFILE_FIELD_NAME, CLASSFILE_FIELD_SIG)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -193,15 +190,14 @@ static int getClassfileBytes(JNIEnv* jni, jvmtiEnv* jvmti, NSK_DISPLAY1("Get classfile bytes array from static field: %s\n", CLASSFILE_FIELD_NAME); if (!NSK_JNI_VERIFY(jni, (array = (jbyteArray) - NSK_CPP_STUB3(GetStaticObjectField, jni, debugeeClass, - fieldID)) != NULL)) { + jni->GetStaticObjectField(debugeeClass, fieldID)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } NSK_DISPLAY1(" ... got array object: %p\n", (void*)array); if (!NSK_JNI_VERIFY(jni, (*size = - NSK_CPP_STUB2(GetArrayLength, jni, array)) > 0)) { + jni->GetArrayLength(array)) > 0)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -210,8 +206,7 @@ static int getClassfileBytes(JNIEnv* jni, jvmtiEnv* jvmti, { jboolean isCopy; if (!NSK_JNI_VERIFY(jni, (elements = - NSK_CPP_STUB3(GetByteArrayElements, jni, array, - &isCopy)) != NULL)) { + jni->GetByteArrayElements(array, &isCopy)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -219,7 +214,7 @@ static int getClassfileBytes(JNIEnv* jni, jvmtiEnv* jvmti, NSK_DISPLAY1(" ... got elements list: %p\n", (void*)elements); if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(Allocate, jvmti, *size, bytes))) { + jvmti->Allocate(*size, bytes))) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -231,7 +226,7 @@ static int getClassfileBytes(JNIEnv* jni, jvmtiEnv* jvmti, NSK_DISPLAY1(" ... copied bytecode: %d bytes\n", (int)*size); NSK_DISPLAY1("Release elements list: %p\n", (void*)elements); - NSK_TRACE(NSK_CPP_STUB4(ReleaseByteArrayElements, jni, array, elements, JNI_ABORT)); + NSK_TRACE(jni->ReleaseByteArrayElements(array, elements, JNI_ABORT)); NSK_DISPLAY0(" ... released\n"); return NSK_TRUE; @@ -264,7 +259,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { { NSK_DISPLAY1("Find tested class: %s\n", TESTED_CLASS_NAME); if (!NSK_JNI_VERIFY(jni, (testedClass = - NSK_CPP_STUB2(FindClass, jni, TESTED_CLASS_NAME)) != NULL)) { + jni->FindClass(TESTED_CLASS_NAME)) != NULL)) { nsk_jvmti_setFailStatus(); return; } @@ -272,7 +267,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY1("Make global reference for class object: %p\n", (void*)testedClass); if (!NSK_JNI_VERIFY(jni, (testedClass = (jclass) - NSK_CPP_STUB2(NewGlobalRef, jni, testedClass)) != NULL)) { + jni->NewGlobalRef(testedClass)) != NULL)) { nsk_jvmti_setFailStatus(); return; } @@ -280,8 +275,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY1("Get static methodID: %s\n", STATIC_METHOD_NAME); if (!NSK_JNI_VERIFY(jni, (staticMethodID = - NSK_CPP_STUB4(GetStaticMethodID, jni, testedClass, - STATIC_METHOD_NAME, STATIC_METHOD_SIG)) != NULL)) { + jni->GetStaticMethodID(testedClass, STATIC_METHOD_NAME, STATIC_METHOD_SIG)) != NULL)) { nsk_jvmti_setFailStatus(); return; } @@ -289,8 +283,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY1("Get instance methodID: %s\n", INSTANCE_METHOD_NAME); if (!NSK_JNI_VERIFY(jni, (instanceMethodID = - NSK_CPP_STUB4(GetMethodID, jni, testedClass, - INSTANCE_METHOD_NAME, INSTANCE_METHOD_SIG)) != NULL)) { + jni->GetMethodID(testedClass, INSTANCE_METHOD_NAME, INSTANCE_METHOD_SIG)) != NULL)) { nsk_jvmti_setFailStatus(); return; } @@ -342,15 +335,15 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { { NSK_DISPLAY1("Deallocate classfile bytes array: %p\n", (void*)classfileBytes); if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, classfileBytes))) { + jvmti->Deallocate(classfileBytes))) { nsk_jvmti_setFailStatus(); } NSK_DISPLAY1("Delete global eference to thread: %p\n", (void*)testedThread); - NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, testedThread)); + NSK_TRACE(jni->DeleteGlobalRef(testedThread)); NSK_DISPLAY1("Delete global reference to class: %p\n", (void*)testedClass); - NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, testedClass)); + NSK_TRACE(jni->DeleteGlobalRef(testedClass)); } } @@ -394,7 +387,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(caps)); caps.can_redefine_classes = 1; if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + jvmti->AddCapabilities(&caps))) { return JNI_ERR; } } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverHeap/iterheap001/iterheap001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverHeap/iterheap001/iterheap001.cpp index 2ae98736fe6..3d54b28b6c8 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverHeap/iterheap001/iterheap001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverHeap/iterheap001/iterheap001.cpp @@ -92,14 +92,14 @@ static int getChainObjects(jvmtiEnv* jvmti, JNIEnv* jni, jobject firstObject, tag++; if (!NSK_JNI_VERIFY(jni, (obj = - NSK_CPP_STUB3(GetObjectField, jni, firstObject, firstField)) != NULL)) { + jni->GetObjectField(firstObject, firstField)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } objectDescList[count].tag = objTag; if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetTag, jvmti, obj, objTag))) { + jvmti->SetTag(obj, objTag))) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -111,7 +111,7 @@ static int getChainObjects(jvmtiEnv* jvmti, JNIEnv* jni, jobject firstObject, return NSK_FALSE; } - NSK_TRACE(NSK_CPP_STUB2(DeleteLocalRef, jni, obj)); + NSK_TRACE(jni->DeleteLocalRef(obj)); return success; } @@ -134,9 +134,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, *objectsCount = 2 * chainLength; NSK_DISPLAY1("Allocate memory for objects list: %d objects\n", *objectsCount); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(Allocate, jvmti, (*objectsCount * sizeof(ObjectDesc)), - (unsigned char**)objectDescList))) { + if (!NSK_JVMTI_VERIFY(jvmti->Allocate((*objectsCount * sizeof(ObjectDesc)), (unsigned char**)objectDescList))) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -153,7 +151,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, NSK_DISPLAY1("Find debugee class: %s\n", DEBUGEE_CLASS_NAME); if (!NSK_JNI_VERIFY(jni, (debugeeClass = - NSK_CPP_STUB2(FindClass, jni, DEBUGEE_CLASS_NAME)) != NULL)) { + jni->FindClass(DEBUGEE_CLASS_NAME)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -161,7 +159,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, NSK_DISPLAY1("Find root object class: %s\n", ROOT_OBJECT_CLASS_NAME); if (!NSK_JNI_VERIFY(jni, (rootObjectClass = - NSK_CPP_STUB2(FindClass, jni, ROOT_OBJECT_CLASS_NAME)) != NULL)) { + jni->FindClass(ROOT_OBJECT_CLASS_NAME)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -169,7 +167,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, NSK_DISPLAY1("Find chain object class: %s\n", CHAIN_OBJECT_CLASS_NAME); if (!NSK_JNI_VERIFY(jni, (chainObjectClass = - NSK_CPP_STUB2(FindClass, jni, CHAIN_OBJECT_CLASS_NAME)) != NULL)) { + jni->FindClass(CHAIN_OBJECT_CLASS_NAME)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -177,8 +175,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, NSK_DISPLAY1("Find static field in debugee class: %s\n", OBJECT_FIELD_NAME); if (!NSK_JNI_VERIFY(jni, (objectField = - NSK_CPP_STUB4(GetStaticFieldID, jni, debugeeClass, - OBJECT_FIELD_NAME, ROOT_OBJECT_CLASS_SIG)) != NULL)) { + jni->GetStaticFieldID(debugeeClass, OBJECT_FIELD_NAME, ROOT_OBJECT_CLASS_SIG)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -186,8 +183,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, NSK_DISPLAY1("Find instance field in root object class: %s\n", REACHABLE_CHAIN_FIELD_NAME); if (!NSK_JNI_VERIFY(jni, (reachableChainField = - NSK_CPP_STUB4(GetFieldID, jni, rootObjectClass, - REACHABLE_CHAIN_FIELD_NAME, CHAIN_OBJECT_CLASS_SIG)) != NULL)) { + jni->GetFieldID(rootObjectClass, REACHABLE_CHAIN_FIELD_NAME, CHAIN_OBJECT_CLASS_SIG)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -195,8 +191,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, NSK_DISPLAY1("Find instance field in root object class: %s\n", UNREACHABLE_CHAIN_FIELD_NAME); if (!NSK_JNI_VERIFY(jni, (unreachableChainField = - NSK_CPP_STUB4(GetFieldID, jni, rootObjectClass, - UNREACHABLE_CHAIN_FIELD_NAME, CHAIN_OBJECT_CLASS_SIG)) != NULL)) { + jni->GetFieldID(rootObjectClass, UNREACHABLE_CHAIN_FIELD_NAME, CHAIN_OBJECT_CLASS_SIG)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -204,8 +199,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, NSK_DISPLAY1("Find instance field in chain object class: %s\n", TAIL_FIELD_NAME); if (!NSK_JNI_VERIFY(jni, (tailField = - NSK_CPP_STUB4(GetFieldID, jni, chainObjectClass, - TAIL_FIELD_NAME, CHAIN_OBJECT_CLASS_SIG)) != NULL)) { + jni->GetFieldID(chainObjectClass, TAIL_FIELD_NAME, CHAIN_OBJECT_CLASS_SIG)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -213,8 +207,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, NSK_DISPLAY1("Get root object from static field: %s\n", OBJECT_FIELD_NAME); if (!NSK_JNI_VERIFY(jni, (rootObject = - NSK_CPP_STUB3(GetStaticObjectField, jni, debugeeClass, - objectField)) != NULL)) { + jni->GetStaticObjectField(debugeeClass, objectField)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -312,7 +305,7 @@ static int releaseTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, if (objectDescList != NULL) { NSK_DISPLAY1("Deallocate objects list: 0x%p\n", (void*)objectDescList); if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)objectDescList))) { + jvmti->Deallocate((unsigned char*)objectDescList))) { nsk_jvmti_setFailStatus(); } } @@ -430,9 +423,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY0(">>> Iterate over all object in heap with filter JVMTI_HEAP_OBJECT_EITHER\n"); { if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(IterateOverHeap, jvmti, - JVMTI_HEAP_OBJECT_EITHER, heapObjectCallback, - &fakeUserData))) { + jvmti->IterateOverHeap(JVMTI_HEAP_OBJECT_EITHER, heapObjectCallback, &fakeUserData))) { nsk_jvmti_setFailStatus(); return; } @@ -542,7 +533,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { caps.can_tag_objects = 1; caps.can_generate_object_free_events = 1; if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + jvmti->AddCapabilities(&caps))) { return JNI_ERR; } } @@ -552,8 +543,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&eventCallbacks, 0, sizeof(eventCallbacks)); eventCallbacks.ObjectFree = callbackObjectFree; if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, - &eventCallbacks, sizeof(eventCallbacks)))) + jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks)))) return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverHeap/iterheap002/iterheap002.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverHeap/iterheap002/iterheap002.cpp index c398e214ef2..9d4171ef71c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverHeap/iterheap002/iterheap002.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverHeap/iterheap002/iterheap002.cpp @@ -92,14 +92,14 @@ static int getChainObjects(jvmtiEnv* jvmti, JNIEnv* jni, jobject firstObject, tag++; if (!NSK_JNI_VERIFY(jni, (obj = - NSK_CPP_STUB3(GetObjectField, jni, firstObject, firstField)) != NULL)) { + jni->GetObjectField(firstObject, firstField)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } objectDescList[count].tag = objTag; if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetTag, jvmti, obj, objTag))) { + jvmti->SetTag(obj, objTag))) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -111,7 +111,7 @@ static int getChainObjects(jvmtiEnv* jvmti, JNIEnv* jni, jobject firstObject, return NSK_FALSE; } - NSK_TRACE(NSK_CPP_STUB2(DeleteLocalRef, jni, obj)); + NSK_TRACE(jni->DeleteLocalRef(obj)); return success; } @@ -134,9 +134,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, *objectsCount = 2 * chainLength; NSK_DISPLAY1("Allocate memory for objects list: %d objects\n", *objectsCount); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(Allocate, jvmti, (*objectsCount * sizeof(ObjectDesc)), - (unsigned char**)objectDescList))) { + if (!NSK_JVMTI_VERIFY(jvmti->Allocate((*objectsCount * sizeof(ObjectDesc)), (unsigned char**)objectDescList))) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -153,7 +151,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, NSK_DISPLAY1("Find debugee class: %s\n", DEBUGEE_CLASS_NAME); if (!NSK_JNI_VERIFY(jni, (debugeeClass = - NSK_CPP_STUB2(FindClass, jni, DEBUGEE_CLASS_NAME)) != NULL)) { + jni->FindClass(DEBUGEE_CLASS_NAME)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -161,7 +159,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, NSK_DISPLAY1("Find root object class: %s\n", ROOT_OBJECT_CLASS_NAME); if (!NSK_JNI_VERIFY(jni, (rootObjectClass = - NSK_CPP_STUB2(FindClass, jni, ROOT_OBJECT_CLASS_NAME)) != NULL)) { + jni->FindClass(ROOT_OBJECT_CLASS_NAME)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -169,7 +167,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, NSK_DISPLAY1("Find chain object class: %s\n", CHAIN_OBJECT_CLASS_NAME); if (!NSK_JNI_VERIFY(jni, (chainObjectClass = - NSK_CPP_STUB2(FindClass, jni, CHAIN_OBJECT_CLASS_NAME)) != NULL)) { + jni->FindClass(CHAIN_OBJECT_CLASS_NAME)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -177,8 +175,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, NSK_DISPLAY1("Find static field in debugee class: %s\n", OBJECT_FIELD_NAME); if (!NSK_JNI_VERIFY(jni, (objectField = - NSK_CPP_STUB4(GetStaticFieldID, jni, debugeeClass, - OBJECT_FIELD_NAME, ROOT_OBJECT_CLASS_SIG)) != NULL)) { + jni->GetStaticFieldID(debugeeClass, OBJECT_FIELD_NAME, ROOT_OBJECT_CLASS_SIG)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -186,8 +183,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, NSK_DISPLAY1("Find instance field in root object class: %s\n", REACHABLE_CHAIN_FIELD_NAME); if (!NSK_JNI_VERIFY(jni, (reachableChainField = - NSK_CPP_STUB4(GetFieldID, jni, rootObjectClass, - REACHABLE_CHAIN_FIELD_NAME, CHAIN_OBJECT_CLASS_SIG)) != NULL)) { + jni->GetFieldID(rootObjectClass, REACHABLE_CHAIN_FIELD_NAME, CHAIN_OBJECT_CLASS_SIG)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -195,8 +191,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, NSK_DISPLAY1("Find instance field in root object class: %s\n", UNREACHABLE_CHAIN_FIELD_NAME); if (!NSK_JNI_VERIFY(jni, (unreachableChainField = - NSK_CPP_STUB4(GetFieldID, jni, rootObjectClass, - UNREACHABLE_CHAIN_FIELD_NAME, CHAIN_OBJECT_CLASS_SIG)) != NULL)) { + jni->GetFieldID(rootObjectClass, UNREACHABLE_CHAIN_FIELD_NAME, CHAIN_OBJECT_CLASS_SIG)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -204,8 +199,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, NSK_DISPLAY1("Find instance field in chain object class: %s\n", TAIL_FIELD_NAME); if (!NSK_JNI_VERIFY(jni, (tailField = - NSK_CPP_STUB4(GetFieldID, jni, chainObjectClass, - TAIL_FIELD_NAME, CHAIN_OBJECT_CLASS_SIG)) != NULL)) { + jni->GetFieldID(chainObjectClass, TAIL_FIELD_NAME, CHAIN_OBJECT_CLASS_SIG)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -213,8 +207,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, NSK_DISPLAY1("Get root object from static field: %s\n", OBJECT_FIELD_NAME); if (!NSK_JNI_VERIFY(jni, (rootObject = - NSK_CPP_STUB3(GetStaticObjectField, jni, debugeeClass, - objectField)) != NULL)) { + jni->GetStaticObjectField(debugeeClass, objectField)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -312,7 +305,7 @@ static int releaseTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, if (objectDescList != NULL) { NSK_DISPLAY1("Deallocate objects list: 0x%p\n", (void*)objectDescList); if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)objectDescList))) { + jvmti->Deallocate((unsigned char*)objectDescList))) { nsk_jvmti_setFailStatus(); } } @@ -438,9 +431,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY0(">>> Iterate over all object in heap with filter JVMTI_HEAP_OBJECT_TAGGED\n"); { if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(IterateOverHeap, jvmti, - JVMTI_HEAP_OBJECT_TAGGED, heapObjectCallback, - &fakeUserData))) { + jvmti->IterateOverHeap(JVMTI_HEAP_OBJECT_TAGGED, heapObjectCallback, &fakeUserData))) { nsk_jvmti_setFailStatus(); return; } @@ -550,7 +541,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { caps.can_tag_objects = 1; caps.can_generate_object_free_events = 1; if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + jvmti->AddCapabilities(&caps))) { return JNI_ERR; } } @@ -560,8 +551,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&eventCallbacks, 0, sizeof(eventCallbacks)); eventCallbacks.ObjectFree = callbackObjectFree; if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, - &eventCallbacks, sizeof(eventCallbacks)))) + jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks)))) return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverHeap/iterheap003/iterheap003.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverHeap/iterheap003/iterheap003.cpp index 21ff9a1e290..a485c4bb6ee 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverHeap/iterheap003/iterheap003.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverHeap/iterheap003/iterheap003.cpp @@ -92,14 +92,14 @@ static int getChainObjects(jvmtiEnv* jvmti, JNIEnv* jni, jobject firstObject, tag++; if (!NSK_JNI_VERIFY(jni, (obj = - NSK_CPP_STUB3(GetObjectField, jni, firstObject, firstField)) != NULL)) { + jni->GetObjectField(firstObject, firstField)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } objectDescList[count].tag = objTag; if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetTag, jvmti, obj, objTag))) { + jvmti->SetTag(obj, objTag))) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -111,7 +111,7 @@ static int getChainObjects(jvmtiEnv* jvmti, JNIEnv* jni, jobject firstObject, return NSK_FALSE; } - NSK_TRACE(NSK_CPP_STUB2(DeleteLocalRef, jni, obj)); + NSK_TRACE(jni->DeleteLocalRef(obj)); return success; } @@ -134,9 +134,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, *objectsCount = 2 * chainLength; NSK_DISPLAY1("Allocate memory for objects list: %d objects\n", *objectsCount); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(Allocate, jvmti, (*objectsCount * sizeof(ObjectDesc)), - (unsigned char**)objectDescList))) { + if (!NSK_JVMTI_VERIFY(jvmti->Allocate((*objectsCount * sizeof(ObjectDesc)), (unsigned char**)objectDescList))) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -153,7 +151,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, NSK_DISPLAY1("Find debugee class: %s\n", DEBUGEE_CLASS_NAME); if (!NSK_JNI_VERIFY(jni, (debugeeClass = - NSK_CPP_STUB2(FindClass, jni, DEBUGEE_CLASS_NAME)) != NULL)) { + jni->FindClass(DEBUGEE_CLASS_NAME)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -161,7 +159,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, NSK_DISPLAY1("Find root object class: %s\n", ROOT_OBJECT_CLASS_NAME); if (!NSK_JNI_VERIFY(jni, (rootObjectClass = - NSK_CPP_STUB2(FindClass, jni, ROOT_OBJECT_CLASS_NAME)) != NULL)) { + jni->FindClass(ROOT_OBJECT_CLASS_NAME)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -169,7 +167,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, NSK_DISPLAY1("Find chain object class: %s\n", CHAIN_OBJECT_CLASS_NAME); if (!NSK_JNI_VERIFY(jni, (chainObjectClass = - NSK_CPP_STUB2(FindClass, jni, CHAIN_OBJECT_CLASS_NAME)) != NULL)) { + jni->FindClass(CHAIN_OBJECT_CLASS_NAME)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -177,8 +175,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, NSK_DISPLAY1("Find static field in debugee class: %s\n", OBJECT_FIELD_NAME); if (!NSK_JNI_VERIFY(jni, (objectField = - NSK_CPP_STUB4(GetStaticFieldID, jni, debugeeClass, - OBJECT_FIELD_NAME, ROOT_OBJECT_CLASS_SIG)) != NULL)) { + jni->GetStaticFieldID(debugeeClass, OBJECT_FIELD_NAME, ROOT_OBJECT_CLASS_SIG)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -186,8 +183,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, NSK_DISPLAY1("Find instance field in root object class: %s\n", REACHABLE_CHAIN_FIELD_NAME); if (!NSK_JNI_VERIFY(jni, (reachableChainField = - NSK_CPP_STUB4(GetFieldID, jni, rootObjectClass, - REACHABLE_CHAIN_FIELD_NAME, CHAIN_OBJECT_CLASS_SIG)) != NULL)) { + jni->GetFieldID(rootObjectClass, REACHABLE_CHAIN_FIELD_NAME, CHAIN_OBJECT_CLASS_SIG)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -195,8 +191,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, NSK_DISPLAY1("Find instance field in root object class: %s\n", UNREACHABLE_CHAIN_FIELD_NAME); if (!NSK_JNI_VERIFY(jni, (unreachableChainField = - NSK_CPP_STUB4(GetFieldID, jni, rootObjectClass, - UNREACHABLE_CHAIN_FIELD_NAME, CHAIN_OBJECT_CLASS_SIG)) != NULL)) { + jni->GetFieldID(rootObjectClass, UNREACHABLE_CHAIN_FIELD_NAME, CHAIN_OBJECT_CLASS_SIG)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -204,8 +199,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, NSK_DISPLAY1("Find instance field in chain object class: %s\n", TAIL_FIELD_NAME); if (!NSK_JNI_VERIFY(jni, (tailField = - NSK_CPP_STUB4(GetFieldID, jni, chainObjectClass, - TAIL_FIELD_NAME, CHAIN_OBJECT_CLASS_SIG)) != NULL)) { + jni->GetFieldID(chainObjectClass, TAIL_FIELD_NAME, CHAIN_OBJECT_CLASS_SIG)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -213,8 +207,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, NSK_DISPLAY1("Get root object from static field: %s\n", OBJECT_FIELD_NAME); if (!NSK_JNI_VERIFY(jni, (rootObject = - NSK_CPP_STUB3(GetStaticObjectField, jni, debugeeClass, - objectField)) != NULL)) { + jni->GetStaticObjectField(debugeeClass, objectField)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -312,7 +305,7 @@ static int releaseTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, if (objectDescList != NULL) { NSK_DISPLAY1("Deallocate objects list: 0x%p\n", (void*)objectDescList); if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)objectDescList))) { + jvmti->Deallocate((unsigned char*)objectDescList))) { nsk_jvmti_setFailStatus(); } } @@ -439,9 +432,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY0(">>> Iterate over all object in heap with filter JVMTI_HEAP_OBJECT_UNTAGGED\n"); { if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(IterateOverHeap, jvmti, - JVMTI_HEAP_OBJECT_UNTAGGED, heapObjectCallback, - &fakeUserData))) { + jvmti->IterateOverHeap(JVMTI_HEAP_OBJECT_UNTAGGED, heapObjectCallback, &fakeUserData))) { nsk_jvmti_setFailStatus(); return; } @@ -551,7 +542,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { caps.can_tag_objects = 1; caps.can_generate_object_free_events = 1; if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + jvmti->AddCapabilities(&caps))) { return JNI_ERR; } } @@ -561,8 +552,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&eventCallbacks, 0, sizeof(eventCallbacks)); eventCallbacks.ObjectFree = callbackObjectFree; if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, - &eventCallbacks, sizeof(eventCallbacks)))) + jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks)))) return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverHeap/iterheap004/iterheap004.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverHeap/iterheap004/iterheap004.cpp index 28470777ba6..3450ad6705c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverHeap/iterheap004/iterheap004.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverHeap/iterheap004/iterheap004.cpp @@ -65,9 +65,7 @@ heapObjectCallbackForFirstIteration(jlong class_tag, *tag_ptr = (jlong)++objectDescCount; /* Allocate memory for next list element*/ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(Allocate, jvmti, (sizeof(ObjectDesc)), - (unsigned char**)&objectDescBuf))) { + if (!NSK_JVMTI_VERIFY(jvmti->Allocate((sizeof(ObjectDesc)), (unsigned char**)&objectDescBuf))) { nsk_jvmti_setFailStatus(); callbackAborted = 1; NSK_COMPLAIN0("heapObjectCallbackForFirstIteration: Allocation failed. Iteration aborted.\n"); @@ -97,7 +95,7 @@ heapObjectCallbackForSecondIteration(jlong class_tag, /* Deallocate memory of list element*/ if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)objectDescArr[ind]))) { + jvmti->Deallocate((unsigned char*)objectDescArr[ind]))) { nsk_jvmti_setFailStatus(); callbackAborted = 1; NSK_COMPLAIN0("heapObjectCallbackForSecondIteration: Deallocation failed. Iteration aborted.\n"); @@ -133,9 +131,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY0("Calling IterateOverHeap with filter JVMTI_HEAP_OBJECT_UNTAGGED\n"); { if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(IterateOverHeap, jvmti, - JVMTI_HEAP_OBJECT_UNTAGGED, heapObjectCallbackForFirstIteration, - &fakeUserData))) { + jvmti->IterateOverHeap(JVMTI_HEAP_OBJECT_UNTAGGED, heapObjectCallbackForFirstIteration, &fakeUserData))) { nsk_jvmti_setFailStatus(); break; } @@ -151,17 +147,13 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { } /* Allocate memory for array to save pointers to ObjectDescList elements */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(Allocate, jvmti, (objectDescCount * sizeof(ObjectDesc*)), - (unsigned char**)&objectDescArr))) { + if (!NSK_JVMTI_VERIFY(jvmti->Allocate((objectDescCount * sizeof(ObjectDesc*)), (unsigned char**)&objectDescArr))) { nsk_jvmti_setFailStatus(); break; } /* Allocate memory for flags array and fill with false values */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(Allocate, jvmti, (objectDescCount * sizeof(unsigned char)), - &deallocatedFlagsArr))) { + if (!NSK_JVMTI_VERIFY(jvmti->Allocate((objectDescCount * sizeof(unsigned char)), &deallocatedFlagsArr))) { nsk_jvmti_setFailStatus(); break; } @@ -186,9 +178,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY0("Calling IterateOverHeap with filter JVMTI_HEAP_OBJECT_TAGGED\n"); { if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(IterateOverHeap, jvmti, - JVMTI_HEAP_OBJECT_TAGGED, heapObjectCallbackForSecondIteration, - &fakeUserData))) { + jvmti->IterateOverHeap(JVMTI_HEAP_OBJECT_TAGGED, heapObjectCallbackForSecondIteration, &fakeUserData))) { nsk_jvmti_setFailStatus(); } } @@ -202,7 +192,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { for (ind = 0; ind < objectDescCount; ind++) { if (!deallocatedFlagsArr[ind]) { if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)objectDescArr[ind]))) { + jvmti->Deallocate((unsigned char*)objectDescArr[ind]))) { NSK_COMPLAIN1("Unable to deallocate descriptor. Index = %d \n", ind); nsk_jvmti_setFailStatus(); return; @@ -211,12 +201,12 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { } if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)objectDescArr))) { + jvmti->Deallocate((unsigned char*)objectDescArr))) { nsk_jvmti_setFailStatus(); } if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)deallocatedFlagsArr))) { + jvmti->Deallocate((unsigned char*)deallocatedFlagsArr))) { nsk_jvmti_setFailStatus(); } @@ -258,12 +248,11 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(caps)); caps.can_tag_objects = 1; if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + jvmti->AddCapabilities(&caps))) { return JNI_ERR; } - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, - jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps))) return JNI_ERR; if (!caps.can_tag_objects) diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverHeap/iterheap005/iterheap005.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverHeap/iterheap005/iterheap005.cpp index b04b1f855cc..d2ccacfe2d2 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverHeap/iterheap005/iterheap005.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverHeap/iterheap005/iterheap005.cpp @@ -51,54 +51,54 @@ heapObjectCallback(jlong class_tag, objCounter++; if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(CreateRawMonitor, st_jvmti, name, &monitor_ptr))) { + st_jvmti->CreateRawMonitor(name, &monitor_ptr))) { nsk_jvmti_setFailStatus(); return JVMTI_ITERATION_ABORT; } if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorEnter, st_jvmti, monitor_ptr))) { + st_jvmti->RawMonitorEnter(monitor_ptr))) { nsk_jvmti_setFailStatus(); return JVMTI_ITERATION_ABORT; } /* Enter second time */ if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorEnter, st_jvmti, monitor_ptr))) { + st_jvmti->RawMonitorEnter(monitor_ptr))) { nsk_jvmti_setFailStatus(); return JVMTI_ITERATION_ABORT; } if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(RawMonitorWait, st_jvmti, monitor_ptr, (jlong)100))) { + st_jvmti->RawMonitorWait(monitor_ptr, (jlong)100))) { nsk_jvmti_setFailStatus(); } if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorNotify, st_jvmti, monitor_ptr))) { + st_jvmti->RawMonitorNotify(monitor_ptr))) { nsk_jvmti_setFailStatus(); } if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorNotifyAll, st_jvmti, monitor_ptr))) { + st_jvmti->RawMonitorNotifyAll(monitor_ptr))) { nsk_jvmti_setFailStatus(); } if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorExit, st_jvmti, monitor_ptr))) { + st_jvmti->RawMonitorExit(monitor_ptr))) { nsk_jvmti_setFailStatus(); return JVMTI_ITERATION_ABORT; } /* Exit second time */ if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorExit, st_jvmti, monitor_ptr))) { + st_jvmti->RawMonitorExit(monitor_ptr))) { nsk_jvmti_setFailStatus(); return JVMTI_ITERATION_ABORT; } if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(DestroyRawMonitor, st_jvmti, monitor_ptr))) { + st_jvmti->DestroyRawMonitor(monitor_ptr))) { nsk_jvmti_setFailStatus(); } @@ -119,11 +119,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY0("Calling IterateOverHeap with filter JVMTI_HEAP_OBJECT_EITHER\n"); { if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(IterateOverHeap, - jvmti, - JVMTI_HEAP_OBJECT_EITHER, - heapObjectCallback, - &fakeUserData))) { + jvmti->IterateOverHeap(JVMTI_HEAP_OBJECT_EITHER, heapObjectCallback, &fakeUserData))) { nsk_jvmti_setFailStatus(); } } @@ -174,7 +170,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(caps)); caps.can_tag_objects = 1; if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + jvmti->AddCapabilities(&caps))) { return JNI_ERR; } } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverHeap/iterheap006/iterheap006.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverHeap/iterheap006/iterheap006.cpp index 10d5d1dccf0..ec9bf6e9aa9 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverHeap/iterheap006/iterheap006.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverHeap/iterheap006/iterheap006.cpp @@ -46,12 +46,12 @@ heapObjectCallback(jlong class_tag, void* storage_data) { if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(SetEnvironmentLocalStorage, st_jvmti, storage_data ))) { + st_jvmti->SetEnvironmentLocalStorage(storage_data ))) { nsk_jvmti_setFailStatus(); } if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GetEnvironmentLocalStorage, st_jvmti, &storage_ptr))) { + st_jvmti->GetEnvironmentLocalStorage(&storage_ptr))) { nsk_jvmti_setFailStatus(); } @@ -73,11 +73,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY0("Calling IterateOverHeap with filter JVMTI_HEAP_OBJECT_EITHER\n"); { if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(IterateOverHeap, - jvmti, - JVMTI_HEAP_OBJECT_EITHER, - heapObjectCallback, - (void *)storage_data))) { + jvmti->IterateOverHeap(JVMTI_HEAP_OBJECT_EITHER, heapObjectCallback, (void *)storage_data))) { nsk_jvmti_setFailStatus(); } } @@ -135,7 +131,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(caps)); caps.can_tag_objects = 1; if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + jvmti->AddCapabilities(&caps))) { return JNI_ERR; } } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverHeap/iterheap007/iterheap007.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverHeap/iterheap007/iterheap007.cpp index 3798c5a9e42..3d818cd32ae 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverHeap/iterheap007/iterheap007.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverHeap/iterheap007/iterheap007.cpp @@ -46,7 +46,7 @@ heapObjectCallback(jlong class_tag, void* user_data) { if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GetCurrentThreadCpuTimerInfo, st_jvmti, &timer_info1 ))) { + st_jvmti->GetCurrentThreadCpuTimerInfo(&timer_info1 ))) { nsk_jvmti_setFailStatus(); } /* Check the returned jvmtiTimerInfo structure */ @@ -65,13 +65,13 @@ heapObjectCallback(jlong class_tag, /* ---------------------------------------------------------------------- */ if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GetCurrentThreadCpuTime, st_jvmti, &nanos ))) { + st_jvmti->GetCurrentThreadCpuTime(&nanos ))) { nsk_jvmti_setFailStatus(); } /* ---------------------------------------------------------------------- */ if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GetTimerInfo, st_jvmti, &timer_info2 ))) { + st_jvmti->GetTimerInfo(&timer_info2 ))) { nsk_jvmti_setFailStatus(); } /* Check the returned jvmtiTimerInfo structure */ @@ -91,7 +91,7 @@ heapObjectCallback(jlong class_tag, nanos = 0; if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GetTime, st_jvmti, &nanos ))) { + st_jvmti->GetTime(&nanos ))) { nsk_jvmti_setFailStatus(); } @@ -113,11 +113,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY0("Calling IterateOverHeap with filter JVMTI_HEAP_OBJECT_EITHER\n"); { if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(IterateOverHeap, - jvmti, - JVMTI_HEAP_OBJECT_EITHER, - heapObjectCallback, - (void *)user_data))) { + jvmti->IterateOverHeap(JVMTI_HEAP_OBJECT_EITHER, heapObjectCallback, (void *)user_data))) { nsk_jvmti_setFailStatus(); } } @@ -164,7 +160,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { caps.can_get_current_thread_cpu_time = 1; if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + jvmti->AddCapabilities(&caps))) { return JNI_ERR; } } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverInstancesOfClass/iterinstcls001/iterinstcls001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverInstancesOfClass/iterinstcls001/iterinstcls001.cpp index c8c6fdab442..c9a0acc33ee 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverInstancesOfClass/iterinstcls001/iterinstcls001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverInstancesOfClass/iterinstcls001/iterinstcls001.cpp @@ -92,14 +92,14 @@ static int getChainObjects(jvmtiEnv* jvmti, JNIEnv* jni, jobject firstObject, tag++; if (!NSK_JNI_VERIFY(jni, (obj = - NSK_CPP_STUB3(GetObjectField, jni, firstObject, firstField)) != NULL)) { + jni->GetObjectField(firstObject, firstField)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } objectDescList[count].tag = objTag; if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetTag, jvmti, obj, objTag))) { + jvmti->SetTag(obj, objTag))) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -111,7 +111,7 @@ static int getChainObjects(jvmtiEnv* jvmti, JNIEnv* jni, jobject firstObject, return NSK_FALSE; } - NSK_TRACE(NSK_CPP_STUB2(DeleteLocalRef, jni, obj)); + NSK_TRACE(jni->DeleteLocalRef(obj)); return success; } @@ -136,9 +136,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, *objectsCount = 2 * chainLength; NSK_DISPLAY1("Allocate memory for objects list: %d objects\n", *objectsCount); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(Allocate, jvmti, (*objectsCount * sizeof(ObjectDesc)), - (unsigned char**)objectDescList))) { + if (!NSK_JVMTI_VERIFY(jvmti->Allocate((*objectsCount * sizeof(ObjectDesc)), (unsigned char**)objectDescList))) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -155,7 +153,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, NSK_DISPLAY1("Find debugee class: %s\n", DEBUGEE_CLASS_NAME); if (!NSK_JNI_VERIFY(jni, (debugeeClass = - NSK_CPP_STUB2(FindClass, jni, DEBUGEE_CLASS_NAME)) != NULL)) { + jni->FindClass(DEBUGEE_CLASS_NAME)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -163,7 +161,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, NSK_DISPLAY1("Find root object class: %s\n", ROOT_OBJECT_CLASS_NAME); if (!NSK_JNI_VERIFY(jni, (rootObjectClass = - NSK_CPP_STUB2(FindClass, jni, ROOT_OBJECT_CLASS_NAME)) != NULL)) { + jni->FindClass(ROOT_OBJECT_CLASS_NAME)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -171,7 +169,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, NSK_DISPLAY1("Find chain object class: %s\n", CHAIN_OBJECT_CLASS_NAME); if (!NSK_JNI_VERIFY(jni, (chainObjectClass = - NSK_CPP_STUB2(FindClass, jni, CHAIN_OBJECT_CLASS_NAME)) != NULL)) { + jni->FindClass(CHAIN_OBJECT_CLASS_NAME)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -179,7 +177,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, NSK_DISPLAY1("Create global ref to tested class: 0x%p\n", chainObjectClass); if (!NSK_JNI_VERIFY(jni, (*testedClass = (jclass) - NSK_CPP_STUB2(NewGlobalRef, jni, chainObjectClass)) != NULL)) { + jni->NewGlobalRef(chainObjectClass)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -187,8 +185,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, NSK_DISPLAY1("Find static field in debugee class: %s\n", OBJECT_FIELD_NAME); if (!NSK_JNI_VERIFY(jni, (objectField = - NSK_CPP_STUB4(GetStaticFieldID, jni, debugeeClass, - OBJECT_FIELD_NAME, ROOT_OBJECT_CLASS_SIG)) != NULL)) { + jni->GetStaticFieldID(debugeeClass, OBJECT_FIELD_NAME, ROOT_OBJECT_CLASS_SIG)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -196,8 +193,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, NSK_DISPLAY1("Find instance field in root object class: %s\n", REACHABLE_CHAIN_FIELD_NAME); if (!NSK_JNI_VERIFY(jni, (reachableChainField = - NSK_CPP_STUB4(GetFieldID, jni, rootObjectClass, - REACHABLE_CHAIN_FIELD_NAME, CHAIN_OBJECT_CLASS_SIG)) != NULL)) { + jni->GetFieldID(rootObjectClass, REACHABLE_CHAIN_FIELD_NAME, CHAIN_OBJECT_CLASS_SIG)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -205,8 +201,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, NSK_DISPLAY1("Find instance field in root object class: %s\n", UNREACHABLE_CHAIN_FIELD_NAME); if (!NSK_JNI_VERIFY(jni, (unreachableChainField = - NSK_CPP_STUB4(GetFieldID, jni, rootObjectClass, - UNREACHABLE_CHAIN_FIELD_NAME, CHAIN_OBJECT_CLASS_SIG)) != NULL)) { + jni->GetFieldID(rootObjectClass, UNREACHABLE_CHAIN_FIELD_NAME, CHAIN_OBJECT_CLASS_SIG)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -214,8 +209,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, NSK_DISPLAY1("Find instance field in chain object class: %s\n", TAIL_FIELD_NAME); if (!NSK_JNI_VERIFY(jni, (tailField = - NSK_CPP_STUB4(GetFieldID, jni, chainObjectClass, - TAIL_FIELD_NAME, CHAIN_OBJECT_CLASS_SIG)) != NULL)) { + jni->GetFieldID(chainObjectClass, TAIL_FIELD_NAME, CHAIN_OBJECT_CLASS_SIG)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -223,8 +217,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, NSK_DISPLAY1("Get root object from static field: %s\n", OBJECT_FIELD_NAME); if (!NSK_JNI_VERIFY(jni, (rootObject = - NSK_CPP_STUB3(GetStaticObjectField, jni, debugeeClass, - objectField)) != NULL)) { + jni->GetStaticObjectField(debugeeClass, objectField)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -234,7 +227,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, NSK_DISPLAY0(" tested class object:\n"); if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetTag, jvmti, *testedClass, testedClassTag))) { + jvmti->SetTag(*testedClass, testedClassTag))) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -329,13 +322,13 @@ static int releaseTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, ObjectDesc* objectDescList, jclass testedClass) { if (testedClass != NULL) { NSK_DISPLAY1("Release object reference to tested class: 0x%p\n", testedClass); - NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, testedClass)); + NSK_TRACE(jni->DeleteGlobalRef(testedClass)); } if (objectDescList != NULL) { NSK_DISPLAY1("Deallocate objects list: 0x%p\n", (void*)objectDescList); if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)objectDescList))) { + jvmti->Deallocate((unsigned char*)objectDescList))) { nsk_jvmti_setFailStatus(); } } @@ -450,9 +443,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY0(">>> Iterate over instances of tested class with filter JVMTI_HEAP_OBJECT_EITHER\n"); { if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB5(IterateOverInstancesOfClass, jvmti, - testedClass, JVMTI_HEAP_OBJECT_EITHER, - heapObjectCallback, &fakeUserData))) { + jvmti->IterateOverInstancesOfClass(testedClass, JVMTI_HEAP_OBJECT_EITHER, heapObjectCallback, &fakeUserData))) { nsk_jvmti_setFailStatus(); return; } @@ -561,7 +552,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { caps.can_tag_objects = 1; caps.can_generate_object_free_events = 1; if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + jvmti->AddCapabilities(&caps))) { return JNI_ERR; } } @@ -571,8 +562,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&eventCallbacks, 0, sizeof(eventCallbacks)); eventCallbacks.ObjectFree = callbackObjectFree; if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, - &eventCallbacks, sizeof(eventCallbacks)))) + jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks)))) return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverInstancesOfClass/iterinstcls002/iterinstcls002.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverInstancesOfClass/iterinstcls002/iterinstcls002.cpp index 367cb8a8a63..13288e2fd5e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverInstancesOfClass/iterinstcls002/iterinstcls002.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverInstancesOfClass/iterinstcls002/iterinstcls002.cpp @@ -92,14 +92,14 @@ static int getChainObjects(jvmtiEnv* jvmti, JNIEnv* jni, jobject firstObject, tag++; if (!NSK_JNI_VERIFY(jni, (obj = - NSK_CPP_STUB3(GetObjectField, jni, firstObject, firstField)) != NULL)) { + jni->GetObjectField(firstObject, firstField)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } objectDescList[count].tag = objTag; if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetTag, jvmti, obj, objTag))) { + jvmti->SetTag(obj, objTag))) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -111,7 +111,7 @@ static int getChainObjects(jvmtiEnv* jvmti, JNIEnv* jni, jobject firstObject, return NSK_FALSE; } - NSK_TRACE(NSK_CPP_STUB2(DeleteLocalRef, jni, obj)); + NSK_TRACE(jni->DeleteLocalRef(obj)); return success; } @@ -136,9 +136,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, *objectsCount = 2 * chainLength; NSK_DISPLAY1("Allocate memory for objects list: %d objects\n", *objectsCount); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(Allocate, jvmti, (*objectsCount * sizeof(ObjectDesc)), - (unsigned char**)objectDescList))) { + if (!NSK_JVMTI_VERIFY(jvmti->Allocate((*objectsCount * sizeof(ObjectDesc)), (unsigned char**)objectDescList))) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -155,7 +153,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, NSK_DISPLAY1("Find debugee class: %s\n", DEBUGEE_CLASS_NAME); if (!NSK_JNI_VERIFY(jni, (debugeeClass = - NSK_CPP_STUB2(FindClass, jni, DEBUGEE_CLASS_NAME)) != NULL)) { + jni->FindClass(DEBUGEE_CLASS_NAME)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -163,7 +161,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, NSK_DISPLAY1("Find root object class: %s\n", ROOT_OBJECT_CLASS_NAME); if (!NSK_JNI_VERIFY(jni, (rootObjectClass = - NSK_CPP_STUB2(FindClass, jni, ROOT_OBJECT_CLASS_NAME)) != NULL)) { + jni->FindClass(ROOT_OBJECT_CLASS_NAME)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -171,7 +169,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, NSK_DISPLAY1("Find chain object class: %s\n", CHAIN_OBJECT_CLASS_NAME); if (!NSK_JNI_VERIFY(jni, (chainObjectClass = - NSK_CPP_STUB2(FindClass, jni, CHAIN_OBJECT_CLASS_NAME)) != NULL)) { + jni->FindClass(CHAIN_OBJECT_CLASS_NAME)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -179,7 +177,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, NSK_DISPLAY1("Create global ref to tested class: 0x%p\n", chainObjectClass); if (!NSK_JNI_VERIFY(jni, (*testedClass = (jclass) - NSK_CPP_STUB2(NewGlobalRef, jni, chainObjectClass)) != NULL)) { + jni->NewGlobalRef(chainObjectClass)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -187,8 +185,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, NSK_DISPLAY1("Find static field in debugee class: %s\n", OBJECT_FIELD_NAME); if (!NSK_JNI_VERIFY(jni, (objectField = - NSK_CPP_STUB4(GetStaticFieldID, jni, debugeeClass, - OBJECT_FIELD_NAME, ROOT_OBJECT_CLASS_SIG)) != NULL)) { + jni->GetStaticFieldID(debugeeClass, OBJECT_FIELD_NAME, ROOT_OBJECT_CLASS_SIG)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -196,8 +193,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, NSK_DISPLAY1("Find instance field in root object class: %s\n", REACHABLE_CHAIN_FIELD_NAME); if (!NSK_JNI_VERIFY(jni, (reachableChainField = - NSK_CPP_STUB4(GetFieldID, jni, rootObjectClass, - REACHABLE_CHAIN_FIELD_NAME, CHAIN_OBJECT_CLASS_SIG)) != NULL)) { + jni->GetFieldID(rootObjectClass, REACHABLE_CHAIN_FIELD_NAME, CHAIN_OBJECT_CLASS_SIG)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -205,8 +201,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, NSK_DISPLAY1("Find instance field in root object class: %s\n", UNREACHABLE_CHAIN_FIELD_NAME); if (!NSK_JNI_VERIFY(jni, (unreachableChainField = - NSK_CPP_STUB4(GetFieldID, jni, rootObjectClass, - UNREACHABLE_CHAIN_FIELD_NAME, CHAIN_OBJECT_CLASS_SIG)) != NULL)) { + jni->GetFieldID(rootObjectClass, UNREACHABLE_CHAIN_FIELD_NAME, CHAIN_OBJECT_CLASS_SIG)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -214,8 +209,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, NSK_DISPLAY1("Find instance field in chain object class: %s\n", TAIL_FIELD_NAME); if (!NSK_JNI_VERIFY(jni, (tailField = - NSK_CPP_STUB4(GetFieldID, jni, chainObjectClass, - TAIL_FIELD_NAME, CHAIN_OBJECT_CLASS_SIG)) != NULL)) { + jni->GetFieldID(chainObjectClass, TAIL_FIELD_NAME, CHAIN_OBJECT_CLASS_SIG)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -223,8 +217,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, NSK_DISPLAY1("Get root object from static field: %s\n", OBJECT_FIELD_NAME); if (!NSK_JNI_VERIFY(jni, (rootObject = - NSK_CPP_STUB3(GetStaticObjectField, jni, debugeeClass, - objectField)) != NULL)) { + jni->GetStaticObjectField(debugeeClass, objectField)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -234,7 +227,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, NSK_DISPLAY0(" tested class object:\n"); if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetTag, jvmti, *testedClass, testedClassTag))) { + jvmti->SetTag(*testedClass, testedClassTag))) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -329,13 +322,13 @@ static int releaseTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, ObjectDesc* objectDescList, jclass testedClass) { if (testedClass != NULL) { NSK_DISPLAY1("Release object reference to tested class: 0x%p\n", testedClass); - NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, testedClass)); + NSK_TRACE(jni->DeleteGlobalRef(testedClass)); } if (objectDescList != NULL) { NSK_DISPLAY1("Deallocate objects list: 0x%p\n", (void*)objectDescList); if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)objectDescList))) { + jvmti->Deallocate((unsigned char*)objectDescList))) { nsk_jvmti_setFailStatus(); } } @@ -458,9 +451,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY0(">>> Iterate over instances of tested class with filter JVMTI_HEAP_OBJECT_TAGGED\n"); { if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB5(IterateOverInstancesOfClass, jvmti, - testedClass, JVMTI_HEAP_OBJECT_TAGGED, - heapObjectCallback, &fakeUserData))) { + jvmti->IterateOverInstancesOfClass(testedClass, JVMTI_HEAP_OBJECT_TAGGED, heapObjectCallback, &fakeUserData))) { nsk_jvmti_setFailStatus(); return; } @@ -569,7 +560,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { caps.can_tag_objects = 1; caps.can_generate_object_free_events = 1; if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + jvmti->AddCapabilities(&caps))) { return JNI_ERR; } } @@ -579,8 +570,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&eventCallbacks, 0, sizeof(eventCallbacks)); eventCallbacks.ObjectFree = callbackObjectFree; if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, - &eventCallbacks, sizeof(eventCallbacks)))) + jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks)))) return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverInstancesOfClass/iterinstcls003/iterinstcls003.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverInstancesOfClass/iterinstcls003/iterinstcls003.cpp index 6d054e160bf..e552dc0b3b9 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverInstancesOfClass/iterinstcls003/iterinstcls003.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverInstancesOfClass/iterinstcls003/iterinstcls003.cpp @@ -92,14 +92,14 @@ static int getChainObjects(jvmtiEnv* jvmti, JNIEnv* jni, jobject firstObject, tag++; if (!NSK_JNI_VERIFY(jni, (obj = - NSK_CPP_STUB3(GetObjectField, jni, firstObject, firstField)) != NULL)) { + jni->GetObjectField(firstObject, firstField)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } objectDescList[count].tag = objTag; if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetTag, jvmti, obj, objTag))) { + jvmti->SetTag(obj, objTag))) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -111,7 +111,7 @@ static int getChainObjects(jvmtiEnv* jvmti, JNIEnv* jni, jobject firstObject, return NSK_FALSE; } - NSK_TRACE(NSK_CPP_STUB2(DeleteLocalRef, jni, obj)); + NSK_TRACE(jni->DeleteLocalRef(obj)); return success; } @@ -136,9 +136,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, *objectsCount = 2 * chainLength; NSK_DISPLAY1("Allocate memory for objects list: %d objects\n", *objectsCount); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(Allocate, jvmti, (*objectsCount * sizeof(ObjectDesc)), - (unsigned char**)objectDescList))) { + if (!NSK_JVMTI_VERIFY(jvmti->Allocate((*objectsCount * sizeof(ObjectDesc)), (unsigned char**)objectDescList))) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -155,7 +153,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, NSK_DISPLAY1("Find debugee class: %s\n", DEBUGEE_CLASS_NAME); if (!NSK_JNI_VERIFY(jni, (debugeeClass = - NSK_CPP_STUB2(FindClass, jni, DEBUGEE_CLASS_NAME)) != NULL)) { + jni->FindClass(DEBUGEE_CLASS_NAME)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -163,7 +161,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, NSK_DISPLAY1("Find root object class: %s\n", ROOT_OBJECT_CLASS_NAME); if (!NSK_JNI_VERIFY(jni, (rootObjectClass = - NSK_CPP_STUB2(FindClass, jni, ROOT_OBJECT_CLASS_NAME)) != NULL)) { + jni->FindClass(ROOT_OBJECT_CLASS_NAME)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -171,7 +169,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, NSK_DISPLAY1("Find chain object class: %s\n", CHAIN_OBJECT_CLASS_NAME); if (!NSK_JNI_VERIFY(jni, (chainObjectClass = - NSK_CPP_STUB2(FindClass, jni, CHAIN_OBJECT_CLASS_NAME)) != NULL)) { + jni->FindClass(CHAIN_OBJECT_CLASS_NAME)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -179,7 +177,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, NSK_DISPLAY1("Create global ref to tested class: 0x%p\n", chainObjectClass); if (!NSK_JNI_VERIFY(jni, (*testedClass = (jclass) - NSK_CPP_STUB2(NewGlobalRef, jni, chainObjectClass)) != NULL)) { + jni->NewGlobalRef(chainObjectClass)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -187,8 +185,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, NSK_DISPLAY1("Find static field in debugee class: %s\n", OBJECT_FIELD_NAME); if (!NSK_JNI_VERIFY(jni, (objectField = - NSK_CPP_STUB4(GetStaticFieldID, jni, debugeeClass, - OBJECT_FIELD_NAME, ROOT_OBJECT_CLASS_SIG)) != NULL)) { + jni->GetStaticFieldID(debugeeClass, OBJECT_FIELD_NAME, ROOT_OBJECT_CLASS_SIG)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -196,8 +193,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, NSK_DISPLAY1("Find instance field in root object class: %s\n", REACHABLE_CHAIN_FIELD_NAME); if (!NSK_JNI_VERIFY(jni, (reachableChainField = - NSK_CPP_STUB4(GetFieldID, jni, rootObjectClass, - REACHABLE_CHAIN_FIELD_NAME, CHAIN_OBJECT_CLASS_SIG)) != NULL)) { + jni->GetFieldID(rootObjectClass, REACHABLE_CHAIN_FIELD_NAME, CHAIN_OBJECT_CLASS_SIG)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -205,8 +201,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, NSK_DISPLAY1("Find instance field in root object class: %s\n", UNREACHABLE_CHAIN_FIELD_NAME); if (!NSK_JNI_VERIFY(jni, (unreachableChainField = - NSK_CPP_STUB4(GetFieldID, jni, rootObjectClass, - UNREACHABLE_CHAIN_FIELD_NAME, CHAIN_OBJECT_CLASS_SIG)) != NULL)) { + jni->GetFieldID(rootObjectClass, UNREACHABLE_CHAIN_FIELD_NAME, CHAIN_OBJECT_CLASS_SIG)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -214,8 +209,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, NSK_DISPLAY1("Find instance field in chain object class: %s\n", TAIL_FIELD_NAME); if (!NSK_JNI_VERIFY(jni, (tailField = - NSK_CPP_STUB4(GetFieldID, jni, chainObjectClass, - TAIL_FIELD_NAME, CHAIN_OBJECT_CLASS_SIG)) != NULL)) { + jni->GetFieldID(chainObjectClass, TAIL_FIELD_NAME, CHAIN_OBJECT_CLASS_SIG)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -223,8 +217,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, NSK_DISPLAY1("Get root object from static field: %s\n", OBJECT_FIELD_NAME); if (!NSK_JNI_VERIFY(jni, (rootObject = - NSK_CPP_STUB3(GetStaticObjectField, jni, debugeeClass, - objectField)) != NULL)) { + jni->GetStaticObjectField(debugeeClass, objectField)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -234,7 +227,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, NSK_DISPLAY0(" tested class object:\n"); if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetTag, jvmti, *testedClass, testedClassTag))) { + jvmti->SetTag(*testedClass, testedClassTag))) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -329,13 +322,13 @@ static int releaseTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, ObjectDesc* objectDescList, jclass testedClass) { if (testedClass != NULL) { NSK_DISPLAY1("Release object reference to tested class: 0x%p\n", testedClass); - NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, testedClass)); + NSK_TRACE(jni->DeleteGlobalRef(testedClass)); } if (objectDescList != NULL) { NSK_DISPLAY1("Deallocate objects list: 0x%p\n", (void*)objectDescList); if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)objectDescList))) { + jvmti->Deallocate((unsigned char*)objectDescList))) { nsk_jvmti_setFailStatus(); } } @@ -459,9 +452,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY0(">>> Iterate over instances of tested class with filter JVMTI_HEAP_OBJECT_UNTAGGED\n"); { if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB5(IterateOverInstancesOfClass, jvmti, - testedClass, JVMTI_HEAP_OBJECT_UNTAGGED, - heapObjectCallback, &fakeUserData))) { + jvmti->IterateOverInstancesOfClass(testedClass, JVMTI_HEAP_OBJECT_UNTAGGED, heapObjectCallback, &fakeUserData))) { nsk_jvmti_setFailStatus(); return; } @@ -570,7 +561,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { caps.can_tag_objects = 1; caps.can_generate_object_free_events = 1; if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + jvmti->AddCapabilities(&caps))) { return JNI_ERR; } } @@ -580,8 +571,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&eventCallbacks, 0, sizeof(eventCallbacks)); eventCallbacks.ObjectFree = callbackObjectFree; if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, - &eventCallbacks, sizeof(eventCallbacks)))) + jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks)))) return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverInstancesOfClass/iterinstcls004/iterinstcls004.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverInstancesOfClass/iterinstcls004/iterinstcls004.cpp index 1da333ffaae..43e378571f4 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverInstancesOfClass/iterinstcls004/iterinstcls004.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverInstancesOfClass/iterinstcls004/iterinstcls004.cpp @@ -61,9 +61,7 @@ heapObjectCallback1(jlong class_tag, /* Set tag */ *tag_ptr = objectCount; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(Allocate, st_jvmti, (sizeof(ObjectDesc)), - (unsigned char**)&objectDescBuf))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->Allocate((sizeof(ObjectDesc)), (unsigned char**)&objectDescBuf))) { nsk_jvmti_setFailStatus(); allocationError = 1; } @@ -83,8 +81,7 @@ heapObjectCallback2(jlong class_tag, objectCount--; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, st_jvmti, (unsigned char*)objectDescBuf))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->Deallocate((unsigned char*)objectDescBuf))) { nsk_jvmti_setFailStatus(); } @@ -115,12 +112,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY0("Calling IterateOverInstancesOfClass with filter JVMTI_HEAP_OBJECT_UNTAGGED\n"); { if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB5(IterateOverInstancesOfClass, - jvmti, - debugeeClass, - JVMTI_HEAP_OBJECT_UNTAGGED, - heapObjectCallback1, - &userData))) { + jvmti->IterateOverInstancesOfClass(debugeeClass, JVMTI_HEAP_OBJECT_UNTAGGED, heapObjectCallback1, &userData))) { nsk_jvmti_setFailStatus(); break; } @@ -139,12 +131,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY0("Calling IterateOverInstancesOfClass with filter JVMTI_HEAP_OBJECT_TAGGED\n"); { if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB5(IterateOverInstancesOfClass, - jvmti, - debugeeClass, - JVMTI_HEAP_OBJECT_TAGGED, - heapObjectCallback2, - &userData))) { + jvmti->IterateOverInstancesOfClass(debugeeClass, JVMTI_HEAP_OBJECT_TAGGED, heapObjectCallback2, &userData))) { nsk_jvmti_setFailStatus(); break; } @@ -200,7 +187,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(caps)); caps.can_tag_objects = 1; if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + jvmti->AddCapabilities(&caps))) { return JNI_ERR; } } From 859d3764943a2a2b7c61fc33ac981dc089fe2f14 Mon Sep 17 00:00:00 2001 From: Xueming Shen Date: Mon, 8 Oct 2018 14:14:52 -0700 Subject: [PATCH 036/124] 8211728: JarFile::versionedStream() does not filter META-INF resources in versioned stream Reviewed-by: alanb --- src/java.base/share/classes/java/util/jar/JarFile.java | 3 ++- .../util/jar/JarFile/mrjar/TestVersionedStream.java | 10 ++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/java.base/share/classes/java/util/jar/JarFile.java b/src/java.base/share/classes/java/util/jar/JarFile.java index bc8805ee14f..0acfc189abf 100644 --- a/src/java.base/share/classes/java/util/jar/JarFile.java +++ b/src/java.base/share/classes/java/util/jar/JarFile.java @@ -556,7 +556,8 @@ class JarFile extends ZipFile { return JUZFA.entryNameStream(this).map(this::getBasename) .filter(Objects::nonNull) .distinct() - .map(this::getJarEntry); + .map(this::getJarEntry) + .filter(Objects::nonNull); } return stream(); } diff --git a/test/jdk/java/util/jar/JarFile/mrjar/TestVersionedStream.java b/test/jdk/java/util/jar/JarFile/mrjar/TestVersionedStream.java index 8f4109ee767..91c0421b207 100644 --- a/test/jdk/java/util/jar/JarFile/mrjar/TestVersionedStream.java +++ b/test/jdk/java/util/jar/JarFile/mrjar/TestVersionedStream.java @@ -23,7 +23,7 @@ /* * @test - * @bug 8163798 8189611 + * @bug 8163798 8189611 8211728 * @summary basic tests for multi-release jar versioned streams * @library /test/lib * @modules jdk.jartool/sun.tools.jar java.base/jdk.internal.util.jar @@ -82,7 +82,8 @@ public class TestVersionedStream { "v10/p/Foo.class", "v10/q/Bar.class", "v" + LATEST_VERSION + "/p/Bar.class", - "v" + LATEST_VERSION + "/p/Foo.class" + "v" + LATEST_VERSION + "/p/Foo.class", + "v" + LATEST_VERSION + "/META-INF/Foo.class" ); jar("cf mmr.jar -C base . " + @@ -224,6 +225,11 @@ public class TestVersionedStream { throw new UncheckedIOException(x); } }); + + if (!unversionedEntryNames.contains("META-INF/Foo.class") || + versionedNames.indexOf("META-INF/Foo.class") != -1) { + Assert.fail("versioned META-INF/Foo.class test failed"); + } } } From 2f82ed4f1db6dfb6937519f0094dac2a0ecf7b97 Mon Sep 17 00:00:00 2001 From: Ioi Lam Date: Mon, 8 Oct 2018 16:29:10 -0700 Subject: [PATCH 037/124] 8210388: Use hash table to store archived subgraph_info records Reviewed-by: jiangli --- .../share/classfile/compactHashtable.cpp | 2 +- .../share/classfile/compactHashtable.hpp | 13 +- src/hotspot/share/classfile/stringTable.cpp | 30 +- src/hotspot/share/classfile/stringTable.hpp | 6 +- src/hotspot/share/classfile/symbolTable.cpp | 52 ++-- src/hotspot/share/classfile/symbolTable.hpp | 6 +- src/hotspot/share/memory/heapShared.cpp | 256 +++++++----------- src/hotspot/share/memory/heapShared.hpp | 59 ++-- src/hotspot/share/memory/metaspaceShared.cpp | 42 +-- 9 files changed, 220 insertions(+), 246 deletions(-) diff --git a/src/hotspot/share/classfile/compactHashtable.cpp b/src/hotspot/share/classfile/compactHashtable.cpp index eabe87a213b..9cdc09375a4 100644 --- a/src/hotspot/share/classfile/compactHashtable.cpp +++ b/src/hotspot/share/classfile/compactHashtable.cpp @@ -174,7 +174,7 @@ void CompactHashtableWriter::dump(SimpleCompactHashtable *cht, const char* table // The CompactHashtable implementation // -void SimpleCompactHashtable::serialize(SerializeClosure* soc) { +void SimpleCompactHashtable::serialize_header(SerializeClosure* soc) { soc->do_ptr((void**)&_base_address); soc->do_u4(&_entry_count); soc->do_u4(&_bucket_count); diff --git a/src/hotspot/share/classfile/compactHashtable.hpp b/src/hotspot/share/classfile/compactHashtable.hpp index 0c2ffe209a9..ed8e8dd5656 100644 --- a/src/hotspot/share/classfile/compactHashtable.hpp +++ b/src/hotspot/share/classfile/compactHashtable.hpp @@ -123,6 +123,15 @@ private: public: void dump(SimpleCompactHashtable *cht, const char* table_name); + + static int default_num_buckets(size_t num_entries) { + return default_num_buckets((int)num_entries); + } + static int default_num_buckets(int num_entries) { + int num_buckets = num_entries / SharedSymbolTableBucketSize; + // calculation of num_buckets can result in zero buckets, we need at least one + return (num_buckets < 1) ? 1 : num_buckets; + } }; #endif // INCLUDE_CDS @@ -213,8 +222,8 @@ public: _entries = entries; } - // For reading from/writing to the CDS archive - void serialize(SerializeClosure* soc) NOT_CDS_RETURN; + // Read/Write the table's header from/to the CDS archive + void serialize_header(SerializeClosure* soc) NOT_CDS_RETURN; inline bool empty() { return (_entry_count == 0); diff --git a/src/hotspot/share/classfile/stringTable.cpp b/src/hotspot/share/classfile/stringTable.cpp index 3759f1a02b9..1231e3729ac 100644 --- a/src/hotspot/share/classfile/stringTable.cpp +++ b/src/hotspot/share/classfile/stringTable.cpp @@ -819,18 +819,9 @@ oop StringTable::create_archived_string(oop s, Thread* THREAD) { return new_s; } -class CompactStringTableWriter: public CompactHashtableWriter { -public: - CompactStringTableWriter(int num_entries, CompactHashtableStats* stats) : - CompactHashtableWriter(num_entries, stats) {} - void add(unsigned int hash, oop string) { - CompactHashtableWriter::add(hash, CompressedOops::encode(string)); - } -}; - struct CopyToArchive : StackObj { - CompactStringTableWriter* _writer; - CopyToArchive(CompactStringTableWriter* writer) : _writer(writer) {} + CompactHashtableWriter* _writer; + CopyToArchive(CompactHashtableWriter* writer) : _writer(writer) {} bool operator()(WeakHandle* val) { oop s = val->peek(); if (s == NULL) { @@ -838,6 +829,7 @@ struct CopyToArchive : StackObj { } unsigned int hash = java_lang_String::hash_code(s); if (hash == 0) { + // We do not archive Strings with a 0 hashcode because ...... return true; } @@ -849,12 +841,12 @@ struct CopyToArchive : StackObj { val->replace(new_s); // add to the compact table - _writer->add(hash, new_s); + _writer->add(hash, CompressedOops::encode(new_s)); return true; } }; -void StringTable::copy_shared_string_table(CompactStringTableWriter* writer) { +void StringTable::copy_shared_string_table(CompactHashtableWriter* writer) { assert(MetaspaceShared::is_heap_object_archiving_allowed(), "must be"); CopyToArchive copy(writer); @@ -865,18 +857,18 @@ void StringTable::write_to_archive() { assert(MetaspaceShared::is_heap_object_archiving_allowed(), "must be"); _shared_table.reset(); - int num_buckets = the_table()->_items_count / SharedSymbolTableBucketSize; - // calculation of num_buckets can result in zero buckets, we need at least one - CompactStringTableWriter writer(num_buckets > 1 ? num_buckets : 1, - &MetaspaceShared::stats()->string); + int num_buckets = CompactHashtableWriter::default_num_buckets( + StringTable::the_table()->_items_count); + CompactHashtableWriter writer(num_buckets, + &MetaspaceShared::stats()->string); // Copy the interned strings into the "string space" within the java heap copy_shared_string_table(&writer); writer.dump(&_shared_table, "string"); } -void StringTable::serialize(SerializeClosure* soc) { - _shared_table.serialize(soc); +void StringTable::serialize_shared_table_header(SerializeClosure* soc) { + _shared_table.serialize_header(soc); if (soc->writing()) { // Sanity. Make sure we don't use the shared table at dump time diff --git a/src/hotspot/share/classfile/stringTable.hpp b/src/hotspot/share/classfile/stringTable.hpp index 15f98302c34..ccd0c043512 100644 --- a/src/hotspot/share/classfile/stringTable.hpp +++ b/src/hotspot/share/classfile/stringTable.hpp @@ -33,7 +33,7 @@ #include "oops/weakHandle.hpp" #include "utilities/concurrentHashTable.hpp" -class CompactStringTableWriter; +class CompactHashtableWriter; class SerializeClosure; class StringTable; @@ -163,14 +163,14 @@ private: // Sharing private: oop lookup_shared(const jchar* name, int len, unsigned int hash) NOT_CDS_JAVA_HEAP_RETURN_(NULL); - static void copy_shared_string_table(CompactStringTableWriter* ch_table) NOT_CDS_JAVA_HEAP_RETURN; + static void copy_shared_string_table(CompactHashtableWriter* ch_table) NOT_CDS_JAVA_HEAP_RETURN; public: static oop create_archived_string(oop s, Thread* THREAD) NOT_CDS_JAVA_HEAP_RETURN_(NULL); static void set_shared_string_mapped() { _shared_string_mapped = true; } static bool shared_string_mapped() { return _shared_string_mapped; } static void shared_oops_do(OopClosure* f) NOT_CDS_JAVA_HEAP_RETURN; static void write_to_archive() NOT_CDS_JAVA_HEAP_RETURN; - static void serialize(SerializeClosure* soc) NOT_CDS_JAVA_HEAP_RETURN; + static void serialize_shared_table_header(SerializeClosure* soc) NOT_CDS_JAVA_HEAP_RETURN; // Jcmd static void dump(outputStream* st, bool verbose=false); diff --git a/src/hotspot/share/classfile/symbolTable.cpp b/src/hotspot/share/classfile/symbolTable.cpp index 25305313498..f556de6db1d 100644 --- a/src/hotspot/share/classfile/symbolTable.cpp +++ b/src/hotspot/share/classfile/symbolTable.cpp @@ -627,43 +627,31 @@ void SymbolTable::dump(outputStream* st, bool verbose) { } #if INCLUDE_CDS -class CompactSymbolTableWriter: public CompactHashtableWriter { -public: - CompactSymbolTableWriter(int num_buckets, CompactHashtableStats* stats) : - CompactHashtableWriter(num_buckets, stats) {} - void add(unsigned int hash, Symbol *symbol) { - uintx deltax = MetaspaceShared::object_delta(symbol); +struct CopyToArchive : StackObj { + CompactHashtableWriter* _writer; + CopyToArchive(CompactHashtableWriter* writer) : _writer(writer) {} + bool operator()(Symbol** value) { + assert(value != NULL, "expected valid value"); + assert(*value != NULL, "value should point to a symbol"); + Symbol* sym = *value; + unsigned int fixed_hash = hash_shared_symbol((const char*)sym->bytes(), sym->utf8_length()); + assert(fixed_hash == hash_symbol((const char*)sym->bytes(), sym->utf8_length(), false), + "must not rehash during dumping"); + + uintx deltax = MetaspaceShared::object_delta(sym); // When the symbols are stored into the archive, we already check that // they won't be more than MAX_SHARED_DELTA from the base address, or // else the dumping would have been aborted. assert(deltax <= MAX_SHARED_DELTA, "must not be"); u4 delta = u4(deltax); - CompactHashtableWriter::add(hash, delta); - } -}; - -struct CopyToArchive : StackObj { - CompactSymbolTableWriter* _writer; - CopyToArchive(CompactSymbolTableWriter* writer) : _writer(writer) {} - bool operator()(Symbol** value) { - assert(value != NULL, "expected valid value"); - assert(*value != NULL, "value should point to a symbol"); - Symbol* sym = *value; - unsigned int fixed_hash = hash_shared_symbol((const char*)sym->bytes(), sym->utf8_length()); - if (fixed_hash == 0) { - return true; - } - assert(fixed_hash == hash_symbol((const char*)sym->bytes(), sym->utf8_length(), false), - "must not rehash during dumping"); - // add to the compact table - _writer->add(fixed_hash, sym); + _writer->add(fixed_hash, delta); return true; } }; -void SymbolTable::copy_shared_symbol_table(CompactSymbolTableWriter* writer) { +void SymbolTable::copy_shared_symbol_table(CompactHashtableWriter* writer) { CopyToArchive copy(writer); SymbolTable::the_table()->_local_table->do_scan(Thread::current(), copy); } @@ -671,10 +659,10 @@ void SymbolTable::copy_shared_symbol_table(CompactSymbolTableWriter* writer) { void SymbolTable::write_to_archive() { _shared_table.reset(); - int num_buckets = (int)(SymbolTable::the_table()->_items_count / SharedSymbolTableBucketSize); - // calculation of num_buckets can result in zero buckets, we need at least one - CompactSymbolTableWriter writer(num_buckets > 1 ? num_buckets : 1, - &MetaspaceShared::stats()->symbol); + int num_buckets = CompactHashtableWriter::default_num_buckets( + SymbolTable::the_table()->_items_count); + CompactHashtableWriter writer(num_buckets, + &MetaspaceShared::stats()->symbol); copy_shared_symbol_table(&writer); writer.dump(&_shared_table, "symbol"); @@ -686,8 +674,8 @@ void SymbolTable::write_to_archive() { assert(sym == _shared_table.lookup(name, hash, len), "sanity"); } -void SymbolTable::serialize(SerializeClosure* soc) { - _shared_table.serialize(soc); +void SymbolTable::serialize_shared_table_header(SerializeClosure* soc) { + _shared_table.serialize_header(soc); if (soc->writing()) { // Sanity. Make sure we don't use the shared table at dump time diff --git a/src/hotspot/share/classfile/symbolTable.hpp b/src/hotspot/share/classfile/symbolTable.hpp index 239c12a1c3c..3d3b27e1fb9 100644 --- a/src/hotspot/share/classfile/symbolTable.hpp +++ b/src/hotspot/share/classfile/symbolTable.hpp @@ -84,7 +84,7 @@ public: operator Symbol*() { return _temp; } }; -class CompactSymbolTableWriter; +class CompactHashtableWriter; class SerializeClosure; class SymbolTableConfig; @@ -240,10 +240,10 @@ public: // Sharing private: - static void copy_shared_symbol_table(CompactSymbolTableWriter* ch_table); + static void copy_shared_symbol_table(CompactHashtableWriter* ch_table); public: static void write_to_archive() NOT_CDS_RETURN; - static void serialize(SerializeClosure* soc) NOT_CDS_RETURN; + static void serialize_shared_table_header(SerializeClosure* soc) NOT_CDS_RETURN; static void metaspace_pointers_do(MetaspaceClosure* it); // Jcmd diff --git a/src/hotspot/share/memory/heapShared.cpp b/src/hotspot/share/memory/heapShared.cpp index 2837a30b277..c55415caf78 100644 --- a/src/hotspot/share/memory/heapShared.cpp +++ b/src/hotspot/share/memory/heapShared.cpp @@ -41,49 +41,26 @@ #include "utilities/bitMap.inline.hpp" #if INCLUDE_CDS_JAVA_HEAP -KlassSubGraphInfo* HeapShared::_subgraph_info_list = NULL; -int HeapShared::_num_archived_subgraph_info_records = 0; -Array* HeapShared::_archived_subgraph_info_records = NULL; - -KlassSubGraphInfo* HeapShared::find_subgraph_info(Klass* k) { - KlassSubGraphInfo* info = _subgraph_info_list; - while (info != NULL) { - if (info->klass() == k) { - return info; - } - info = info->next(); - } - return NULL; -} +address HeapShared::_narrow_oop_base; +int HeapShared::_narrow_oop_shift; +HeapShared::DumpTimeKlassSubGraphInfoTable* HeapShared::_dump_time_subgraph_info_table = NULL; +HeapShared::RunTimeKlassSubGraphInfoTable HeapShared::_run_time_subgraph_info_table; // Get the subgraph_info for Klass k. A new subgraph_info is created if // there is no existing one for k. The subgraph_info records the relocated // Klass* of the original k. KlassSubGraphInfo* HeapShared::get_subgraph_info(Klass* k) { + assert(DumpSharedSpaces, "dump time only"); Klass* relocated_k = MetaspaceShared::get_relocated_klass(k); - KlassSubGraphInfo* info = find_subgraph_info(relocated_k); - if (info != NULL) { - return info; + KlassSubGraphInfo* info = _dump_time_subgraph_info_table->get(relocated_k); + if (info == NULL) { + _dump_time_subgraph_info_table->put(relocated_k, KlassSubGraphInfo(relocated_k)); + info = _dump_time_subgraph_info_table->get(relocated_k); + ++ _dump_time_subgraph_info_table->_count; } - - info = new KlassSubGraphInfo(relocated_k, _subgraph_info_list); - _subgraph_info_list = info; return info; } -address HeapShared::_narrow_oop_base; -int HeapShared::_narrow_oop_shift; - -int HeapShared::num_of_subgraph_infos() { - int num = 0; - KlassSubGraphInfo* info = _subgraph_info_list; - while (info != NULL) { - num ++; - info = info->next(); - } - return num; -} - // Add an entry field to the current KlassSubGraphInfo. void KlassSubGraphInfo::add_subgraph_entry_field(int static_field_offset, oop v) { assert(DumpSharedSpaces, "dump time only"); @@ -156,7 +133,6 @@ void KlassSubGraphInfo::add_subgraph_object_klass(Klass* orig_k, Klass *relocate // Initialize an archived subgraph_info_record from the given KlassSubGraphInfo. void ArchivedKlassSubGraphInfoRecord::init(KlassSubGraphInfo* info) { _k = info->klass(); - _next = NULL; _entry_field_records = NULL; _subgraph_object_klasses = NULL; @@ -191,6 +167,26 @@ void ArchivedKlassSubGraphInfoRecord::init(KlassSubGraphInfo* info) { } } +struct CopyKlassSubGraphInfoToArchive : StackObj { + CompactHashtableWriter* _writer; + CopyKlassSubGraphInfoToArchive(CompactHashtableWriter* writer) : _writer(writer) {} + + bool do_entry(Klass* klass, KlassSubGraphInfo& info) { + if (info.subgraph_object_klasses() != NULL || info.subgraph_entry_fields() != NULL) { + ArchivedKlassSubGraphInfoRecord* record = + (ArchivedKlassSubGraphInfoRecord*)MetaspaceShared::read_only_space_alloc(sizeof(ArchivedKlassSubGraphInfoRecord)); + record->init(&info); + + unsigned int hash = primitive_hash(klass); + uintx deltax = MetaspaceShared::object_delta(record); + guarantee(deltax <= MAX_SHARED_DELTA, "must not be"); + u4 delta = u4(deltax); + _writer->add(hash, delta); + } + return true; // keep on iterating + } +}; + // Build the records of archived subgraph infos, which include: // - Entry points to all subgraphs from the containing class mirror. The entry // points are static fields in the mirror. For each entry point, the field @@ -198,145 +194,97 @@ void ArchivedKlassSubGraphInfoRecord::init(KlassSubGraphInfo* info) { // back to the corresponding field at runtime. // - A list of klasses that need to be loaded/initialized before archived // java object sub-graph can be accessed at runtime. -// -// The records are saved in the archive file and reloaded at runtime. -// -// Layout of the archived subgraph info records: -// -// records_size | num_records | records* -// ArchivedKlassSubGraphInfoRecord | entry_fields | subgraph_object_klasses -size_t HeapShared::build_archived_subgraph_info_records(int num_records) { - // remember the start address - char* start_p = MetaspaceShared::read_only_space_top(); +void HeapShared::write_subgraph_info_table() { + // Allocate the contents of the hashtable(s) inside the RO region of the CDS archive. + DumpTimeKlassSubGraphInfoTable* d_table = _dump_time_subgraph_info_table; + CompactHashtableStats stats; - // now populate the archived subgraph infos, which will be saved in the - // archive file - _archived_subgraph_info_records = - MetaspaceShared::new_ro_array(num_records); - KlassSubGraphInfo* info = _subgraph_info_list; - int i = 0; - while (info != NULL) { - assert(i < _archived_subgraph_info_records->length(), "sanity"); - ArchivedKlassSubGraphInfoRecord* record = - _archived_subgraph_info_records->adr_at(i); - record->init(info); - info = info->next(); - i ++; - } + _run_time_subgraph_info_table.reset(); - // _subgraph_info_list is no longer needed - delete _subgraph_info_list; - _subgraph_info_list = NULL; + int num_buckets = CompactHashtableWriter::default_num_buckets(d_table->_count); + CompactHashtableWriter writer(num_buckets, &stats); + CopyKlassSubGraphInfoToArchive copy(&writer); + _dump_time_subgraph_info_table->iterate(©); - char* end_p = MetaspaceShared::read_only_space_top(); - size_t records_size = end_p - start_p; - return records_size; + writer.dump(&_run_time_subgraph_info_table, "subgraphs"); } -// Write the subgraph info records in the shared _ro region -void HeapShared::write_archived_subgraph_infos() { - assert(DumpSharedSpaces, "dump time only"); - - Array* records_header = MetaspaceShared::new_ro_array(3); - - _num_archived_subgraph_info_records = num_of_subgraph_infos(); - size_t records_size = build_archived_subgraph_info_records( - _num_archived_subgraph_info_records); - - // Now write the header information: - // records_size, num_records, _archived_subgraph_info_records - assert(records_header != NULL, "sanity"); - intptr_t* p = (intptr_t*)(records_header->data()); - *p = (intptr_t)records_size; - p ++; - *p = (intptr_t)_num_archived_subgraph_info_records; - p ++; - *p = (intptr_t)_archived_subgraph_info_records; -} - -char* HeapShared::read_archived_subgraph_infos(char* buffer) { - Array* records_header = (Array*)buffer; - intptr_t* p = (intptr_t*)(records_header->data()); - size_t records_size = (size_t)(*p); - p ++; - _num_archived_subgraph_info_records = *p; - p ++; - _archived_subgraph_info_records = - (Array*)(*p); - - buffer = (char*)_archived_subgraph_info_records + records_size; - return buffer; +void HeapShared::serialize_subgraph_info_table_header(SerializeClosure* soc) { + _run_time_subgraph_info_table.serialize_header(soc); } void HeapShared::initialize_from_archived_subgraph(Klass* k) { if (!MetaspaceShared::open_archive_heap_region_mapped()) { return; // nothing to do } + assert(!DumpSharedSpaces, "Should not be called with DumpSharedSpaces"); - if (_num_archived_subgraph_info_records == 0) { - return; // no subgraph info records - } + unsigned int hash = primitive_hash(k); + ArchivedKlassSubGraphInfoRecord* record = _run_time_subgraph_info_table.lookup(k, hash, 0); // Initialize from archived data. Currently this is done only // during VM initialization time. No lock is needed. - Thread* THREAD = Thread::current(); - for (int i = 0; i < _archived_subgraph_info_records->length(); i++) { - ArchivedKlassSubGraphInfoRecord* record = _archived_subgraph_info_records->adr_at(i); - if (record->klass() == k) { - int i; - // Found the archived subgraph info record for the requesting klass. - // Load/link/initialize the klasses of the objects in the subgraph. - // NULL class loader is used. - Array* klasses = record->subgraph_object_klasses(); - if (klasses != NULL) { - for (i = 0; i < klasses->length(); i++) { - Klass* obj_k = klasses->at(i); - Klass* resolved_k = SystemDictionary::resolve_or_null( - (obj_k)->name(), THREAD); - if (resolved_k != obj_k) { - return; - } - if ((obj_k)->is_instance_klass()) { - InstanceKlass* ik = InstanceKlass::cast(obj_k); - ik->initialize(THREAD); - } else if ((obj_k)->is_objArray_klass()) { - ObjArrayKlass* oak = ObjArrayKlass::cast(obj_k); - oak->initialize(THREAD); - } + if (record != NULL) { + Thread* THREAD = Thread::current(); + if (log_is_enabled(Info, cds, heap)) { + ResourceMark rm; + log_info(cds, heap)("initialize_from_archived_subgraph " PTR_FORMAT " %s", p2i(k), + k->external_name()); + } + + int i; + // Load/link/initialize the klasses of the objects in the subgraph. + // NULL class loader is used. + Array* klasses = record->subgraph_object_klasses(); + if (klasses != NULL) { + for (i = 0; i < klasses->length(); i++) { + Klass* obj_k = klasses->at(i); + Klass* resolved_k = SystemDictionary::resolve_or_null( + (obj_k)->name(), THREAD); + if (resolved_k != obj_k) { + return; + } + if ((obj_k)->is_instance_klass()) { + InstanceKlass* ik = InstanceKlass::cast(obj_k); + ik->initialize(THREAD); + } else if ((obj_k)->is_objArray_klass()) { + ObjArrayKlass* oak = ObjArrayKlass::cast(obj_k); + oak->initialize(THREAD); } } + } - if (HAS_PENDING_EXCEPTION) { - CLEAR_PENDING_EXCEPTION; - // None of the field value will be set if there was an exception. - // The java code will not see any of the archived objects in the - // subgraphs referenced from k in this case. - return; - } - - // Load the subgraph entry fields from the record and store them back to - // the corresponding fields within the mirror. - oop m = k->java_mirror(); - Array* entry_field_records = record->entry_field_records(); - if (entry_field_records != NULL) { - int efr_len = entry_field_records->length(); - assert(efr_len % 2 == 0, "sanity"); - for (i = 0; i < efr_len;) { - int field_offset = entry_field_records->at(i); - // The object refereced by the field becomes 'known' by GC from this - // point. All objects in the subgraph reachable from the object are - // also 'known' by GC. - oop v = MetaspaceShared::materialize_archived_object( - entry_field_records->at(i+1)); - m->obj_field_put(field_offset, v); - i += 2; - } - } - - // Done. Java code can see the archived sub-graphs referenced from k's - // mirror after this point. + if (HAS_PENDING_EXCEPTION) { + CLEAR_PENDING_EXCEPTION; + // None of the field value will be set if there was an exception. + // The java code will not see any of the archived objects in the + // subgraphs referenced from k in this case. return; } + + // Load the subgraph entry fields from the record and store them back to + // the corresponding fields within the mirror. + oop m = k->java_mirror(); + Array* entry_field_records = record->entry_field_records(); + if (entry_field_records != NULL) { + int efr_len = entry_field_records->length(); + assert(efr_len % 2 == 0, "sanity"); + for (i = 0; i < efr_len;) { + int field_offset = entry_field_records->at(i); + // The object refereced by the field becomes 'known' by GC from this + // point. All objects in the subgraph reachable from the object are + // also 'known' by GC. + oop v = MetaspaceShared::materialize_archived_object( + entry_field_records->at(i+1)); + m->obj_field_put(field_offset, v); + i += 2; + + log_debug(cds, heap)(" " PTR_FORMAT " init field @ %2d = " PTR_FORMAT, p2i(k), field_offset, p2i(v)); + } + + // Done. Java code can see the archived sub-graphs referenced from k's + // mirror after this point. + } } } @@ -702,6 +650,8 @@ public: }; void HeapShared::init_archivable_static_fields(Thread* THREAD) { + _dump_time_subgraph_info_table = new (ResourceObj::C_HEAP, mtClass)DumpTimeKlassSubGraphInfoTable(); + for (int i = 0; i < num_archivable_static_fields; i++) { ArchivableStaticFieldInfo* info = &archivable_static_fields[i]; TempNewSymbol klass_name = SymbolTable::new_symbol(info->klass_name, THREAD); diff --git a/src/hotspot/share/memory/heapShared.hpp b/src/hotspot/share/memory/heapShared.hpp index ce9e542c72d..92c10e41120 100644 --- a/src/hotspot/share/memory/heapShared.hpp +++ b/src/hotspot/share/memory/heapShared.hpp @@ -25,6 +25,7 @@ #ifndef SHARE_VM_MEMORY_HEAPSHARED_HPP #define SHARE_VM_MEMORY_HEAPSHARED_HPP +#include "classfile/compactHashtable.hpp" #include "classfile/systemDictionary.hpp" #include "memory/allocation.hpp" #include "memory/universe.hpp" @@ -42,7 +43,6 @@ // within the sub-graphs. class KlassSubGraphInfo: public CHeapObj { private: - KlassSubGraphInfo* _next; // The class that contains the static field(s) as the entry point(s) // of archived object sub-graph(s). Klass* _k; @@ -54,8 +54,8 @@ class KlassSubGraphInfo: public CHeapObj { GrowableArray* _subgraph_entry_fields; public: - KlassSubGraphInfo(Klass* k, KlassSubGraphInfo* next) : - _next(next), _k(k), _subgraph_object_klasses(NULL), + KlassSubGraphInfo(Klass* k) : + _k(k), _subgraph_object_klasses(NULL), _subgraph_entry_fields(NULL) {} ~KlassSubGraphInfo() { if (_subgraph_object_klasses != NULL) { @@ -66,7 +66,6 @@ class KlassSubGraphInfo: public CHeapObj { } }; - KlassSubGraphInfo* next() { return _next; } Klass* klass() { return _k; } GrowableArray* subgraph_object_klasses() { return _subgraph_object_klasses; @@ -87,7 +86,6 @@ class KlassSubGraphInfo: public CHeapObj { // at runtime. class ArchivedKlassSubGraphInfoRecord { private: - ArchivedKlassSubGraphInfoRecord* _next; Klass* _k; // contains pairs of field offset and value for each subgraph entry field @@ -98,11 +96,9 @@ class ArchivedKlassSubGraphInfoRecord { Array* _subgraph_object_klasses; public: ArchivedKlassSubGraphInfoRecord() : - _next(NULL), _k(NULL), _entry_field_records(NULL), _subgraph_object_klasses(NULL) {} + _k(NULL), _entry_field_records(NULL), _subgraph_object_klasses(NULL) {} void init(KlassSubGraphInfo* info); Klass* klass() { return _k; } - ArchivedKlassSubGraphInfoRecord* next() { return _next; } - void set_next(ArchivedKlassSubGraphInfoRecord* next) { _next = next; } Array* entry_field_records() { return _entry_field_records; } Array* subgraph_object_klasses() { return _subgraph_object_klasses; } }; @@ -112,14 +108,42 @@ class HeapShared: AllStatic { friend class VerifySharedOopClosure; private: #if INCLUDE_CDS_JAVA_HEAP - // This is a list of subgraph infos built at dump time while - // archiving object subgraphs. - static KlassSubGraphInfo* _subgraph_info_list; - // Contains a list of ArchivedKlassSubGraphInfoRecords that is stored - // in the archive file and reloaded at runtime. - static int _num_archived_subgraph_info_records; - static Array* _archived_subgraph_info_records; + static bool klass_equals(Klass* const& p1, Klass* const& p2) { + return primitive_equals(p1, p2); + } + + static unsigned klass_hash(Klass* const& klass) { + return primitive_hash

((address)klass); + } + + class DumpTimeKlassSubGraphInfoTable + : public ResourceHashtable { + public: + int _count; + }; + + inline static ArchivedKlassSubGraphInfoRecord* read_record_from_compact_hashtable(address base_address, u4 offset) { + return (ArchivedKlassSubGraphInfoRecord*)(base_address + offset); + } + + inline static bool record_equals_compact_hashtable_entry(ArchivedKlassSubGraphInfoRecord* value, const Klass* key, int len_unused) { + return (value->klass() == key); + } + + typedef CompactHashtable< + const Klass*, + ArchivedKlassSubGraphInfoRecord*, + read_record_from_compact_hashtable, + record_equals_compact_hashtable_entry + > RunTimeKlassSubGraphInfoTable; + + static DumpTimeKlassSubGraphInfoTable* _dump_time_subgraph_info_table; + static RunTimeKlassSubGraphInfoTable _run_time_subgraph_info_table; // Archive object sub-graph starting from the given static field // in Klass k's mirror. @@ -131,11 +155,10 @@ class HeapShared: AllStatic { static void verify_reachable_objects_from(oop obj, bool is_archived) PRODUCT_RETURN; - static KlassSubGraphInfo* find_subgraph_info(Klass *k); static KlassSubGraphInfo* get_subgraph_info(Klass *k); static int num_of_subgraph_infos(); - static size_t build_archived_subgraph_info_records(int num_records); + static void build_archived_subgraph_info_records(int num_records); // Used by decode_from_archive static address _narrow_oop_base; @@ -203,6 +226,8 @@ class HeapShared: AllStatic { static void init_archivable_static_fields(Thread* THREAD) NOT_CDS_JAVA_HEAP_RETURN; static void archive_static_fields(Thread* THREAD) NOT_CDS_JAVA_HEAP_RETURN; + static void write_subgraph_info_table() NOT_CDS_JAVA_HEAP_RETURN; + static void serialize_subgraph_info_table_header(SerializeClosure* soc) NOT_CDS_JAVA_HEAP_RETURN; #if INCLUDE_CDS_JAVA_HEAP static ResourceBitMap calculate_oopmap(MemRegion region); diff --git a/src/hotspot/share/memory/metaspaceShared.cpp b/src/hotspot/share/memory/metaspaceShared.cpp index f1b11f94724..930b57457af 100644 --- a/src/hotspot/share/memory/metaspaceShared.cpp +++ b/src/hotspot/share/memory/metaspaceShared.cpp @@ -420,10 +420,10 @@ void MetaspaceShared::serialize(SerializeClosure* soc) { vmSymbols::serialize(soc); soc->do_tag(--tag); - // Dump/restore the symbol and string tables - SymbolTable::serialize(soc); - StringTable::serialize(soc); - soc->do_tag(--tag); + // Dump/restore the symbol/string/subgraph_info tables + SymbolTable::serialize_shared_table_header(soc); + StringTable::serialize_shared_table_header(soc); + HeapShared::serialize_subgraph_info_table_header(soc); JavaClasses::serialize_offsets(soc); InstanceMirrorKlass::serialize_offsets(soc); @@ -1098,6 +1098,21 @@ public: return _alloc_stats; } + // Use this when you allocate space with MetaspaceShare::read_only_space_alloc() + // outside of ArchiveCompactor::allocate(). These are usually for misc tables + // that are allocated in the RO space. + class OtherROAllocMark { + char* _oldtop; + public: + OtherROAllocMark() { + _oldtop = _ro_region.top(); + } + ~OtherROAllocMark() { + char* newtop = _ro_region.top(); + ArchiveCompactor::alloc_stats()->record_other_type(int(newtop - _oldtop), true); + } + }; + static void allocate(MetaspaceClosure::Ref* ref, bool read_only) { address obj = ref->obj(); int bytes = ref->size() * BytesPerWord; @@ -1308,7 +1323,7 @@ void VM_PopulateDumpSharedSpace::dump_symbols() { } char* VM_PopulateDumpSharedSpace::dump_read_only_tables() { - char* oldtop = _ro_region.top(); + ArchiveCompactor::OtherROAllocMark mark; // Reorder the system dictionary. Moving the symbols affects // how the hash table indices are calculated. SystemDictionary::reorder_dictionary_for_sharing(); @@ -1329,11 +1344,6 @@ char* VM_PopulateDumpSharedSpace::dump_read_only_tables() { char* table_top = _ro_region.allocate(table_bytes, sizeof(intptr_t)); SystemDictionary::copy_table(table_top, _ro_region.top()); - // Write the archived object sub-graph infos. For each klass with sub-graphs, - // the info includes the static fields (sub-graph entry points) and Klasses - // of objects included in the sub-graph. - HeapShared::write_archived_subgraph_infos(); - // Write the other data to the output array. WriteClosure wc(&_ro_region); MetaspaceShared::serialize(&wc); @@ -1341,8 +1351,6 @@ char* VM_PopulateDumpSharedSpace::dump_read_only_tables() { // Write the bitmaps for patching the archive heap regions dump_archive_heap_oopmaps(); - char* newtop = _ro_region.top(); - ArchiveCompactor::alloc_stats()->record_other_type(int(newtop - oldtop), true); return buckets_top; } @@ -1822,6 +1830,11 @@ void VM_PopulateDumpSharedSpace::dump_java_heap_objects() { } G1HeapVerifier::verify_archive_regions(); + + { + ArchiveCompactor::OtherROAllocMark mark; + HeapShared::write_subgraph_info_table(); + } } void VM_PopulateDumpSharedSpace::dump_archive_heap_oopmaps() { @@ -1889,7 +1902,7 @@ void MetaspaceShared::dump_open_archive_heap_objects( unsigned MetaspaceShared::obj_hash(oop const& p) { assert(!p->mark()->has_bias_pattern(), - "this object should never have been locked"); // so identity_hash won't safepoin + "this object should never have been locked"); // so identity_hash won't safepoint unsigned hash = (unsigned)p->identity_hash(); return hash; } @@ -2145,9 +2158,6 @@ void MetaspaceShared::initialize_shared_spaces() { buffer += sizeof(intptr_t); buffer += len; - // The table of archived java heap object sub-graph infos - buffer = HeapShared::read_archived_subgraph_infos(buffer); - // Verify various attributes of the archive, plus initialize the // shared string/symbol tables intptr_t* array = (intptr_t*)buffer; From 51be7db96f3fc32a7ddb24f8af19fb4fc0577aaf Mon Sep 17 00:00:00 2001 From: Kim Barrett Date: Mon, 8 Oct 2018 20:01:39 -0400 Subject: [PATCH 038/124] 8211804: Constant AO_UNUSED_MBZ uses left shift of negative value Use unsigned shift. Reviewed-by: alanb --- src/jdk.pack/share/native/common-unpack/constants.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jdk.pack/share/native/common-unpack/constants.h b/src/jdk.pack/share/native/common-unpack/constants.h index 8d8376dd23a..6fc34f75a08 100644 --- a/src/jdk.pack/share/native/common-unpack/constants.h +++ b/src/jdk.pack/share/native/common-unpack/constants.h @@ -203,7 +203,7 @@ enum { AO_HAVE_FIELD_FLAGS_HI = 1<<10, AO_HAVE_METHOD_FLAGS_HI = 1<<11, AO_HAVE_CODE_FLAGS_HI = 1<<12, - AO_UNUSED_MBZ = (-1)<<13, // options bits reserved for future use. + AO_UNUSED_MBZ = (int)((~0U)<<13), // options bits reserved for future use. #define ARCHIVE_BIT_DO(F) \ F(AO_HAVE_SPECIAL_FORMATS) \ From 61f453edf72fa506318d755345482e45ac901ce4 Mon Sep 17 00:00:00 2001 From: Jean Christophe Beyler Date: Mon, 8 Oct 2018 19:44:44 -0700 Subject: [PATCH 039/124] 8211782: Remove the NSK_CPP_STUB macros from vmTestbase for jvmti/[I-S]* Remove the NSK_CPP_STUB macros Reviewed-by: amenkov, sspitsyn --- .../iterinstcls005/iterinstcls005.cpp | 40 ++-- .../iterinstcls006/iterinstcls006.cpp | 19 +- .../iterinstcls007/iterinstcls007.cpp | 25 +-- .../iterobjreachobj001/iterobjreachobj001.cpp | 58 +++--- .../iterobjreachobj002/iterobjreachobj002.cpp | 35 ++-- .../iterobjreachobj003/iterobjreachobj003.cpp | 46 ++--- .../iterobjreachobj004/iterobjreachobj004.cpp | 25 +-- .../iterobjreachobj005/iterobjreachobj005.cpp | 31 +-- .../iterreachobj001/iterreachobj001.cpp | 55 +++--- .../iterreachobj002/iterreachobj002.cpp | 86 +++----- .../iterreachobj003/iterreachobj003.cpp | 94 +++------ .../iterreachobj004/iterreachobj004.cpp | 31 ++- .../iterreachobj005/iterreachobj005.cpp | 50 ++--- .../jvmti/IterateThroughHeap/abort/Abort.cpp | 9 +- .../callbacks/Callbacks.cpp | 91 ++++----- .../ConcreteKlassFilter.cpp | 40 ++-- .../filter-tagged/HeapFilter.cpp | 102 ++++------ .../NonConcreteKlassFilter.cpp | 16 +- .../mcontenter001/mcontenter001.cpp | 51 ++--- .../mcontentered001/mcontentered001.cpp | 61 +++--- .../monitorwait001/monitorwait001.cpp | 49 ++--- .../monitorwaited001/monitorwaited001.cpp | 49 ++--- .../nativemethbind001/nativemethbind001.cpp | 46 ++--- .../nativemethbind002/nativemethbind002.cpp | 46 ++--- .../nativemethbind003/nativemethbind003.cpp | 54 ++--- .../nativemethbind004/nativemethbind004.cpp | 40 ++-- .../ObjectFree/objfree001/objfree001.cpp | 46 ++--- .../ObjectFree/objfree002/objfree002.cpp | 55 ++---- .../PopFrame/popframe005/popframe005.cpp | 107 ++-------- .../redefclass028/redefclass028.cpp | 29 ++- .../redefclass029/redefclass029.cpp | 29 ++- .../redefclass030/redefclass030.cpp | 29 ++- .../relcaps001/relcaps001.cpp | 16 +- .../relcaps002/relcaps002.cpp | 16 +- .../jvmti/ResourceExhausted/resexhausted.cpp | 8 +- .../resumethrd001/resumethrd001.cpp | 14 +- .../resumethrd002/resumethrd002.cpp | 16 +- .../resumethrdlst001/resumethrdlst001.cpp | 41 ++-- .../resumethrdlst002/resumethrdlst002.cpp | 52 ++--- .../retransform002/retransform002.cpp | 49 +---- .../retransform003/retransform003.cpp | 133 ++----------- .../retransform004/retransform004.cpp | 58 +----- .../allocation/AP01/ap01t001/ap01t001.cpp | 78 +++----- .../allocation/AP02/ap02t001/ap02t001.cpp | 47 ++--- .../allocation/AP03/ap03t001/ap03t001.cpp | 56 ++---- .../allocation/AP04/ap04t001/ap04t001.cpp | 93 ++++----- .../allocation/AP04/ap04t002/ap04t002.cpp | 102 ++++------ .../allocation/AP04/ap04t003/ap04t003.cpp | 185 ++++++------------ .../allocation/AP05/ap05t001/ap05t001.cpp | 31 ++- .../allocation/AP05/ap05t002/ap05t002.cpp | 34 ++-- 50 files changed, 845 insertions(+), 1728 deletions(-) diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverInstancesOfClass/iterinstcls005/iterinstcls005.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverInstancesOfClass/iterinstcls005/iterinstcls005.cpp index 519ad2c0722..0907650299a 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverInstancesOfClass/iterinstcls005/iterinstcls005.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverInstancesOfClass/iterinstcls005/iterinstcls005.cpp @@ -49,55 +49,46 @@ heapObjectCallback(jlong class_tag, objCounter++; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(CreateRawMonitor, st_jvmti, name, &monitor_ptr))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->CreateRawMonitor(name, &monitor_ptr))) { nsk_jvmti_setFailStatus(); return JVMTI_ITERATION_ABORT; } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorEnter, st_jvmti, monitor_ptr))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->RawMonitorEnter(monitor_ptr))) { nsk_jvmti_setFailStatus(); return JVMTI_ITERATION_ABORT; } /* Enter second time */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorEnter, st_jvmti, monitor_ptr))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->RawMonitorEnter(monitor_ptr))) { nsk_jvmti_setFailStatus(); return JVMTI_ITERATION_ABORT; } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(RawMonitorWait, st_jvmti, monitor_ptr, (jlong)100))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->RawMonitorWait(monitor_ptr, (jlong)100))) { nsk_jvmti_setFailStatus(); } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorNotify, st_jvmti, monitor_ptr))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->RawMonitorNotify(monitor_ptr))) { nsk_jvmti_setFailStatus(); } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorNotifyAll, st_jvmti, monitor_ptr))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->RawMonitorNotifyAll(monitor_ptr))) { nsk_jvmti_setFailStatus(); } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorExit, st_jvmti, monitor_ptr))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->RawMonitorExit(monitor_ptr))) { nsk_jvmti_setFailStatus(); return JVMTI_ITERATION_ABORT; } /* Exit second time */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorExit, st_jvmti, monitor_ptr))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->RawMonitorExit(monitor_ptr))) { nsk_jvmti_setFailStatus(); return JVMTI_ITERATION_ABORT; } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(DestroyRawMonitor, st_jvmti, monitor_ptr))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->DestroyRawMonitor(monitor_ptr))) { nsk_jvmti_setFailStatus(); } @@ -127,12 +118,10 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY0("Calling IterateOverInstancesOfClass with filter JVMTI_HEAP_OBJECT_EITHER\n"); { if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB5(IterateOverInstancesOfClass, - jvmti, - debugeeClass, - JVMTI_HEAP_OBJECT_EITHER, - heapObjectCallback, - &fakeUserData))) { + jvmti->IterateOverInstancesOfClass(debugeeClass, + JVMTI_HEAP_OBJECT_EITHER, + heapObjectCallback, + &fakeUserData))) { nsk_jvmti_setFailStatus(); } } @@ -182,8 +171,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(caps)); caps.can_tag_objects = 1; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) { return JNI_ERR; } } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverInstancesOfClass/iterinstcls006/iterinstcls006.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverInstancesOfClass/iterinstcls006/iterinstcls006.cpp index 04ed2e73b45..e74db0cfeca 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverInstancesOfClass/iterinstcls006/iterinstcls006.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverInstancesOfClass/iterinstcls006/iterinstcls006.cpp @@ -45,13 +45,11 @@ heapObjectCallback(jlong class_tag, jlong* tag_ptr, void* storage_data) { - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(SetEnvironmentLocalStorage, st_jvmti, storage_data ))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->SetEnvironmentLocalStorage(storage_data))) { nsk_jvmti_setFailStatus(); } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GetEnvironmentLocalStorage, st_jvmti, &storage_ptr))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->GetEnvironmentLocalStorage(&storage_ptr))) { nsk_jvmti_setFailStatus(); } @@ -82,12 +80,10 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY0("Calling IterateOverInstancesOfClass with filter JVMTI_HEAP_OBJECT_EITHER\n"); { if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB5(IterateOverInstancesOfClass, - jvmti, - debugeeClass, - JVMTI_HEAP_OBJECT_EITHER, - heapObjectCallback, - (void *)storage_data))) { + jvmti->IterateOverInstancesOfClass(debugeeClass, + JVMTI_HEAP_OBJECT_EITHER, + heapObjectCallback, + (void *) storage_data))) { nsk_jvmti_setFailStatus(); } } @@ -144,8 +140,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(caps)); caps.can_tag_objects = 1; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) { return JNI_ERR; } } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverInstancesOfClass/iterinstcls007/iterinstcls007.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverInstancesOfClass/iterinstcls007/iterinstcls007.cpp index b88bf1c6e1e..5e93a860167 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverInstancesOfClass/iterinstcls007/iterinstcls007.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverInstancesOfClass/iterinstcls007/iterinstcls007.cpp @@ -46,8 +46,7 @@ heapObjectCallback(jlong class_tag, jlong* tag_ptr, void* user_data) { - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GetCurrentThreadCpuTimerInfo, st_jvmti, &timer_info1 ))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->GetCurrentThreadCpuTimerInfo(&timer_info1))) { nsk_jvmti_setFailStatus(); } /* Check the returned jvmtiTimerInfo structure */ @@ -65,14 +64,12 @@ heapObjectCallback(jlong class_tag, } /* ---------------------------------------------------------------------- */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GetCurrentThreadCpuTime, st_jvmti, &nanos ))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->GetCurrentThreadCpuTime(&nanos))) { nsk_jvmti_setFailStatus(); } /* ---------------------------------------------------------------------- */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GetTimerInfo, st_jvmti, &timer_info2 ))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->GetTimerInfo(&timer_info2))) { nsk_jvmti_setFailStatus(); } /* Check the returned jvmtiTimerInfo structure */ @@ -91,8 +88,7 @@ heapObjectCallback(jlong class_tag, /* ---------------------------------------------------------------------- */ nanos = 0; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GetTime, st_jvmti, &nanos ))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->GetTime(&nanos))) { nsk_jvmti_setFailStatus(); } @@ -123,12 +119,10 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { } if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB5(IterateOverInstancesOfClass, - jvmti, - debugeeClass, - JVMTI_HEAP_OBJECT_EITHER, - heapObjectCallback, - (void *)user_data))) { + jvmti->IterateOverInstancesOfClass(debugeeClass, + JVMTI_HEAP_OBJECT_EITHER, + heapObjectCallback, + (void *) user_data))) { nsk_jvmti_setFailStatus(); } } @@ -174,8 +168,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { caps.can_tag_objects = 1; caps.can_get_current_thread_cpu_time = 1; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) { return JNI_ERR; } } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverObjectsReachableFromObject/iterobjreachobj001/iterobjreachobj001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverObjectsReachableFromObject/iterobjreachobj001/iterobjreachobj001.cpp index 38fea2a9d7e..487ca0fd703 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverObjectsReachableFromObject/iterobjreachobj001/iterobjreachobj001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverObjectsReachableFromObject/iterobjreachobj001/iterobjreachobj001.cpp @@ -85,15 +85,13 @@ static int getChainObjects(jvmtiEnv* jvmti, JNIEnv* jni, jobject firstObject, count--; tag++; - if (!NSK_JNI_VERIFY(jni, (obj = - NSK_CPP_STUB3(GetObjectField, jni, firstObject, firstField)) != NULL)) { + if (!NSK_JNI_VERIFY(jni, (obj = jni->GetObjectField(firstObject, firstField)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } objectDescList[count].tag = objTag; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetTag, jvmti, obj, objTag))) { + if (!NSK_JVMTI_VERIFY(jvmti->SetTag(obj, objTag))) { nsk_jvmti_setFailStatus(); } NSK_DISPLAY2(" tag=%-5ld object=0x%p\n", (long)objTag, (void*)obj); @@ -104,7 +102,7 @@ static int getChainObjects(jvmtiEnv* jvmti, JNIEnv* jni, jobject firstObject, return NSK_FALSE; } - NSK_TRACE(NSK_CPP_STUB2(DeleteLocalRef, jni, obj)); + NSK_TRACE(jni->DeleteLocalRef(obj)); return NSK_TRUE; } @@ -127,9 +125,8 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, *objectsCount = 1 + 2 * chainLength; NSK_DISPLAY1("Allocate memory for objects list: %d objects\n", *objectsCount); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(Allocate, jvmti, (*objectsCount * sizeof(ObjectDesc)), - (unsigned char**)objectDescList))) { + if (!NSK_JVMTI_VERIFY(jvmti->Allocate((*objectsCount * sizeof(ObjectDesc)), + (unsigned char**)objectDescList))) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -144,16 +141,14 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, } NSK_DISPLAY1("Find debugee class: %s\n", DEBUGEE_CLASS_NAME); - if (!NSK_JNI_VERIFY(jni, (debugeeClass = - NSK_CPP_STUB2(FindClass, jni, DEBUGEE_CLASS_NAME)) != NULL)) { + if (!NSK_JNI_VERIFY(jni, (debugeeClass = jni->FindClass(DEBUGEE_CLASS_NAME)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } NSK_DISPLAY1(" ... found class: 0x%p\n", (void*)debugeeClass); NSK_DISPLAY1("Find root object class: %s\n", ROOT_OBJECT_CLASS_NAME); - if (!NSK_JNI_VERIFY(jni, (rootObjectClass = - NSK_CPP_STUB2(FindClass, jni, ROOT_OBJECT_CLASS_NAME)) != NULL)) { + if (!NSK_JNI_VERIFY(jni, (rootObjectClass = jni->FindClass(ROOT_OBJECT_CLASS_NAME)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -161,34 +156,31 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, NSK_DISPLAY1("Find chain object class: %s\n", CHAIN_OBJECT_CLASS_NAME); if (!NSK_JNI_VERIFY(jni, (chainObjectClass = - NSK_CPP_STUB2(FindClass, jni, CHAIN_OBJECT_CLASS_NAME)) != NULL)) { + jni->FindClass(CHAIN_OBJECT_CLASS_NAME)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } NSK_DISPLAY1(" ... found class: 0x%p\n", (void*)chainObjectClass); NSK_DISPLAY1("Find static field in debugee class: %s\n", OBJECT_FIELD_NAME); - if (!NSK_JNI_VERIFY(jni, (objectField = - NSK_CPP_STUB4(GetStaticFieldID, jni, debugeeClass, - OBJECT_FIELD_NAME, ROOT_OBJECT_CLASS_SIG)) != NULL)) { + if (!NSK_JNI_VERIFY(jni, (objectField = jni->GetStaticFieldID( + debugeeClass, OBJECT_FIELD_NAME, ROOT_OBJECT_CLASS_SIG)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } NSK_DISPLAY1(" ... got fieldID: 0x%p\n", (void*)objectField); NSK_DISPLAY1("Find instance field in root object class: %s\n", REACHABLE_CHAIN_FIELD_NAME); - if (!NSK_JNI_VERIFY(jni, (reachableChainField = - NSK_CPP_STUB4(GetFieldID, jni, rootObjectClass, - REACHABLE_CHAIN_FIELD_NAME, CHAIN_OBJECT_CLASS_SIG)) != NULL)) { + if (!NSK_JNI_VERIFY(jni, (reachableChainField = jni->GetFieldID( + rootObjectClass, REACHABLE_CHAIN_FIELD_NAME, CHAIN_OBJECT_CLASS_SIG)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } NSK_DISPLAY1(" ... got fieldID: 0x%p\n", (void*)reachableChainField); NSK_DISPLAY1("Find instance field in root object class: %s\n", UNREACHABLE_CHAIN_FIELD_NAME); - if (!NSK_JNI_VERIFY(jni, (unreachableChainField = - NSK_CPP_STUB4(GetFieldID, jni, rootObjectClass, - UNREACHABLE_CHAIN_FIELD_NAME, CHAIN_OBJECT_CLASS_SIG)) != NULL)) { + if (!NSK_JNI_VERIFY(jni, (unreachableChainField = jni->GetFieldID( + rootObjectClass, UNREACHABLE_CHAIN_FIELD_NAME, CHAIN_OBJECT_CLASS_SIG)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -196,8 +188,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, NSK_DISPLAY1("Find instance field in chain object class: %s\n", TAIL_FIELD_NAME); if (!NSK_JNI_VERIFY(jni, (tailField = - NSK_CPP_STUB4(GetFieldID, jni, chainObjectClass, - TAIL_FIELD_NAME, CHAIN_OBJECT_CLASS_SIG)) != NULL)) { + jni->GetFieldID(chainObjectClass, TAIL_FIELD_NAME, CHAIN_OBJECT_CLASS_SIG)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -205,15 +196,13 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, NSK_DISPLAY1("Get root object from static field: %s\n", OBJECT_FIELD_NAME); if (!NSK_JNI_VERIFY(jni, (*rootObject = - NSK_CPP_STUB3(GetStaticObjectField, jni, debugeeClass, - objectField)) != NULL)) { + jni->GetStaticObjectField(debugeeClass, objectField)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } NSK_DISPLAY1(" ... got object: 0x%p\n", (void*)*rootObject); - if (!NSK_JNI_VERIFY(jni, (*rootObject = - NSK_CPP_STUB2(NewGlobalRef, jni, *rootObject)) != NULL)) { + if (!NSK_JNI_VERIFY(jni, (*rootObject = jni->NewGlobalRef(*rootObject)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -222,8 +211,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, NSK_DISPLAY0("Obtain and tag chain objects:\n"); NSK_DISPLAY0(" root tested object:\n"); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetTag, jvmti, *rootObject, rootObjectTag))) { + if (!NSK_JVMTI_VERIFY(jvmti->SetTag(*rootObject, rootObjectTag))) { nsk_jvmti_setFailStatus(); } NSK_DISPLAY2(" tag=%-5ld object=0x%p\n", (long)rootObjectTag, (void*)*rootObject); @@ -304,13 +292,12 @@ static int releaseTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, ObjectDesc* objectDescList, jobject rootObject) { if (rootObject != NULL) { NSK_DISPLAY1("Release object reference to root tested object: 0x%p\n", rootObject); - NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, rootObject)); + NSK_TRACE(jni->DeleteGlobalRef(rootObject)); } if (objectDescList != NULL) { NSK_DISPLAY1("Deallocate objects list: 0x%p\n", (void*)objectDescList); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)objectDescList))) { + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)objectDescList))) { nsk_jvmti_setFailStatus(); } } @@ -445,7 +432,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY0(">>> Start iteration for root tested object\n"); { if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(IterateOverObjectsReachableFromObject, jvmti, + jvmti->IterateOverObjectsReachableFromObject( rootObject, objectReferenceCallback, &fakeUserData))) { nsk_jvmti_setFailStatus(); return; @@ -529,8 +516,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(caps)); caps.can_tag_objects = 1; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) { return JNI_ERR; } } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverObjectsReachableFromObject/iterobjreachobj002/iterobjreachobj002.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverObjectsReachableFromObject/iterobjreachobj002/iterobjreachobj002.cpp index 7f342d92f9a..9ea087e0e9b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverObjectsReachableFromObject/iterobjreachobj002/iterobjreachobj002.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverObjectsReachableFromObject/iterobjreachobj002/iterobjreachobj002.cpp @@ -66,9 +66,8 @@ objectReferenceCallback1( jvmtiObjectReferenceKind reference_kind, /* Set tag */ *tag_ptr = objectCount; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(Allocate, st_jvmti, (sizeof(ObjectDesc)), - (unsigned char**)&objectDescBuf))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->Allocate((sizeof(ObjectDesc)), + (unsigned char**)&objectDescBuf))) { nsk_jvmti_setFailStatus(); allocationError = 1; } @@ -91,8 +90,7 @@ objectReferenceCallback2( jvmtiObjectReferenceKind reference_kind, objectCount--; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, st_jvmti, (unsigned char*)objectDescBuf))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->Deallocate((unsigned char*)objectDescBuf))) { nsk_jvmti_setFailStatus(); } @@ -123,29 +121,23 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { } NSK_DISPLAY1("Find static field in debugee class: %s\n", objectFieldName); - if (!NSK_JNI_VERIFY(jni, (objectField = - NSK_CPP_STUB4(GetStaticFieldID, jni, debugeeClass, - objectFieldName, debugeeClassSignature)) != NULL)) { + if (!NSK_JNI_VERIFY(jni, (objectField = jni->GetStaticFieldID( + debugeeClass, objectFieldName, debugeeClassSignature)) != NULL)) { nsk_jvmti_setFailStatus(); break; } NSK_DISPLAY1("Find value of static field in debugee class: %s\n", objectFieldName); if (!NSK_JNI_VERIFY(jni, (object = - NSK_CPP_STUB3(GetStaticObjectField, jni, debugeeClass, - objectField)) != NULL)) { + jni->GetStaticObjectField(debugeeClass, objectField)) != NULL)) { nsk_jvmti_setFailStatus(); break; } NSK_DISPLAY0("Calling IterateOverObjectsReachableFromObject with allocation\n"); { - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(IterateOverObjectsReachableFromObject, - jvmti, - object, - objectReferenceCallback1, - &userData))) { + if (!NSK_JVMTI_VERIFY(jvmti->IterateOverObjectsReachableFromObject( + object, objectReferenceCallback1, &userData))) { nsk_jvmti_setFailStatus(); break; } @@ -161,12 +153,8 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY0("Calling IterateOverObjectsReachableFromObject with deallocation\n"); { - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(IterateOverObjectsReachableFromObject, - jvmti, - object, - objectReferenceCallback2, - &userData))) { + if (!NSK_JVMTI_VERIFY(jvmti->IterateOverObjectsReachableFromObject( + object, objectReferenceCallback2, &userData))) { nsk_jvmti_setFailStatus(); break; } @@ -221,8 +209,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(caps)); caps.can_tag_objects = 1; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) { return JNI_ERR; } } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverObjectsReachableFromObject/iterobjreachobj003/iterobjreachobj003.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverObjectsReachableFromObject/iterobjreachobj003/iterobjreachobj003.cpp index 08db92979b1..dd9c5a94bb1 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverObjectsReachableFromObject/iterobjreachobj003/iterobjreachobj003.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverObjectsReachableFromObject/iterobjreachobj003/iterobjreachobj003.cpp @@ -53,55 +53,46 @@ objectReferenceCallback( jvmtiObjectReferenceKind reference_kind, objCounter++; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(CreateRawMonitor, st_jvmti, name, &monitor_ptr))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->CreateRawMonitor(name, &monitor_ptr))) { nsk_jvmti_setFailStatus(); return JVMTI_ITERATION_ABORT; } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorEnter, st_jvmti, monitor_ptr))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->RawMonitorEnter(monitor_ptr))) { nsk_jvmti_setFailStatus(); return JVMTI_ITERATION_ABORT; } /* Enter second time */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorEnter, st_jvmti, monitor_ptr))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->RawMonitorEnter(monitor_ptr))) { nsk_jvmti_setFailStatus(); return JVMTI_ITERATION_ABORT; } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(RawMonitorWait, st_jvmti, monitor_ptr, (jlong)100))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->RawMonitorWait(monitor_ptr, (jlong)100))) { nsk_jvmti_setFailStatus(); } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorNotify, st_jvmti, monitor_ptr))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->RawMonitorNotify(monitor_ptr))) { nsk_jvmti_setFailStatus(); } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorNotifyAll, st_jvmti, monitor_ptr))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->RawMonitorNotifyAll(monitor_ptr))) { nsk_jvmti_setFailStatus(); } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorExit, st_jvmti, monitor_ptr))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->RawMonitorExit(monitor_ptr))) { nsk_jvmti_setFailStatus(); return JVMTI_ITERATION_ABORT; } /* Exit second time */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorExit, st_jvmti, monitor_ptr))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->RawMonitorExit(monitor_ptr))) { nsk_jvmti_setFailStatus(); return JVMTI_ITERATION_ABORT; } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(DestroyRawMonitor, st_jvmti, monitor_ptr))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->DestroyRawMonitor(monitor_ptr))) { nsk_jvmti_setFailStatus(); } @@ -131,29 +122,23 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { } NSK_DISPLAY1("Find static field in debugee class: %s\n", objectFieldName); - if (!NSK_JNI_VERIFY(jni, (objectField = - NSK_CPP_STUB4(GetStaticFieldID, jni, debugeeClass, - objectFieldName, debugeeClassSignature)) != NULL)) { + if (!NSK_JNI_VERIFY(jni, (objectField = jni->GetStaticFieldID( + debugeeClass, objectFieldName, debugeeClassSignature)) != NULL)) { nsk_jvmti_setFailStatus(); break; } NSK_DISPLAY1("Find value of static field in debugee class: %s\n", objectFieldName); if (!NSK_JNI_VERIFY(jni, (object = - NSK_CPP_STUB3(GetStaticObjectField, jni, debugeeClass, - objectField)) != NULL)) { + jni->GetStaticObjectField(debugeeClass, objectField)) != NULL)) { nsk_jvmti_setFailStatus(); break; } NSK_DISPLAY0("Calling IterateOverObjectsReachableFromObject with filter JVMTI_HEAP_OBJECT_EITHER\n"); { - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(IterateOverObjectsReachableFromObject, - jvmti, - object, - objectReferenceCallback, - &fakeUserData))) { + if (!NSK_JVMTI_VERIFY(jvmti->IterateOverObjectsReachableFromObject( + object, objectReferenceCallback, &fakeUserData))) { nsk_jvmti_setFailStatus(); } } @@ -203,8 +188,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(caps)); caps.can_tag_objects = 1; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) { return JNI_ERR; } } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverObjectsReachableFromObject/iterobjreachobj004/iterobjreachobj004.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverObjectsReachableFromObject/iterobjreachobj004/iterobjreachobj004.cpp index 21dbad3b8d6..344a1e14d05 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverObjectsReachableFromObject/iterobjreachobj004/iterobjreachobj004.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverObjectsReachableFromObject/iterobjreachobj004/iterobjreachobj004.cpp @@ -52,13 +52,11 @@ objectReferenceCallback( jvmtiObjectReferenceKind reference_kind, objCounter++; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(SetEnvironmentLocalStorage, st_jvmti, storage_data ))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->SetEnvironmentLocalStorage(storage_data))) { nsk_jvmti_setFailStatus(); } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GetEnvironmentLocalStorage, st_jvmti, &storage_ptr))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->GetEnvironmentLocalStorage(&storage_ptr))) { nsk_jvmti_setFailStatus(); } @@ -89,29 +87,23 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { } NSK_DISPLAY1("Find static field in debugee class: %s\n", objectFieldName); - if (!NSK_JNI_VERIFY(jni, (objectField = - NSK_CPP_STUB4(GetStaticFieldID, jni, debugeeClass, - objectFieldName, debugeeClassSignature)) != NULL)) { + if (!NSK_JNI_VERIFY(jni, (objectField = jni->GetStaticFieldID( + debugeeClass, objectFieldName, debugeeClassSignature)) != NULL)) { nsk_jvmti_setFailStatus(); break; } NSK_DISPLAY1("Find value of static field in debugee class: %s\n", objectFieldName); if (!NSK_JNI_VERIFY(jni, (object = - NSK_CPP_STUB3(GetStaticObjectField, jni, debugeeClass, - objectField)) != NULL)) { + jni->GetStaticObjectField(debugeeClass, objectField)) != NULL)) { nsk_jvmti_setFailStatus(); break; } NSK_DISPLAY0("Calling IterateOverObjectsReachableFromObject with filter JVMTI_HEAP_OBJECT_EITHER\n"); { - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(IterateOverObjectsReachableFromObject, - jvmti, - object, - objectReferenceCallback, - &fakeUserData))) { + if (!NSK_JVMTI_VERIFY(jvmti->IterateOverObjectsReachableFromObject( + object, objectReferenceCallback, &fakeUserData))) { nsk_jvmti_setFailStatus(); } } @@ -173,8 +165,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(caps)); caps.can_tag_objects = 1; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) { return JNI_ERR; } } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverObjectsReachableFromObject/iterobjreachobj005/iterobjreachobj005.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverObjectsReachableFromObject/iterobjreachobj005/iterobjreachobj005.cpp index cfdbbf20a8b..d49edd1b3e2 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverObjectsReachableFromObject/iterobjreachobj005/iterobjreachobj005.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverObjectsReachableFromObject/iterobjreachobj005/iterobjreachobj005.cpp @@ -52,8 +52,7 @@ objectReferenceCallback( jvmtiObjectReferenceKind reference_kind, objCounter++; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GetCurrentThreadCpuTimerInfo, st_jvmti, &timer_info1 ))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->GetCurrentThreadCpuTimerInfo(&timer_info1))) { nsk_jvmti_setFailStatus(); } /* Check the returned jvmtiTimerInfo structure */ @@ -71,14 +70,12 @@ objectReferenceCallback( jvmtiObjectReferenceKind reference_kind, } /* ---------------------------------------------------------------------- */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GetCurrentThreadCpuTime, st_jvmti, &nanos ))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->GetCurrentThreadCpuTime(&nanos))) { nsk_jvmti_setFailStatus(); } /* ---------------------------------------------------------------------- */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GetTimerInfo, st_jvmti, &timer_info2 ))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->GetTimerInfo(&timer_info2))) { nsk_jvmti_setFailStatus(); } /* Check the returned jvmtiTimerInfo structure */ @@ -97,8 +94,7 @@ objectReferenceCallback( jvmtiObjectReferenceKind reference_kind, /* ---------------------------------------------------------------------- */ nanos = 0; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GetTime, st_jvmti, &nanos ))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->GetTime(&nanos))) { nsk_jvmti_setFailStatus(); } @@ -131,29 +127,23 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { } NSK_DISPLAY1("Find static field in debugee class: %s\n", objectFieldName); - if (!NSK_JNI_VERIFY(jni, (objectField = - NSK_CPP_STUB4(GetStaticFieldID, jni, debugeeClass, - objectFieldName, debugeeClassSignature)) != NULL)) { + if (!NSK_JNI_VERIFY(jni, (objectField = jni->GetStaticFieldID( + debugeeClass, objectFieldName, debugeeClassSignature)) != NULL)) { nsk_jvmti_setFailStatus(); break; } NSK_DISPLAY1("Find value of static field in debugee class: %s\n", objectFieldName); if (!NSK_JNI_VERIFY(jni, (object = - NSK_CPP_STUB3(GetStaticObjectField, jni, debugeeClass, - objectField)) != NULL)) { + jni->GetStaticObjectField(debugeeClass, objectField)) != NULL)) { nsk_jvmti_setFailStatus(); break; } NSK_DISPLAY0("Calling IterateOverObjectsReachableFromObject with filter JVMTI_HEAP_OBJECT_EITHER\n"); { - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(IterateOverObjectsReachableFromObject, - jvmti, - object, - objectReferenceCallback, - &user_data))) { + if (!NSK_JVMTI_VERIFY(jvmti->IterateOverObjectsReachableFromObject( + object, objectReferenceCallback, &user_data))) { nsk_jvmti_setFailStatus(); } } @@ -205,8 +195,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { caps.can_tag_objects = 1; caps.can_get_current_thread_cpu_time = 1; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) { return JNI_ERR; } } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverReachableObjects/iterreachobj001/iterreachobj001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverReachableObjects/iterreachobj001/iterreachobj001.cpp index 118e49ffe41..9052297cacf 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverReachableObjects/iterreachobj001/iterreachobj001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverReachableObjects/iterreachobj001/iterreachobj001.cpp @@ -87,15 +87,13 @@ static int getChainObjects(jvmtiEnv* jvmti, JNIEnv* jni, jobject firstObject, count--; tag++; - if (!NSK_JNI_VERIFY(jni, (obj = - NSK_CPP_STUB3(GetObjectField, jni, firstObject, firstField)) != NULL)) { + if (!NSK_JNI_VERIFY(jni, (obj = jni->GetObjectField(firstObject, firstField)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } objectDescList[count].tag = objTag; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetTag, jvmti, obj, objTag))) { + if (!NSK_JVMTI_VERIFY(jvmti->SetTag(obj, objTag))) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -107,7 +105,7 @@ static int getChainObjects(jvmtiEnv* jvmti, JNIEnv* jni, jobject firstObject, return NSK_FALSE; } - NSK_TRACE(NSK_CPP_STUB2(DeleteLocalRef, jni, obj)); + NSK_TRACE(jni->DeleteLocalRef(obj)); return success; } @@ -131,9 +129,8 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, *objectsCount = 2 * chainLength; NSK_DISPLAY1("Allocate memory for objects list: %d objects\n", *objectsCount); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(Allocate, jvmti, (*objectsCount * sizeof(ObjectDesc)), - (unsigned char**)objectDescList))) { + if (!NSK_JVMTI_VERIFY(jvmti->Allocate((*objectsCount * sizeof(ObjectDesc)), + (unsigned char**)objectDescList))) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -148,16 +145,14 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, } NSK_DISPLAY1("Find debugee class: %s\n", DEBUGEE_CLASS_NAME); - if (!NSK_JNI_VERIFY(jni, (debugeeClass = - NSK_CPP_STUB2(FindClass, jni, DEBUGEE_CLASS_NAME)) != NULL)) { + if (!NSK_JNI_VERIFY(jni, (debugeeClass = jni->FindClass(DEBUGEE_CLASS_NAME)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } NSK_DISPLAY1(" ... found class: 0x%p\n", (void*)debugeeClass); NSK_DISPLAY1("Find root object class: %s\n", ROOT_OBJECT_CLASS_NAME); - if (!NSK_JNI_VERIFY(jni, (rootObjectClass = - NSK_CPP_STUB2(FindClass, jni, ROOT_OBJECT_CLASS_NAME)) != NULL)) { + if (!NSK_JNI_VERIFY(jni, (rootObjectClass = jni->FindClass(ROOT_OBJECT_CLASS_NAME)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -165,34 +160,31 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, NSK_DISPLAY1("Find chain object class: %s\n", CHAIN_OBJECT_CLASS_NAME); if (!NSK_JNI_VERIFY(jni, (chainObjectClass = - NSK_CPP_STUB2(FindClass, jni, CHAIN_OBJECT_CLASS_NAME)) != NULL)) { + jni->FindClass(CHAIN_OBJECT_CLASS_NAME)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } NSK_DISPLAY1(" ... found class: 0x%p\n", (void*)chainObjectClass); NSK_DISPLAY1("Find static field in debugee class: %s\n", OBJECT_FIELD_NAME); - if (!NSK_JNI_VERIFY(jni, (objectField = - NSK_CPP_STUB4(GetStaticFieldID, jni, debugeeClass, - OBJECT_FIELD_NAME, ROOT_OBJECT_CLASS_SIG)) != NULL)) { + if (!NSK_JNI_VERIFY(jni, (objectField = jni->GetStaticFieldID( + debugeeClass, OBJECT_FIELD_NAME, ROOT_OBJECT_CLASS_SIG)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } NSK_DISPLAY1(" ... got fieldID: 0x%p\n", (void*)objectField); NSK_DISPLAY1("Find instance field in root object class: %s\n", REACHABLE_CHAIN_FIELD_NAME); - if (!NSK_JNI_VERIFY(jni, (reachableChainField = - NSK_CPP_STUB4(GetFieldID, jni, rootObjectClass, - REACHABLE_CHAIN_FIELD_NAME, CHAIN_OBJECT_CLASS_SIG)) != NULL)) { + if (!NSK_JNI_VERIFY(jni, (reachableChainField = jni->GetFieldID( + rootObjectClass, REACHABLE_CHAIN_FIELD_NAME, CHAIN_OBJECT_CLASS_SIG)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } NSK_DISPLAY1(" ... got fieldID: 0x%p\n", (void*)reachableChainField); NSK_DISPLAY1("Find instance field in root object class: %s\n", UNREACHABLE_CHAIN_FIELD_NAME); - if (!NSK_JNI_VERIFY(jni, (unreachableChainField = - NSK_CPP_STUB4(GetFieldID, jni, rootObjectClass, - UNREACHABLE_CHAIN_FIELD_NAME, CHAIN_OBJECT_CLASS_SIG)) != NULL)) { + if (!NSK_JNI_VERIFY(jni, (unreachableChainField = jni->GetFieldID( + rootObjectClass, UNREACHABLE_CHAIN_FIELD_NAME, CHAIN_OBJECT_CLASS_SIG)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -200,8 +192,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, NSK_DISPLAY1("Find instance field in chain object class: %s\n", TAIL_FIELD_NAME); if (!NSK_JNI_VERIFY(jni, (tailField = - NSK_CPP_STUB4(GetFieldID, jni, chainObjectClass, - TAIL_FIELD_NAME, CHAIN_OBJECT_CLASS_SIG)) != NULL)) { + jni->GetFieldID(chainObjectClass, TAIL_FIELD_NAME, CHAIN_OBJECT_CLASS_SIG)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -209,8 +200,7 @@ static int getTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, NSK_DISPLAY1("Get root object from static field: %s\n", OBJECT_FIELD_NAME); if (!NSK_JNI_VERIFY(jni, (rootObject = - NSK_CPP_STUB3(GetStaticObjectField, jni, debugeeClass, - objectField)) != NULL)) { + jni->GetStaticObjectField(debugeeClass, objectField)) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -288,8 +278,7 @@ static int releaseTestedObjects(jvmtiEnv* jvmti, JNIEnv* jni, int chainLength, ObjectDesc* objectDescList) { if (objectDescList != NULL) { NSK_DISPLAY1("Deallocate objects list: 0x%p\n", (void*)objectDescList); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)objectDescList))) { + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)objectDescList))) { nsk_jvmti_setFailStatus(); } } @@ -638,9 +627,10 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY0(">>> Start iteration over reachable objects\n"); { if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB5(IterateOverReachableObjects, jvmti, - heapRootCallback, stackReferenceCallback, - objectReferenceCallback, &fakeUserData))) { + jvmti->IterateOverReachableObjects(heapRootCallback, + stackReferenceCallback, + objectReferenceCallback, + &fakeUserData))) { nsk_jvmti_setFailStatus(); return; } @@ -722,8 +712,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(caps)); caps.can_tag_objects = 1; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) { return JNI_ERR; } } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverReachableObjects/iterreachobj002/iterreachobj002.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverReachableObjects/iterreachobj002/iterreachobj002.cpp index bd1cd4e84b5..d904150488d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverReachableObjects/iterreachobj002/iterreachobj002.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverReachableObjects/iterreachobj002/iterreachobj002.cpp @@ -75,9 +75,7 @@ heapRootCallbackForFirstObjectsIteration( jvmtiHeapRootKind root_kind, /* Set tag */ *tag_ptr = (jlong)++objectCount; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(Allocate, jvmti, (sizeof(ObjectDesc)), - (unsigned char**)&objectDescBuf))) { + if (!NSK_JVMTI_VERIFY(jvmti->Allocate((sizeof(ObjectDesc)), (unsigned char**)&objectDescBuf))) { nsk_jvmti_setFailStatus(); callbackAborted = 1; NSK_COMPLAIN0("heapRootCallbackForFirstObjectsIteration: Allocation failed. Iteration aborted.\n"); @@ -121,8 +119,7 @@ heapRootCallbackForSecondObjectsIteration( jvmtiHeapRootKind root_kind, (long)*tag_ptr, (long)tag, objectCount); */ /* Deallocate memory of list element*/ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)objectDescArr[ind]))) { + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)objectDescArr[ind]))) { nsk_jvmti_setFailStatus(); callbackAborted = 1; NSK_COMPLAIN0("heapRootCallbackForSecondObjectsIteration: Deallocation failed. Iteration aborted.\n"); @@ -156,9 +153,7 @@ stackReferenceCallbackForFirstObjectsIteration( jvmtiHeapRootKind root_kind, /* Set tag */ *tag_ptr = (jlong)++objectCount; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(Allocate, jvmti, (sizeof(ObjectDesc)), - (unsigned char**)&objectDescBuf))) { + if (!NSK_JVMTI_VERIFY(jvmti->Allocate((sizeof(ObjectDesc)), (unsigned char**)&objectDescBuf))) { nsk_jvmti_setFailStatus(); callbackAborted = 1; NSK_COMPLAIN0("stackReferenceCallbackForFirstObjectsIteration: Allocation failed. Iteration aborted.\n"); @@ -206,8 +201,7 @@ stackReferenceCallbackForSecondObjectsIteration( jvmtiHeapRootKind root_kind, (long)*tag_ptr, (long)tag, objectCount); */ /* Deallocate memory of list element*/ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)objectDescArr[ind]))) { + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)objectDescArr[ind]))) { nsk_jvmti_setFailStatus(); callbackAborted = 1; NSK_COMPLAIN0("stackReferenceCallbackForSecondObjectsIteration: Deallocation failed. Iteration aborted.\n"); @@ -239,9 +233,7 @@ objectReferenceCallbackForFirstObjectsIteration( jvmtiObjectReferenceKind refere /* Set tag */ *tag_ptr = (jlong)++objectCount; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(Allocate, jvmti, (sizeof(ObjectDesc)), - (unsigned char**)&objectDescBuf))) { + if (!NSK_JVMTI_VERIFY(jvmti->Allocate((sizeof(ObjectDesc)), (unsigned char**)&objectDescBuf))) { nsk_jvmti_setFailStatus(); callbackAborted = 1; NSK_COMPLAIN0("objectReferenceCallbackForFirstObjectsIteration: Allocation failed. Iteration aborted.\n"); @@ -287,8 +279,7 @@ objectReferenceCallbackForSecondObjectsIteration( jvmtiObjectReferenceKind refer (long)*tag_ptr, (long)tag, objectCount); */ /* Deallocate memory of list element*/ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)objectDescArr[ind]))) { + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)objectDescArr[ind]))) { nsk_jvmti_setFailStatus(); callbackAborted = 1; NSK_COMPLAIN0("objectReferenceCallbackForSecondObjectsIteration: Deallocation failed. Iteration aborted.\n"); @@ -320,9 +311,8 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { { do { /* Allocate memory for first element of objectList */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(Allocate, jvmti, (sizeof(ObjectDesc)), - (unsigned char**)&objectDescBuf))) { + if (!NSK_JVMTI_VERIFY(jvmti->Allocate((sizeof(ObjectDesc)), + (unsigned char**)&objectDescBuf))) { nsk_jvmti_setFailStatus(); break; } @@ -331,13 +321,11 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY0("Calling IterateOverReachableObjects with allocating object descriptors\n"); { - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB5(IterateOverReachableObjects, - jvmti, - heapRootCallbackForFirstObjectsIteration, - stackReferenceCallbackForFirstObjectsIteration, - objectReferenceCallbackForFirstObjectsIteration, - &userData))) { + if (!NSK_JVMTI_VERIFY(jvmti->IterateOverReachableObjects( + heapRootCallbackForFirstObjectsIteration, + stackReferenceCallbackForFirstObjectsIteration, + objectReferenceCallbackForFirstObjectsIteration, + &userData))) { nsk_jvmti_setFailStatus(); break; } @@ -357,25 +345,22 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { objectCountMax = objectCount; /* Deallocate last unnecessary descriptor */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)objectDescList))) { + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)objectDescList))) { NSK_COMPLAIN0("Unable to deallocate last unnecessary descriptor. \n"); nsk_jvmti_setFailStatus(); break; } /* Allocate memory for array to save pointers to ObjectDescList elements */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(Allocate, jvmti, (objectCount * sizeof(ObjectDesc*)), - (unsigned char**)&objectDescArr))) { + if (!NSK_JVMTI_VERIFY(jvmti->Allocate((objectCount * sizeof(ObjectDesc*)), + (unsigned char**)&objectDescArr))) { nsk_jvmti_setFailStatus(); break; } /* Allocate memory for flags array and fill with false values */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(Allocate, jvmti, (objectCountMax * sizeof(short)), - (unsigned char**)&deallocatedFlagsArr))) { + if (!NSK_JVMTI_VERIFY(jvmti->Allocate((objectCountMax * sizeof(short)), + (unsigned char**)&deallocatedFlagsArr))) { nsk_jvmti_setFailStatus(); break; } @@ -395,13 +380,11 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY0("Calling IterateOverReachableObjects with deallocating object descriptors\n"); { - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB5(IterateOverReachableObjects, - jvmti, - heapRootCallbackForSecondObjectsIteration, - stackReferenceCallbackForSecondObjectsIteration, - objectReferenceCallbackForSecondObjectsIteration, - &userData))) { + if (!NSK_JVMTI_VERIFY(jvmti->IterateOverReachableObjects( + heapRootCallbackForSecondObjectsIteration, + stackReferenceCallbackForSecondObjectsIteration, + objectReferenceCallbackForSecondObjectsIteration, + &userData))) { nsk_jvmti_setFailStatus(); break; } @@ -415,8 +398,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { for (ind = 0; ind < objectCountMax; ind++) { if (!deallocatedFlagsArr[ind]) { - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)objectDescArr[ind]))) { + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)objectDescArr[ind]))) { NSK_COMPLAIN1("Unable to deallocate descriptor. Index = %d \n", ind); nsk_jvmti_setFailStatus(); return; @@ -424,13 +406,11 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { } } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)objectDescArr))) { + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)objectDescArr))) { nsk_jvmti_setFailStatus(); } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)deallocatedFlagsArr))) { + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)deallocatedFlagsArr))) { nsk_jvmti_setFailStatus(); } @@ -472,13 +452,11 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(caps)); caps.can_tag_objects = 1; caps.can_generate_object_free_events = 1; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) { return JNI_ERR; } - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, - jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps))) return JNI_ERR; if (!caps.can_tag_objects) @@ -491,15 +469,15 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { (void) memset(&callbacks, 0, sizeof(callbacks)); callbacks.ObjectFree = &ObjectFree; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetEventCallbacks, - jvmti, &callbacks, sizeof(callbacks)))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, sizeof(callbacks)))) return JNI_ERR; NSK_DISPLAY0("setting event callbacks done.\n"); NSK_DISPLAY0("enabling JVMTI events ...\n"); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode, - jvmti, JVMTI_ENABLE, JVMTI_EVENT_OBJECT_FREE, NULL))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, + JVMTI_EVENT_OBJECT_FREE, + NULL))) return JNI_ERR; NSK_DISPLAY0("enabling the events done.\n"); diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverReachableObjects/iterreachobj003/iterreachobj003.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverReachableObjects/iterreachobj003/iterreachobj003.cpp index bd1f66b56a7..2c67e8a7044 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverReachableObjects/iterreachobj003/iterreachobj003.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverReachableObjects/iterreachobj003/iterreachobj003.cpp @@ -54,55 +54,46 @@ heapRootCallback( jvmtiHeapRootKind root_kind, *tag_ptr = (jlong)++objCounter; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(CreateRawMonitor, st_jvmti, "heapRootMonitor", &monitor_ptr))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->CreateRawMonitor("heapRootMonitor", &monitor_ptr))) { nsk_jvmti_setFailStatus(); return JVMTI_ITERATION_ABORT; } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorEnter, st_jvmti, monitor_ptr))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->RawMonitorEnter(monitor_ptr))) { nsk_jvmti_setFailStatus(); return JVMTI_ITERATION_ABORT; } /* Enter second time */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorEnter, st_jvmti, monitor_ptr))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->RawMonitorEnter(monitor_ptr))) { nsk_jvmti_setFailStatus(); return JVMTI_ITERATION_ABORT; } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(RawMonitorWait, st_jvmti, monitor_ptr, (jlong)1))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->RawMonitorWait(monitor_ptr, (jlong)1))) { nsk_jvmti_setFailStatus(); } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorNotify, st_jvmti, monitor_ptr))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->RawMonitorNotify(monitor_ptr))) { nsk_jvmti_setFailStatus(); } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorNotifyAll, st_jvmti, monitor_ptr))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->RawMonitorNotifyAll(monitor_ptr))) { nsk_jvmti_setFailStatus(); } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorExit, st_jvmti, monitor_ptr))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->RawMonitorExit(monitor_ptr))) { nsk_jvmti_setFailStatus(); return JVMTI_ITERATION_ABORT; } /* Exit second time */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorExit, st_jvmti, monitor_ptr))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->RawMonitorExit(monitor_ptr))) { nsk_jvmti_setFailStatus(); return JVMTI_ITERATION_ABORT; } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(DestroyRawMonitor, st_jvmti, monitor_ptr))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->DestroyRawMonitor(monitor_ptr))) { nsk_jvmti_setFailStatus(); } /* @@ -127,55 +118,46 @@ stackReferenceCallback( jvmtiHeapRootKind root_kind, *tag_ptr = (jlong)++objCounter; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(CreateRawMonitor, st_jvmti, "stackRefMonitor", &monitor_ptr))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->CreateRawMonitor("stackRefMonitor", &monitor_ptr))) { nsk_jvmti_setFailStatus(); return JVMTI_ITERATION_ABORT; } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorEnter, st_jvmti, monitor_ptr))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->RawMonitorEnter(monitor_ptr))) { nsk_jvmti_setFailStatus(); return JVMTI_ITERATION_ABORT; } /* Enter second time */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorEnter, st_jvmti, monitor_ptr))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->RawMonitorEnter(monitor_ptr))) { nsk_jvmti_setFailStatus(); return JVMTI_ITERATION_ABORT; } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(RawMonitorWait, st_jvmti, monitor_ptr, (jlong)1))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->RawMonitorWait(monitor_ptr, (jlong)1))) { nsk_jvmti_setFailStatus(); } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorNotify, st_jvmti, monitor_ptr))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->RawMonitorNotify(monitor_ptr))) { nsk_jvmti_setFailStatus(); } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorNotifyAll, st_jvmti, monitor_ptr))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->RawMonitorNotifyAll(monitor_ptr))) { nsk_jvmti_setFailStatus(); } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorExit, st_jvmti, monitor_ptr))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->RawMonitorExit(monitor_ptr))) { nsk_jvmti_setFailStatus(); return JVMTI_ITERATION_ABORT; } /* Exit second time */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorExit, st_jvmti, monitor_ptr))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->RawMonitorExit(monitor_ptr))) { nsk_jvmti_setFailStatus(); return JVMTI_ITERATION_ABORT; } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(DestroyRawMonitor, st_jvmti, monitor_ptr))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->DestroyRawMonitor(monitor_ptr))) { nsk_jvmti_setFailStatus(); } /* @@ -199,55 +181,46 @@ objectReferenceCallback( jvmtiObjectReferenceKind reference_kind, *tag_ptr = (jlong)++objCounter; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(CreateRawMonitor, st_jvmti, "objRefMonitor", &monitor_ptr))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->CreateRawMonitor("objRefMonitor", &monitor_ptr))) { nsk_jvmti_setFailStatus(); return JVMTI_ITERATION_ABORT; } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorEnter, st_jvmti, monitor_ptr))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->RawMonitorEnter(monitor_ptr))) { nsk_jvmti_setFailStatus(); return JVMTI_ITERATION_ABORT; } /* Enter second time */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorEnter, st_jvmti, monitor_ptr))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->RawMonitorEnter(monitor_ptr))) { nsk_jvmti_setFailStatus(); return JVMTI_ITERATION_ABORT; } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(RawMonitorWait, st_jvmti, monitor_ptr, (jlong)1))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->RawMonitorWait(monitor_ptr, (jlong)1))) { nsk_jvmti_setFailStatus(); } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorNotify, st_jvmti, monitor_ptr))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->RawMonitorNotify(monitor_ptr))) { nsk_jvmti_setFailStatus(); } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorNotifyAll, st_jvmti, monitor_ptr))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->RawMonitorNotifyAll(monitor_ptr))) { nsk_jvmti_setFailStatus(); } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorExit, st_jvmti, monitor_ptr))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->RawMonitorExit(monitor_ptr))) { nsk_jvmti_setFailStatus(); return JVMTI_ITERATION_ABORT; } /* Exit second time */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorExit, st_jvmti, monitor_ptr))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->RawMonitorExit(monitor_ptr))) { nsk_jvmti_setFailStatus(); return JVMTI_ITERATION_ABORT; } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(DestroyRawMonitor, st_jvmti, monitor_ptr))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->DestroyRawMonitor(monitor_ptr))) { nsk_jvmti_setFailStatus(); } @@ -270,12 +243,10 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY0("Calling IterateOverReachableObjects\n"); { if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB5(IterateOverReachableObjects, - jvmti, - heapRootCallback, - stackReferenceCallback, - objectReferenceCallback, - &userData))) { + jvmti->IterateOverReachableObjects(heapRootCallback, + stackReferenceCallback, + objectReferenceCallback, + &userData))) { nsk_jvmti_setFailStatus(); break; } @@ -333,8 +304,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(caps)); caps.can_tag_objects = 1; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) { return JNI_ERR; } } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverReachableObjects/iterreachobj004/iterreachobj004.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverReachableObjects/iterreachobj004/iterreachobj004.cpp index a5ed6ab9a25..99a20befcc2 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverReachableObjects/iterreachobj004/iterreachobj004.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverReachableObjects/iterreachobj004/iterreachobj004.cpp @@ -54,14 +54,12 @@ heapRootCallback( jvmtiHeapRootKind root_kind, *tag_ptr = (jlong)++objCounter; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(SetEnvironmentLocalStorage, st_jvmti, storage_data ))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->SetEnvironmentLocalStorage(storage_data))) { nsk_jvmti_setFailStatus(); return JVMTI_ITERATION_ABORT; } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GetEnvironmentLocalStorage, st_jvmti, &storage_ptr))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->GetEnvironmentLocalStorage(&storage_ptr))) { nsk_jvmti_setFailStatus(); return JVMTI_ITERATION_ABORT; } @@ -100,14 +98,12 @@ stackReferenceCallback( jvmtiHeapRootKind root_kind, *tag_ptr = (jlong)++objCounter; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(SetEnvironmentLocalStorage, st_jvmti, storage_data ))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->SetEnvironmentLocalStorage(storage_data))) { nsk_jvmti_setFailStatus(); return JVMTI_ITERATION_ABORT; } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GetEnvironmentLocalStorage, st_jvmti, &storage_ptr))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->GetEnvironmentLocalStorage(&storage_ptr))) { nsk_jvmti_setFailStatus(); return JVMTI_ITERATION_ABORT; } @@ -145,14 +141,12 @@ objectReferenceCallback( jvmtiObjectReferenceKind reference_kind, *tag_ptr = (jlong)++objCounter; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(SetEnvironmentLocalStorage, st_jvmti, storage_data ))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->SetEnvironmentLocalStorage(storage_data))) { nsk_jvmti_setFailStatus(); return JVMTI_ITERATION_ABORT; } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GetEnvironmentLocalStorage, st_jvmti, &storage_ptr))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->GetEnvironmentLocalStorage(&storage_ptr))) { nsk_jvmti_setFailStatus(); return JVMTI_ITERATION_ABORT; } @@ -190,12 +184,10 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY0("Calling IterateOverReachableObjects\n"); { if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB5(IterateOverReachableObjects, - jvmti, - heapRootCallback, - stackReferenceCallback, - objectReferenceCallback, - &userData))) { + jvmti->IterateOverReachableObjects(heapRootCallback, + stackReferenceCallback, + objectReferenceCallback, + &userData))) { nsk_jvmti_setFailStatus(); break; } @@ -253,8 +245,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(caps)); caps.can_tag_objects = 1; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) { return JNI_ERR; } } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverReachableObjects/iterreachobj005/iterreachobj005.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverReachableObjects/iterreachobj005/iterreachobj005.cpp index 83faf4d0c37..ec10be7e443 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverReachableObjects/iterreachobj005/iterreachobj005.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverReachableObjects/iterreachobj005/iterreachobj005.cpp @@ -53,8 +53,7 @@ heapRootCallback( jvmtiHeapRootKind root_kind, if (!nsk_jvmti_isFailStatus()) { - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GetCurrentThreadCpuTimerInfo, st_jvmti, &timer_info1 ))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->GetCurrentThreadCpuTimerInfo(&timer_info1))) { nsk_jvmti_setFailStatus(); } /* Check the returned jvmtiTimerInfo structure */ @@ -72,14 +71,12 @@ heapRootCallback( jvmtiHeapRootKind root_kind, } /* ---------------------------------------------------------------------- */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GetCurrentThreadCpuTime, st_jvmti, &nanos ))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->GetCurrentThreadCpuTime(&nanos))) { nsk_jvmti_setFailStatus(); } /* ---------------------------------------------------------------------- */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GetTimerInfo, st_jvmti, &timer_info2 ))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->GetTimerInfo(&timer_info2))) { nsk_jvmti_setFailStatus(); } /* Check the returned jvmtiTimerInfo structure */ @@ -98,8 +95,7 @@ heapRootCallback( jvmtiHeapRootKind root_kind, /* ---------------------------------------------------------------------- */ nanos = 0; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GetTime, st_jvmti, &nanos ))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->GetTime(&nanos))) { nsk_jvmti_setFailStatus(); } } @@ -126,8 +122,7 @@ stackReferenceCallback( jvmtiHeapRootKind root_kind, if (!nsk_jvmti_isFailStatus()) { - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GetCurrentThreadCpuTimerInfo, st_jvmti, &timer_info1 ))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->GetCurrentThreadCpuTimerInfo(&timer_info1))) { nsk_jvmti_setFailStatus(); } /* Check the returned jvmtiTimerInfo structure */ @@ -145,14 +140,12 @@ stackReferenceCallback( jvmtiHeapRootKind root_kind, } /* ---------------------------------------------------------------------- */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GetCurrentThreadCpuTime, st_jvmti, &nanos ))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->GetCurrentThreadCpuTime(&nanos))) { nsk_jvmti_setFailStatus(); } /* ---------------------------------------------------------------------- */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GetTimerInfo, st_jvmti, &timer_info2 ))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->GetTimerInfo(&timer_info2))) { nsk_jvmti_setFailStatus(); } /* Check the returned jvmtiTimerInfo structure */ @@ -171,8 +164,7 @@ stackReferenceCallback( jvmtiHeapRootKind root_kind, /* ---------------------------------------------------------------------- */ nanos = 0; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GetTime, st_jvmti, &nanos ))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->GetTime(&nanos))) { nsk_jvmti_setFailStatus(); } } @@ -196,8 +188,7 @@ objectReferenceCallback( jvmtiObjectReferenceKind reference_kind, *tag_ptr = (jlong)++objCounter; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GetCurrentThreadCpuTimerInfo, st_jvmti, &timer_info1 ))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->GetCurrentThreadCpuTimerInfo(&timer_info1))) { nsk_jvmti_setFailStatus(); } /* Check the returned jvmtiTimerInfo structure */ @@ -215,15 +206,13 @@ objectReferenceCallback( jvmtiObjectReferenceKind reference_kind, } /* ---------------------------------------------------------------------- */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GetCurrentThreadCpuTime, st_jvmti, &nanos ))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->GetCurrentThreadCpuTime(&nanos))) { nsk_jvmti_setFailStatus(); } /* ---------------------------------------------------------------------- */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GetTimerInfo, st_jvmti, &timer_info2 ))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->GetTimerInfo(&timer_info2))) { nsk_jvmti_setFailStatus(); } /* Check the returned jvmtiTimerInfo structure */ @@ -242,8 +231,7 @@ objectReferenceCallback( jvmtiObjectReferenceKind reference_kind, /* ---------------------------------------------------------------------- */ nanos = 0; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GetTime, st_jvmti, &nanos ))) { + if (!NSK_JVMTI_VERIFY(st_jvmti->GetTime(&nanos))) { nsk_jvmti_setFailStatus(); } @@ -265,13 +253,10 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { do { NSK_DISPLAY0("Calling IterateOverReachableObjects\n"); { - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB5(IterateOverReachableObjects, - jvmti, - heapRootCallback, - stackReferenceCallback, - objectReferenceCallback, - &userData))) { + if (!NSK_JVMTI_VERIFY(jvmti->IterateOverReachableObjects(heapRootCallback, + stackReferenceCallback, + objectReferenceCallback, + &userData))) { nsk_jvmti_setFailStatus(); break; } @@ -330,8 +315,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(caps)); caps.can_tag_objects = 1; caps.can_get_current_thread_cpu_time = 1; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) { return JNI_ERR; } } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/abort/Abort.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/abort/Abort.cpp index 6654faa6c1e..bef827c7565 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/abort/Abort.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/abort/Abort.cpp @@ -95,8 +95,7 @@ agent(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { primitive_callbacks.heap_iteration_callback = &heap_callback; NSK_DISPLAY0("Iterating over reachable objects.\n"); - if(!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(IterateThroughHeap, jvmti, - 0, NULL, &primitive_callbacks, &invocations))) { + if(!NSK_JVMTI_VERIFY(jvmti->IterateThroughHeap(0, NULL, &primitive_callbacks, &invocations))) { nsk_jvmti_setFailStatus(); return; } @@ -139,14 +138,12 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { caps.can_tag_objects = 1; caps.can_generate_object_free_events = 1; - if(!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + if(!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) { return JNI_ERR; } memset(&event_callbacks, 0, sizeof(jvmtiEventCallbacks)); - if(!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, - &event_callbacks, sizeof(jvmtiEventCallbacks)))) { + if(!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&event_callbacks, sizeof(jvmtiEventCallbacks)))) { return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/callbacks/Callbacks.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/callbacks/Callbacks.cpp index 0b29cbd4dd8..d814bc8108e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/callbacks/Callbacks.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/callbacks/Callbacks.cpp @@ -368,21 +368,14 @@ int tag_objects(jvmtiEnv *jvmti, JNIEnv *jni) { jobjectArray testObjects; int object; - if(!NSK_VERIFY(NULL != - (debugee = NSK_CPP_STUB2(FindClass, jni, className)))) + if(!NSK_VERIFY(NULL != (debugee = jni->FindClass(className)))) return JNI_ERR; - if(!NSK_VERIFY(NULL != - (testObjectsField = NSK_CPP_STUB4(GetStaticFieldID, - jni, debugee, - fieldName, - fieldSig)))) + if(!NSK_VERIFY(NULL != (testObjectsField = jni->GetStaticFieldID(debugee, fieldName, fieldSig)))) return JNI_ERR; - if(!NSK_VERIFY(NULL != - (testObjects = (jobjectArray)(NSK_CPP_STUB3(GetStaticObjectField, - jni, debugee, - testObjectsField))))) + if(!NSK_VERIFY(NULL != (testObjects = (jobjectArray)(jni->GetStaticObjectField( + debugee, testObjectsField))))) return JNI_ERR; // For each of test objects tag every field @@ -393,33 +386,28 @@ int tag_objects(jvmtiEnv *jvmti, JNIEnv *jni) { jint field; memset(&objects_info[object],0,sizeof(object_info_t)); - if(!NSK_VERIFY(NULL != - (target = NSK_CPP_STUB3(GetObjectArrayElement,jni, - testObjects,object)))) + if(!NSK_VERIFY(NULL != (target = jni->GetObjectArrayElement(testObjects, object)))) return JNI_ERR; - if(!NSK_VERIFY(NULL != - (targetClass = NSK_CPP_STUB2(GetObjectClass, jni, target)))) + if(!NSK_VERIFY(NULL != (targetClass = jni->GetObjectClass(target)))) return JNI_ERR; - if(!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(GetClassSignature, jvmti, targetClass, - &(objects_info[object].name), NULL))) + if(!NSK_JVMTI_VERIFY(jvmti->GetClassSignature(targetClass, &(objects_info[object].name), NULL))) return JNI_ERR; - if(!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(GetClassFields, jvmti, targetClass, - &(objects_info[object].fields_count), - &targetFields))) + if(!NSK_JVMTI_VERIFY(jvmti->GetClassFields( + targetClass, &(objects_info[object].fields_count), &targetFields))) return JNI_ERR; objects_info[object].fields = (field_info_t*)calloc(objects_info[object].fields_count,sizeof(field_info_t)); // Iterate over fields, collect info about it and tag non primitive fields. for(field = 0; field < objects_info[object].fields_count; field++) { - if(!NSK_JVMTI_VERIFY(NSK_CPP_STUB6(GetFieldName, jvmti, - targetClass, targetFields[field], - &objects_info[object].fields[field].name, - &objects_info[object].fields[field].signature, - NULL))) + if(!NSK_JVMTI_VERIFY(jvmti->GetFieldName(targetClass, + targetFields[field], + &objects_info[object].fields[field].name, + &objects_info[object].fields[field].signature, + NULL))) return JNI_ERR; if(is_primitive_type(objects_info[object].fields[field].signature)) { objects_info[object].fields[field].primitive = 1; @@ -427,49 +415,42 @@ int tag_objects(jvmtiEnv *jvmti, JNIEnv *jni) { jint modifiers; jobject value; int tag_type = get_tag_type(objects_info[object].fields[field].signature); - if(!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(GetFieldModifiers, jvmti, - targetClass, targetFields[field], - &modifiers))) { + if(!NSK_JVMTI_VERIFY(jvmti->GetFieldModifiers( + targetClass, targetFields[field], &modifiers))) { return JNI_ERR; } if(modifiers & STATIC_FIELD) { - if(!NSK_VERIFY(NULL != (value = NSK_CPP_STUB3(GetStaticObjectField, jni, - targetClass, - targetFields[field])))) { + if(!NSK_VERIFY(NULL != (value = jni->GetStaticObjectField(targetClass, + targetFields[field])))) { return JNI_ERR; } } else { - if(!NSK_VERIFY(NULL != (value = NSK_CPP_STUB3(GetObjectField, jni, - target, - targetFields[field])))) { + if(!NSK_VERIFY(NULL != (value = jni->GetObjectField(target, targetFields[field])))) { return JNI_ERR; } } //tag field's value - if(!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetTag, jvmti, value, - ENCODE_TAG(tag_type,object,field)))) { + if(!NSK_JVMTI_VERIFY(jvmti->SetTag(value, ENCODE_TAG(tag_type,object,field)))) { return JNI_ERR; } //remove local reference so object will have a chance to become unreachable - NSK_CPP_STUB2(DeleteLocalRef, jni, (jobject)value); + jni->DeleteLocalRef((jobject)value); } } // tag class and it's instance to pass this tag into primitive field callback - if(!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetTag, jvmti, target, - ENCODE_TAG(TAG_TYPE_PRIMITIVE,object,0)))) + if(!NSK_JVMTI_VERIFY(jvmti->SetTag(target, ENCODE_TAG(TAG_TYPE_PRIMITIVE,object,0)))) return JNI_ERR; - if(!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetTag, jvmti, targetClass, - ENCODE_TAG(TAG_TYPE_PRIMITIVE,object,0)))) + if(!NSK_JVMTI_VERIFY(jvmti->SetTag(targetClass, ENCODE_TAG(TAG_TYPE_PRIMITIVE,object,0)))) return JNI_ERR; - NSK_JVMTI_VERIFY(NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)targetFields)); + NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)targetFields)); - NSK_CPP_STUB2(DeleteLocalRef, jni, (jobject)target); - NSK_CPP_STUB2(DeleteLocalRef, jni, (jobject)targetClass); + jni->DeleteLocalRef((jobject)target); + jni->DeleteLocalRef((jobject)targetClass); } - NSK_CPP_STUB2(DeleteLocalRef, jni, (jobject)testObjects); + jni->DeleteLocalRef((jobject)testObjects); return JNI_OK; } @@ -480,10 +461,10 @@ void release_object_info(jvmtiEnv *jvmti, JNIEnv *jni) { int field; for(object = 0; object < TEST_OBJECTS_COUNT; object++) { for(field = 0; field < objects_info[object].fields_count; field++) { - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)objects_info[object].fields[field].name); - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)objects_info[object].fields[field].signature); + jvmti->Deallocate((unsigned char*)objects_info[object].fields[field].name); + jvmti->Deallocate((unsigned char*)objects_info[object].fields[field].signature); } - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)objects_info[object].name); + jvmti->Deallocate((unsigned char*)objects_info[object].name); free(objects_info[object].fields); } } @@ -553,8 +534,7 @@ agent(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { primitive_callbacks.heap_iteration_callback = &heap_callback; NSK_DISPLAY0("Iterating over reachable objects.\n"); - if(!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(IterateThroughHeap, jvmti, - 0, NULL, &primitive_callbacks, NULL))) { + if(!NSK_JVMTI_VERIFY(jvmti->IterateThroughHeap(0, NULL, &primitive_callbacks, NULL))) { nsk_jvmti_setFailStatus(); return; } @@ -571,8 +551,7 @@ agent(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { } NSK_DISPLAY0("Iterating over unreachable objects.\n"); - if(!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(IterateThroughHeap, jvmti, - 0, NULL, &primitive_callbacks, NULL))) { + if(!NSK_JVMTI_VERIFY(jvmti->IterateThroughHeap(0, NULL, &primitive_callbacks, NULL))) { nsk_jvmti_setFailStatus(); return; } @@ -618,15 +597,13 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { caps.can_tag_objects = 1; caps.can_generate_object_free_events = 1; - if(!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + if(!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) { return JNI_ERR; } memset(&event_callbacks, 0, sizeof(jvmtiEventCallbacks)); event_callbacks.ObjectFree = &object_free_callback; - if(!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, - &event_callbacks, sizeof(jvmtiEventCallbacks)))) { + if(!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&event_callbacks, sizeof(jvmtiEventCallbacks)))) { return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/concrete-klass-filter/ConcreteKlassFilter.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/concrete-klass-filter/ConcreteKlassFilter.cpp index c042306004f..ebff549c2de 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/concrete-klass-filter/ConcreteKlassFilter.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/concrete-klass-filter/ConcreteKlassFilter.cpp @@ -152,36 +152,26 @@ int tag_objects(jvmtiEnv *jvmti, JNIEnv *jni) { jobject testObject; jclass testObjectClass; - if(!NSK_VERIFY(NULL != - (debugee = NSK_CPP_STUB2(FindClass, jni, className)))) + if(!NSK_VERIFY(NULL != (debugee = jni->FindClass(className)))) return JNI_ERR; - if(!NSK_VERIFY(NULL != - (testObjectField = NSK_CPP_STUB4(GetStaticFieldID, - jni, debugee, - fieldName, - fieldSig)))) + if(!NSK_VERIFY(NULL != (testObjectField = jni->GetStaticFieldID(debugee, fieldName, fieldSig)))) return JNI_ERR; - if(!NSK_VERIFY(NULL != - (testObject = (NSK_CPP_STUB3(GetStaticObjectField, - jni, debugee, - testObjectField))))) + if(!NSK_VERIFY(NULL != (testObject = (jni->GetStaticObjectField(debugee, testObjectField))))) return JNI_ERR; - if(!NSK_VERIFY(NULL != - (testObjectClass = (NSK_CPP_STUB2(GetObjectClass, - jni, testObject))))) + if(!NSK_VERIFY(NULL != (testObjectClass = (jni->GetObjectClass(testObject))))) return JNI_ERR; // tag class and it's instance to pass this tag into primitive field callback - if(!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetTag, jvmti, testObject, TEST_OBJECT_TAG))) + if(!NSK_JVMTI_VERIFY(jvmti->SetTag(testObject, TEST_OBJECT_TAG))) return JNI_ERR; - if(!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetTag, jvmti, testObjectClass, TEST_OBJECT_TAG))) + if(!NSK_JVMTI_VERIFY(jvmti->SetTag(testObjectClass, TEST_OBJECT_TAG))) return JNI_ERR; - NSK_CPP_STUB2(DeleteLocalRef, jni, testObjectClass); - NSK_CPP_STUB2(DeleteLocalRef, jni, testObject); + jni->DeleteLocalRef(testObjectClass); + jni->DeleteLocalRef(testObject); return JNI_OK; } @@ -207,7 +197,7 @@ agent(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { jvmtiHeapCallbacks primitive_callbacks; jclass klass; - if(!NSK_VERIFY(NULL != (klass = NSK_CPP_STUB2(FindClass,jni,testClassName)))) { + if(!NSK_VERIFY(NULL != (klass = jni->FindClass(testClassName)))) { NSK_COMPLAIN1("Can't find class %s.\n",testClassName); nsk_jvmti_setFailStatus(); return; @@ -233,8 +223,7 @@ agent(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { primitive_callbacks.heap_iteration_callback = &heap_callback; NSK_DISPLAY0("Iterating over reachable objects.\n"); - if(!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(IterateThroughHeap, jvmti, - 0, klass, &primitive_callbacks, NULL))) { + if(!NSK_JVMTI_VERIFY(jvmti->IterateThroughHeap(0, klass, &primitive_callbacks, NULL))) { nsk_jvmti_setFailStatus(); return; } @@ -251,8 +240,7 @@ agent(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { } NSK_DISPLAY0("Iterating over unreachable objects.\n"); - if(!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(IterateThroughHeap, jvmti, - 0, klass, &primitive_callbacks, NULL))) { + if(!NSK_JVMTI_VERIFY(jvmti->IterateThroughHeap(0, klass, &primitive_callbacks, NULL))) { nsk_jvmti_setFailStatus(); return; } @@ -292,15 +280,13 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { caps.can_tag_objects = 1; caps.can_generate_object_free_events = 1; - if(!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + if(!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) { return JNI_ERR; } memset(&event_callbacks, 0, sizeof(jvmtiEventCallbacks)); event_callbacks.ObjectFree = &object_free_callback; - if(!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, - &event_callbacks, sizeof(jvmtiEventCallbacks)))) { + if(!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&event_callbacks, sizeof(jvmtiEventCallbacks)))) { return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/filter-tagged/HeapFilter.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/filter-tagged/HeapFilter.cpp index 70fbddb82e9..06ae9b8ebb6 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/filter-tagged/HeapFilter.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/filter-tagged/HeapFilter.cpp @@ -299,21 +299,14 @@ int tag_objects(jvmtiEnv *jvmti, JNIEnv *jni) { jobjectArray testObjects; int object; - if(!NSK_VERIFY(NULL != - (debugee = NSK_CPP_STUB2(FindClass, jni, className)))) + if(!NSK_VERIFY(NULL != (debugee = jni->FindClass(className)))) return JNI_ERR; - if(!NSK_VERIFY(NULL != - (testObjectsField = NSK_CPP_STUB4(GetStaticFieldID, - jni, debugee, - fieldName, - fieldSig)))) + if(!NSK_VERIFY(NULL != (testObjectsField = jni->GetStaticFieldID(debugee, fieldName, fieldSig)))) return JNI_ERR; - if(!NSK_VERIFY(NULL != - (testObjects = (jobjectArray)(NSK_CPP_STUB3(GetStaticObjectField, - jni, debugee, - testObjectsField))))) + if(!NSK_VERIFY(NULL != (testObjects = (jobjectArray)(jni->GetStaticObjectField( + debugee, testObjectsField))))) return JNI_ERR; // For each of test objects tag every field @@ -325,22 +318,17 @@ int tag_objects(jvmtiEnv *jvmti, JNIEnv *jni) { int tagged = object == 0; memset(&objects_info[object],0,sizeof(object_info_t)); - if(!NSK_VERIFY(NULL != - (target = NSK_CPP_STUB3(GetObjectArrayElement,jni, - testObjects,object)))) + if(!NSK_VERIFY(NULL != (target = jni->GetObjectArrayElement(testObjects, object)))) return JNI_ERR; - if(!NSK_VERIFY(NULL != - (targetClass = NSK_CPP_STUB2(GetObjectClass, jni, target)))) + if(!NSK_VERIFY(NULL != (targetClass = jni->GetObjectClass(target)))) return JNI_ERR; - if(!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(GetClassSignature, jvmti, targetClass, - &(objects_info[object].name), NULL))) + if(!NSK_JVMTI_VERIFY(jvmti->GetClassSignature(targetClass, &(objects_info[object].name), NULL))) return JNI_ERR; - if(!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(GetClassFields, jvmti, targetClass, - &(objects_info[object].fields_count), - &targetFields))) + if(!NSK_JVMTI_VERIFY(jvmti->GetClassFields( + targetClass, &(objects_info[object].fields_count), &targetFields))) return JNI_ERR; objects_info[object].fields = (field_info_t*)calloc(objects_info[object].fields_count,sizeof(field_info_t)); @@ -350,15 +338,14 @@ int tag_objects(jvmtiEnv *jvmti, JNIEnv *jni) { jint modifiers; int is_static = 0; int is_primitive = 0; - if(!NSK_JVMTI_VERIFY(NSK_CPP_STUB6(GetFieldName, jvmti, - targetClass, targetFields[field], - &objects_info[object].fields[field].name, - &objects_info[object].fields[field].signature, - NULL))) + if(!NSK_JVMTI_VERIFY(jvmti->GetFieldName(targetClass, + targetFields[field], + &objects_info[object].fields[field].name, + &objects_info[object].fields[field].signature, + NULL))) return JNI_ERR; - if(!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(GetFieldModifiers, jvmti, - targetClass, targetFields[field], - &modifiers))) { + if(!NSK_JVMTI_VERIFY(jvmti->GetFieldModifiers( + targetClass, targetFields[field], &modifiers))) { return JNI_ERR; } is_static = (modifiers & STATIC_FIELD) == STATIC_FIELD; @@ -367,31 +354,26 @@ int tag_objects(jvmtiEnv *jvmti, JNIEnv *jni) { is_primitive = 1; } else { jobject value; - if(!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(GetFieldModifiers, jvmti, - targetClass, targetFields[field], - &modifiers))) { + if(!NSK_JVMTI_VERIFY(jvmti->GetFieldModifiers( + targetClass, targetFields[field], &modifiers))) { return JNI_ERR; } if(is_static) { - if(!NSK_VERIFY(NULL != (value = NSK_CPP_STUB3(GetStaticObjectField, jni, - targetClass, - targetFields[field])))) { + if(!NSK_VERIFY(NULL != (value = jni->GetStaticObjectField( + targetClass, targetFields[field])))) { return JNI_ERR; } } else { - if(!NSK_VERIFY(NULL != (value = NSK_CPP_STUB3(GetObjectField, jni, - target, - targetFields[field])))) { + if(!NSK_VERIFY(NULL != (value = jni->GetObjectField(target, targetFields[field])))) { return JNI_ERR; } } if(tagged) { - if(!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetTag, jvmti, value, - ENCODE_TAG(FIELD_TAG,object,field)))) { + if(!NSK_JVMTI_VERIFY(jvmti->SetTag(value, ENCODE_TAG(FIELD_TAG,object,field)))) { return JNI_ERR; } } - NSK_CPP_STUB2(DeleteLocalRef, jni, value); + jni->DeleteLocalRef(value); } objects_info[object].fields[field].expected = @@ -403,20 +385,18 @@ int tag_objects(jvmtiEnv *jvmti, JNIEnv *jni) { // tag class and it's instance to pass this tag into primitive field callback if(tagged) { - if(!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetTag, jvmti, target, - ENCODE_TAG(OBJECT_TAG,object,0)))) + if(!NSK_JVMTI_VERIFY(jvmti->SetTag(target, ENCODE_TAG(OBJECT_TAG,object,0)))) return JNI_ERR; - if(!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetTag, jvmti, targetClass, - ENCODE_TAG(CLASS_TAG,object,0)))) + if(!NSK_JVMTI_VERIFY(jvmti->SetTag(targetClass, ENCODE_TAG(CLASS_TAG,object,0)))) return JNI_ERR; } - NSK_JVMTI_VERIFY(NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)targetFields)); - NSK_CPP_STUB2(DeleteLocalRef, jni, target); - NSK_CPP_STUB2(DeleteLocalRef, jni, targetClass); + NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)targetFields)); + jni->DeleteLocalRef(target); + jni->DeleteLocalRef(targetClass); } - NSK_CPP_STUB2(DeleteLocalRef, jni, testObjects); + jni->DeleteLocalRef(testObjects); return JNI_OK; } @@ -428,12 +408,10 @@ void release_object_info(jvmtiEnv *jvmti, JNIEnv *jni) { int field; for(object = 0; object < TEST_OBJECTS_COUNT; object++) { for(field = 0; field < objects_info[object].fields_count; field++) { - NSK_CPP_STUB2(Deallocate, jvmti, - (unsigned char*)objects_info[object].fields[field].name); - NSK_CPP_STUB2(Deallocate, jvmti, - (unsigned char*)objects_info[object].fields[field].signature); + jvmti->Deallocate((unsigned char*)objects_info[object].fields[field].name); + jvmti->Deallocate((unsigned char*)objects_info[object].fields[field].signature); } - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)objects_info[object].name); + jvmti->Deallocate((unsigned char*)objects_info[object].name); free(objects_info[object].fields); } } @@ -494,8 +472,7 @@ agent(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { primitive_callbacks.heap_iteration_callback = &heap_callback; NSK_DISPLAY0("Iterating over reachable objects.\n"); - if(!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(IterateThroughHeap, jvmti, - filter_type, NULL, &primitive_callbacks, NULL))) { + if(!NSK_JVMTI_VERIFY(jvmti->IterateThroughHeap(filter_type, NULL, &primitive_callbacks, NULL))) { nsk_jvmti_setFailStatus(); return; } @@ -512,8 +489,7 @@ agent(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { } NSK_DISPLAY0("Iterating over unreachable objects.\n"); - if(!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(IterateThroughHeap, jvmti, - filter_type, NULL, &primitive_callbacks, NULL))) { + if(!NSK_JVMTI_VERIFY(jvmti->IterateThroughHeap(filter_type, NULL, &primitive_callbacks, NULL))) { nsk_jvmti_setFailStatus(); return; } @@ -526,9 +502,7 @@ agent(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { * since it will free some memory that the callback will access. */ memset(&event_callbacks, 0, sizeof(jvmtiEventCallbacks)); - if(!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, - &event_callbacks, sizeof(jvmtiEventCallbacks)))) { + if(!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&event_callbacks, sizeof(jvmtiEventCallbacks)))) { return; } @@ -586,15 +560,13 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { caps.can_tag_objects = 1; caps.can_generate_object_free_events = 1; - if(!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + if(!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) { return JNI_ERR; } memset(&event_callbacks, 0, sizeof(jvmtiEventCallbacks)); event_callbacks.ObjectFree = &object_free_callback; - if(!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, - &event_callbacks, sizeof(jvmtiEventCallbacks)))) { + if(!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&event_callbacks, sizeof(jvmtiEventCallbacks)))) { return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/non-concrete-klass-filter/NonConcreteKlassFilter.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/non-concrete-klass-filter/NonConcreteKlassFilter.cpp index d2c9d48127e..bc038f96289 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/non-concrete-klass-filter/NonConcreteKlassFilter.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/non-concrete-klass-filter/NonConcreteKlassFilter.cpp @@ -156,14 +156,13 @@ agent(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { phase = ZERO_INVOCATIONS_PHASE; for(i = 0; i < FILTER_COUNT; i++) { - if(!NSK_VERIFY(NULL != (klass = NSK_CPP_STUB2(FindClass, jni, types[i])))) { + if(!NSK_VERIFY(NULL != (klass = jni->FindClass(types[i])))) { NSK_COMPLAIN1("Can't find class %s.\n",types[i]); nsk_jvmti_setFailStatus(); return; } NSK_DISPLAY1("Iterating through heap with klass-filter '%s'.\n",types[i]); - if(!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(IterateThroughHeap, jvmti, - 0, klass, &primitive_callbacks, NULL))) { + if(!NSK_JVMTI_VERIFY(jvmti->IterateThroughHeap(0, klass, &primitive_callbacks, NULL))) { nsk_jvmti_setFailStatus(); return; } @@ -171,13 +170,12 @@ agent(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { phase = STATIC_FIELDS_FINDING_PHASE; NSK_DISPLAY0("Iterating through heap with klass-filter 'java/lang/Class'.\n"); - if(!NSK_VERIFY(NULL != (klass = NSK_CPP_STUB2(FindClass, jni, "java/lang/Class")))) { + if(!NSK_VERIFY(NULL != (klass = jni->FindClass("java/lang/Class")))) { NSK_COMPLAIN0("Can't find class java/lang/Class.\n"); nsk_jvmti_setFailStatus(); return; } - if(!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(IterateThroughHeap, jvmti, - 0, klass, &primitive_callbacks, NULL))) { + if(!NSK_JVMTI_VERIFY(jvmti->IterateThroughHeap(0, klass, &primitive_callbacks, NULL))) { nsk_jvmti_setFailStatus(); return; } @@ -222,14 +220,12 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { caps.can_tag_objects = 1; caps.can_generate_object_free_events = 1; - if(!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + if(!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) { return JNI_ERR; } memset(&event_callbacks, 0, sizeof(jvmtiEventCallbacks)); - if(!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, - &event_callbacks, sizeof(jvmtiEventCallbacks)))) { + if(!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&event_callbacks, sizeof(jvmtiEventCallbacks)))) { return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/MonitorContendedEnter/mcontenter001/mcontenter001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/MonitorContendedEnter/mcontenter001/mcontenter001.cpp index 8d6d2d3d5a3..4be2422c91b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/MonitorContendedEnter/mcontenter001/mcontenter001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/MonitorContendedEnter/mcontenter001/mcontenter001.cpp @@ -55,8 +55,8 @@ MonitorContendedEnter(jvmtiEnv *jvmti, JNIEnv* jni, jthread thr, jobject obj) { } /* check if event is for tested thread and for tested object */ - if (NSK_CPP_STUB3(IsSameObject, jni, thread, thr) && - NSK_CPP_STUB3(IsSameObject, jni, object, obj)) + if (jni->IsSameObject(thread, thr) && + jni->IsSameObject(object, obj)) eventsCount++; } @@ -74,8 +74,7 @@ static int prepare() { NSK_DISPLAY0("Prepare: find tested thread\n"); /* get all live threads */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads))) + if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads))) return NSK_FALSE; if (!NSK_VERIFY(threads_count > 0 && threads != NULL)) @@ -87,8 +86,7 @@ static int prepare() { return NSK_FALSE; /* get thread information */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info))) + if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info))) return NSK_FALSE; NSK_DISPLAY3(" thread #%d (%s): %p\n", i, info.name, threads[i]); @@ -100,8 +98,7 @@ static int prepare() { } /* deallocate threads list */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads))) + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads))) return NSK_FALSE; if (thread == NULL) { @@ -110,35 +107,30 @@ static int prepare() { } /* make thread accessable for a long time */ - if (!NSK_JNI_VERIFY(jni, (thread = - NSK_CPP_STUB2(NewGlobalRef, jni, thread)) != NULL)) + if (!NSK_JNI_VERIFY(jni, (thread = jni->NewGlobalRef(thread)) != NULL)) return NSK_FALSE; /* get tested thread class */ - if (!NSK_JNI_VERIFY(jni, (klass = - NSK_CPP_STUB2(GetObjectClass, jni, thread)) != NULL)) + if (!NSK_JNI_VERIFY(jni, (klass = jni->GetObjectClass(thread)) != NULL)) return NSK_FALSE; /* get tested thread field 'endingMonitor' */ if (!NSK_JNI_VERIFY(jni, (field = - NSK_CPP_STUB4(GetFieldID, jni, klass, - "endingMonitor", "Ljava/lang/Object;")) != NULL)) + jni->GetFieldID(klass, "endingMonitor", "Ljava/lang/Object;")) != NULL)) return NSK_FALSE; /* get 'endingMonitor' object */ - if (!NSK_JNI_VERIFY(jni, (object = - NSK_CPP_STUB3(GetObjectField, jni, thread, field)) != NULL)) + if (!NSK_JNI_VERIFY(jni, (object = jni->GetObjectField(thread, field)) != NULL)) return NSK_FALSE; /* make object accessable for a long time */ - if (!NSK_JNI_VERIFY(jni, (object = - NSK_CPP_STUB2(NewGlobalRef, jni, object)) != NULL)) + if (!NSK_JNI_VERIFY(jni, (object = jni->NewGlobalRef(object)) != NULL)) return NSK_FALSE; /* enable MonitorContendedEnter event */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(SetEventNotificationMode, jvmti, JVMTI_ENABLE, - JVMTI_EVENT_MONITOR_CONTENDED_ENTER, NULL))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, + JVMTI_EVENT_MONITOR_CONTENDED_ENTER, + NULL))) return NSK_FALSE; return NSK_TRUE; @@ -147,9 +139,9 @@ static int prepare() { static int clean() { /* disable MonitorContendedEnter event */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(SetEventNotificationMode, jvmti, JVMTI_DISABLE, - JVMTI_EVENT_MONITOR_CONTENDED_ENTER, NULL))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_DISABLE, + JVMTI_EVENT_MONITOR_CONTENDED_ENTER, + NULL))) nsk_jvmti_setFailStatus(); return NSK_TRUE; @@ -228,14 +220,13 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { nsk_jvmti_createJVMTIEnv(jvm, reserved)) != NULL)) return JNI_ERR; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GetPotentialCapabilities, jvmti,&caps))) + if (!NSK_JVMTI_VERIFY(jvmti->GetPotentialCapabilities(&caps))) return JNI_ERR; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) return JNI_ERR; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps))) return JNI_ERR; if (!NSK_VERIFY(caps.can_generate_monitor_events)) @@ -243,9 +234,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&callbacks, 0, sizeof(callbacks)); callbacks.MonitorContendedEnter = &MonitorContendedEnter; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, - &callbacks, sizeof(callbacks)))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, sizeof(callbacks)))) return JNI_ERR; /* register agent proc and arg */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/MonitorContendedEntered/mcontentered001/mcontentered001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/MonitorContendedEntered/mcontentered001/mcontentered001.cpp index 021c911d68b..7182e128003 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/MonitorContendedEntered/mcontentered001/mcontentered001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/MonitorContendedEntered/mcontentered001/mcontentered001.cpp @@ -57,8 +57,8 @@ MonitorContendedEntered(jvmtiEnv *jvmti, JNIEnv* jni, jthread thr, jobject obj) } /* check if event is for tested thread and for tested object */ - if (NSK_CPP_STUB3(IsSameObject, jni, thread, thr) && - NSK_CPP_STUB3(IsSameObject, jni, object, obj)) + if (jni->IsSameObject(thread, thr) && + jni->IsSameObject(object, obj)) eventsCount++; } @@ -74,8 +74,8 @@ MonitorContendedEnter(jvmtiEnv *jvmti, JNIEnv* jni, jthread thr, jobject obj) { } /* check if event is for tested thread and for tested object */ - if (NSK_CPP_STUB3(IsSameObject, jni, thread, thr) && - NSK_CPP_STUB3(IsSameObject, jni, object, obj)) + if (jni->IsSameObject(thread, thr) && + jni->IsSameObject(object, obj)) eventsCount++; } @@ -94,8 +94,7 @@ static int prepare() { NSK_DISPLAY0("Prepare: find tested thread\n"); /* get all live threads */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads))) + if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads))) return NSK_FALSE; if (!NSK_VERIFY(threads_count > 0 && threads != NULL)) @@ -107,8 +106,7 @@ static int prepare() { return NSK_FALSE; /* get thread information */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info))) + if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info))) return NSK_FALSE; NSK_DISPLAY3(" thread #%d (%s): %p\n", i, info.name, threads[i]); @@ -120,8 +118,7 @@ static int prepare() { } /* deallocate threads list */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads))) + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads))) return NSK_FALSE; if (thread == NULL) { @@ -130,41 +127,36 @@ static int prepare() { } /* make thread accessable for a long time */ - if (!NSK_JNI_VERIFY(jni, (thread = - NSK_CPP_STUB2(NewGlobalRef, jni, thread)) != NULL)) + if (!NSK_JNI_VERIFY(jni, (thread = jni->NewGlobalRef(thread)) != NULL)) return NSK_FALSE; /* get tested thread class */ - if (!NSK_JNI_VERIFY(jni, (klass = - NSK_CPP_STUB2(GetObjectClass, jni, thread)) != NULL)) + if (!NSK_JNI_VERIFY(jni, (klass = jni->GetObjectClass(thread)) != NULL)) return NSK_FALSE; /* get tested thread field 'endingMonitor' */ if (!NSK_JNI_VERIFY(jni, (field = - NSK_CPP_STUB4(GetFieldID, jni, klass, - "endingMonitor", "Ljava/lang/Object;")) != NULL)) + jni->GetFieldID(klass, "endingMonitor", "Ljava/lang/Object;")) != NULL)) return NSK_FALSE; /* get 'endingMonitor' object */ - if (!NSK_JNI_VERIFY(jni, (object = - NSK_CPP_STUB3(GetObjectField, jni, thread, field)) != NULL)) + if (!NSK_JNI_VERIFY(jni, (object = jni->GetObjectField(thread, field)) != NULL)) return NSK_FALSE; /* make object accessable for a long time */ - if (!NSK_JNI_VERIFY(jni, (object = - NSK_CPP_STUB2(NewGlobalRef, jni, object)) != NULL)) + if (!NSK_JNI_VERIFY(jni, (object = jni->NewGlobalRef(object)) != NULL)) return NSK_FALSE; /* enable MonitorContendedEntered event */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(SetEventNotificationMode, jvmti, JVMTI_ENABLE, - JVMTI_EVENT_MONITOR_CONTENDED_ENTERED, NULL))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, + JVMTI_EVENT_MONITOR_CONTENDED_ENTERED, + NULL))) return NSK_FALSE; /* enable MonitorContendedEnter event */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(SetEventNotificationMode, jvmti, JVMTI_ENABLE, - JVMTI_EVENT_MONITOR_CONTENDED_ENTER, NULL))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, + JVMTI_EVENT_MONITOR_CONTENDED_ENTER, + NULL))) return NSK_FALSE; return NSK_TRUE; @@ -173,9 +165,9 @@ static int prepare() { static int clean() { /* disable MonitorContendedEntered event */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(SetEventNotificationMode, jvmti, JVMTI_DISABLE, - JVMTI_EVENT_MONITOR_CONTENDED_ENTERED, NULL))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_DISABLE, + JVMTI_EVENT_MONITOR_CONTENDED_ENTERED, + NULL))) nsk_jvmti_setFailStatus(); return NSK_TRUE; @@ -254,14 +246,13 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { nsk_jvmti_createJVMTIEnv(jvm, reserved)) != NULL)) return JNI_ERR; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GetPotentialCapabilities, jvmti,&caps))) + if (!NSK_JVMTI_VERIFY(jvmti->GetPotentialCapabilities(&caps))) return JNI_ERR; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) return JNI_ERR; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps))) return JNI_ERR; if (!NSK_VERIFY(caps.can_generate_monitor_events)) @@ -271,9 +262,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { callbacks.MonitorContendedEntered = &MonitorContendedEntered; callbacks.MonitorContendedEnter = &MonitorContendedEnter; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, - &callbacks, sizeof(callbacks)))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, sizeof(callbacks)))) return JNI_ERR; /* register agent proc and arg */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/MonitorWait/monitorwait001/monitorwait001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/MonitorWait/monitorwait001/monitorwait001.cpp index 421ef7d0d3b..0313ca59319 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/MonitorWait/monitorwait001/monitorwait001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/MonitorWait/monitorwait001/monitorwait001.cpp @@ -55,8 +55,8 @@ MonitorWait(jvmtiEnv *jvmti, JNIEnv* jni, jthread thr, jobject obj, jlong tout) } /* check if event is for tested thread and for tested object */ - if (NSK_CPP_STUB3(IsSameObject, jni, thread, thr) && - NSK_CPP_STUB3(IsSameObject, jni, object, obj)) { + if (jni->IsSameObject(thread, thr) && + jni->IsSameObject(object, obj)) { eventsCount++; if (tout != timeout) { NSK_COMPLAIN1("Unexpected timeout value: %d\n", (int)tout); @@ -79,8 +79,7 @@ static int prepare() { NSK_DISPLAY0("Prepare: find tested thread\n"); /* get all live threads */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads))) + if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads))) return NSK_FALSE; if (!NSK_VERIFY(threads_count > 0 && threads != NULL)) @@ -92,8 +91,7 @@ static int prepare() { return NSK_FALSE; /* get thread information */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info))) + if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info))) return NSK_FALSE; NSK_DISPLAY3(" thread #%d (%s): %p\n", i, info.name, threads[i]); @@ -105,8 +103,7 @@ static int prepare() { } /* deallocate threads list */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads))) + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads))) return NSK_FALSE; if (thread == NULL) { @@ -115,35 +112,29 @@ static int prepare() { } /* make thread accessable for a long time */ - if (!NSK_JNI_VERIFY(jni, (thread = - NSK_CPP_STUB2(NewGlobalRef, jni, thread)) != NULL)) + if (!NSK_JNI_VERIFY(jni, (thread = jni->NewGlobalRef(thread)) != NULL)) return NSK_FALSE; /* get tested thread class */ - if (!NSK_JNI_VERIFY(jni, (klass = - NSK_CPP_STUB2(GetObjectClass, jni, thread)) != NULL)) + if (!NSK_JNI_VERIFY(jni, (klass = jni->GetObjectClass(thread)) != NULL)) return NSK_FALSE; /* get tested thread field 'waitingMonitor' */ if (!NSK_JNI_VERIFY(jni, (field = - NSK_CPP_STUB4(GetFieldID, jni, klass, - "waitingMonitor", "Ljava/lang/Object;")) != NULL)) + jni->GetFieldID(klass, "waitingMonitor", "Ljava/lang/Object;")) != NULL)) return NSK_FALSE; /* get 'waitingMonitor' object */ - if (!NSK_JNI_VERIFY(jni, (object = - NSK_CPP_STUB3(GetObjectField, jni, thread, field)) != NULL)) + if (!NSK_JNI_VERIFY(jni, (object = jni->GetObjectField(thread, field)) != NULL)) return NSK_FALSE; /* make object accessable for a long time */ - if (!NSK_JNI_VERIFY(jni, (object = - NSK_CPP_STUB2(NewGlobalRef, jni, object)) != NULL)) + if (!NSK_JNI_VERIFY(jni, (object = jni->NewGlobalRef(object)) != NULL)) return NSK_FALSE; /* enable MonitorWait event */ if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(SetEventNotificationMode, jvmti, JVMTI_ENABLE, - JVMTI_EVENT_MONITOR_WAIT, NULL))) + jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_MONITOR_WAIT, NULL))) return NSK_FALSE; return NSK_TRUE; @@ -153,13 +144,12 @@ static int clean() { /* disable MonitorWait event */ if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(SetEventNotificationMode, jvmti, JVMTI_DISABLE, - JVMTI_EVENT_MONITOR_WAIT, NULL))) + jvmti->SetEventNotificationMode(JVMTI_DISABLE, JVMTI_EVENT_MONITOR_WAIT, NULL))) nsk_jvmti_setFailStatus(); /* dispose global references */ - NSK_CPP_STUB2(DeleteGlobalRef, jni, object); - NSK_CPP_STUB2(DeleteGlobalRef, jni, thread); + jni->DeleteGlobalRef(object); + jni->DeleteGlobalRef(thread); return NSK_TRUE; } @@ -237,14 +227,13 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { nsk_jvmti_createJVMTIEnv(jvm, reserved)) != NULL)) return JNI_ERR; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GetPotentialCapabilities, jvmti,&caps))) + if (!NSK_JVMTI_VERIFY(jvmti->GetPotentialCapabilities(&caps))) return JNI_ERR; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) return JNI_ERR; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps))) return JNI_ERR; if (!NSK_VERIFY(caps.can_generate_monitor_events)) @@ -252,9 +241,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&callbacks, 0, sizeof(callbacks)); callbacks.MonitorWait = &MonitorWait; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, - &callbacks, sizeof(callbacks)))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, sizeof(callbacks)))) return JNI_ERR; /* register agent proc and arg */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/MonitorWaited/monitorwaited001/monitorwaited001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/MonitorWaited/monitorwaited001/monitorwaited001.cpp index 17a547524f9..c7237f43961 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/MonitorWaited/monitorwaited001/monitorwaited001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/MonitorWaited/monitorwaited001/monitorwaited001.cpp @@ -56,8 +56,8 @@ MonitorWaited(jvmtiEnv *jvmti, JNIEnv* jni, } /* check if event is for tested thread and for tested object */ - if (NSK_CPP_STUB3(IsSameObject, jni, thread, thr) && - NSK_CPP_STUB3(IsSameObject, jni, object, obj)) { + if (jni->IsSameObject(thread, thr) && + jni->IsSameObject(object, obj)) { eventsCount++; if (timed_out == JNI_TRUE) { NSK_COMPLAIN0("Unexpected timed_out value: true\n"); @@ -80,8 +80,7 @@ static int prepare() { NSK_DISPLAY0("Prepare: find tested thread\n"); /* get all live threads */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads))) + if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads))) return NSK_FALSE; if (!NSK_VERIFY(threads_count > 0 && threads != NULL)) @@ -93,8 +92,7 @@ static int prepare() { return NSK_FALSE; /* get thread information */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info))) + if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info))) return NSK_FALSE; NSK_DISPLAY3(" thread #%d (%s): %p\n", i, info.name, threads[i]); @@ -106,8 +104,7 @@ static int prepare() { } /* deallocate threads list */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads))) + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads))) return NSK_FALSE; if (thread == NULL) { @@ -116,35 +113,29 @@ static int prepare() { } /* make thread accessable for a long time */ - if (!NSK_JNI_VERIFY(jni, (thread = - NSK_CPP_STUB2(NewGlobalRef, jni, thread)) != NULL)) + if (!NSK_JNI_VERIFY(jni, (thread = jni->NewGlobalRef(thread)) != NULL)) return NSK_FALSE; /* get tested thread class */ - if (!NSK_JNI_VERIFY(jni, (klass = - NSK_CPP_STUB2(GetObjectClass, jni, thread)) != NULL)) + if (!NSK_JNI_VERIFY(jni, (klass = jni->GetObjectClass(thread)) != NULL)) return NSK_FALSE; /* get tested thread field 'waitingMonitor' */ if (!NSK_JNI_VERIFY(jni, (field = - NSK_CPP_STUB4(GetFieldID, jni, klass, - "waitingMonitor", "Ljava/lang/Object;")) != NULL)) + jni->GetFieldID(klass, "waitingMonitor", "Ljava/lang/Object;")) != NULL)) return NSK_FALSE; /* get 'waitingMonitor' object */ - if (!NSK_JNI_VERIFY(jni, (object = - NSK_CPP_STUB3(GetObjectField, jni, thread, field)) != NULL)) + if (!NSK_JNI_VERIFY(jni, (object = jni->GetObjectField(thread, field)) != NULL)) return NSK_FALSE; /* make object accessable for a long time */ - if (!NSK_JNI_VERIFY(jni, (object = - NSK_CPP_STUB2(NewGlobalRef, jni, object)) != NULL)) + if (!NSK_JNI_VERIFY(jni, (object = jni->NewGlobalRef(object)) != NULL)) return NSK_FALSE; /* enable MonitorWaited event */ if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(SetEventNotificationMode, jvmti, JVMTI_ENABLE, - JVMTI_EVENT_MONITOR_WAITED, NULL))) + jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_MONITOR_WAITED, NULL))) return NSK_FALSE; return NSK_TRUE; @@ -154,13 +145,12 @@ static int clean() { /* disable MonitorWaited event */ if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(SetEventNotificationMode, jvmti, JVMTI_DISABLE, - JVMTI_EVENT_MONITOR_WAITED, NULL))) + jvmti->SetEventNotificationMode(JVMTI_DISABLE, JVMTI_EVENT_MONITOR_WAITED, NULL))) nsk_jvmti_setFailStatus(); /* dispose global references */ - NSK_CPP_STUB2(DeleteGlobalRef, jni, object); - NSK_CPP_STUB2(DeleteGlobalRef, jni, thread); + jni->DeleteGlobalRef(object); + jni->DeleteGlobalRef(thread); return NSK_TRUE; } @@ -238,14 +228,13 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { nsk_jvmti_createJVMTIEnv(jvm, reserved)) != NULL)) return JNI_ERR; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GetPotentialCapabilities, jvmti,&caps))) + if (!NSK_JVMTI_VERIFY(jvmti->GetPotentialCapabilities(&caps))) return JNI_ERR; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) return JNI_ERR; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps))) return JNI_ERR; if (!NSK_VERIFY(caps.can_generate_monitor_events)) @@ -253,9 +242,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&callbacks, 0, sizeof(callbacks)); callbacks.MonitorWaited = &MonitorWaited; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, - &callbacks, sizeof(callbacks)))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, sizeof(callbacks)))) return JNI_ERR; /* register agent proc and arg */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/NativeMethodBind/nativemethbind001/nativemethbind001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/NativeMethodBind/nativemethbind001/nativemethbind001.cpp index ee54c447b08..79812992d82 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/NativeMethodBind/nativemethbind001/nativemethbind001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/NativeMethodBind/nativemethbind001/nativemethbind001.cpp @@ -59,17 +59,13 @@ static jvmtiEventCallbacks callbacks; static jrawMonitorID countLock; static void lock(jvmtiEnv *jvmti_env, JNIEnv *jni_env) { - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorEnter, - jvmti_env, countLock))) - NSK_CPP_STUB2(FatalError, jni_env, - "failed to enter a raw monitor\n"); + if (!NSK_JVMTI_VERIFY(jvmti_env->RawMonitorEnter(countLock))) + jni_env->FatalError("failed to enter a raw monitor\n"); } static void unlock(jvmtiEnv *jvmti_env, JNIEnv *jni_env) { - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorExit, - jvmti_env, countLock))) - NSK_CPP_STUB2(FatalError, jni_env, - "failed to exit a raw monitor\n"); + if (!NSK_JVMTI_VERIFY(jvmti_env->RawMonitorExit(countLock))) + jni_env->FatalError("failed to exit a raw monitor\n"); } /** callback functions **/ @@ -84,7 +80,7 @@ NativeMethodBind(jvmtiEnv *jvmti_env, JNIEnv* jni_env, jthread thread, NSK_DISPLAY0(">>>> NativeMethodBind event received\n"); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPhase, jvmti_env, &phase))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->GetPhase(&phase))) { result = STATUS_FAILED; unlock(jvmti_env, jni_env); return; @@ -95,8 +91,7 @@ NativeMethodBind(jvmtiEnv *jvmti_env, JNIEnv* jni_env, jthread thread, return; } - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(GetMethodName, - jvmti_env, method, &methNam, &methSig, NULL))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->GetMethodName(method, &methNam, &methSig, NULL))) { result = STATUS_FAILED; NSK_COMPLAIN0("TEST FAILED: unable to get method name during NativeMethodBind callback\n\n"); unlock(jvmti_env, jni_env); @@ -118,13 +113,11 @@ NativeMethodBind(jvmtiEnv *jvmti_env, JNIEnv* jni_env, jthread thread, } } - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(Deallocate, - jvmti_env, (unsigned char*) methNam))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->Deallocate((unsigned char*) methNam))) { result = STATUS_FAILED; NSK_COMPLAIN0("TEST FAILED: unable to deallocate memory pointed to method name\n\n"); } - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(Deallocate, - jvmti_env, (unsigned char*) methSig))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->Deallocate((unsigned char*) methSig))) { result = STATUS_FAILED; NSK_COMPLAIN0("TEST FAILED: unable to deallocate memory pointed to method signature\n\n"); } @@ -152,8 +145,7 @@ Java_nsk_jvmti_NativeMethodBind_nativemethbind001_nativeMethod( if (registerNative == JNI_TRUE) { NSK_DISPLAY1("Finding class \"%s\" ...\n", CLASS_SIG); - if (!NSK_JNI_VERIFY(env, (testedCls = - NSK_CPP_STUB2(FindClass, env, CLASS_SIG)) != NULL)) { + if (!NSK_JNI_VERIFY(env, (testedCls = env->FindClass(CLASS_SIG)) != NULL)) { result = STATUS_FAILED; NSK_COMPLAIN1("TEST FAILURE: unable to find class \"%s\"\n\n", CLASS_SIG); @@ -167,8 +159,7 @@ Java_nsk_jvmti_NativeMethodBind_nativemethbind001_nativeMethod( NSK_DISPLAY3("Calling RegisterNatives() with \"%s %s\"\n" "\tfor class \"%s\" ...\n", METHODS[1][0], METHODS[1][1], CLASS_SIG); - if (!NSK_JNI_VERIFY_VOID(env, (NSK_CPP_STUB4(RegisterNatives, - env, testedCls, &meth, 1)) != 0)) { + if (!NSK_JNI_VERIFY_VOID(env, (env->RegisterNatives(testedCls, &meth, 1)) != 0)) { result = STATUS_FAILED; NSK_COMPLAIN3("TEST FAILURE: unable to RegisterNatives() \"%s %s\" for class \"%s\"\n\n", METHODS[1][0], METHODS[1][1], CLASS_SIG); @@ -221,19 +212,16 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { return JNI_ERR; /* create a raw monitor */ - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(CreateRawMonitor, - jvmti, "_counter_lock", &countLock))) + if (!NSK_JVMTI_VERIFY(jvmti->CreateRawMonitor("_counter_lock", &countLock))) return JNI_ERR; /* add capability to generate compiled method events */ memset(&caps, 0, sizeof(jvmtiCapabilities)); caps.can_generate_native_method_bind_events = 1; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, - jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) return JNI_ERR; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, - jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps))) return JNI_ERR; if (!caps.can_generate_native_method_bind_events) NSK_DISPLAY0("Warning: generation of native method bind events is not implemented\n"); @@ -242,13 +230,13 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { NSK_DISPLAY0("setting event callbacks ...\n"); (void) memset(&callbacks, 0, sizeof(callbacks)); callbacks.NativeMethodBind = &NativeMethodBind; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetEventCallbacks, - jvmti, &callbacks, sizeof(callbacks)))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, sizeof(callbacks)))) return JNI_ERR; NSK_DISPLAY0("setting event callbacks done\nenabling JVMTI events ...\n"); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode, - jvmti, JVMTI_ENABLE, JVMTI_EVENT_NATIVE_METHOD_BIND, NULL))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, + JVMTI_EVENT_NATIVE_METHOD_BIND, + NULL))) return JNI_ERR; NSK_DISPLAY0("enabling the events done\n\n"); diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/NativeMethodBind/nativemethbind002/nativemethbind002.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/NativeMethodBind/nativemethbind002/nativemethbind002.cpp index 4adf089130e..4cf4d921e68 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/NativeMethodBind/nativemethbind002/nativemethbind002.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/NativeMethodBind/nativemethbind002/nativemethbind002.cpp @@ -42,17 +42,13 @@ static jvmtiEventCallbacks callbacks; static jrawMonitorID countLock; static void lock(jvmtiEnv *jvmti_env, JNIEnv *jni_env) { - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorEnter, - jvmti_env, countLock))) - NSK_CPP_STUB2(FatalError, jni_env, - "failed to enter a raw monitor\n"); + if (!NSK_JVMTI_VERIFY(jvmti_env->RawMonitorEnter(countLock))) + jni_env->FatalError("failed to enter a raw monitor\n"); } static void unlock(jvmtiEnv *jvmti_env, JNIEnv *jni_env) { - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorExit, - jvmti_env, countLock))) - NSK_CPP_STUB2(FatalError, jni_env, - "failed to exit a raw monitor\n"); + if (!NSK_JVMTI_VERIFY(jvmti_env->RawMonitorExit(countLock))) + jni_env->FatalError("failed to exit a raw monitor\n"); } /** callback functions **/ @@ -64,8 +60,7 @@ NativeMethodBind(jvmtiEnv *jvmti_env, JNIEnv* jni_env, jthread thread, lock(jvmti_env, jni_env); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPhase, - jvmti_env, &phase))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->GetPhase(&phase))) { result = STATUS_FAILED; NSK_COMPLAIN0( "TEST FAILED: unable to obtain phase of the VM execution\n" @@ -79,8 +74,7 @@ NativeMethodBind(jvmtiEnv *jvmti_env, JNIEnv* jni_env, jthread thread, return; } - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(GetMethodName, - jvmti_env, method, &methNam, &methSig, NULL))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->GetMethodName(method, &methNam, &methSig, NULL))) { result = STATUS_FAILED; NSK_COMPLAIN0("TEST FAILED: unable to get method name during NativeMethodBind callback\n\n"); } @@ -89,12 +83,10 @@ NativeMethodBind(jvmtiEnv *jvmti_env, JNIEnv* jni_env, jthread thread, methNam, methSig); if (!(methNam==NULL)) - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(Deallocate, - jvmti_env, (unsigned char*) methNam))) + if (!NSK_JVMTI_VERIFY(jvmti_env->Deallocate((unsigned char*) methNam))) NSK_COMPLAIN0("TEST FAILED: unable to deallocate memory pointed to method name\n\n"); if (!(methSig==NULL)) - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(Deallocate, - jvmti_env, (unsigned char*) methSig))) + if (!NSK_JVMTI_VERIFY(jvmti_env->Deallocate((unsigned char*) methSig))) NSK_COMPLAIN0("TEST FAILED: unable to deallocate memory pointed to method signature\n\n"); unlock(jvmti_env, jni_env); @@ -149,19 +141,16 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { return JNI_ERR; /* create a raw monitor */ - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(CreateRawMonitor, - jvmti, "_counter_lock", &countLock))) + if (!NSK_JVMTI_VERIFY(jvmti->CreateRawMonitor("_counter_lock", &countLock))) return JNI_ERR; /* add capability to generate compiled method events */ memset(&caps, 0, sizeof(jvmtiCapabilities)); caps.can_generate_native_method_bind_events = 1; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, - jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) return JNI_ERR; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, - jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps))) return JNI_ERR; if (!caps.can_generate_native_method_bind_events) NSK_DISPLAY0("Warning: generation of native method bind events is not implemented\n"); @@ -171,16 +160,17 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { (void) memset(&callbacks, 0, sizeof(callbacks)); callbacks.NativeMethodBind = &NativeMethodBind; callbacks.VMDeath = &VMDeath; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetEventCallbacks, - jvmti, &callbacks, sizeof(callbacks)))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, sizeof(callbacks)))) return JNI_ERR; NSK_DISPLAY0("setting event callbacks done\nenabling JVMTI events ...\n"); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode, - jvmti, JVMTI_ENABLE, JVMTI_EVENT_NATIVE_METHOD_BIND, NULL))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, + JVMTI_EVENT_NATIVE_METHOD_BIND, + NULL))) return JNI_ERR; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode, - jvmti, JVMTI_ENABLE, JVMTI_EVENT_VM_DEATH, NULL))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, + JVMTI_EVENT_VM_DEATH, + NULL))) return JNI_ERR; NSK_DISPLAY0("enabling the events done\n\n"); diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/NativeMethodBind/nativemethbind003/nativemethbind003.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/NativeMethodBind/nativemethbind003/nativemethbind003.cpp index 05f6f771b85..2bd4a40a757 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/NativeMethodBind/nativemethbind003/nativemethbind003.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/NativeMethodBind/nativemethbind003/nativemethbind003.cpp @@ -52,17 +52,13 @@ static jvmtiEventCallbacks callbacks; static jrawMonitorID countLock; static void lock(jvmtiEnv *jvmti_env, JNIEnv *jni_env) { - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorEnter, - jvmti_env, countLock))) - NSK_CPP_STUB2(FatalError, jni_env, - "failed to enter a raw monitor\n"); + if (!NSK_JVMTI_VERIFY(jvmti_env->RawMonitorEnter(countLock))) + jni_env->FatalError("failed to enter a raw monitor\n"); } static void unlock(jvmtiEnv *jvmti_env, JNIEnv *jni_env) { - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorExit, - jvmti_env, countLock))) - NSK_CPP_STUB2(FatalError, jni_env, - "failed to exit a raw monitor\n"); + if (!NSK_JVMTI_VERIFY(jvmti_env->RawMonitorExit(countLock))) + jni_env->FatalError("failed to exit a raw monitor\n"); } /** callback functions **/ @@ -76,7 +72,7 @@ NativeMethodBind(jvmtiEnv *jvmti_env, JNIEnv* jni_env, jthread thread, NSK_DISPLAY0(">>>> NativeMethodBind event received\n"); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPhase, jvmti_env, &phase))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->GetPhase(&phase))) { result = STATUS_FAILED; unlock(jvmti_env, jni_env); return; @@ -87,8 +83,7 @@ NativeMethodBind(jvmtiEnv *jvmti_env, JNIEnv* jni_env, jthread thread, return; } - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(GetMethodName, - jvmti_env, method, &methNam, &methSig, NULL))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->GetMethodName(method, &methNam, &methSig, NULL))) { result = STATUS_FAILED; NSK_COMPLAIN0("TEST FAILED: unable to get method name during NativeMethodBind callback\n\n"); unlock(jvmti_env, jni_env); @@ -102,13 +97,11 @@ NativeMethodBind(jvmtiEnv *jvmti_env, JNIEnv* jni_env, jthread thread, NSK_DISPLAY2("\tmethod: \"%s %s\"\n", methNam, methSig); } - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(Deallocate, - jvmti_env, (unsigned char*) methNam))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->Deallocate((unsigned char*) methNam))) { result = STATUS_FAILED; NSK_COMPLAIN0("TEST FAILED: unable to deallocate memory storing method name\n\n"); } - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(Deallocate, - jvmti_env, (unsigned char*) methSig))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->Deallocate((unsigned char*) methSig))) { result = STATUS_FAILED; NSK_COMPLAIN0("TEST FAILED: unable to deallocate memory storing method signature\n\n"); } @@ -158,8 +151,7 @@ Java_nsk_jvmti_NativeMethodBind_nativemethbind003_registerNative( NSK_DISPLAY1("Inside the registerNative()\n" "Finding class \"%s\" ...\n", CLASS_SIG); - if (!NSK_JNI_VERIFY(env, (testedCls = - NSK_CPP_STUB2(FindClass, env, CLASS_SIG)) != NULL)) { + if (!NSK_JNI_VERIFY(env, (testedCls = env->FindClass(CLASS_SIG)) != NULL)) { result = STATUS_FAILED; NSK_COMPLAIN1("TEST FAILURE: unable to find class \"%s\"\n\n", CLASS_SIG); @@ -174,8 +166,7 @@ Java_nsk_jvmti_NativeMethodBind_nativemethbind003_registerNative( "Calling RegisterNatives() with \"%s %s\"\n" "\tfor class \"%s\" ...\n", METHODS[0], METHODS[1], CLASS_SIG); - if (!NSK_JNI_VERIFY_VOID(env, (NSK_CPP_STUB4(RegisterNatives, - env, testedCls, &meth, 1)) != 0)) { + if (!NSK_JNI_VERIFY_VOID(env, (env->RegisterNatives(testedCls, &meth, 1)) != 0)) { result = STATUS_FAILED; NSK_COMPLAIN3("TEST FAILURE: unable to RegisterNatives() \"%s %s\" for class \"%s\"\n\n", METHODS[0], METHODS[1], CLASS_SIG); @@ -183,8 +174,7 @@ Java_nsk_jvmti_NativeMethodBind_nativemethbind003_registerNative( NSK_DISPLAY1("Calling UnregisterNatives() for class \"%s\" ...\n", CLASS_SIG); - if (!NSK_JNI_VERIFY_VOID(env, (NSK_CPP_STUB2(UnregisterNatives, - env, testedCls)) != 0)) { + if (!NSK_JNI_VERIFY_VOID(env, (env->UnregisterNatives(testedCls)) != 0)) { result = STATUS_FAILED; NSK_COMPLAIN3("TEST FAILURE: unable to UnregisterNatives() \"%s %s\" for class \"%s\"\n\n", METHODS[1][0], METHODS[1][1], CLASS_SIG); @@ -215,19 +205,16 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { return JNI_ERR; /* create a raw monitor */ - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(CreateRawMonitor, - jvmti, "_counter_lock", &countLock))) + if (!NSK_JVMTI_VERIFY(jvmti->CreateRawMonitor("_counter_lock", &countLock))) return JNI_ERR; /* add capability to generate compiled method events */ memset(&caps, 0, sizeof(jvmtiCapabilities)); caps.can_generate_native_method_bind_events = 1; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, - jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) return JNI_ERR; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, - jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps))) return JNI_ERR; if (!caps.can_generate_native_method_bind_events) NSK_DISPLAY0("Warning: generation of native method bind events is not implemented\n"); @@ -237,16 +224,17 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { (void) memset(&callbacks, 0, sizeof(callbacks)); callbacks.NativeMethodBind = &NativeMethodBind; callbacks.VMDeath = &VMDeath; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetEventCallbacks, - jvmti, &callbacks, sizeof(callbacks)))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, sizeof(callbacks)))) return JNI_ERR; NSK_DISPLAY0("setting event callbacks done\nenabling JVMTI events ...\n"); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode, - jvmti, JVMTI_ENABLE, JVMTI_EVENT_NATIVE_METHOD_BIND, NULL))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, + JVMTI_EVENT_NATIVE_METHOD_BIND, + NULL))) return JNI_ERR; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode, - jvmti, JVMTI_ENABLE, JVMTI_EVENT_VM_DEATH, NULL))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, + JVMTI_EVENT_VM_DEATH, + NULL))) return JNI_ERR; NSK_DISPLAY0("enabling the events done\n\n"); diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/NativeMethodBind/nativemethbind004/nativemethbind004.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/NativeMethodBind/nativemethbind004/nativemethbind004.cpp index b995aa2be17..a516f4564e4 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/NativeMethodBind/nativemethbind004/nativemethbind004.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/NativeMethodBind/nativemethbind004/nativemethbind004.cpp @@ -67,17 +67,13 @@ redirNativeMethod(JNIEnv *env, jobject obj) { } static void lock(jvmtiEnv *jvmti_env, JNIEnv *jni_env) { - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorEnter, - jvmti_env, countLock))) - NSK_CPP_STUB2(FatalError, jni_env, - "failed to enter a raw monitor\n"); + if (!NSK_JVMTI_VERIFY(jvmti_env->RawMonitorEnter(countLock))) + jni_env->FatalError("failed to enter a raw monitor\n"); } static void unlock(jvmtiEnv *jvmti_env, JNIEnv *jni_env) { - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorExit, - jvmti_env, countLock))) - NSK_CPP_STUB2(FatalError, jni_env, - "failed to exit a raw monitor\n"); + if (!NSK_JVMTI_VERIFY(jvmti_env->RawMonitorExit(countLock))) + jni_env->FatalError("failed to exit a raw monitor\n"); } /** callback functions **/ @@ -90,7 +86,7 @@ NativeMethodBind(jvmtiEnv *jvmti_env, JNIEnv* jni_env, jthread thread, NSK_DISPLAY0(">>>> NativeMethodBind event received\n"); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPhase, jvmti_env, &phase))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->GetPhase(&phase))) { result = STATUS_FAILED; unlock(jvmti_env, jni_env); return; @@ -101,8 +97,7 @@ NativeMethodBind(jvmtiEnv *jvmti_env, JNIEnv* jni_env, jthread thread, return; } - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(GetMethodName, - jvmti_env, method, &methNam, &methSig, NULL))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->GetMethodName(method, &methNam, &methSig, NULL))) { result = STATUS_FAILED; NSK_COMPLAIN0("TEST FAILED: unable to get method name during NativeMethodBind callback\n\n"); unlock(jvmti_env, jni_env); @@ -117,13 +112,11 @@ NativeMethodBind(jvmtiEnv *jvmti_env, JNIEnv* jni_env, jthread thread, *new_addr = (void*) redirNativeMethod; } - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(Deallocate, - jvmti_env, (unsigned char*) methNam))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->Deallocate((unsigned char*) methNam))) { result = STATUS_FAILED; NSK_COMPLAIN0("TEST FAILED: unable to deallocate memory storing method name\n\n"); } - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(Deallocate, - jvmti_env, (unsigned char*) methSig))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->Deallocate((unsigned char*) methSig))) { result = STATUS_FAILED; NSK_COMPLAIN0("TEST FAILED: unable to deallocate memory storing method signature\n\n"); } @@ -190,19 +183,16 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { return JNI_ERR; /* create a raw monitor */ - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(CreateRawMonitor, - jvmti, "_counter_lock", &countLock))) + if (!NSK_JVMTI_VERIFY(jvmti->CreateRawMonitor("_counter_lock", &countLock))) return JNI_ERR; /* add capability to generate compiled method events */ memset(&caps, 0, sizeof(jvmtiCapabilities)); caps.can_generate_native_method_bind_events = 1; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, - jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) return JNI_ERR; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, - jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps))) return JNI_ERR; if (!caps.can_generate_native_method_bind_events) NSK_DISPLAY0("Warning: generation of native method bind events is not implemented\n"); @@ -211,13 +201,13 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { NSK_DISPLAY0("setting event callbacks ...\n"); (void) memset(&callbacks, 0, sizeof(callbacks)); callbacks.NativeMethodBind = &NativeMethodBind; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetEventCallbacks, - jvmti, &callbacks, sizeof(callbacks)))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, sizeof(callbacks)))) return JNI_ERR; NSK_DISPLAY0("setting event callbacks done\nenabling JVMTI events ...\n"); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode, - jvmti, JVMTI_ENABLE, JVMTI_EVENT_NATIVE_METHOD_BIND, NULL))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, + JVMTI_EVENT_NATIVE_METHOD_BIND, + NULL))) return JNI_ERR; NSK_DISPLAY0("enabling the events done\n\n"); diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ObjectFree/objfree001/objfree001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ObjectFree/objfree001/objfree001.cpp index bc1123f9001..2a14eee0629 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ObjectFree/objfree001/objfree001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ObjectFree/objfree001/objfree001.cpp @@ -62,8 +62,7 @@ static void rawMonitorFunc(jvmtiEnv *jvmti_env, const char *msg) { NSK_DISPLAY1("%s: creating a raw monitor ...\n", msg); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(CreateRawMonitor, - jvmti_env, "_lock", &_lock))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->CreateRawMonitor("_lock", &_lock))) { result = STATUS_FAILED; NSK_COMPLAIN1("TEST FAILED: %s: unable to create a raw monitor\n\n", msg); @@ -74,8 +73,7 @@ static void rawMonitorFunc(jvmtiEnv *jvmti_env, const char *msg) { NSK_DISPLAY1("%s: entering the raw monitor ...\n", msg); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorEnter, - jvmti_env, _lock))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->RawMonitorEnter(_lock))) { result = STATUS_FAILED; NSK_COMPLAIN1("TEST FAILED: %s: unable to enter the raw monitor\n\n", msg); @@ -86,8 +84,7 @@ static void rawMonitorFunc(jvmtiEnv *jvmti_env, const char *msg) { NSK_DISPLAY1("%s: exiting the raw monitor ...\n", msg); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorExit, - jvmti_env, _lock))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->RawMonitorExit(_lock))) { result = STATUS_FAILED; NSK_COMPLAIN1("TEST FAILED: %s: unable to exit the raw monitor\n\n", msg); @@ -98,8 +95,7 @@ static void rawMonitorFunc(jvmtiEnv *jvmti_env, const char *msg) { NSK_DISPLAY1("%s: destroying the raw monitor ...\n", msg); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(DestroyRawMonitor, - jvmti_env, _lock))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->DestroyRawMonitor(_lock))) { result = STATUS_FAILED; NSK_COMPLAIN1("TEST FAILED: %s: unable to destroy a raw monitor\n", msg); @@ -112,8 +108,7 @@ static void rawMonitorFunc(jvmtiEnv *jvmti_env, const char *msg) { static void memoryFunc(jvmtiEnv *jvmti_env, const char *msg) { NSK_DISPLAY1("%s: allocating memory ...\n", msg); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(Allocate, - jvmti_env, MEM_SIZE, &mem))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->Allocate(MEM_SIZE, &mem))) { result = STATUS_FAILED; NSK_COMPLAIN1("TEST FAILED: %s: unable to allocate memory\n\n", msg); @@ -125,8 +120,7 @@ static void memoryFunc(jvmtiEnv *jvmti_env, const char *msg) { NSK_DISPLAY1("%s: deallocating memory ...\n", msg); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(Deallocate, - jvmti_env, mem))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->Deallocate(mem))) { result = STATUS_FAILED; NSK_COMPLAIN1("TEST FAILED: %s: unable to deallocate memory\n\n", msg); @@ -142,8 +136,7 @@ static void envStorageFunc(jvmtiEnv *jvmti_env, const char *msg) { NSK_DISPLAY2("%s: setting an environment local storage 0x%p ...\n", msg, (void*) &stor); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(SetEnvironmentLocalStorage, - jvmti_env, (const void*) &stor))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->SetEnvironmentLocalStorage((const void*) &stor))) { result = STATUS_FAILED; NSK_COMPLAIN1("TEST FAILED: %s: unable to set an environment local storage\n\n", msg); @@ -155,8 +148,7 @@ static void envStorageFunc(jvmtiEnv *jvmti_env, const char *msg) { NSK_DISPLAY1("%s: getting an environment local storage ...\n", msg); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetEnvironmentLocalStorage, - jvmti_env, (void**) &obtainedData))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->GetEnvironmentLocalStorage((void**) &obtainedData))) { result = STATUS_FAILED; NSK_COMPLAIN1("TEST FAILED: %s: unable to get an environment local storage\n\n", msg); @@ -229,8 +221,7 @@ VMDeath(jvmtiEnv *jvmti_env, JNIEnv *env) { JNIEXPORT void JNICALL Java_nsk_jvmti_ObjectFree_objfree001_setTag(JNIEnv *jni_env, jobject obj, jobject objToTag) { - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetTag, - jvmti, objToTag, (jlong) 1))) { + if (!NSK_JVMTI_VERIFY(jvmti->SetTag(objToTag, (jlong) 1))) { result = STATUS_FAILED; NSK_COMPLAIN0("TEST FAILED: unable to set tag for a tested object\n"); } @@ -269,12 +260,10 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(jvmtiCapabilities)); caps.can_generate_object_free_events = 1; caps.can_tag_objects = 1; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, - jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) return JNI_ERR; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, - jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps))) return JNI_ERR; if (!caps.can_generate_object_free_events) @@ -287,16 +276,17 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { (void) memset(&callbacks, 0, sizeof(callbacks)); callbacks.VMDeath = &VMDeath; callbacks.ObjectFree = &ObjectFree; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetEventCallbacks, - jvmti, &callbacks, sizeof(callbacks)))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, sizeof(callbacks)))) return JNI_ERR; NSK_DISPLAY0("setting event callbacks done\nenabling JVMTI events ...\n"); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode, - jvmti, JVMTI_ENABLE, JVMTI_EVENT_VM_DEATH, NULL))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, + JVMTI_EVENT_VM_DEATH, + NULL))) return JNI_ERR; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode, - jvmti, JVMTI_ENABLE, JVMTI_EVENT_OBJECT_FREE, NULL))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, + JVMTI_EVENT_OBJECT_FREE, + NULL))) return JNI_ERR; NSK_DISPLAY0("enabling the events done\n\n"); diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ObjectFree/objfree002/objfree002.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ObjectFree/objfree002/objfree002.cpp index 48f4e01bc21..7e1be9da537 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ObjectFree/objfree002/objfree002.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ObjectFree/objfree002/objfree002.cpp @@ -59,8 +59,7 @@ static void rawMonitorFunc(jvmtiEnv *jvmti_env, const char *msg) { NSK_DISPLAY1("%s: creating a raw monitor ...\n", msg); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(CreateRawMonitor, - jvmti_env, "_lock", &_lock))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->CreateRawMonitor("_lock", &_lock))) { result = STATUS_FAILED; NSK_COMPLAIN1("TEST FAILED: %s: unable to create a raw monitor\n\n", msg); @@ -71,8 +70,7 @@ static void rawMonitorFunc(jvmtiEnv *jvmti_env, const char *msg) { NSK_DISPLAY1("%s: entering the raw monitor ...\n", msg); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorEnter, - jvmti_env, _lock))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->RawMonitorEnter(_lock))) { result = STATUS_FAILED; NSK_COMPLAIN1("TEST FAILED: %s: unable to enter the raw monitor\n\n", msg); @@ -83,8 +81,7 @@ static void rawMonitorFunc(jvmtiEnv *jvmti_env, const char *msg) { NSK_DISPLAY1("%s: waiting the raw monitor ...\n", msg); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(RawMonitorWait, - jvmti_env, _lock, (jlong)10))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->RawMonitorWait(_lock, (jlong)10))) { result = STATUS_FAILED; NSK_COMPLAIN1("TEST FAILED: %s: unable to wait the raw monitor\n\n", msg); @@ -95,8 +92,7 @@ static void rawMonitorFunc(jvmtiEnv *jvmti_env, const char *msg) { NSK_DISPLAY1("%s: notifying a single thread waiting on the raw monitor ...\n", msg); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorNotify, - jvmti_env, _lock))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->RawMonitorNotify(_lock))) { result = STATUS_FAILED; NSK_COMPLAIN1("TEST FAILED: %s: unable to notify single thread\n\n", msg); @@ -107,8 +103,7 @@ static void rawMonitorFunc(jvmtiEnv *jvmti_env, const char *msg) { NSK_DISPLAY1("%s: notifying all threads waiting on the raw monitor ...\n", msg); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorNotifyAll, - jvmti_env, _lock))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->RawMonitorNotifyAll(_lock))) { result = STATUS_FAILED; NSK_COMPLAIN1("TEST FAILED: %s: unable to notify all threads\n\n", msg); @@ -119,8 +114,7 @@ static void rawMonitorFunc(jvmtiEnv *jvmti_env, const char *msg) { NSK_DISPLAY1("%s: exiting the raw monitor ...\n", msg); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorExit, - jvmti_env, _lock))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->RawMonitorExit(_lock))) { result = STATUS_FAILED; NSK_COMPLAIN1("TEST FAILED: %s: unable to exit the raw monitor\n\n", msg); @@ -131,8 +125,7 @@ static void rawMonitorFunc(jvmtiEnv *jvmti_env, const char *msg) { NSK_DISPLAY1("%s: destroying the raw monitor ...\n", msg); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(DestroyRawMonitor, - jvmti_env, _lock))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->DestroyRawMonitor(_lock))) { result = STATUS_FAILED; NSK_COMPLAIN1("TEST FAILED: %s: unable to destroy a raw monitor\n", msg); @@ -145,8 +138,7 @@ static void rawMonitorFunc(jvmtiEnv *jvmti_env, const char *msg) { static void memoryFunc(jvmtiEnv *jvmti_env, const char *msg) { NSK_DISPLAY1("%s: allocating memory ...\n", msg); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(Allocate, - jvmti_env, MEM_SIZE, &mem))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->Allocate(MEM_SIZE, &mem))) { result = STATUS_FAILED; NSK_COMPLAIN1("TEST FAILED: %s: unable to allocate memory\n\n", msg); @@ -158,8 +150,7 @@ static void memoryFunc(jvmtiEnv *jvmti_env, const char *msg) { NSK_DISPLAY1("%s: deallocating memory ...\n", msg); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(Deallocate, - jvmti_env, mem))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->Deallocate(mem))) { result = STATUS_FAILED; NSK_COMPLAIN1("TEST FAILED: %s: unable to deallocate memory\n\n", msg); @@ -175,8 +166,7 @@ static void envStorageFunc(jvmtiEnv *jvmti_env, const char *msg) { NSK_DISPLAY2("%s: setting an environment local storage 0x%p ...\n", msg, (void*) &stor); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(SetEnvironmentLocalStorage, - jvmti_env, (const void*) &stor))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->SetEnvironmentLocalStorage((const void*) &stor))) { result = STATUS_FAILED; NSK_COMPLAIN1("TEST FAILED: %s: unable to set an environment local storage\n\n", msg); @@ -188,8 +178,7 @@ static void envStorageFunc(jvmtiEnv *jvmti_env, const char *msg) { NSK_DISPLAY1("%s: getting an environment local storage ...\n", msg); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetEnvironmentLocalStorage, - jvmti_env, (void**) &obtainedData))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->GetEnvironmentLocalStorage((void**) &obtainedData))) { result = STATUS_FAILED; NSK_COMPLAIN1("TEST FAILED: %s: unable to get an environment local storage\n\n", msg); @@ -249,8 +238,7 @@ Java_nsk_jvmti_ObjectFree_objfree002_setTag( if ((num % 2) == 0) { NSK_DISPLAY2("Setting the tag \"%ld\" for object #%d\n", (long) num, num); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetTag, - jvmti, objToTag, (jlong) num))) { + if (!NSK_JVMTI_VERIFY(jvmti->SetTag(objToTag, (jlong) num))) { result = STATUS_FAILED; NSK_COMPLAIN1("TEST FAILED: unable to set tag for object #%d\n", num); @@ -292,12 +280,10 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(jvmtiCapabilities)); caps.can_generate_object_free_events = 1; caps.can_tag_objects = 1; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, - jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) return JNI_ERR; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, - jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps))) return JNI_ERR; if (!caps.can_generate_object_free_events) @@ -310,16 +296,17 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { (void) memset(&callbacks, 0, sizeof(callbacks)); callbacks.VMDeath = &VMDeath; callbacks.ObjectFree = &ObjectFree; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetEventCallbacks, - jvmti, &callbacks, sizeof(callbacks)))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, sizeof(callbacks)))) return JNI_ERR; NSK_DISPLAY0("setting event callbacks done\nenabling JVMTI events ...\n"); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode, - jvmti, JVMTI_ENABLE, JVMTI_EVENT_VM_DEATH, NULL))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, + JVMTI_EVENT_VM_DEATH, + NULL))) return JNI_ERR; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode, - jvmti, JVMTI_ENABLE, JVMTI_EVENT_OBJECT_FREE, NULL))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, + JVMTI_EVENT_OBJECT_FREE, + NULL))) return JNI_ERR; NSK_DISPLAY0("enabling the events done\n\n"); diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/PopFrame/popframe005/popframe005.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/PopFrame/popframe005/popframe005.cpp index f1b66ec1e86..f8d0e740302 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/PopFrame/popframe005/popframe005.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/PopFrame/popframe005/popframe005.cpp @@ -33,12 +33,7 @@ extern "C" { // Deallocate memory region allocated by VM #define DEALLOCATE(p) \ if (p != NULL) \ - if (!NSK_JVMTI_VERIFY( \ - NSK_CPP_STUB2( \ - Deallocate \ - , jvmti \ - , p \ - ))) \ + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate(p))) \ { \ NSK_COMPLAIN0("Failed to deallocate: ##p##\n"); \ } @@ -101,49 +96,22 @@ MethodExit( int failure = 1; do { - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3( - GetThreadInfo - , jvmti - , thread - , &thr_info - ))) + if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(thread, &thr_info))) { break; } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3( - GetMethodDeclaringClass - , jvmti - , method - , &klass - ))) + if (!NSK_JVMTI_VERIFY(jvmti->GetMethodDeclaringClass(method, &klass))) { break; } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4( - GetClassSignature - , jvmti - , klass - , &class_signature - , NULL - ))) + if (!NSK_JVMTI_VERIFY(jvmti->GetClassSignature(klass, &class_signature, NULL))) { break; } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB5( - GetMethodName - , jvmti - , method - , &entry_name - , &entry_sig - , NULL - ))) + if (!NSK_JVMTI_VERIFY(jvmti->GetMethodName(method, &entry_name, &entry_sig, NULL))) { break; } @@ -181,12 +149,7 @@ jboolean suspendThread(jobject suspendedThread) { NSK_DISPLAY0(">>>>>>>> Invoke SuspendThread()\n"); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2( - SuspendThread - , jvmti - , suspendedThread - ))) + if (!NSK_JVMTI_VERIFY(jvmti->SuspendThread(suspendedThread))) { return JNI_FALSE; } @@ -203,12 +166,7 @@ jboolean resThread(jobject suspendedThread) { NSK_DISPLAY0(">>>>>>>> Invoke ResumeThread()\n"); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2( - ResumeThread - , jvmti - , suspendedThread - ))) + if (!NSK_JVMTI_VERIFY(jvmti->ResumeThread(suspendedThread))) { return JNI_FALSE; } @@ -234,25 +192,13 @@ Java_nsk_jvmti_PopFrame_popframe005_doPopFrame( } if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4( - SetEventNotificationMode - , jvmti - , JVMTI_ENABLE - , JVMTI_EVENT_METHOD_EXIT - , frameThr - ))) + jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_METHOD_EXIT, frameThr))) { result = JNI_FALSE; } if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4( - SetEventNotificationMode - , jvmti - , JVMTI_ENABLE - , JVMTI_EVENT_FRAME_POP - , frameThr - ))) + jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_FRAME_POP, frameThr))) { result = JNI_FALSE; } @@ -261,12 +207,7 @@ Java_nsk_jvmti_PopFrame_popframe005_doPopFrame( set_watch_jvmti_events(1); /* watch JVMTI events */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2( - PopFrame - , jvmti - , frameThr - ))) + if (!NSK_JVMTI_VERIFY(jvmti->PopFrame(frameThr))) { result = JNI_FALSE; } else { @@ -319,32 +260,17 @@ jint Agent_Initialize(JavaVM *vm, char *options, void *reserved) return JNI_ERR; } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2( - GetPotentialCapabilities - , jvmti - , &caps - ))) + if (!NSK_JVMTI_VERIFY(jvmti->GetPotentialCapabilities(&caps))) { return JNI_ERR; } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2( - AddCapabilities - , jvmti - , &caps - ))) + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) { return JNI_ERR; } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2( - GetCapabilities - , jvmti - , &caps - ))) + if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps))) { return JNI_ERR; } @@ -365,12 +291,7 @@ jint Agent_Initialize(JavaVM *vm, char *options, void *reserved) callbacks.MethodExit = &MethodExit; callbacks.FramePop = &FramePop; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3( - SetEventCallbacks - , jvmti - , &callbacks - , sizeof(callbacks) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, sizeof(callbacks) ))) { return JNI_ERR; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RedefineClasses/redefclass028/redefclass028.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RedefineClasses/redefclass028/redefclass028.cpp index 2420b73869a..4afa9e5079c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RedefineClasses/redefclass028/redefclass028.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RedefineClasses/redefclass028/redefclass028.cpp @@ -86,9 +86,9 @@ JNIEXPORT void JNICALL Java_nsk_jvmti_RedefineClasses_redefclass028_storeClassBy (JNIEnv *jni_env, jclass cls, jbyteArray classBytes) { jboolean isCopy; - bytesCount = NSK_CPP_STUB2(GetArrayLength, jni_env, classBytes); + bytesCount = jni_env->GetArrayLength(classBytes); clsBytes = - NSK_CPP_STUB3(GetByteArrayElements, jni_env, classBytes, &isCopy); + jni_env->GetByteArrayElements(classBytes, &isCopy); } /** callback functions **/ @@ -100,8 +100,7 @@ CompiledMethodLoad(jvmtiEnv *jvmti_env, jmethodID method, jint code_size, char *sig; NSK_DISPLAY0("CompiledMethodLoad event received for:\n"); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(GetMethodName, - jvmti_env, method, &name, &sig, NULL))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->GetMethodName(method, &name, &sig, NULL))) { nsk_jvmti_setFailStatus(); return; } @@ -138,8 +137,8 @@ CompiledMethodUnload(jvmtiEnv* jvmti_env, jmethodID method, if (err == JVMTI_ERROR_NONE) { NSK_DISPLAY3("for: \tmethod: name=\"%s\" signature=\"%s\"\n\tnative address=0x%p\n", name, sig, code_addr); - NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)name); - NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)sig); + jvmti_env->Deallocate((unsigned char*)name); + jvmti_env->Deallocate((unsigned char*)sig); } } /************************/ @@ -163,8 +162,7 @@ agentProc(jvmtiEnv* jvmti_env, JNIEnv* jni_env, void* arg) { /* at first, send all generated CompiledMethodLoad events */ NSK_DISPLAY0("agentProc: sending all generated CompiledMethodLoad events ...\n\n"); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GenerateEvents, jvmti, JVMTI_EVENT_COMPILED_METHOD_LOAD))) { + if (!NSK_JVMTI_VERIFY(jvmti->GenerateEvents(JVMTI_EVENT_COMPILED_METHOD_LOAD))) { nsk_jvmti_setFailStatus(); nsk_jvmti_resumeSync(); return; @@ -185,14 +183,12 @@ agentProc(jvmtiEnv* jvmti_env, JNIEnv* jni_env, void* arg) { NSK_DISPLAY0("agentProc: hotspot method compiled\n\n"); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(GetMethodDeclaringClass, - jvmti_env, hsMethodID, &decl_cls))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->GetMethodDeclaringClass(hsMethodID, &decl_cls))) { nsk_jvmti_setFailStatus(); nsk_jvmti_resumeSync(); return; } - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(GetClassSignature, - jvmti_env, decl_cls, &cls_sig, NULL))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->GetClassSignature(decl_cls, &cls_sig, NULL))) { nsk_jvmti_setFailStatus(); nsk_jvmti_resumeSync(); return; @@ -209,8 +205,7 @@ agentProc(jvmtiEnv* jvmti_env, JNIEnv* jni_env, void* arg) { NSK_DISPLAY1("agentProc: >>>>>>>> Invoke RedefineClasses():\n" "\tnew class byte count=%d\n", classDef.class_byte_count); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(RedefineClasses, - jvmti, 1, &classDef))) { + if (!NSK_JVMTI_VERIFY(jvmti->RedefineClasses(1, &classDef))) { nsk_jvmti_setFailStatus(); nsk_jvmti_resumeSync(); return; @@ -261,8 +256,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(jvmtiCapabilities)); caps.can_generate_compiled_method_load_events = 1; caps.can_redefine_classes = 1; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, - jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) return JNI_ERR; /* set event callback */ @@ -270,8 +264,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { (void) memset(&callbacks, 0, sizeof(callbacks)); callbacks.CompiledMethodLoad = &CompiledMethodLoad; callbacks.CompiledMethodUnload = &CompiledMethodUnload; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetEventCallbacks, - jvmti, &callbacks, sizeof(callbacks)))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, sizeof(callbacks)))) return JNI_ERR; NSK_DISPLAY0("setting event callbacks done\nenabling events ...\n"); diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RedefineClasses/redefclass029/redefclass029.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RedefineClasses/redefclass029/redefclass029.cpp index 3ee94187511..0fec733438c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RedefineClasses/redefclass029/redefclass029.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RedefineClasses/redefclass029/redefclass029.cpp @@ -85,9 +85,9 @@ JNIEXPORT void JNICALL Java_nsk_jvmti_RedefineClasses_redefclass029_storeClassBy (JNIEnv *jni_env, jclass cls, jbyteArray classBytes) { jboolean isCopy; - bytesCount = NSK_CPP_STUB2(GetArrayLength, jni_env, classBytes); + bytesCount = jni_env->GetArrayLength(classBytes); clsBytes = - NSK_CPP_STUB3(GetByteArrayElements, jni_env, classBytes, &isCopy); + jni_env->GetByteArrayElements(classBytes, &isCopy); } /** callback functions **/ @@ -99,8 +99,7 @@ CompiledMethodLoad(jvmtiEnv *jvmti_env, jmethodID method, jint code_size, char *sig; NSK_DISPLAY0("CompiledMethodLoad event received for:\n"); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(GetMethodName, - jvmti_env, method, &name, &sig, NULL))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->GetMethodName(method, &name, &sig, NULL))) { nsk_jvmti_setFailStatus(); return; } @@ -137,8 +136,8 @@ CompiledMethodUnload(jvmtiEnv* jvmti_env, jmethodID method, if (err == JVMTI_ERROR_NONE) { NSK_DISPLAY3("for: \tmethod: name=\"%s\" signature=\"%s\"\n\tnative address=0x%p\n", name, sig, code_addr); - NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)name); - NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)sig); + jvmti_env->Deallocate((unsigned char*)name); + jvmti_env->Deallocate((unsigned char*)sig); } } /************************/ @@ -162,8 +161,7 @@ agentProc(jvmtiEnv* jvmti_env, JNIEnv* jni_env, void* arg) { /* at first, send all generated CompiledMethodLoad events */ NSK_DISPLAY0("agentProc: sending all generated CompiledMethodLoad events ...\n\n"); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GenerateEvents, jvmti, JVMTI_EVENT_COMPILED_METHOD_LOAD))) { + if (!NSK_JVMTI_VERIFY(jvmti->GenerateEvents(JVMTI_EVENT_COMPILED_METHOD_LOAD))) { nsk_jvmti_setFailStatus(); nsk_jvmti_resumeSync(); return; @@ -184,14 +182,12 @@ agentProc(jvmtiEnv* jvmti_env, JNIEnv* jni_env, void* arg) { NSK_DISPLAY0("agentProc: hotspot method compiled\n\n"); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(GetMethodDeclaringClass, - jvmti_env, hsMethodID, &decl_cls))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->GetMethodDeclaringClass(hsMethodID, &decl_cls))) { nsk_jvmti_setFailStatus(); nsk_jvmti_resumeSync(); return; } - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(GetClassSignature, - jvmti_env, decl_cls, &cls_sig, NULL))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->GetClassSignature(decl_cls, &cls_sig, NULL))) { nsk_jvmti_setFailStatus(); nsk_jvmti_resumeSync(); return; @@ -208,8 +204,7 @@ agentProc(jvmtiEnv* jvmti_env, JNIEnv* jni_env, void* arg) { NSK_DISPLAY1("agentProc: >>>>>>>> Invoke RedefineClasses():\n" "\tnew class byte count=%d\n", classDef.class_byte_count); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(RedefineClasses, - jvmti, 1, &classDef))) { + if (!NSK_JVMTI_VERIFY(jvmti->RedefineClasses(1, &classDef))) { nsk_jvmti_setFailStatus(); nsk_jvmti_resumeSync(); return; @@ -260,8 +255,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(jvmtiCapabilities)); caps.can_generate_compiled_method_load_events = 1; caps.can_redefine_classes = 1; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, - jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) return JNI_ERR; /* set event callback */ @@ -269,8 +263,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { (void) memset(&callbacks, 0, sizeof(callbacks)); callbacks.CompiledMethodLoad = &CompiledMethodLoad; callbacks.CompiledMethodUnload = &CompiledMethodUnload; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetEventCallbacks, - jvmti, &callbacks, sizeof(callbacks)))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, sizeof(callbacks)))) return JNI_ERR; NSK_DISPLAY0("setting event callbacks done\nenabling events ...\n"); diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RedefineClasses/redefclass030/redefclass030.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RedefineClasses/redefclass030/redefclass030.cpp index a1315ac7218..8dc2d553006 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RedefineClasses/redefclass030/redefclass030.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RedefineClasses/redefclass030/redefclass030.cpp @@ -86,9 +86,9 @@ JNIEXPORT void JNICALL Java_nsk_jvmti_RedefineClasses_redefclass030_storeClassBy (JNIEnv *jni_env, jclass cls, jbyteArray classBytes) { jboolean isCopy; - bytesCount = NSK_CPP_STUB2(GetArrayLength, jni_env, classBytes); + bytesCount = jni_env->GetArrayLength(classBytes); clsBytes = - NSK_CPP_STUB3(GetByteArrayElements, jni_env, classBytes, &isCopy); + jni_env->GetByteArrayElements(classBytes, &isCopy); } /** callback functions **/ @@ -100,8 +100,7 @@ CompiledMethodLoad(jvmtiEnv *jvmti_env, jmethodID method, jint code_size, char *sig; NSK_DISPLAY0("CompiledMethodLoad event received for:\n"); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(GetMethodName, - jvmti_env, method, &name, &sig, NULL))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->GetMethodName(method, &name, &sig, NULL))) { nsk_jvmti_setFailStatus(); return; } @@ -138,8 +137,8 @@ CompiledMethodUnload(jvmtiEnv* jvmti_env, jmethodID method, if (err == JVMTI_ERROR_NONE) { NSK_DISPLAY3("for: \tmethod: name=\"%s\" signature=\"%s\"\n\tnative address=0x%p\n", name, sig, code_addr); - NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)name); - NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)sig); + jvmti_env->Deallocate((unsigned char*)name); + jvmti_env->Deallocate((unsigned char*)sig); } } /************************/ @@ -163,8 +162,7 @@ agentProc(jvmtiEnv* jvmti_env, JNIEnv* jni_env, void* arg) { /* at first, send all generated CompiledMethodLoad events */ NSK_DISPLAY0("agentProc: sending all generated CompiledMethodLoad events ...\n\n"); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GenerateEvents, jvmti, JVMTI_EVENT_COMPILED_METHOD_LOAD))) { + if (!NSK_JVMTI_VERIFY(jvmti->GenerateEvents(JVMTI_EVENT_COMPILED_METHOD_LOAD))) { nsk_jvmti_setFailStatus(); nsk_jvmti_resumeSync(); return; @@ -185,14 +183,12 @@ agentProc(jvmtiEnv* jvmti_env, JNIEnv* jni_env, void* arg) { NSK_DISPLAY0("agentProc: hotspot method compiled\n\n"); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(GetMethodDeclaringClass, - jvmti_env, hsMethodID, &decl_cls))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->GetMethodDeclaringClass(hsMethodID, &decl_cls))) { nsk_jvmti_setFailStatus(); nsk_jvmti_resumeSync(); return; } - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(GetClassSignature, - jvmti_env, decl_cls, &cls_sig, NULL))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->GetClassSignature(decl_cls, &cls_sig, NULL))) { nsk_jvmti_setFailStatus(); nsk_jvmti_resumeSync(); return; @@ -209,8 +205,7 @@ agentProc(jvmtiEnv* jvmti_env, JNIEnv* jni_env, void* arg) { NSK_DISPLAY1("agentProc: >>>>>>>> Invoke RedefineClasses():\n" "\tnew class byte count=%d\n", classDef.class_byte_count); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(RedefineClasses, - jvmti, 1, &classDef))) { + if (!NSK_JVMTI_VERIFY(jvmti->RedefineClasses(1, &classDef))) { nsk_jvmti_setFailStatus(); nsk_jvmti_resumeSync(); return; @@ -261,8 +256,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(jvmtiCapabilities)); caps.can_generate_compiled_method_load_events = 1; caps.can_redefine_classes = 1; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, - jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) return JNI_ERR; /* set event callback */ @@ -270,8 +264,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { (void) memset(&callbacks, 0, sizeof(callbacks)); callbacks.CompiledMethodLoad = &CompiledMethodLoad; callbacks.CompiledMethodUnload = &CompiledMethodUnload; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetEventCallbacks, - jvmti, &callbacks, sizeof(callbacks)))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, sizeof(callbacks)))) return JNI_ERR; NSK_DISPLAY0("setting event callbacks done\nenabling events ...\n"); diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RelinquishCapabilities/relcaps001/relcaps001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RelinquishCapabilities/relcaps001/relcaps001.cpp index 314ab08b3aa..2a6d4c05ae1 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RelinquishCapabilities/relcaps001/relcaps001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RelinquishCapabilities/relcaps001/relcaps001.cpp @@ -193,8 +193,7 @@ static int checkCapabilities(jvmtiEnv* jvmti, jvmtiCapabilities* initCaps, const memset(&caps, 0, sizeof(jvmtiCapabilities)); NSK_DISPLAY0("GetCapabilities() for current JVMTI env\n"); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GetCapabilities, jvmti, &caps))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps))) { return NSK_FALSE; } @@ -217,8 +216,7 @@ static int checkCapabilities(jvmtiEnv* jvmti, jvmtiCapabilities* initCaps, const */ static int addCapabilities(jvmtiEnv* jvmti, jvmtiCapabilities* caps) { NSK_DISPLAY0("AddCapabilities() for current JVMTI env\n"); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, caps))) { + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(caps))) { return NSK_FALSE; } NSK_DISPLAY0(" ... set\n"); @@ -232,8 +230,7 @@ static int addCapabilities(jvmtiEnv* jvmti, jvmtiCapabilities* caps) { */ static int removeCapabilities(jvmtiEnv* jvmti, jvmtiCapabilities* caps, const char where[]) { NSK_DISPLAY0("RelinquishCapabilities() for current JVMTI env\n"); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RelinquishCapabilities, jvmti, caps))) { + if (!NSK_JVMTI_VERIFY(jvmti->RelinquishCapabilities(caps))) { return NSK_FALSE; } NSK_DISPLAY0(" ... relinguished\n"); @@ -247,8 +244,7 @@ static int removeCapabilities(jvmtiEnv* jvmti, jvmtiCapabilities* caps, const ch */ static int getPotentialCapabilities(jvmtiEnv* jvmti, jvmtiCapabilities* caps) { NSK_DISPLAY0("GetPotentialCapabilities() for current JVMTI env\n"); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GetPotentialCapabilities, jvmti, caps))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetPotentialCapabilities(caps))) { return NSK_FALSE; } @@ -350,9 +346,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&eventCallbacks, 0, sizeof(eventCallbacks)); eventCallbacks.VMInit = callbackVMInit; eventCallbacks.VMDeath = callbackVMDeath; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, - &eventCallbacks, sizeof(eventCallbacks)))) { + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks)))) { return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RelinquishCapabilities/relcaps002/relcaps002.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RelinquishCapabilities/relcaps002/relcaps002.cpp index ebc346b61cb..a16e39c2ee8 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RelinquishCapabilities/relcaps002/relcaps002.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RelinquishCapabilities/relcaps002/relcaps002.cpp @@ -193,8 +193,7 @@ static int checkCapabilities(jvmtiEnv* jvmti, jvmtiCapabilities* initCaps, const memset(&caps, 0, sizeof(jvmtiCapabilities)); NSK_DISPLAY0("GetCapabilities() for current JVMTI env\n"); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GetCapabilities, jvmti, &caps))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps))) { return NSK_FALSE; } @@ -217,8 +216,7 @@ static int checkCapabilities(jvmtiEnv* jvmti, jvmtiCapabilities* initCaps, const */ static int addCapabilities(jvmtiEnv* jvmti, jvmtiCapabilities* caps) { NSK_DISPLAY0("AddCapabilities() for current JVMTI env\n"); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, caps))) { + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(caps))) { return NSK_FALSE; } NSK_DISPLAY0(" ... set\n"); @@ -232,8 +230,7 @@ static int addCapabilities(jvmtiEnv* jvmti, jvmtiCapabilities* caps) { */ static int removeCapabilities(jvmtiEnv* jvmti, jvmtiCapabilities* caps, const char where[]) { NSK_DISPLAY0("RelinquishCapabilities() for current JVMTI env\n"); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RelinquishCapabilities, jvmti, caps))) { + if (!NSK_JVMTI_VERIFY(jvmti->RelinquishCapabilities(caps))) { return NSK_FALSE; } NSK_DISPLAY0(" ... relinguished\n"); @@ -247,8 +244,7 @@ static int removeCapabilities(jvmtiEnv* jvmti, jvmtiCapabilities* caps, const ch */ static int getPotentialCapabilities(jvmtiEnv* jvmti, jvmtiCapabilities* caps) { NSK_DISPLAY0("GetPotentialCapabilities() for current JVMTI env\n"); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GetPotentialCapabilities, jvmti, caps))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetPotentialCapabilities(caps))) { return NSK_FALSE; } @@ -349,9 +345,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&eventCallbacks, 0, sizeof(eventCallbacks)); eventCallbacks.VMInit = callbackVMInit; eventCallbacks.VMDeath = callbackVMDeath; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, - &eventCallbacks, sizeof(eventCallbacks)))) { + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks)))) { return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ResourceExhausted/resexhausted.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ResourceExhausted/resexhausted.cpp index f2b07a9ca15..ecc47dcc239 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ResourceExhausted/resexhausted.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ResourceExhausted/resexhausted.cpp @@ -86,15 +86,17 @@ jint Agent_Initialize(JavaVM *vm, char *options, void *reserved) memset(&capabilities, 0, sizeof(jvmtiCapabilities)); capabilities.can_generate_resource_exhaustion_heap_events = 1; capabilities.can_generate_resource_exhaustion_threads_events = 1; - if ( ! NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, gJvmti, &capabilities)) ) + if ( ! NSK_JVMTI_VERIFY(gJvmti->AddCapabilities(&capabilities)) ) return JNI_ERR; memset((void *)&callbacks, 0, sizeof(jvmtiEventCallbacks)); callbacks.ResourceExhausted = resourceExhausted; - if ( ! NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetEventCallbacks, gJvmti, &callbacks, sizeof(callbacks))) ) + if ( ! NSK_JVMTI_VERIFY(gJvmti->SetEventCallbacks(&callbacks, sizeof(callbacks))) ) return JNI_ERR; - if ( ! NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode, gJvmti, JVMTI_ENABLE, JVMTI_EVENT_RESOURCE_EXHAUSTED, NULL) ) ) + if ( ! NSK_JVMTI_VERIFY(gJvmti->SetEventNotificationMode(JVMTI_ENABLE, + JVMTI_EVENT_RESOURCE_EXHAUSTED, + NULL) ) ) return JNI_ERR; return JNI_OK; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ResumeThread/resumethrd001/resumethrd001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ResumeThread/resumethrd001/resumethrd001.cpp index ab686f2b7e2..97689802db3 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ResumeThread/resumethrd001/resumethrd001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ResumeThread/resumethrd001/resumethrd001.cpp @@ -58,15 +58,13 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY1(" ... found thread: %p\n", (void*)testedThread); NSK_DISPLAY1("Suspend thread: %p\n", (void*)testedThread); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(SuspendThread, jvmti, testedThread))) { + if (!NSK_JVMTI_VERIFY(jvmti->SuspendThread(testedThread))) { nsk_jvmti_setFailStatus(); return; } NSK_DISPLAY1("Resume thread: %p\n", (void*)testedThread); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(ResumeThread, jvmti, testedThread))) { + if (!NSK_JVMTI_VERIFY(jvmti->ResumeThread(testedThread))) { nsk_jvmti_setFailStatus(); } @@ -74,8 +72,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { { jint state = 0; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetThreadState, jvmti, testedThread, &state))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetThreadState(testedThread, &state))) { nsk_jvmti_setFailStatus(); } NSK_DISPLAY2(" ... got state vector: %s (%d)\n", @@ -98,7 +95,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { return; NSK_DISPLAY0("Delete thread reference\n"); - NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, testedThread)); + NSK_TRACE(jni->DeleteGlobalRef(testedThread)); } NSK_DISPLAY0("Let debugee to finish\n"); @@ -139,8 +136,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { jvmtiCapabilities suspendCaps; memset(&suspendCaps, 0, sizeof(suspendCaps)); suspendCaps.can_suspend = 1; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, &suspendCaps))) + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&suspendCaps))) return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ResumeThread/resumethrd002/resumethrd002.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ResumeThread/resumethrd002/resumethrd002.cpp index afccedf4f10..55a06f21bbc 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ResumeThread/resumethrd002/resumethrd002.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ResumeThread/resumethrd002/resumethrd002.cpp @@ -72,8 +72,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { return; NSK_DISPLAY1("Suspend thread: %p\n", (void*)testedThread); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(SuspendThread, jvmti, testedThread))) { + if (!NSK_JVMTI_VERIFY(jvmti->SuspendThread(testedThread))) { nsk_jvmti_setFailStatus(); return; } @@ -83,8 +82,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { return; NSK_DISPLAY1("Resume thread: %p\n", (void*)testedThread); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(ResumeThread, jvmti, testedThread))) { + if (!NSK_JVMTI_VERIFY(jvmti->ResumeThread(testedThread))) { nsk_jvmti_setFailStatus(); } @@ -112,7 +110,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { return; NSK_DISPLAY0("Delete thread reference\n"); - NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, testedThread)); + NSK_TRACE(jni->DeleteGlobalRef(testedThread)); } NSK_DISPLAY0("Let debugee to finish\n"); @@ -127,7 +125,7 @@ JNIEXPORT void JNICALL callbackThreadEnd(jvmtiEnv* jvmti, JNIEnv* jni, jthread thread) { /* check if event is for tested thread */ if (thread != NULL && - NSK_CPP_STUB3(IsSameObject, jni, testedThread, thread)) { + jni->IsSameObject(testedThread, thread)) { NSK_DISPLAY1(" ... received THREAD_END event for tested thread: %p\n", (void*)thread); eventsReceived++; } else { @@ -168,8 +166,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { jvmtiCapabilities suspendCaps; memset(&suspendCaps, 0, sizeof(suspendCaps)); suspendCaps.can_suspend = 1; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, &suspendCaps))) + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&suspendCaps))) return JNI_ERR; } @@ -178,8 +175,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { jvmtiEventCallbacks callbacks; memset(&callbacks, 0, sizeof(callbacks)); callbacks.ThreadEnd = callbackThreadEnd; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, &callbacks, sizeof(callbacks)))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, sizeof(callbacks)))) return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ResumeThreadList/resumethrdlst001/resumethrdlst001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ResumeThreadList/resumethrdlst001/resumethrdlst001.cpp index 6f500966992..b513fa47ec0 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ResumeThreadList/resumethrdlst001/resumethrdlst001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ResumeThreadList/resumethrdlst001/resumethrdlst001.cpp @@ -62,18 +62,16 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { int i; NSK_DISPLAY1("Allocate threads array: %d threads\n", threadsCount); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(Allocate, jvmti, (threadsCount * sizeof(jthread)), - (unsigned char**)&threads))) { + if (!NSK_JVMTI_VERIFY(jvmti->Allocate((threadsCount * sizeof(jthread)), + (unsigned char**)&threads))) { nsk_jvmti_setFailStatus(); return; } NSK_DISPLAY1(" ... allocated array: %p\n", (void*)threads); NSK_DISPLAY1("Allocate results array: %d threads\n", threadsCount); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(Allocate, jvmti, (threadsCount * sizeof(jvmtiError)), - (unsigned char**)&results))) { + if (!NSK_JVMTI_VERIFY(jvmti->Allocate((threadsCount * sizeof(jvmtiError)), + (unsigned char**)&results))) { nsk_jvmti_setFailStatus(); return; } @@ -84,8 +82,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { return; NSK_DISPLAY0("Suspend threads list\n"); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(SuspendThreadList, jvmti, threadsCount, threads, results))) { + if (!NSK_JVMTI_VERIFY(jvmti->SuspendThreadList(threadsCount, threads, results))) { nsk_jvmti_setFailStatus(); return; } @@ -99,8 +96,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { } NSK_DISPLAY0("Resume threads list\n"); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(ResumeThreadList, jvmti, threadsCount, threads, results))) { + if (!NSK_JVMTI_VERIFY(jvmti->ResumeThreadList(threadsCount, threads, results))) { nsk_jvmti_setFailStatus(); return; } @@ -118,8 +114,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { jint state = 0; NSK_DISPLAY2(" thread #%d (%p):\n", i, (void*)threads[i]); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetThreadState, jvmti, threads[i], &state))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetThreadState(threads[i], &state))) { nsk_jvmti_setFailStatus(); } NSK_DISPLAY2(" ... got state vector: %s (%d)\n", @@ -144,18 +139,16 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY0("Delete threads references\n"); for (i = 0; i < threadsCount; i++) { if (threads[i] != NULL) - NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, threads[i])); + NSK_TRACE(jni->DeleteGlobalRef(threads[i])); } NSK_DISPLAY1("Deallocate threads array: %p\n", (void*)threads); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads))) { + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads))) { nsk_jvmti_setFailStatus(); } NSK_DISPLAY1("Deallocate results array: %p\n", (void*)results); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)results))) { + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)results))) { nsk_jvmti_setFailStatus(); } } @@ -181,8 +174,7 @@ static int fillThreadsByName(jvmtiEnv* jvmti, JNIEnv* jni, foundThreads[i] = NULL; } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetAllThreads, jvmti, &count, &threads))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&count, &threads))) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -191,8 +183,7 @@ static int fillThreadsByName(jvmtiEnv* jvmti, JNIEnv* jni, for (i = 0; i < count; i++) { jvmtiThreadInfo info; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info))) { nsk_jvmti_setFailStatus(); break; } @@ -207,8 +198,7 @@ static int fillThreadsByName(jvmtiEnv* jvmti, JNIEnv* jni, } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads))) { + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads))) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -226,7 +216,7 @@ static int fillThreadsByName(jvmtiEnv* jvmti, JNIEnv* jni, NSK_DISPLAY1("Make global references for threads: %d threads\n", foundCount); for (i = 0; i < foundCount; i++) { if (!NSK_JNI_VERIFY(jni, (foundThreads[i] = (jthread) - NSK_CPP_STUB2(NewGlobalRef, jni, foundThreads[i])) != NULL)) { + jni->NewGlobalRef(foundThreads[i])) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -274,8 +264,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { jvmtiCapabilities suspendCaps; memset(&suspendCaps, 0, sizeof(suspendCaps)); suspendCaps.can_suspend = 1; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, &suspendCaps))) + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&suspendCaps))) return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ResumeThreadList/resumethrdlst002/resumethrdlst002.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ResumeThreadList/resumethrdlst002/resumethrdlst002.cpp index 4947224da15..0aa26616579 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ResumeThreadList/resumethrdlst002/resumethrdlst002.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ResumeThreadList/resumethrdlst002/resumethrdlst002.cpp @@ -71,18 +71,16 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { int i; NSK_DISPLAY1("Allocate threads array: %d threads\n", threadsCount); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(Allocate, jvmti, (threadsCount * sizeof(jthread)), - (unsigned char**)&threads))) { + if (!NSK_JVMTI_VERIFY(jvmti->Allocate((threadsCount * sizeof(jthread)), + (unsigned char**)&threads))) { nsk_jvmti_setFailStatus(); return; } NSK_DISPLAY1(" ... allocated array: %p\n", (void*)threads); NSK_DISPLAY1("Allocate results array: %d threads\n", threadsCount); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(Allocate, jvmti, (threadsCount * sizeof(jvmtiError)), - (unsigned char**)&results))) { + if (!NSK_JVMTI_VERIFY(jvmti->Allocate((threadsCount * sizeof(jvmtiError)), + (unsigned char**)&results))) { nsk_jvmti_setFailStatus(); return; } @@ -93,8 +91,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { return; NSK_DISPLAY0("Suspend threads list\n"); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(SuspendThreadList, jvmti, threadsCount, threads, results))) { + if (!NSK_JVMTI_VERIFY(jvmti->SuspendThreadList(threadsCount, threads, results))) { nsk_jvmti_setFailStatus(); return; } @@ -117,8 +114,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { return; NSK_DISPLAY0("Resume threads list\n"); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(ResumeThreadList, jvmti, threadsCount, threads, results))) { + if (!NSK_JVMTI_VERIFY(jvmti->ResumeThreadList(threadsCount, threads, results))) { nsk_jvmti_setFailStatus(); return; } @@ -159,18 +155,16 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY0("Delete threads references\n"); for (i = 0; i < threadsCount; i++) { if (threads[i] != NULL) - NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, threads[i])); + NSK_TRACE(jni->DeleteGlobalRef(threads[i])); } NSK_DISPLAY1("Deallocate threads array: %p\n", (void*)threads); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads))) { + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads))) { nsk_jvmti_setFailStatus(); } NSK_DISPLAY1("Deallocate results array: %p\n", (void*)results); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)results))) { + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)results))) { nsk_jvmti_setFailStatus(); } } @@ -196,8 +190,7 @@ static int fillThreadsByName(jvmtiEnv* jvmti, JNIEnv* jni, foundThreads[i] = NULL; } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetAllThreads, jvmti, &count, &threads))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&count, &threads))) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -206,8 +199,7 @@ static int fillThreadsByName(jvmtiEnv* jvmti, JNIEnv* jni, for (i = 0; i < count; i++) { jvmtiThreadInfo info; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info))) { nsk_jvmti_setFailStatus(); break; } @@ -222,8 +214,7 @@ static int fillThreadsByName(jvmtiEnv* jvmti, JNIEnv* jni, } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads))) { + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads))) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -241,7 +232,7 @@ static int fillThreadsByName(jvmtiEnv* jvmti, JNIEnv* jni, NSK_DISPLAY1("Make global references for threads: %d threads\n", foundCount); for (i = 0; i < foundCount; i++) { if (!NSK_JNI_VERIFY(jni, (foundThreads[i] = (jthread) - NSK_CPP_STUB2(NewGlobalRef, jni, foundThreads[i])) != NULL)) { + jni->NewGlobalRef(foundThreads[i])) != NULL)) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -258,7 +249,7 @@ JNIEXPORT void JNICALL callbackThreadEnd(jvmtiEnv* jvmti, JNIEnv* jni, jthread thread) { int i = 0; - jvmtiError e = NSK_CPP_STUB2(RawMonitorEnter, jvmti, eventsReceivedMtx); + jvmtiError e = jvmti->RawMonitorEnter(eventsReceivedMtx); if ( !NSK_JVMTI_VERIFY(e) ) { NSK_DISPLAY1(" ... ERROR entering raw monitor for thread %p\n", (void *) thread); return; @@ -267,15 +258,15 @@ callbackThreadEnd(jvmtiEnv* jvmti, JNIEnv* jni, jthread thread) { /* check if event is for tested thread */ for (i = 0; i < threadsCount; i++) { if (thread != NULL && - NSK_CPP_STUB3(IsSameObject, jni, threads[i], thread)) { + jni->IsSameObject(threads[i], thread)) { NSK_DISPLAY2(" ... received THREAD_END event for thread #%d: %p\n", i, (void*)thread); eventsReceived++; - NSK_CPP_STUB2(RawMonitorExit, jvmti, eventsReceivedMtx); + jvmti->RawMonitorExit(eventsReceivedMtx); return; } } - NSK_CPP_STUB2(RawMonitorExit, jvmti, eventsReceivedMtx); + jvmti->RawMonitorExit(eventsReceivedMtx); NSK_DISPLAY1(" ... received THREAD_END event for unknown thread: %p\n", (void*)thread); } @@ -317,8 +308,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { jvmtiCapabilities suspendCaps; memset(&suspendCaps, 0, sizeof(suspendCaps)); suspendCaps.can_suspend = 1; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, &suspendCaps))) + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&suspendCaps))) return JNI_ERR; } @@ -327,15 +317,13 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { jvmtiEventCallbacks callbacks; memset(&callbacks, 0, sizeof(callbacks)); callbacks.ThreadEnd = callbackThreadEnd; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, &callbacks, sizeof(callbacks)))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, sizeof(callbacks)))) return JNI_ERR; } /* create a mutex for the eventsReceived variable */ { - if ( ! NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(CreateRawMonitor, jvmti, "eventsReceived", &eventsReceivedMtx))) { + if ( ! NSK_JVMTI_VERIFY(jvmti->CreateRawMonitor("eventsReceived", &eventsReceivedMtx))) { return JNI_ERR; } } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RetransformClasses/retransform002/retransform002.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RetransformClasses/retransform002/retransform002.cpp index 7aa7299a1c9..c9078ea5784 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RetransformClasses/retransform002/retransform002.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RetransformClasses/retransform002/retransform002.cpp @@ -49,15 +49,7 @@ Java_nsk_jvmti_RetransformClasses_retransform002_forceLoadedClassesRetransformat ) { - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3( - RetransformClasses - , jvmti - , 1 - , &class_for_retransformation - ) - ) - ) + if (!NSK_JVMTI_VERIFY(jvmti->RetransformClasses(1, &class_for_retransformation))) return JNI_FALSE; return JNI_TRUE; @@ -114,53 +106,26 @@ jint Agent_Initialize(JavaVM *vm, char *options, void *reserved) ) return JNI_ERR; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2( - GetCapabilities - , jvmti - , &caps) - ) - ) + if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps))) return JNI_ERR; caps.can_retransform_classes = 1; // Register all necessary JVM capabilities - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2( - AddCapabilities - , jvmti - , &caps) - ) - ) + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) return JNI_ERR; // Register all necessary event callbacks memset(&callbacks, 0, sizeof(callbacks)); callbacks.ClassFileLoadHook = &ClassFileLoadHook; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3( - SetEventCallbacks - , jvmti - , &callbacks - , sizeof(callbacks) - ) - ) - ) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, sizeof(callbacks)))) return JNI_ERR; // Enable class retransformation - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4( - SetEventNotificationMode - , jvmti - , JVMTI_ENABLE - , JVMTI_EVENT_CLASS_FILE_LOAD_HOOK - , NULL - ) - ) - ) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, + JVMTI_EVENT_CLASS_FILE_LOAD_HOOK, + NULL))) return JNI_ERR; return JNI_OK; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RetransformClasses/retransform003/retransform003.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RetransformClasses/retransform003/retransform003.cpp index b37effc6ec0..b189355432c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RetransformClasses/retransform003/retransform003.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RetransformClasses/retransform003/retransform003.cpp @@ -63,15 +63,7 @@ Java_nsk_jvmti_RetransformClasses_retransform003_forceLoadedClassesRetransformat , jclass class_for_retransformation ) { - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3( - RetransformClasses - , jvmti - , 1 - , &class_for_retransformation - ) - ) - ) + if (!NSK_JVMTI_VERIFY(jvmti->RetransformClasses(1, &class_for_retransformation))) return JNI_FALSE; return JNI_TRUE; @@ -107,88 +99,28 @@ ClassFileLoadHook ( } // Get ant the invoke callback function - if (!NSK_VERIFY( - (loader_class = NSK_CPP_STUB2( - GetObjectClass - , jni - , loader - ) - ) != NULL - ) - ) + if (!NSK_VERIFY((loader_class = jni->GetObjectClass(loader)) != NULL)) return; - if (!NSK_VERIFY( - (method_id = NSK_CPP_STUB4( - GetMethodID - , jni - , loader_class - , "loadClass" - , "(Ljava/lang/String;)Ljava/lang/Class;" - ) - ) != NULL - ) - ) + if (!NSK_VERIFY((method_id = jni->GetMethodID( + loader_class, "loadClass", "(Ljava/lang/String;)Ljava/lang/Class;")) != NULL)) return; - if (!NSK_VERIFY( - (class_name_string = - NSK_CPP_STUB2( - NewStringUTF - , jni - , CALLBACK_CLASS_NAME - ) - ) != NULL - ) - ) + if (!NSK_VERIFY((class_name_string = jni->NewStringUTF(CALLBACK_CLASS_NAME)) != NULL)) return; - if (!NSK_VERIFY( - (callback_class = (jclass) NSK_CPP_STUB4( - CallObjectMethod - , jni - , loader - , method_id - , class_name_string - ) - ) != NULL - ) - ) + if (!NSK_VERIFY((callback_class = (jclass) jni->CallObjectMethod( + loader, method_id, class_name_string)) != NULL)) return; - if (!NSK_VERIFY( - (method_id = NSK_CPP_STUB4( - GetStaticMethodID - , jni - , callback_class - , "callback" - , "(Ljava/lang/String;I)V" - ) - ) != NULL - ) - ) + if (!NSK_VERIFY((method_id = jni->GetStaticMethodID( + callback_class, "callback", "(Ljava/lang/String;I)V")) != NULL)) return; - if (!NSK_VERIFY( - (class_name_string = - NSK_CPP_STUB2( - NewStringUTF - , jni - , name - ) - ) != NULL - ) - ) + if (!NSK_VERIFY((class_name_string = jni->NewStringUTF(name)) != NULL)) return; - NSK_CPP_STUB5( - CallStaticObjectMethod - , jni - , callback_class - , method_id - , class_name_string - , agent_id - ); + jni->CallStaticObjectMethod(callback_class, method_id, class_name_string, agent_id); } @@ -219,19 +151,10 @@ jint Agent_Initialize(JavaVM *vm, char *options, void *reserved) agent_id= nsk_jvmti_findOptionIntValue("id", -1); - if (!NSK_VERIFY( - (jvmti = nsk_jvmti_createJVMTIEnv(vm, reserved)) != NULL - ) - ) + if (!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(vm, reserved)) != NULL)) return JNI_ERR; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2( - GetCapabilities - , jvmti - , &caps) - ) - ) + if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps))) return JNI_ERR; if(nsk_jvmti_findOptionIntValue("can_retransform_classes", 1)) { @@ -242,41 +165,21 @@ jint Agent_Initialize(JavaVM *vm, char *options, void *reserved) // Register all necessary JVM capabilities - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2( - AddCapabilities - , jvmti - , &caps) - ) - ) + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) return JNI_ERR; // Register all necessary event callbacks memset(&callbacks, 0, sizeof(callbacks)); callbacks.ClassFileLoadHook = &ClassFileLoadHook; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3( - SetEventCallbacks - , jvmti - , &callbacks - , sizeof(callbacks) - ) - ) - ) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, sizeof(callbacks)))) return JNI_ERR; // Enable class retransformation if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4( - SetEventNotificationMode - , jvmti - , JVMTI_ENABLE - , JVMTI_EVENT_CLASS_FILE_LOAD_HOOK - , NULL - ) - ) - ) + jvmti->SetEventNotificationMode(JVMTI_ENABLE, + JVMTI_EVENT_CLASS_FILE_LOAD_HOOK, + NULL))) return JNI_ERR; return JNI_OK; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RetransformClasses/retransform004/retransform004.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RetransformClasses/retransform004/retransform004.cpp index 2891102df58..78a4b31d36f 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RetransformClasses/retransform004/retransform004.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RetransformClasses/retransform004/retransform004.cpp @@ -52,15 +52,7 @@ Java_nsk_jvmti_RetransformClasses_retransform004_forceLoadedClassesRetransformat , jclass class_for_retransformation ) { - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3( - RetransformClasses - , jvmti - , 1 - , &class_for_retransformation - ) - ) - ) + if (!NSK_JVMTI_VERIFY(jvmti->RetransformClasses(1, &class_for_retransformation))) return JNI_FALSE; return JNI_TRUE; @@ -85,15 +77,7 @@ ClassFileLoadHook ( ) { // Allocate space for "retransformed" class version - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3( - Allocate - , jvmti - , class_data_len - , new_class_data - ) - ) - ) + if (!NSK_JVMTI_VERIFY(jvmti->Allocate(class_data_len, new_class_data))) return; // Copy old code @@ -127,53 +111,27 @@ jint Agent_Initialize(JavaVM *vm, char *options, void *reserved) ) return JNI_ERR; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2( - GetCapabilities - , jvmti - , &caps) - ) - ) + if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps))) return JNI_ERR; caps.can_retransform_classes = 1; // Register all necessary JVM capabilities - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2( - AddCapabilities - , jvmti - , &caps) - ) - ) + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) return JNI_ERR; // Register all necessary event callbacks memset(&callbacks, 0, sizeof(callbacks)); callbacks.ClassFileLoadHook = &ClassFileLoadHook; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3( - SetEventCallbacks - , jvmti - , &callbacks - , sizeof(callbacks) - ) - ) - ) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, sizeof(callbacks)))) return JNI_ERR; // Enable class retransformation if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4( - SetEventNotificationMode - , jvmti - , JVMTI_ENABLE - , JVMTI_EVENT_CLASS_FILE_LOAD_HOOK - , NULL - ) - ) - ) + jvmti->SetEventNotificationMode(JVMTI_ENABLE, + JVMTI_EVENT_CLASS_FILE_LOAD_HOOK, + NULL))) return JNI_ERR; return JNI_OK; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP01/ap01t001/ap01t001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP01/ap01t001/ap01t001.cpp index 3711c71bb9a..1dae1f2118a 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP01/ap01t001/ap01t001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP01/ap01t001/ap01t001.cpp @@ -146,20 +146,13 @@ Java_nsk_jvmti_scenarios_allocation_AP01_ap01t001_newObject( JNIEnv* jni, jclass jmethodID cid; jobject result; - if (!NSK_JNI_VERIFY(jni, (cid = - NSK_CPP_STUB4(GetMethodID, jni, - cls, - "", - "()V" )) != NULL)) { + if (!NSK_JNI_VERIFY(jni, (cid = jni->GetMethodID(cls, "", "()V" )) != NULL)) { NSK_COMPLAIN0("newObject: GetMethodID returned NULL\n\n"); nsk_jvmti_setFailStatus(); return NULL; } - if (!NSK_JNI_VERIFY(jni, ( result = - NSK_CPP_STUB3(NewObject, jni, - cls, - cid )) != NULL)) { + if (!NSK_JNI_VERIFY(jni, ( result = jni->NewObject(cls, cid)) != NULL)) { NSK_COMPLAIN0("newObject: NewObject returned NULL\n\n"); nsk_jvmti_setFailStatus(); @@ -174,31 +167,21 @@ Java_nsk_jvmti_scenarios_allocation_AP01_ap01t001_allocObject( JNIEnv* jni, jcla jmethodID cid; jobject result; - if (!NSK_JNI_VERIFY(jni, ( cid = - NSK_CPP_STUB4(GetMethodID, jni, - cls, - "", - "()V" )) != NULL)) { + if (!NSK_JNI_VERIFY(jni, ( cid = jni->GetMethodID(cls, "", "()V" )) != NULL)) { NSK_COMPLAIN0("allocObject: GetMethodID returned NULL\n\n"); nsk_jvmti_setFailStatus(); return NULL; } - if (!NSK_JNI_VERIFY(jni, ( result = - NSK_CPP_STUB2(AllocObject, jni, - cls )) != NULL)) { + if (!NSK_JNI_VERIFY(jni, ( result = jni->AllocObject(cls)) != NULL)) { NSK_COMPLAIN0("allocObject: AllocObject returned NULL\n\n"); nsk_jvmti_setFailStatus(); return NULL; } - if (!NSK_JNI_VERIFY_VOID(jni, - NSK_CPP_STUB4(CallNonvirtualVoidMethod, jni, - result, - cls, - cid))) { + if (!NSK_JNI_VERIFY_VOID(jni,jni->CallNonvirtualVoidMethod(result, cls, cid))) { NSK_COMPLAIN0("newObject: CallNonvirtualVoidMethod failed\n\n"); nsk_jvmti_setFailStatus(); @@ -225,10 +208,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { } NSK_DISPLAY0("Set tag for debugee class\n\n"); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetTag, jvmti, - debugeeClass, - DEBUGEE_CLASS_TAG ))) { + if (!NSK_JVMTI_VERIFY(jvmti->SetTag(debugeeClass, DEBUGEE_CLASS_TAG))) { nsk_jvmti_setFailStatus(); return; } @@ -236,13 +216,10 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY0("Calling IterateOverInstancesOfClass with filter JVMTI_HEAP_OBJECT_UNTAGGED\n"); obj_count = 0; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB5(IterateOverInstancesOfClass, - jvmti, - debugeeClass, - JVMTI_HEAP_OBJECT_UNTAGGED, - heapObjectCallback, - &user_data))) { + if (!NSK_JVMTI_VERIFY(jvmti->IterateOverInstancesOfClass(debugeeClass, + JVMTI_HEAP_OBJECT_UNTAGGED, + heapObjectCallback, + &user_data))) { nsk_jvmti_setFailStatus(); return; } @@ -261,11 +238,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY0("Calling IterateOverHeap with filter JVMTI_HEAP_OBJECT_UNTAGGED\n"); obj_count = 0; if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(IterateOverHeap, - jvmti, - JVMTI_HEAP_OBJECT_UNTAGGED, - heapObjectCallback, - &user_data))) { + jvmti->IterateOverHeap(JVMTI_HEAP_OBJECT_UNTAGGED, heapObjectCallback, &user_data))) { nsk_jvmti_setFailStatus(); return; } @@ -282,12 +255,10 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY0("Calling IterateOverReachableObjects\n"); obj_count = 0; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB5(IterateOverReachableObjects, jvmti, - heapRootCallback, - stackReferenceCallback, - objectReferenceCallback, - &user_data))) { + if (!NSK_JVMTI_VERIFY(jvmti->IterateOverReachableObjects(heapRootCallback, + stackReferenceCallback, + objectReferenceCallback, + &user_data))) { nsk_jvmti_setFailStatus(); return; } @@ -338,12 +309,10 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(jvmtiCapabilities)); caps.can_generate_object_free_events = 1; caps.can_tag_objects = 1; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, - jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) return JNI_ERR; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, - jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps))) return JNI_ERR; if (!caps.can_generate_object_free_events) @@ -358,16 +327,17 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { callbacks.ObjectFree = &ObjectFree; callbacks.VMDeath = &VMDeath; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetEventCallbacks, - jvmti, &callbacks, sizeof(callbacks)))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, sizeof(callbacks)))) return JNI_ERR; NSK_DISPLAY0("setting event callbacks done\nenabling JVMTI events ...\n"); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode, - jvmti, JVMTI_ENABLE, JVMTI_EVENT_OBJECT_FREE, NULL))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, + JVMTI_EVENT_OBJECT_FREE, + NULL))) return JNI_ERR; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode, - jvmti, JVMTI_ENABLE, JVMTI_EVENT_VM_DEATH, NULL))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, + JVMTI_EVENT_VM_DEATH, + NULL))) return JNI_ERR; NSK_DISPLAY0("enabling the events done\n\n"); diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP02/ap02t001/ap02t001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP02/ap02t001/ap02t001.cpp index 531adc20ec6..60e52d1dd3b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP02/ap02t001/ap02t001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP02/ap02t001/ap02t001.cpp @@ -91,9 +91,7 @@ Java_nsk_jvmti_scenarios_allocation_AP02_ap02t001_throwException( JNIEnv* jni, jclass exception_cls ) { jint result; - result = NSK_CPP_STUB3(ThrowNew, jni, - exception_cls, - "Got expected exception thrown from native code" ); + result = jni->ThrowNew(exception_cls, "Got expected exception thrown from native code" ); if (result != 0) { NSK_COMPLAIN1("throwException: Unable to throw exception in native code: %d\n\n", result ); nsk_jvmti_setFailStatus(); @@ -105,13 +103,10 @@ Java_nsk_jvmti_scenarios_allocation_AP02_ap02t001_throwException( JNIEnv* jni, static void runIterations (jvmtiEnv* jvmti, jclass testedClass, jint exp_count) { NSK_DISPLAY0("Calling IterateOverInstancesOfClass with filter JVMTI_HEAP_OBJECT_EITHER\n"); obj_count = 0; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB5(IterateOverInstancesOfClass, - jvmti, - testedClass, - JVMTI_HEAP_OBJECT_EITHER, - heapObjectCallback, - &user_data))) { + if (!NSK_JVMTI_VERIFY(jvmti->IterateOverInstancesOfClass(testedClass, + JVMTI_HEAP_OBJECT_EITHER, + heapObjectCallback, + &user_data))) { nsk_jvmti_setFailStatus(); return; } @@ -130,11 +125,7 @@ static void runIterations (jvmtiEnv* jvmti, jclass testedClass, jint exp_count) NSK_DISPLAY0("Calling IterateOverHeap with filter JVMTI_HEAP_OBJECT_EITHER\n"); obj_count = 0; if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(IterateOverHeap, - jvmti, - JVMTI_HEAP_OBJECT_EITHER, - heapObjectCallback, - &user_data))) { + jvmti->IterateOverHeap(JVMTI_HEAP_OBJECT_EITHER, heapObjectCallback, &user_data))) { nsk_jvmti_setFailStatus(); return; } @@ -151,12 +142,10 @@ static void runIterations (jvmtiEnv* jvmti, jclass testedClass, jint exp_count) NSK_DISPLAY0("Calling IterateOverReachableObjects\n"); obj_count = 0; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB5(IterateOverReachableObjects, jvmti, - NULL /*heapRootCallback*/, - stackReferenceCallback, - NULL /*objectReferenceCallback*/, - &user_data))) { + if (!NSK_JVMTI_VERIFY(jvmti->IterateOverReachableObjects(NULL /*heapRootCallback*/, + stackReferenceCallback, + NULL /*objectReferenceCallback*/, + &user_data))) { nsk_jvmti_setFailStatus(); return; } @@ -189,15 +178,11 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { return; } - if (!NSK_JNI_VERIFY(jni, (testedClass = (jclass) - NSK_CPP_STUB2(NewGlobalRef, jni, testedClass)) != NULL)) + if (!NSK_JNI_VERIFY(jni, (testedClass = (jclass)jni->NewGlobalRef(testedClass)) != NULL)) return; NSK_DISPLAY0("Set tag for tested class\n\n"); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetTag, jvmti, - testedClass, - TESTED_CLASS_TAG ))) { + if (!NSK_JVMTI_VERIFY(jvmti->SetTag(testedClass, TESTED_CLASS_TAG))) { nsk_jvmti_setFailStatus(); return; } @@ -212,7 +197,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { runIterations (jvmti, testedClass, 2); - NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, testedClass)); + NSK_TRACE(jni->DeleteGlobalRef(testedClass)); NSK_DISPLAY0("Let debugee to finish\n"); if (!NSK_VERIFY(nsk_jvmti_resumeSync())) @@ -242,12 +227,10 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(jvmtiCapabilities)); caps.can_tag_objects = 1; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, - jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) return JNI_ERR; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, - jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps))) return JNI_ERR; if (!caps.can_tag_objects) diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP03/ap03t001/ap03t001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP03/ap03t001/ap03t001.cpp index edd37b434d8..d5b16bef9d3 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP03/ap03t001/ap03t001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP03/ap03t001/ap03t001.cpp @@ -90,8 +90,7 @@ objectReferenceCallback( jvmtiObjectReferenceKind reference_kind, JNIEXPORT void JNICALL Java_nsk_jvmti_scenarios_allocation_AP03_ap03t001_setTag( JNIEnv* jni, jobject obj, jlong tag) { - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetTag, - jvmti, obj, tag))) { + if (!NSK_JVMTI_VERIFY(jvmti->SetTag(obj, tag))) { nsk_jvmti_setFailStatus(); } } @@ -117,23 +116,17 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { } NSK_DISPLAY0("Set tag for debugee class\n\n"); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetTag, jvmti, - debugeeClass, - DEBUGEE_CLASS_TAG ))) { + if (!NSK_JVMTI_VERIFY(jvmti->SetTag(debugeeClass, DEBUGEE_CLASS_TAG))) { nsk_jvmti_setFailStatus(); break; } NSK_DISPLAY0("Calling IterateOverInstancesOfClass with filter JVMTI_HEAP_OBJECT_TAGGED\n"); obj_count = 0; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB5(IterateOverInstancesOfClass, - jvmti, - debugeeClass, - JVMTI_HEAP_OBJECT_TAGGED, - heapObjectCallback, - &user_data))) { + if (!NSK_JVMTI_VERIFY(jvmti->IterateOverInstancesOfClass(debugeeClass, + JVMTI_HEAP_OBJECT_TAGGED, + heapObjectCallback, + &user_data))) { nsk_jvmti_setFailStatus(); break; } @@ -151,11 +144,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY0("Calling IterateOverHeap with filter JVMTI_HEAP_OBJECT_TAGGED\n"); obj_count = 0; if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(IterateOverHeap, - jvmti, - JVMTI_HEAP_OBJECT_TAGGED, - heapObjectCallback, - &user_data))) { + jvmti->IterateOverHeap(JVMTI_HEAP_OBJECT_TAGGED, heapObjectCallback, &user_data))) { nsk_jvmti_setFailStatus(); break; } @@ -171,18 +160,13 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { } if (!NSK_JNI_VERIFY(jni, (fid = - NSK_CPP_STUB4(GetStaticFieldID, jni, - debugeeClass, - "catcher", - DEBUGEE_SIGNATURE)) != NULL )) { + jni->GetStaticFieldID(debugeeClass, "catcher", DEBUGEE_SIGNATURE)) != NULL )) { nsk_jvmti_setFailStatus(); break; } if (!NSK_JNI_VERIFY(jni, (catcher = - NSK_CPP_STUB3(GetStaticObjectField, jni, - debugeeClass, - fid )) != NULL )) { + jni->GetStaticObjectField(debugeeClass, fid)) != NULL )) { NSK_COMPLAIN0("GetStaticObjectField returned NULL for 'catcher' field value\n\n"); nsk_jvmti_setFailStatus(); break; @@ -190,11 +174,9 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY0("Calling IterateOverObjectsReachableFromObject\n"); obj_count = 0; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(IterateOverObjectsReachableFromObject, jvmti, - catcher, - objectReferenceCallback, - &user_data))) { + if (!NSK_JVMTI_VERIFY(jvmti->IterateOverObjectsReachableFromObject(catcher, + objectReferenceCallback, + &user_data))) { nsk_jvmti_setFailStatus(); break; } @@ -239,12 +221,10 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(jvmtiCapabilities)); caps.can_generate_object_free_events = 1; caps.can_tag_objects = 1; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, - jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) return JNI_ERR; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, - jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps))) return JNI_ERR; if (!caps.can_generate_object_free_events) @@ -258,13 +238,13 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { callbacks.ObjectFree = &ObjectFree; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetEventCallbacks, - jvmti, &callbacks, sizeof(callbacks)))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, sizeof(callbacks)))) return JNI_ERR; NSK_DISPLAY0("setting event callbacks done\nenabling JVMTI events ...\n"); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode, - jvmti, JVMTI_ENABLE, JVMTI_EVENT_OBJECT_FREE, NULL))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, + JVMTI_EVENT_OBJECT_FREE, + NULL))) return JNI_ERR; NSK_DISPLAY0("enabling the events done\n\n"); diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP04/ap04t001/ap04t001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP04/ap04t001/ap04t001.cpp index 84aab03ceb6..9e89ca1c5f6 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP04/ap04t001/ap04t001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP04/ap04t001/ap04t001.cpp @@ -66,30 +66,26 @@ static jrawMonitorID counterMonitor_ptr = NULL; static void increaseCounter(volatile int* counterPtr) { - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorEnter, jvmti, counterMonitor_ptr))) { + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorEnter(counterMonitor_ptr))) { nsk_jvmti_setFailStatus(); } (*counterPtr)++; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorExit, jvmti, counterMonitor_ptr))) { + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorExit(counterMonitor_ptr))) { nsk_jvmti_setFailStatus(); } } static void setCounter(volatile int* counterPtr, int value) { - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorEnter, jvmti, counterMonitor_ptr))) { + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorEnter(counterMonitor_ptr))) { nsk_jvmti_setFailStatus(); } *counterPtr = value; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorExit, jvmti, counterMonitor_ptr))) { + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorExit(counterMonitor_ptr))) { nsk_jvmti_setFailStatus(); } } @@ -97,15 +93,13 @@ static void setCounter(volatile int* counterPtr, int value) { static int getCounter(volatile int* counterPtr) { int result; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorEnter, jvmti, counterMonitor_ptr))) { + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorEnter(counterMonitor_ptr))) { nsk_jvmti_setFailStatus(); } result = *counterPtr; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorExit, jvmti, counterMonitor_ptr))) { + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorExit(counterMonitor_ptr))) { nsk_jvmti_setFailStatus(); } @@ -248,7 +242,7 @@ Java_nsk_jvmti_scenarios_allocation_AP04_ap04t001_setTag( JNIEnv* jni, jobject target, /* object to be tagged */ jlong tag ) { - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetTag, jvmti, target, tag))) { + if (!NSK_JVMTI_VERIFY(jvmti->SetTag(target, tag))) { nsk_jvmti_setFailStatus(); } } @@ -258,7 +252,7 @@ Java_nsk_jvmti_scenarios_allocation_AP04_ap04t001_forceGC( JNIEnv* jni, jclass klass) { NSK_DISPLAY0(" run: ForceGarbageCollection\n"); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB1(ForceGarbageCollection, jvmti))) { + if (!NSK_JVMTI_VERIFY(jvmti->ForceGarbageCollection())) { nsk_jvmti_setFailStatus(); } } @@ -273,11 +267,9 @@ Java_nsk_jvmti_scenarios_allocation_AP04_ap04t001_runIterateOverHeap( JNIEnv* jn setCounter(&iterationCount, 0); NSK_DISPLAY0("Calling IterateOverHeap...\n"); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(IterateOverHeap, jvmti, - JVMTI_HEAP_OBJECT_TAGGED, - heapObjectCallback, - NULL /*user_data*/))) { + if (!NSK_JVMTI_VERIFY(jvmti->IterateOverHeap(JVMTI_HEAP_OBJECT_TAGGED, + heapObjectCallback, + NULL /*user_data*/))) { nsk_jvmti_setFailStatus(); } NSK_DISPLAY0("IterateOverHeap finished.\n"); @@ -303,12 +295,10 @@ Java_nsk_jvmti_scenarios_allocation_AP04_ap04t001_runIterateOverReachableObjects setCounter(&iterationCount, 0); NSK_DISPLAY0("Calling IterateOverReachableObjects...\n"); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB5(IterateOverReachableObjects, jvmti, - heapRootCallback, - stackReferenceCallback, - objectReferenceCallback, - NULL /*user_data*/))) { + if (!NSK_JVMTI_VERIFY(jvmti->IterateOverReachableObjects(heapRootCallback, + stackReferenceCallback, + objectReferenceCallback, + NULL /*user_data*/))) { nsk_jvmti_setFailStatus(); } NSK_DISPLAY0("IterateOverReachableObjects finished.\n"); @@ -334,12 +324,10 @@ Java_nsk_jvmti_scenarios_allocation_AP04_ap04t001_runIterateOverInstancesOfClass setCounter(&iterationCount, 0); NSK_DISPLAY0("Calling IterateOverInstancesOfClass...\n"); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB5(IterateOverInstancesOfClass, jvmti, - debugeeClass, - JVMTI_HEAP_OBJECT_TAGGED, - heapObjectCallback, - NULL /*user_data*/))) { + if (!NSK_JVMTI_VERIFY(jvmti->IterateOverInstancesOfClass(debugeeClass, + JVMTI_HEAP_OBJECT_TAGGED, + heapObjectCallback, + NULL /*user_data*/))) { nsk_jvmti_setFailStatus(); } NSK_DISPLAY0("IterateOverInstancesOfClass finished.\n"); @@ -363,27 +351,23 @@ Java_nsk_jvmti_scenarios_allocation_AP04_ap04t001_runIterateOverObjectsReachable int count = 0; if (!NSK_JNI_VERIFY(jni, (root = - NSK_CPP_STUB3(GetStaticObjectField, jni, - debugeeClass, - rootFieldID )) != NULL )) { + jni->GetStaticObjectField(debugeeClass, rootFieldID)) != NULL )) { NSK_COMPLAIN0("GetStaticObjectField returned NULL for 'root' field value\n\n"); nsk_jvmti_setFailStatus(); return; } // release secondary lock - NSK_CPP_STUB3(CallStaticVoidMethod, jni, debugeeClass, unlockSecondaryID); + jni->CallStaticVoidMethod(debugeeClass, unlockSecondaryID); setCounter(&errorCount, 0); setCounter(&eventCount, 0); setCounter(&iterationCount, 0); NSK_DISPLAY0("Calling IterateOverObjectsReachableFromObject...\n"); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(IterateOverObjectsReachableFromObject, jvmti, - root, - objectReferenceCallback, - NULL /*user_data*/))) { + if (!NSK_JVMTI_VERIFY(jvmti->IterateOverObjectsReachableFromObject(root, + objectReferenceCallback, + NULL /*user_data*/))) { nsk_jvmti_setFailStatus(); } NSK_DISPLAY0("IterateOverObjectsReachableFromObject finished.\n"); @@ -413,26 +397,19 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { return; } - if (!NSK_JNI_VERIFY(jni, (debugeeClass = (jclass) - NSK_CPP_STUB2(NewGlobalRef, jni, debugeeClass)) != NULL)) + if (!NSK_JNI_VERIFY(jni, (debugeeClass = (jclass)jni->NewGlobalRef(debugeeClass)) != NULL)) return; NSK_DISPLAY1("Find ID of 'root' field: %s\n", ROOT_SIGNATURE); if (!NSK_JNI_VERIFY(jni, (rootFieldID = - NSK_CPP_STUB4(GetStaticFieldID, jni, - debugeeClass, - "root", - ROOT_SIGNATURE)) != NULL )) { + jni->GetStaticFieldID(debugeeClass, "root", ROOT_SIGNATURE)) != NULL )) { nsk_jvmti_setFailStatus(); return; } NSK_DISPLAY1("Find ID of 'unlockSecondary' method: %s\n", ROOT_SIGNATURE); if (!NSK_JNI_VERIFY(jni, (unlockSecondaryID = - NSK_CPP_STUB4(GetStaticMethodID, jni, - debugeeClass, - "unlockSecondary", - "()V")) != NULL )) { + jni->GetStaticMethodID(debugeeClass, "unlockSecondary", "()V")) != NULL )) { nsk_jvmti_setFailStatus(); return; } @@ -448,8 +425,8 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { nsk_jvmti_enableEvents(JVMTI_DISABLE, eventsCount, events, NULL); - NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, debugeeClass)); - NSK_TRACE(NSK_CPP_STUB2(DestroyRawMonitor, jvmti, counterMonitor_ptr)); + NSK_TRACE(jni->DeleteGlobalRef(debugeeClass)); + NSK_TRACE(jvmti->DestroyRawMonitor(counterMonitor_ptr)); NSK_DISPLAY0("Let debugee to finish\n"); if (!NSK_VERIFY(nsk_jvmti_resumeSync())) @@ -477,8 +454,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { nsk_jvmti_createJVMTIEnv(jvm, reserved)) != NULL)) return JNI_ERR; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(CreateRawMonitor, jvmti, "counterMonitor", &counterMonitor_ptr))) { + if (!NSK_JVMTI_VERIFY(jvmti->CreateRawMonitor("counterMonitor", &counterMonitor_ptr))) { return JNI_ERR; } @@ -487,12 +463,10 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { caps.can_generate_object_free_events = 1; caps.can_generate_garbage_collection_events = 1; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, - jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) return JNI_ERR; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, - jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps))) return JNI_ERR; if (!caps.can_tag_objects) @@ -509,8 +483,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { callbacks.ObjectFree = &ObjectFree; callbacks.GarbageCollectionStart = &GarbageCollectionStart; callbacks.GarbageCollectionFinish = &GarbageCollectionFinish; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetEventCallbacks, - jvmti, &callbacks, sizeof(callbacks)))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, sizeof(callbacks)))) return JNI_ERR; NSK_DISPLAY0("setting event callbacks done.\n"); diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP04/ap04t002/ap04t002.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP04/ap04t002/ap04t002.cpp index 530fea33657..bb146389062 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP04/ap04t002/ap04t002.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP04/ap04t002/ap04t002.cpp @@ -59,30 +59,26 @@ static jrawMonitorID counterMonitor_ptr = NULL; static void increaseCounter(volatile int* counterPtr) { - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorEnter, jvmti, counterMonitor_ptr))) { + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorEnter(counterMonitor_ptr))) { nsk_jvmti_setFailStatus(); } (*counterPtr)++; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorExit, jvmti, counterMonitor_ptr))) { + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorExit(counterMonitor_ptr))) { nsk_jvmti_setFailStatus(); } } static void setCounter(volatile int* counterPtr, int value) { - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorEnter, jvmti, counterMonitor_ptr))) { + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorEnter(counterMonitor_ptr))) { nsk_jvmti_setFailStatus(); } *counterPtr = value; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorExit, jvmti, counterMonitor_ptr))) { + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorExit(counterMonitor_ptr))) { nsk_jvmti_setFailStatus(); } } @@ -90,15 +86,13 @@ static void setCounter(volatile int* counterPtr, int value) { static int getCounter(volatile int* counterPtr) { int result; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorEnter, jvmti, counterMonitor_ptr))) { + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorEnter(counterMonitor_ptr))) { nsk_jvmti_setFailStatus(); } result = *counterPtr; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorExit, jvmti, counterMonitor_ptr))) { + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorExit(counterMonitor_ptr))) { nsk_jvmti_setFailStatus(); } @@ -238,7 +232,7 @@ Java_nsk_jvmti_scenarios_allocation_AP04_ap04t002_setTag( JNIEnv* jni, jobject target, /* object to be tagged */ jlong tag ) { - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetTag, jvmti, target, tag))) { + if (!NSK_JVMTI_VERIFY(jvmti->SetTag(target, tag))) { nsk_jvmti_setFailStatus(); } } @@ -253,11 +247,9 @@ Java_nsk_jvmti_scenarios_allocation_AP04_ap04t002_runIterateOverHeap( JNIEnv* jn setCounter(&iterationCount, 0); NSK_DISPLAY0("Calling IterateOverHeap...\n"); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(IterateOverHeap, jvmti, - JVMTI_HEAP_OBJECT_TAGGED, - heapObjectCallback, - NULL /*user_data*/))) { + if (!NSK_JVMTI_VERIFY(jvmti->IterateOverHeap(JVMTI_HEAP_OBJECT_TAGGED, + heapObjectCallback, + NULL /*user_data*/))) { nsk_jvmti_setFailStatus(); } NSK_DISPLAY0("IterateOverHeap finished.\n"); @@ -284,12 +276,10 @@ Java_nsk_jvmti_scenarios_allocation_AP04_ap04t002_runIterateOverReachableObjects setCounter(&iterationCount, 0); NSK_DISPLAY0("Calling IterateOverReachableObjects...\n"); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB5(IterateOverReachableObjects, jvmti, - heapRootCallback, - stackReferenceCallback, - objectReferenceCallback, - NULL /*user_data*/))) { + if (!NSK_JVMTI_VERIFY(jvmti->IterateOverReachableObjects(heapRootCallback, + stackReferenceCallback, + objectReferenceCallback, + NULL /*user_data*/))) { nsk_jvmti_setFailStatus(); } NSK_DISPLAY0("IterateOverReachableObjects finished.\n"); @@ -316,12 +306,10 @@ Java_nsk_jvmti_scenarios_allocation_AP04_ap04t002_runIterateOverInstancesOfClass setCounter(&iterationCount, 0); NSK_DISPLAY0("Calling IterateOverInstancesOfClass...\n"); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB5(IterateOverInstancesOfClass, jvmti, - debugeeClass, - JVMTI_HEAP_OBJECT_TAGGED, - heapObjectCallback, - NULL /*user_data*/))) { + if (!NSK_JVMTI_VERIFY(jvmti->IterateOverInstancesOfClass(debugeeClass, + JVMTI_HEAP_OBJECT_TAGGED, + heapObjectCallback, + NULL /*user_data*/))) { nsk_jvmti_setFailStatus(); } NSK_DISPLAY0("IterateOverInstancesOfClass finished.\n"); @@ -345,9 +333,7 @@ Java_nsk_jvmti_scenarios_allocation_AP04_ap04t002_runIterateOverObjectsReachable int count = 0; if (!NSK_JNI_VERIFY(jni, (root = - NSK_CPP_STUB3(GetStaticObjectField, jni, - debugeeClass, - rootFieldID )) != NULL )) { + jni->GetStaticObjectField(debugeeClass, rootFieldID)) != NULL )) { NSK_COMPLAIN0("GetStaticObjectField returned NULL for 'root' field value\n\n"); nsk_jvmti_setFailStatus(); return; @@ -358,11 +344,9 @@ Java_nsk_jvmti_scenarios_allocation_AP04_ap04t002_runIterateOverObjectsReachable setCounter(&iterationCount, 0); NSK_DISPLAY0("Calling IterateOverObjectsReachableFromObject...\n"); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(IterateOverObjectsReachableFromObject, jvmti, - root, - objectReferenceCallback, - NULL /*user_data*/))) { + if (!NSK_JVMTI_VERIFY(jvmti->IterateOverObjectsReachableFromObject(root, + objectReferenceCallback, + NULL /*user_data*/))) { nsk_jvmti_setFailStatus(); } NSK_DISPLAY0("IterateOverObjectsReachableFromObject finished.\n"); @@ -393,35 +377,25 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { return; } - if (!NSK_JNI_VERIFY(jni, (debugeeClass = (jclass) - NSK_CPP_STUB2(NewGlobalRef, jni, debugeeClass)) != NULL)) + if (!NSK_JNI_VERIFY(jni, (debugeeClass = (jclass)jni->NewGlobalRef(debugeeClass)) != NULL)) return; NSK_DISPLAY1("Find ID of 'root' field: %s\n", ROOT_SIGNATURE); if (!NSK_JNI_VERIFY(jni, (rootFieldID = - NSK_CPP_STUB4(GetStaticFieldID, jni, - debugeeClass, - "root", - ROOT_SIGNATURE)) != NULL )) { + jni->GetStaticFieldID(debugeeClass, "root", ROOT_SIGNATURE)) != NULL )) { nsk_jvmti_setFailStatus(); return; } NSK_DISPLAY0("Find ID of 'modified' field\n"); if (!NSK_JNI_VERIFY(jni, (modifiedFieldID = - NSK_CPP_STUB4(GetStaticFieldID, jni, - debugeeClass, - "modified", - "I")) != NULL )) { + jni->GetStaticFieldID(debugeeClass, "modified", "I")) != NULL )) { nsk_jvmti_setFailStatus(); return; } NSK_DISPLAY0("Set FieldModification watchpoint for 'modified' field\n"); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetFieldModificationWatch, jvmti, - debugeeClass, - modifiedFieldID))) { + if (!NSK_JVMTI_VERIFY(jvmti->SetFieldModificationWatch(debugeeClass, modifiedFieldID))) { nsk_jvmti_setFailStatus(); return; } @@ -434,8 +408,8 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { if (!NSK_VERIFY(nsk_jvmti_waitForSync(timeout))) return; - NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, debugeeClass)); - NSK_TRACE(NSK_CPP_STUB2(DestroyRawMonitor, jvmti, counterMonitor_ptr)); + NSK_TRACE(jni->DeleteGlobalRef(debugeeClass)); + NSK_TRACE(jvmti->DestroyRawMonitor(counterMonitor_ptr)); NSK_DISPLAY0("Let debugee to finish\n"); if (!NSK_VERIFY(nsk_jvmti_resumeSync())) @@ -463,8 +437,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { nsk_jvmti_createJVMTIEnv(jvm, reserved)) != NULL)) return JNI_ERR; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(CreateRawMonitor, jvmti, "counterMonitor", &counterMonitor_ptr))) { + if (!NSK_JVMTI_VERIFY(jvmti->CreateRawMonitor("counterMonitor", &counterMonitor_ptr))) { return JNI_ERR; } @@ -472,12 +445,10 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { caps.can_tag_objects = 1; caps.can_generate_field_modification_events = 1; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, - jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) return JNI_ERR; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, - jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps))) return JNI_ERR; if (!caps.can_tag_objects) @@ -490,18 +461,15 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { (void) memset(&callbacks, 0, sizeof(callbacks)); callbacks.FieldModification = &FieldModification; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetEventCallbacks, - jvmti, &callbacks, sizeof(callbacks)))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, sizeof(callbacks)))) return JNI_ERR; NSK_DISPLAY0("setting event callbacks done.\n"); NSK_DISPLAY0("enabling JVMTI events ...\n"); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4( SetEventNotificationMode, - jvmti, - JVMTI_ENABLE, - JVMTI_EVENT_FIELD_MODIFICATION, - NULL))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, + JVMTI_EVENT_FIELD_MODIFICATION, + NULL))) return JNI_ERR; NSK_DISPLAY0("enabling the events done.\n"); diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP04/ap04t003/ap04t003.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP04/ap04t003/ap04t003.cpp index 81f541b3ad9..b9d43e569d6 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP04/ap04t003/ap04t003.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP04/ap04t003/ap04t003.cpp @@ -61,30 +61,26 @@ static jrawMonitorID counterMonitor_ptr = NULL; static void increaseCounter(volatile int* counterPtr) { - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorEnter, jvmti, counterMonitor_ptr))) { + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorEnter(counterMonitor_ptr))) { nsk_jvmti_setFailStatus(); } (*counterPtr)++; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorExit, jvmti, counterMonitor_ptr))) { + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorExit(counterMonitor_ptr))) { nsk_jvmti_setFailStatus(); } } static void setCounter(volatile int* counterPtr, int value) { - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorEnter, jvmti, counterMonitor_ptr))) { + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorEnter(counterMonitor_ptr))) { nsk_jvmti_setFailStatus(); } *counterPtr = value; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorExit, jvmti, counterMonitor_ptr))) { + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorExit(counterMonitor_ptr))) { nsk_jvmti_setFailStatus(); } } @@ -92,15 +88,13 @@ static void setCounter(volatile int* counterPtr, int value) { static int getCounter(volatile int* counterPtr) { int result; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorEnter, jvmti, counterMonitor_ptr))) { + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorEnter(counterMonitor_ptr))) { nsk_jvmti_setFailStatus(); } result = *counterPtr; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorExit, jvmti, counterMonitor_ptr))) { + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorExit(counterMonitor_ptr))) { nsk_jvmti_setFailStatus(); } @@ -113,16 +107,13 @@ void notifyThread() { /* enter and notify runLock */ { - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorEnter, jvmti, runLock))) { + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorEnter(runLock))) { nsk_jvmti_setFailStatus(); } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorNotify, jvmti, runLock))) { + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorNotify(runLock))) { nsk_jvmti_setFailStatus(); } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorExit, jvmti, runLock))) { + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorExit(runLock))) { nsk_jvmti_setFailStatus(); } } @@ -227,12 +218,8 @@ void JNICALL agent_start(jvmtiEnv* jvmti, JNIEnv* jni, void *p) { { jlong tag = (jlong)1; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB6(GetObjectsWithTags, jvmti, - 1, &tag, - &taggedObjectsCount, - &taggedObjectsList, - NULL))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetObjectsWithTags( + 1, &tag, &taggedObjectsCount, &taggedObjectsList, NULL))) { nsk_jvmti_setFailStatus(); return; } @@ -246,23 +233,19 @@ void JNICALL agent_start(jvmtiEnv* jvmti, JNIEnv* jni, void *p) { } /* enter runLock */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorEnter, jvmti, runLock))) { + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorEnter(runLock))) { nsk_jvmti_setFailStatus(); } /* enter and notify startLock */ { - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorEnter, jvmti, startLock))) { + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorEnter(startLock))) { nsk_jvmti_setFailStatus(); } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorNotify, jvmti, startLock))) { + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorNotify(startLock))) { nsk_jvmti_setFailStatus(); } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorExit, jvmti, startLock))) { + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorExit(startLock))) { nsk_jvmti_setFailStatus(); } } @@ -271,12 +254,10 @@ void JNICALL agent_start(jvmtiEnv* jvmti, JNIEnv* jni, void *p) { /* wait on runLock */ { - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(RawMonitorWait, jvmti, runLock, timeout))) { + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorWait(runLock, timeout))) { nsk_jvmti_setFailStatus(); } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorExit, jvmti, runLock))) { + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorExit(runLock))) { nsk_jvmti_setFailStatus(); } } @@ -288,8 +269,7 @@ void JNICALL agent_start(jvmtiEnv* jvmti, JNIEnv* jni, void *p) { int modified = 0; int i; for (i = 0; i < taggedObjectsCount; i+=2) { - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetTag, jvmti, taggedObjectsList[i], 0))) { + if (!NSK_JVMTI_VERIFY(jvmti->SetTag(taggedObjectsList[i], 0))) { nsk_jvmti_setFailStatus(); continue; } @@ -302,24 +282,20 @@ void JNICALL agent_start(jvmtiEnv* jvmti, JNIEnv* jni, void *p) { /* destroy objects list */ { - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)taggedObjectsList))) { + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)taggedObjectsList))) { nsk_jvmti_setFailStatus(); } } /* enter and notify endLock */ { - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorEnter, jvmti, endLock))) { + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorEnter(endLock))) { nsk_jvmti_setFailStatus(); } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorNotify, jvmti, endLock))) { + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorNotify(endLock))) { nsk_jvmti_setFailStatus(); } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorExit, jvmti, endLock))) { + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorExit(endLock))) { nsk_jvmti_setFailStatus(); } } @@ -333,31 +309,24 @@ static int startThread(JNIEnv* jni, jthread threadObj) { int success = NSK_TRUE; /* enter startLock */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorEnter, jvmti, startLock))) { + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorEnter(startLock))) { nsk_jvmti_setFailStatus(); } /* start thread */ if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB5(RunAgentThread, jvmti, - threadObj, - agent_start, - NULL, - JVMTI_THREAD_NORM_PRIORITY))) { + jvmti->RunAgentThread(threadObj, agent_start, NULL, JVMTI_THREAD_NORM_PRIORITY))) { success = NSK_FALSE; nsk_jvmti_setFailStatus(); } else { /* wait on startLock */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(RawMonitorWait, jvmti, startLock, timeout))) { + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorWait(startLock, timeout))) { nsk_jvmti_setFailStatus(); } } /* exit starLock */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorExit, jvmti, startLock))) { + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorExit(startLock))) { nsk_jvmti_setFailStatus(); } @@ -370,26 +339,17 @@ static jthread newThreadObj(JNIEnv* jni) { jmethodID cid; jthread result = NULL; - if (!NSK_JNI_VERIFY(jni, (thrClass = - NSK_CPP_STUB2(FindClass, jni, - "java/lang/Thread")) != NULL )) { + if (!NSK_JNI_VERIFY(jni, (thrClass = jni->FindClass("java/lang/Thread")) != NULL )) { nsk_jvmti_setFailStatus(); return result; } - if (!NSK_JNI_VERIFY(jni, (cid = - NSK_CPP_STUB4(GetMethodID, jni, - thrClass, - "", - "()V")) != NULL )) { + if (!NSK_JNI_VERIFY(jni, (cid = jni->GetMethodID(thrClass, "", "()V")) != NULL )) { nsk_jvmti_setFailStatus(); return result; } - if (!NSK_JNI_VERIFY(jni, (result = - NSK_CPP_STUB3(NewObject, jni, - thrClass, - cid )) != NULL )) { + if (!NSK_JNI_VERIFY(jni, (result = jni->NewObject(thrClass, cid)) != NULL )) { nsk_jvmti_setFailStatus(); return result; } @@ -412,8 +372,7 @@ static int prepareToIteration (JNIEnv* jni) { } /* enter endLock */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorEnter, jvmti, endLock))) { + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorEnter(endLock))) { nsk_jvmti_setFailStatus(); } @@ -430,14 +389,12 @@ static void afterIteration (JNIEnv* jni) { NSK_DISPLAY0("Wait for new agent thread to complete\n"); /* wait on endLock */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(RawMonitorWait, jvmti, endLock, timeout))) { + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorWait(endLock, timeout))) { nsk_jvmti_setFailStatus(); } /* exit endLock */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(RawMonitorExit, jvmti, endLock))) { + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorExit(endLock))) { nsk_jvmti_setFailStatus(); } } @@ -450,7 +407,7 @@ Java_nsk_jvmti_scenarios_allocation_AP04_ap04t003_setTag( JNIEnv* jni, jobject target, /* object to be tagged */ jlong tag ) { - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetTag, jvmti, target, tag))) { + if (!NSK_JVMTI_VERIFY(jvmti->SetTag(target, tag))) { nsk_jvmti_setFailStatus(); } } @@ -465,11 +422,9 @@ Java_nsk_jvmti_scenarios_allocation_AP04_ap04t003_runIterateOverHeap( JNIEnv* jn return; NSK_DISPLAY0("Calling IterateOverHeap...\n"); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(IterateOverHeap, jvmti, - JVMTI_HEAP_OBJECT_TAGGED, - heapObjectCallback, - NULL /*user_data*/))) { + if (!NSK_JVMTI_VERIFY(jvmti->IterateOverHeap(JVMTI_HEAP_OBJECT_TAGGED, + heapObjectCallback, + NULL /*user_data*/))) { nsk_jvmti_setFailStatus(); } NSK_DISPLAY0("IterateOverHeap finished.\n"); @@ -497,12 +452,10 @@ Java_nsk_jvmti_scenarios_allocation_AP04_ap04t003_runIterateOverReachableObjects return; NSK_DISPLAY0("Calling IterateOverReachableObjects...\n"); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB5(IterateOverReachableObjects, jvmti, - heapRootCallback, - stackReferenceCallback, - objectReferenceCallback, - NULL /*user_data*/))) { + if (!NSK_JVMTI_VERIFY(jvmti->IterateOverReachableObjects(heapRootCallback, + stackReferenceCallback, + objectReferenceCallback, + NULL /*user_data*/))) { nsk_jvmti_setFailStatus(); } NSK_DISPLAY0("IterateOverReachableObjects finished.\n"); @@ -530,12 +483,10 @@ Java_nsk_jvmti_scenarios_allocation_AP04_ap04t003_runIterateOverInstancesOfClass return; NSK_DISPLAY0("Calling IterateOverInstancesOfClass...\n"); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB5(IterateOverInstancesOfClass, jvmti, - debugeeClass, - JVMTI_HEAP_OBJECT_TAGGED, - heapObjectCallback, - NULL /*user_data*/))) { + if (!NSK_JVMTI_VERIFY(jvmti->IterateOverInstancesOfClass(debugeeClass, + JVMTI_HEAP_OBJECT_TAGGED, + heapObjectCallback, + NULL /*user_data*/))) { nsk_jvmti_setFailStatus(); } NSK_DISPLAY0("IterateOverInstancesOfClass finished.\n"); @@ -561,9 +512,7 @@ Java_nsk_jvmti_scenarios_allocation_AP04_ap04t003_runIterateOverObjectsReachable int found = 0; if (!NSK_JNI_VERIFY(jni, (root = - NSK_CPP_STUB3(GetStaticObjectField, jni, - debugeeClass, - rootFieldID )) != NULL )) { + jni->GetStaticObjectField(debugeeClass, rootFieldID)) != NULL )) { NSK_COMPLAIN0("GetStaticObjectField returned NULL for 'root' field value\n\n"); nsk_jvmti_setFailStatus(); return; @@ -573,11 +522,9 @@ Java_nsk_jvmti_scenarios_allocation_AP04_ap04t003_runIterateOverObjectsReachable return; NSK_DISPLAY0("Calling IterateOverObjectsReachableFromObject...\n"); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(IterateOverObjectsReachableFromObject, jvmti, - root, - objectReferenceCallback, - NULL /*user_data*/))) { + if (!NSK_JVMTI_VERIFY(jvmti->IterateOverObjectsReachableFromObject(root, + objectReferenceCallback, + NULL /*user_data*/))) { nsk_jvmti_setFailStatus(); } NSK_DISPLAY0("IterateOverObjectsReachableFromObject finished.\n"); @@ -609,16 +556,12 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { return; } - if (!NSK_JNI_VERIFY(jni, (debugeeClass = (jclass) - NSK_CPP_STUB2(NewGlobalRef, jni, debugeeClass)) != NULL)) + if (!NSK_JNI_VERIFY(jni, (debugeeClass = (jclass)jni->NewGlobalRef(debugeeClass)) != NULL)) return; NSK_DISPLAY1("Find ID of 'root' field: %s\n", ROOT_SIGNATURE); if (!NSK_JNI_VERIFY(jni, (rootFieldID = - NSK_CPP_STUB4(GetStaticFieldID, jni, - debugeeClass, - "root", - ROOT_SIGNATURE)) != NULL )) { + jni->GetStaticFieldID(debugeeClass, "root", ROOT_SIGNATURE)) != NULL )) { nsk_jvmti_setFailStatus(); return; } @@ -631,11 +574,11 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { if (!NSK_VERIFY(nsk_jvmti_waitForSync(timeout))) return; - NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, debugeeClass)); - NSK_TRACE(NSK_CPP_STUB2(DestroyRawMonitor, jvmti, counterMonitor_ptr)); - NSK_TRACE(NSK_CPP_STUB2(DestroyRawMonitor, jvmti, startLock)); - NSK_TRACE(NSK_CPP_STUB2(DestroyRawMonitor, jvmti, runLock)); - NSK_TRACE(NSK_CPP_STUB2(DestroyRawMonitor, jvmti, endLock)); + NSK_TRACE(jni->DeleteGlobalRef(debugeeClass)); + NSK_TRACE(jvmti->DestroyRawMonitor(counterMonitor_ptr)); + NSK_TRACE(jvmti->DestroyRawMonitor(startLock)); + NSK_TRACE(jvmti->DestroyRawMonitor(runLock)); + NSK_TRACE(jvmti->DestroyRawMonitor(endLock)); NSK_DISPLAY0("Let debugee to finish\n"); if (!NSK_VERIFY(nsk_jvmti_resumeSync())) @@ -663,33 +606,27 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { nsk_jvmti_createJVMTIEnv(jvm, reserved)) != NULL)) return JNI_ERR; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(CreateRawMonitor, jvmti, "counterMonitor", &counterMonitor_ptr))) { + if (!NSK_JVMTI_VERIFY(jvmti->CreateRawMonitor("counterMonitor", &counterMonitor_ptr))) { return JNI_ERR; } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(CreateRawMonitor, jvmti, "startLock", &startLock))) { + if (!NSK_JVMTI_VERIFY(jvmti->CreateRawMonitor("startLock", &startLock))) { return JNI_ERR; } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(CreateRawMonitor, jvmti, "runLock", &runLock))) { + if (!NSK_JVMTI_VERIFY(jvmti->CreateRawMonitor("runLock", &runLock))) { return JNI_ERR; } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(CreateRawMonitor, jvmti, "endLock", &endLock))) { + if (!NSK_JVMTI_VERIFY(jvmti->CreateRawMonitor("endLock", &endLock))) { return JNI_ERR; } memset(&caps, 0, sizeof(jvmtiCapabilities)); caps.can_tag_objects = 1; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, - jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) return JNI_ERR; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, - jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps))) return JNI_ERR; if (!caps.can_tag_objects) diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP05/ap05t001/ap05t001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP05/ap05t001/ap05t001.cpp index bb75ee89900..7c87491cb10 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP05/ap05t001/ap05t001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP05/ap05t001/ap05t001.cpp @@ -105,15 +105,14 @@ Java_nsk_jvmti_scenarios_allocation_AP05_ap05t001_setTag( JNIEnv* jni, jobject target, jlong tag ) { - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetTag, jvmti, target, tag))) { + if (!NSK_JVMTI_VERIFY(jvmti->SetTag(target, tag))) { nsk_jvmti_setFailStatus(); } } JNIEXPORT void JNICALL Java_nsk_jvmti_scenarios_allocation_AP05_ap05t001_setReferrer( JNIEnv* jni, jclass klass, jobject ref) { - if (!NSK_JNI_VERIFY(jni, (referrer = - NSK_CPP_STUB2(NewGlobalRef, jni, ref)) != NULL)) + if (!NSK_JNI_VERIFY(jni, (referrer = jni->NewGlobalRef(ref)) != NULL)) nsk_jvmti_setFailStatus(); } @@ -130,12 +129,10 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { staticFieldsCount = 0; instanceFieldsCount = 0; NSK_DISPLAY0("\nCalling IterateOverReachableObjects\n"); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB5(IterateOverReachableObjects, jvmti, - heapRootCallback, - stackReferenceCallback, - objectReferenceCallback, - NULL /*user_data*/))) { + if (!NSK_JVMTI_VERIFY(jvmti->IterateOverReachableObjects(heapRootCallback, + stackReferenceCallback, + objectReferenceCallback, + NULL /*user_data*/))) { nsk_jvmti_setFailStatus(); break; } @@ -156,12 +153,8 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { instanceFieldsCount = 0; NSK_DISPLAY0("\nCalling IterateOverObjectsReachableFromObject\n"); { - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(IterateOverObjectsReachableFromObject, - jvmti, - referrer, - objectReferenceCallback, - NULL /*user_data*/))) { + if (!NSK_JVMTI_VERIFY(jvmti->IterateOverObjectsReachableFromObject( + referrer, objectReferenceCallback, NULL /*user_data*/))) { nsk_jvmti_setFailStatus(); break; } @@ -180,7 +173,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { } - NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, referrer)); + NSK_TRACE(jni->DeleteGlobalRef(referrer)); } while (0); @@ -213,12 +206,10 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(jvmtiCapabilities)); caps.can_tag_objects = 1; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, - jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) return JNI_ERR; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, - jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps))) return JNI_ERR; if (!caps.can_tag_objects) diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP05/ap05t002/ap05t002.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP05/ap05t002/ap05t002.cpp index a0cd4bc828e..4b18a8e4c86 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP05/ap05t002/ap05t002.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP05/ap05t002/ap05t002.cpp @@ -103,7 +103,7 @@ Java_nsk_jvmti_scenarios_allocation_AP05_ap05t002_setTag( JNIEnv* jni, jobject target, jlong tag ) { - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetTag, jvmti, target, tag))) { + if (!NSK_JVMTI_VERIFY(jvmti->SetTag(target, tag))) { nsk_jvmti_setFailStatus(); } } @@ -111,8 +111,7 @@ Java_nsk_jvmti_scenarios_allocation_AP05_ap05t002_setTag( JNIEnv* jni, JNIEXPORT void JNICALL Java_nsk_jvmti_scenarios_allocation_AP05_ap05t002_setReferrer( JNIEnv* jni, jclass klass, jobject ref, jint caseNum) { caseNumber = caseNum; - if (!NSK_JNI_VERIFY(jni, (referrer = - NSK_CPP_STUB2(NewGlobalRef, jni, ref)) != NULL)) + if (!NSK_JNI_VERIFY(jni, (referrer = jni->NewGlobalRef(ref)) != NULL)) nsk_jvmti_setFailStatus(); } @@ -120,12 +119,10 @@ static void runCase() { NSK_DISPLAY0("\nCalling IterateOverReachableObjects\n"); forthRef = 0; backRef = 0; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB5(IterateOverReachableObjects, jvmti, - heapRootCallback, - stackReferenceCallback, - objectReferenceCallback, - NULL /*user_data*/))) { + if (!NSK_JVMTI_VERIFY(jvmti->IterateOverReachableObjects(heapRootCallback, + stackReferenceCallback, + objectReferenceCallback, + NULL /*user_data*/))) { nsk_jvmti_setFailStatus(); } if (forthRef != 1) { @@ -142,12 +139,9 @@ static void runCase() { NSK_DISPLAY0("\nCalling IterateOverObjectsReachableFromObject\n"); forthRef = 0; backRef = 0; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(IterateOverObjectsReachableFromObject, - jvmti, - referrer, - objectReferenceCallback, - NULL /*user_data*/))) { + if (!NSK_JVMTI_VERIFY(jvmti->IterateOverObjectsReachableFromObject(referrer, + objectReferenceCallback, + NULL /*user_data*/))) { nsk_jvmti_setFailStatus(); } if (forthRef != 1) { @@ -175,7 +169,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY0("CASE #1\n"); runCase(); - NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, referrer)); + NSK_TRACE(jni->DeleteGlobalRef(referrer)); if (!NSK_VERIFY(nsk_jvmti_resumeSync())) return; if (!NSK_VERIFY(nsk_jvmti_waitForSync(timeout))) @@ -184,7 +178,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY0("CASE #2\n"); runCase(); - NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, referrer)); + NSK_TRACE(jni->DeleteGlobalRef(referrer)); } while (0); NSK_DISPLAY0("Let debugee to finish\n"); @@ -216,12 +210,10 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(jvmtiCapabilities)); caps.can_tag_objects = 1; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, - jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) return JNI_ERR; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, - jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps))) return JNI_ERR; if (!caps.can_tag_objects) From cb3fe46b955b5365b1401e94064787fb102120d2 Mon Sep 17 00:00:00 2001 From: Alan Bateman Date: Tue, 9 Oct 2018 07:06:32 +0100 Subject: [PATCH 040/124] 8211825: ModuleLayer.defineModulesWithXXX does not setup delegation when module reads automatic module Reviewed-by: mchung --- .../share/classes/java/lang/Module.java | 11 +- .../classes/jdk/internal/loader/Loader.java | 53 +++--- .../jdk/internal/loader/LoaderPool.java | 4 +- .../automatic/AutomaticModulesTest.java | 152 ++++++++++++++++++ .../ModuleLayer/automatic/src/alib/q/Lib.java | 31 ++++ .../automatic/src/m/module-info.java | 25 +++ .../ModuleLayer/automatic/src/m/p/Main.java | 32 ++++ 7 files changed, 283 insertions(+), 25 deletions(-) create mode 100644 test/jdk/java/lang/ModuleLayer/automatic/AutomaticModulesTest.java create mode 100644 test/jdk/java/lang/ModuleLayer/automatic/src/alib/q/Lib.java create mode 100644 test/jdk/java/lang/ModuleLayer/automatic/src/m/module-info.java create mode 100644 test/jdk/java/lang/ModuleLayer/automatic/src/m/p/Main.java diff --git a/src/java.base/share/classes/java/lang/Module.java b/src/java.base/share/classes/java/lang/Module.java index 6d474b1ad5c..e338b402342 100644 --- a/src/java.base/share/classes/java/lang/Module.java +++ b/src/java.base/share/classes/java/lang/Module.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2018, 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 @@ -477,7 +477,7 @@ public final class Module implements AnnotatedElement { * * @see ModuleDescriptor#opens() * @see #addOpens(String,Module) - * @see AccessibleObject#setAccessible(boolean) + * @see java.lang.reflect.AccessibleObject#setAccessible(boolean) * @see java.lang.invoke.MethodHandles#privateLookupIn */ public boolean isOpen(String pn, Module other) { @@ -747,7 +747,7 @@ public final class Module implements AnnotatedElement { * package to at least the caller's module * * @see #isOpen(String,Module) - * @see AccessibleObject#setAccessible(boolean) + * @see java.lang.reflect.AccessibleObject#setAccessible(boolean) * @see java.lang.invoke.MethodHandles#privateLookupIn */ @CallerSensitive @@ -1061,7 +1061,10 @@ public final class Module implements AnnotatedElement { * @return a map of module name to runtime {@code Module} * * @throws IllegalArgumentException - * If defining any of the modules to the VM fails + * If the function maps a module to the null or platform class loader + * @throws IllegalStateException + * If the module cannot be defined to the VM or its packages overlap + * with another module mapped to the same class loader */ static Map defineModules(Configuration cf, Function clf, diff --git a/src/java.base/share/classes/jdk/internal/loader/Loader.java b/src/java.base/share/classes/jdk/internal/loader/Loader.java index d65b8acc229..5faf2de9102 100644 --- a/src/java.base/share/classes/jdk/internal/loader/Loader.java +++ b/src/java.base/share/classes/jdk/internal/loader/Loader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2018, 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 @@ -198,7 +198,6 @@ public final class Loader extends SecureClassLoader { this.acc = AccessController.getContext(); } - /** * Completes initialization of this Loader. This method populates * remotePackageToLoader with the packages of the remote modules, where @@ -253,25 +252,25 @@ public final class Loader extends SecureClassLoader { } // find the packages that are exported to the target module - String target = resolvedModule.name(); ModuleDescriptor descriptor = other.reference().descriptor(); - for (ModuleDescriptor.Exports e : descriptor.exports()) { - boolean delegate; - if (e.isQualified()) { - // qualified export in same configuration - delegate = (other.configuration() == cf) - && e.targets().contains(target); - } else { - // unqualified - delegate = true; - } + if (descriptor.isAutomatic()) { + ClassLoader l = loader; + descriptor.packages().forEach(pn -> remotePackage(pn, l)); + } else { + String target = resolvedModule.name(); + for (ModuleDescriptor.Exports e : descriptor.exports()) { + boolean delegate; + if (e.isQualified()) { + // qualified export in same configuration + delegate = (other.configuration() == cf) + && e.targets().contains(target); + } else { + // unqualified + delegate = true; + } - if (delegate) { - String pn = e.source(); - ClassLoader l = remotePackageToLoader.putIfAbsent(pn, loader); - if (l != null && l != loader) { - throw new IllegalArgumentException("Package " - + pn + " cannot be imported from multiple loaders"); + if (delegate) { + remotePackage(e.source(), loader); } } } @@ -282,6 +281,22 @@ public final class Loader extends SecureClassLoader { return this; } + /** + * Adds to remotePackageToLoader so that an attempt to load a class in + * the package delegates to the given class loader. + * + * @throws IllegalStateException + * if the package is already mapped to a different class loader + */ + private void remotePackage(String pn, ClassLoader loader) { + ClassLoader l = remotePackageToLoader.putIfAbsent(pn, loader); + if (l != null && l != loader) { + throw new IllegalStateException("Package " + + pn + " cannot be imported from multiple loaders"); + } + } + + /** * Find the layer corresponding to the given configuration in the tree * of layers rooted at the given parent. diff --git a/src/java.base/share/classes/jdk/internal/loader/LoaderPool.java b/src/java.base/share/classes/jdk/internal/loader/LoaderPool.java index 1b6bb197b60..c0bdecf6807 100644 --- a/src/java.base/share/classes/jdk/internal/loader/LoaderPool.java +++ b/src/java.base/share/classes/jdk/internal/loader/LoaderPool.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2018, 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 @@ -46,7 +46,7 @@ public final class LoaderPool { /** * Creates a pool of class loaders. Each module in the given configuration - * will be loaded its own class loader in the pool. The class loader is + * is mapped to its own class loader in the pool. The class loader is * created with the given parent class loader as its parent. */ public LoaderPool(Configuration cf, diff --git a/test/jdk/java/lang/ModuleLayer/automatic/AutomaticModulesTest.java b/test/jdk/java/lang/ModuleLayer/automatic/AutomaticModulesTest.java new file mode 100644 index 00000000000..758a1fb6652 --- /dev/null +++ b/test/jdk/java/lang/ModuleLayer/automatic/AutomaticModulesTest.java @@ -0,0 +1,152 @@ +/* + * Copyright (c) 2018, 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. + * + * 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 8211825 + * @modules jdk.compiler + * @library /test/lib + * @build jdk.test.lib.compiler.CompilerUtils jdk.test.lib.util.JarUtils + * @run testng/othervm AutomaticModulesTest + * @summary Tests automatic modules in module layers + */ + +import java.nio.file.Files; +import java.nio.file.Path; +import java.lang.ModuleLayer.Controller; +import java.lang.module.*; +import java.lang.reflect.Method; +import java.util.List; +import java.util.Set; + +import jdk.test.lib.compiler.CompilerUtils; +import jdk.test.lib.util.JarUtils; + +import org.testng.annotations.BeforeTest; +import org.testng.annotations.Test; +import static org.testng.Assert.*; + +/** + * This test uses two modules: + * m requires alib and has an entry point p.Main + * alib is an automatic module + */ + +@Test +public class AutomaticModulesTest { + + private static final String TEST_SRC = System.getProperty("test.src"); + + private static final Path CLASSES = Path.of("classes"); + private static final Path LIB = Path.of("lib"); + private static final Path MODS = Path.of("mods"); + + @BeforeTest + public void setup() throws Exception { + // javac -d classes src/alib/** + // jar cf lib/alib.jar -C classes . + Files.createDirectory(CLASSES); + assertTrue(CompilerUtils.compile(Path.of(TEST_SRC, "src", "alib"), CLASSES)); + JarUtils.createJarFile(LIB.resolve("alib.jar"), CLASSES); + + // javac -p lib -d mods/m - src/m/** + Path src = Path.of(TEST_SRC, "src", "m"); + Path output = Files.createDirectories(MODS.resolve("m")); + assertTrue(CompilerUtils.compile(src, output, "-p", LIB.toString())); + } + + /** + * Create a module layer with modules m and alib mapped to the same class + * loader. + */ + public void testOneLoader() throws Exception { + Configuration cf = ModuleLayer.boot() + .configuration() + .resolve(ModuleFinder.of(), ModuleFinder.of(MODS, LIB), Set.of("m")); + ResolvedModule m = cf.findModule("m").orElseThrow(); + ResolvedModule alib = cf.findModule("alib").orElseThrow(); + assertTrue(m.reads().contains(alib)); + assertTrue(alib.reference().descriptor().isAutomatic()); + ModuleLayer bootLayer = ModuleLayer.boot(); + ClassLoader scl = ClassLoader.getSystemClassLoader(); + Controller controller = ModuleLayer.defineModulesWithOneLoader(cf, List.of(bootLayer), scl); + invokeMain(controller, "m/p.Main"); + } + + /** + * Create a module layer with modules m and alib mapped to different class + * loaders. This will test that L(m) delegates to L(alib) in the same layer. + */ + public void testManyLoaders() throws Exception { + Configuration cf = ModuleLayer.boot() + .configuration() + .resolve(ModuleFinder.of(), ModuleFinder.of(MODS, LIB), Set.of("m")); + ResolvedModule m = cf.findModule("m").orElseThrow(); + ResolvedModule alib = cf.findModule("alib").orElseThrow(); + assertTrue(m.reads().contains(alib)); + assertTrue(alib.reference().descriptor().isAutomatic()); + ModuleLayer bootLayer = ModuleLayer.boot(); + ClassLoader scl = ClassLoader.getSystemClassLoader(); + Controller controller = ModuleLayer.defineModulesWithManyLoaders(cf, List.of(bootLayer), scl); + invokeMain(controller, "m/p.Main"); + } + + /** + * Create a module layer with alib and another module layer with m. + * This will test that L(m) delegates to L(alib) in a parent layer. + */ + public void testAutomaticModuleInParent() throws Exception { + ModuleLayer bootLayer = ModuleLayer.boot(); + ClassLoader scl = ClassLoader.getSystemClassLoader(); + + // configuration/layer containing alib + Configuration cf1 = bootLayer + .configuration() + .resolve(ModuleFinder.of(), ModuleFinder.of(LIB), Set.of("alib")); + ModuleLayer layer1 = bootLayer.defineModulesWithOneLoader(cf1, scl); + + // configuration/layer containing m + Configuration cf2 = cf1.resolve(ModuleFinder.of(), ModuleFinder.of(MODS), Set.of("m")); + Controller controller = ModuleLayer.defineModulesWithOneLoader(cf2, List.of(layer1), scl); + + invokeMain(controller, "m/p.Main"); + } + + /** + * Invokes the main method of the given entry point (module-name/class-name) + */ + private void invokeMain(Controller controller, String entry) throws Exception { + String[] s = entry.split("/"); + String moduleName = s[0]; + String className = s[1]; + int pos = className.lastIndexOf('.'); + String packageName = className.substring(0, pos); + ModuleLayer layer = controller.layer(); + Module module = layer.findModule(moduleName).orElseThrow(); + controller.addExports(module, packageName, this.getClass().getModule()); + ClassLoader loader = layer.findLoader(moduleName); + Class c = loader.loadClass(className); + Method m = c.getMethod("main", String[].class); + m.invoke(null, (Object)new String[0]); + } +} diff --git a/test/jdk/java/lang/ModuleLayer/automatic/src/alib/q/Lib.java b/test/jdk/java/lang/ModuleLayer/automatic/src/alib/q/Lib.java new file mode 100644 index 00000000000..ce772f0bcb8 --- /dev/null +++ b/test/jdk/java/lang/ModuleLayer/automatic/src/alib/q/Lib.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2018, 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. + * + * 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. + */ +package q; + +public class Lib { + private Lib() { } + + public static String generate() { + return "something useful"; + } +} diff --git a/test/jdk/java/lang/ModuleLayer/automatic/src/m/module-info.java b/test/jdk/java/lang/ModuleLayer/automatic/src/m/module-info.java new file mode 100644 index 00000000000..b6fbef7ddec --- /dev/null +++ b/test/jdk/java/lang/ModuleLayer/automatic/src/m/module-info.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2018, 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. + * + * 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. + */ +module m { + requires alib; +} diff --git a/test/jdk/java/lang/ModuleLayer/automatic/src/m/p/Main.java b/test/jdk/java/lang/ModuleLayer/automatic/src/m/p/Main.java new file mode 100644 index 00000000000..53ac92220bd --- /dev/null +++ b/test/jdk/java/lang/ModuleLayer/automatic/src/m/p/Main.java @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2018, 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. + * + * 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. + */ +package p; + +import q.Lib; + +public class Main { + public static void main(String[] args) { + String s = Lib.generate(); + System.out.println(s); + } +} From 2db7ed189585c5bcfff2c0d6ee8f7900fd6a6880 Mon Sep 17 00:00:00 2001 From: Andrew Haley Date: Tue, 2 Oct 2018 17:17:43 +0200 Subject: [PATCH 041/124] 8211387: [Zero] atomic_copy64: Use ldrexd for atomic reads on ARMv7 Reviewed-by: dholmes, aph --- src/hotspot/os_cpu/linux_zero/os_linux_zero.hpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/hotspot/os_cpu/linux_zero/os_linux_zero.hpp b/src/hotspot/os_cpu/linux_zero/os_linux_zero.hpp index a018b6114d4..3c13b5b7d2b 100644 --- a/src/hotspot/os_cpu/linux_zero/os_linux_zero.hpp +++ b/src/hotspot/os_cpu/linux_zero/os_linux_zero.hpp @@ -54,6 +54,16 @@ "std %0, %1\n" : "=&f"(tmp), "=Q"(*(volatile double*)dst) : "Q"(*(volatile double*)src)); +#elif defined(__ARM_ARCH_7A__) + // Note that a ldrexd + clrex combination is only needed for + // correctness on the OS level (context-switches). In this + // case, clrex *may* be beneficial for performance. For now + // don't bother with clrex as this is Zero. + jlong tmp; + asm volatile ("ldrexd %0, [%1]\n" + : "=r"(tmp) + : "r"(src), "m"(src)); + *(jlong *) dst = tmp; #else *(jlong *) dst = *(const jlong *) src; #endif From e61252dc278fd44345c5377811552ed6760ffcf0 Mon Sep 17 00:00:00 2001 From: Chris Hegarty Date: Tue, 9 Oct 2018 11:44:00 +0100 Subject: [PATCH 042/124] 8211920: Close server socket and cleanups in test/jdk/javax/naming/module/RunBasic.java Reviewed-by: dfuchs --- test/jdk/javax/naming/module/RunBasic.java | 11 +- .../src/test/test/ConnectWithAuthzId.java | 131 +++++----- .../module/src/test/test/ConnectWithFoo.java | 93 ++++---- .../module/src/test/test/ReadByUrl.java | 95 ++++---- .../module/src/test/test/StoreFruit.java | 166 +++++++------ .../module/src/test/test/StoreObject.java | 161 +++++++------ .../module/src/test/test/StorePerson.java | 224 +++++++++--------- .../module/src/test/test/StoreRemote.java | 132 ++++++----- 8 files changed, 541 insertions(+), 472 deletions(-) diff --git a/test/jdk/javax/naming/module/RunBasic.java b/test/jdk/javax/naming/module/RunBasic.java index 54b77e23883..0fd9d2b28aa 100644 --- a/test/jdk/javax/naming/module/RunBasic.java +++ b/test/jdk/javax/naming/module/RunBasic.java @@ -27,8 +27,10 @@ import jdk.test.lib.compiler.CompilerUtils; import jdk.test.lib.process.ProcessTools; import java.io.IOException; +import java.net.InetAddress; import java.nio.file.Files; import java.nio.file.Path; +import java.time.Duration; import java.util.Collection; import java.util.Collections; import java.util.List; @@ -65,6 +67,8 @@ public class RunBasic { private static final List JAVA_CMDS; + static final String HOST_NAME = InetAddress.getLoopbackAddress().getHostName(); + static { String javaPath = JDKToolFinder.getJDKTool("java"); @@ -85,6 +89,8 @@ public class RunBasic { prepareModule("test", "--module-source-path", Path.of(TEST_SRC, "src").toString()); + System.out.println("Hostname: [" + HOST_NAME + "]"); + // run tests runTest("java.desktop", "test.StoreObject"); runTest("person", "test.StorePerson"); @@ -98,9 +104,12 @@ public class RunBasic { private static void prepareModule(String mod, String... opts) throws IOException { System.out.println("Preparing the '" + mod + "' module..."); + long start = System.nanoTime(); makeDir("mods", mod); CompilerUtils.compile(Path.of(TEST_SRC, "src", mod), Path.of("mods", (mod.equals("test") ? "" : mod)), opts); + Duration duration = Duration.ofNanos(System.nanoTime() - start); + System.out.println("completed: duration - " + duration ); } private static void makeDir(String first, String... more) @@ -111,7 +120,7 @@ public class RunBasic { private static void runTest(String desc, String clsName) throws Throwable { System.out.println("Running with the '" + desc + "' module..."); runJava("-Dtest.src=" + TEST_SRC, "-p", "mods", "-m", "test/" + clsName, - "ldap://localhost/dc=ie,dc=oracle,dc=com"); + "ldap://" + HOST_NAME + "/dc=ie,dc=oracle,dc=com"); } private static void runJava(String... opts) throws Throwable { diff --git a/test/jdk/javax/naming/module/src/test/test/ConnectWithAuthzId.java b/test/jdk/javax/naming/module/src/test/test/ConnectWithAuthzId.java index 27e8e49b43d..5f707e44d69 100644 --- a/test/jdk/javax/naming/module/src/test/test/ConnectWithAuthzId.java +++ b/test/jdk/javax/naming/module/src/test/test/ConnectWithAuthzId.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2018, 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 @@ -29,6 +29,7 @@ package test; +import java.io.PrintStream; import java.net.*; import java.util.*; import javax.naming.*; @@ -40,12 +41,18 @@ import org.example.authz.AuthzIdResponseControl; public class ConnectWithAuthzId { + static { + final PrintStream out = new PrintStream(System.out, true); + final PrintStream err = new PrintStream(System.err, true); + + System.setOut(out); + System.setErr(err); + } + // LDAP capture file private static final String LDAP_CAPTURE_FILE = System.getProperty("test.src") + "/src/test/test/ConnectWithAuthzId.ldap"; - // LDAPServer socket - private static ServerSocket serverSocket; public static void main(String[] args) throws Exception { @@ -68,67 +75,69 @@ public class ConnectWithAuthzId { * Launch the LDAP server with the ConnectWithAuthzId.ldap capture file */ - serverSocket = new ServerSocket(0); - new Thread(new Runnable() { - @Override - public void run() { - try { - new LDAPServer(serverSocket, LDAP_CAPTURE_FILE); - } catch (Exception e) { - System.out.println("ERROR: unable to launch LDAP server"); - e.printStackTrace(); - } - } - }).start(); - - /* - * Connect to the LDAP directory - */ - - Hashtable env = new Hashtable<>(); - env.put(Context.INITIAL_CONTEXT_FACTORY, - "com.sun.jndi.ldap.LdapCtxFactory"); - URI ldapUri = new URI(args[0]); - if (ldapUri.getPort() == -1) { - ldapUri = new URI(ldapUri.getScheme(), null, ldapUri.getHost(), - serverSocket.getLocalPort(), ldapUri.getPath(), null, null); - } - env.put(Context.PROVIDER_URL, ldapUri.toString()); - env.put(Context.SECURITY_AUTHENTICATION, "simple"); - env.put(Context.SECURITY_PRINCIPAL, "cn=admin,dc=ie,dc=oracle,dc=com"); - env.put(Context.SECURITY_CREDENTIALS, "changeit"); - env.put(LdapContext.CONTROL_FACTORIES, - "org.example.authz.AuthzIdResponseControlFactory"); - if (args[args.length - 1].equalsIgnoreCase("-trace")) { - env.put("com.sun.jndi.ldap.trace.ber", System.out); - } - - System.out.println("ConnectWithAuthzId: connecting to " + ldapUri); - LdapContext ctx = null; - Control[] connectionControls = { new AuthzIdRequestControl(false) }; - - try { - ctx = new InitialLdapContext(env, connectionControls); - System.out.println("ConnectWithAuthzId: connected"); - // Retrieve the response controls - Control[] responseControls = ctx.getResponseControls(); - if (responseControls != null) { - for (Control responseControl : responseControls) { - System.out.println("ConnectWithAuthzId: received response" + - " control: " + responseControl.getID()); - if (responseControl instanceof AuthzIdResponseControl) { - AuthzIdResponseControl authzId = - (AuthzIdResponseControl)responseControl; - System.out.println("ConnectWithAuthzId: identity is " + - authzId.getIdentity()); + try (ServerSocket serverSocket = new ServerSocket()) { + serverSocket.bind(new InetSocketAddress(InetAddress.getLoopbackAddress(), 0)); + new Thread(new Runnable() { + @Override + public void run() { + try { + new LDAPServer(serverSocket, LDAP_CAPTURE_FILE); + } catch (Exception e) { + System.out.println("ERROR: unable to launch LDAP server"); + e.printStackTrace(); } } + }).start(); + + /* + * Connect to the LDAP directory + */ + + Hashtable env = new Hashtable<>(); + env.put(Context.INITIAL_CONTEXT_FACTORY, + "com.sun.jndi.ldap.LdapCtxFactory"); + URI ldapUri = new URI(args[0]); + if (ldapUri.getPort() == -1) { + ldapUri = new URI(ldapUri.getScheme(), null, ldapUri.getHost(), + serverSocket.getLocalPort(), ldapUri.getPath(), null, null); } - } catch (NamingException e) { - System.err.println("ConnectWithAuthzId: error connecting " + e); - } finally { - if (ctx != null) { - ctx.close(); + env.put(Context.PROVIDER_URL, ldapUri.toString()); + env.put(Context.SECURITY_AUTHENTICATION, "simple"); + env.put(Context.SECURITY_PRINCIPAL, "cn=admin,dc=ie,dc=oracle,dc=com"); + env.put(Context.SECURITY_CREDENTIALS, "changeit"); + env.put(LdapContext.CONTROL_FACTORIES, + "org.example.authz.AuthzIdResponseControlFactory"); + if (args[args.length - 1].equalsIgnoreCase("-trace")) { + env.put("com.sun.jndi.ldap.trace.ber", System.out); + } + + System.out.println("ConnectWithAuthzId: connecting to " + ldapUri); + LdapContext ctx = null; + Control[] connectionControls = { new AuthzIdRequestControl(false) }; + + try { + ctx = new InitialLdapContext(env, connectionControls); + System.out.println("ConnectWithAuthzId: connected"); + // Retrieve the response controls + Control[] responseControls = ctx.getResponseControls(); + if (responseControls != null) { + for (Control responseControl : responseControls) { + System.out.println("ConnectWithAuthzId: received response" + + " control: " + responseControl.getID()); + if (responseControl instanceof AuthzIdResponseControl) { + AuthzIdResponseControl authzId = + (AuthzIdResponseControl)responseControl; + System.out.println("ConnectWithAuthzId: identity is " + + authzId.getIdentity()); + } + } + } + } catch (NamingException e) { + System.err.println("ConnectWithAuthzId: error connecting " + e); + } finally { + if (ctx != null) { + ctx.close(); + } } } } diff --git a/test/jdk/javax/naming/module/src/test/test/ConnectWithFoo.java b/test/jdk/javax/naming/module/src/test/test/ConnectWithFoo.java index c14e4f4f31c..6df3b97cc61 100644 --- a/test/jdk/javax/naming/module/src/test/test/ConnectWithFoo.java +++ b/test/jdk/javax/naming/module/src/test/test/ConnectWithFoo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2018, 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 @@ -28,6 +28,7 @@ package test; +import java.io.PrintStream; import java.net.*; import java.util.*; import javax.naming.*; @@ -38,11 +39,17 @@ import org.example.foo.FooControl; public class ConnectWithFoo { + static { + final PrintStream out = new PrintStream(System.out, true); + final PrintStream err = new PrintStream(System.err, true); + + System.setOut(out); + System.setErr(err); + } + // LDAP capture file private static final String LDAP_CAPTURE_FILE = System.getProperty("test.src") + "/src/test/test/ConnectWithFoo.ldap"; - // LDAPServer socket - private static ServerSocket serverSocket; public static void main(String[] args) throws Exception { @@ -65,48 +72,50 @@ public class ConnectWithFoo { * Launch the LDAP server with the ConnectWithFoo.ldap capture file */ - serverSocket = new ServerSocket(0); - new Thread(new Runnable() { - @Override - public void run() { - try { - new LDAPServer(serverSocket, LDAP_CAPTURE_FILE); - } catch (Exception e) { - System.out.println("ERROR: unable to launch LDAP server"); - e.printStackTrace(); - } + try (ServerSocket serverSocket = new ServerSocket()) { + serverSocket.bind(new InetSocketAddress(InetAddress.getLoopbackAddress(), 0)); + new Thread(new Runnable() { + @Override + public void run() { + try { + new LDAPServer(serverSocket, LDAP_CAPTURE_FILE); + } catch (Exception e) { + System.out.println("ERROR: unable to launch LDAP server"); + e.printStackTrace(); + } + } + }).start(); + + /* + * Connect to the LDAP directory + */ + + Hashtable env = new Hashtable<>(); + env.put(Context.INITIAL_CONTEXT_FACTORY, + "com.sun.jndi.ldap.LdapCtxFactory"); + URI ldapUri = new URI(args[0]); + if (ldapUri.getPort() == -1) { + ldapUri = new URI(ldapUri.getScheme(), null, ldapUri.getHost(), + serverSocket.getLocalPort(), ldapUri.getPath(), null, null); + } + env.put(Context.PROVIDER_URL, ldapUri.toString()); + if (args[args.length - 1].equalsIgnoreCase("-trace")) { + env.put("com.sun.jndi.ldap.trace.ber", System.out); } - }).start(); - /* - * Connect to the LDAP directory - */ + System.out.println("ConnectWithFoo: connecting to " + ldapUri); + LdapContext ctx = null; + Control[] connectionControls = { new FooControl(false) }; - Hashtable env = new Hashtable<>(); - env.put(Context.INITIAL_CONTEXT_FACTORY, - "com.sun.jndi.ldap.LdapCtxFactory"); - URI ldapUri = new URI(args[0]); - if (ldapUri.getPort() == -1) { - ldapUri = new URI(ldapUri.getScheme(), null, ldapUri.getHost(), - serverSocket.getLocalPort(), ldapUri.getPath(), null, null); - } - env.put(Context.PROVIDER_URL, ldapUri.toString()); - if (args[args.length - 1].equalsIgnoreCase("-trace")) { - env.put("com.sun.jndi.ldap.trace.ber", System.out); - } - - System.out.println("ConnectWithFoo: connecting to " + ldapUri); - LdapContext ctx = null; - Control[] connectionControls = { new FooControl(false) }; - - try { - ctx = new InitialLdapContext(env, connectionControls); - System.out.println("ConnectWithFoo: connected"); - } catch (NamingException e) { - System.err.println("ConnectWithFoo: error connecting " + e); - } finally { - if (ctx != null) { - ctx.close(); + try { + ctx = new InitialLdapContext(env, connectionControls); + System.out.println("ConnectWithFoo: connected"); + } catch (NamingException e) { + System.err.println("ConnectWithFoo: error connecting " + e); + } finally { + if (ctx != null) { + ctx.close(); + } } } } diff --git a/test/jdk/javax/naming/module/src/test/test/ReadByUrl.java b/test/jdk/javax/naming/module/src/test/test/ReadByUrl.java index 4b68da455a3..cc2861b433b 100644 --- a/test/jdk/javax/naming/module/src/test/test/ReadByUrl.java +++ b/test/jdk/javax/naming/module/src/test/test/ReadByUrl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2018, 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 @@ -28,6 +28,7 @@ package test; +import java.io.PrintStream; import java.net.*; import java.util.*; import javax.naming.*; @@ -36,11 +37,17 @@ import javax.naming.ldap.*; public class ReadByUrl { + static { + final PrintStream out = new PrintStream(System.out, true); + final PrintStream err = new PrintStream(System.err, true); + + System.setOut(out); + System.setErr(err); + } + // LDAP capture file private static final String LDAP_CAPTURE_FILE = System.getProperty("test.src") + "/src/test/test/ReadByUrl.ldap"; - // LDAPServer socket - private static ServerSocket serverSocket; public static void main(String[] args) throws Exception { @@ -63,50 +70,52 @@ public class ReadByUrl { * Launch the LDAP server with the ReadByUrl.ldap capture file */ - serverSocket = new ServerSocket(0); - new Thread(new Runnable() { - @Override - public void run() { - try { - new LDAPServer(serverSocket, LDAP_CAPTURE_FILE); - } catch (Exception e) { - System.out.println("ERROR: unable to launch LDAP server"); - e.printStackTrace(); - } + try (ServerSocket serverSocket = new ServerSocket()) { + serverSocket.bind(new InetSocketAddress(InetAddress.getLoopbackAddress(), 0)); + new Thread(new Runnable() { + @Override + public void run() { + try { + new LDAPServer(serverSocket, LDAP_CAPTURE_FILE); + } catch (Exception e) { + System.out.println("ERROR: unable to launch LDAP server"); + e.printStackTrace(); + } + } + }).start(); + + /* + * Connect to the LDAP directory + */ + + Hashtable env = new Hashtable<>(); + URI ldapUri = new URI(args[0]); + if (ldapUri.getPort() == -1) { + ldapUri = new URI("ldapv4", null, ldapUri.getHost(), + serverSocket.getLocalPort(), ldapUri.getPath(), null, null); + } + env.put(Context.PROVIDER_URL, ldapUri.toString()); + if (args[args.length - 1].equalsIgnoreCase("-trace")) { + env.put("com.sun.jndi.ldap.trace.ber", System.out); } - }).start(); - /* - * Connect to the LDAP directory - */ + // URL context factory location for 'ldapv4://' + env.put(Context.URL_PKG_PREFIXES, "org.example"); - Hashtable env = new Hashtable<>(); - URI ldapUri = new URI(args[0]); - if (ldapUri.getPort() == -1) { - ldapUri = new URI("ldapv4", null, ldapUri.getHost(), - serverSocket.getLocalPort(), ldapUri.getPath(), null, null); - } - env.put(Context.PROVIDER_URL, ldapUri.toString()); - if (args[args.length - 1].equalsIgnoreCase("-trace")) { - env.put("com.sun.jndi.ldap.trace.ber", System.out); - } + System.out.println("ReadByUrl: connecting to " + ldapUri); + DirContext ctx = null; - // URL context factory location for 'ldapv4://' - env.put(Context.URL_PKG_PREFIXES, "org.example"); - - System.out.println("ReadByUrl: connecting to " + ldapUri); - DirContext ctx = null; - - try { - ctx = new InitialDirContext(env); - System.out.println("ReadByUrl: connected"); - DirContext entry = (DirContext) ctx.lookup(ldapUri.toString()); - entry.close(); - } catch (NamingException e) { - System.err.println("ReadByUrl: error connecting " + e); - } finally { - if (ctx != null) { - ctx.close(); + try { + ctx = new InitialDirContext(env); + System.out.println("ReadByUrl: connected"); + DirContext entry = (DirContext) ctx.lookup(ldapUri.toString()); + entry.close(); + } catch (NamingException e) { + System.err.println("ReadByUrl: error connecting " + e); + } finally { + if (ctx != null) { + ctx.close(); + } } } } diff --git a/test/jdk/javax/naming/module/src/test/test/StoreFruit.java b/test/jdk/javax/naming/module/src/test/test/StoreFruit.java index 278102cdcdf..8121c6ac906 100644 --- a/test/jdk/javax/naming/module/src/test/test/StoreFruit.java +++ b/test/jdk/javax/naming/module/src/test/test/StoreFruit.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2018, 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 @@ -29,6 +29,7 @@ package test; +import java.io.PrintStream; import java.net.*; import java.util.*; import javax.naming.*; @@ -38,18 +39,24 @@ import org.example.fruit.Fruit; public class StoreFruit { + static { + final PrintStream out = new PrintStream(System.out, true); + final PrintStream err = new PrintStream(System.err, true); + + System.setOut(out); + System.setErr(err); + } + + // LDAP capture file private static final String LDAP_CAPTURE_FILE = System.getProperty("test.src") + "/src/test/test/StoreFruit.ldap"; - // LDAPServer socket - private static ServerSocket serverSocket; public static void main(String[] args) throws Exception { /* * Process arguments */ - int argc = args.length; if ((argc < 1) || ((argc == 1) && (args[0].equalsIgnoreCase("-help")))) { @@ -58,97 +65,98 @@ public class StoreFruit { System.err.println(" is the LDAP URL of the parent entry\n"); System.err.println("example:"); System.err.println(" java StoreFruit ldap://oasis/o=airius.com"); - return; + return; } /* * Launch the LDAP server with the StoreFruit.ldap capture file */ + try (ServerSocket serverSocket = new ServerSocket()) { + serverSocket.bind(new InetSocketAddress(InetAddress.getLoopbackAddress(), 0)); + new Thread(new Runnable() { + @Override + public void run() { + try { + new LDAPServer(serverSocket, LDAP_CAPTURE_FILE); + } catch (Exception e) { + System.out.println("ERROR: unable to launch LDAP server"); + e.printStackTrace(); + } + } + }).start(); - serverSocket = new ServerSocket(0); - new Thread(new Runnable() { - @Override - public void run() { - try { - new LDAPServer(serverSocket, LDAP_CAPTURE_FILE); - } catch (Exception e) { - System.out.println("ERROR: unable to launch LDAP server"); - e.printStackTrace(); - } + /* + * Store fruit objects in the LDAP directory + */ + + Hashtable env = new Hashtable<>(); + env.put(Context.INITIAL_CONTEXT_FACTORY, + "com.sun.jndi.ldap.LdapCtxFactory"); + URI ldapUri = new URI(args[0]); + if (ldapUri.getPort() == -1) { + ldapUri = new URI(ldapUri.getScheme(), null, ldapUri.getHost(), + serverSocket.getLocalPort(), ldapUri.getPath(), null, null); + } + env.put(Context.PROVIDER_URL, ldapUri.toString()); + if (args[args.length - 1].equalsIgnoreCase("-trace")) { + env.put("com.sun.jndi.ldap.trace.ber", System.out); } - }).start(); - /* - * Store fruit objects in the LDAP directory - */ + System.out.println("StoreFruit: connecting to " + ldapUri); + DirContext ctx = new InitialDirContext(env); + Fruit fruit = null; + String dn = "cn=myfruit"; + String dn2 = "cn=myapple"; - Hashtable env = new Hashtable<>(); - env.put(Context.INITIAL_CONTEXT_FACTORY, - "com.sun.jndi.ldap.LdapCtxFactory"); - URI ldapUri = new URI(args[0]); - if (ldapUri.getPort() == -1) { - ldapUri = new URI(ldapUri.getScheme(), null, ldapUri.getHost(), - serverSocket.getLocalPort(), ldapUri.getPath(), null, null); - } - env.put(Context.PROVIDER_URL, ldapUri.toString()); - if (args[args.length - 1].equalsIgnoreCase("-trace")) { - env.put("com.sun.jndi.ldap.trace.ber", System.out); - } + try { + fruit = new Fruit("orange"); + ctx.bind(dn, fruit); + System.out.println("StoreFruit: created entry '" + dn + "'"); + } catch (NameAlreadyBoundException e) { + System.err.println("StoreFruit: entry '" + dn + + "' already exists"); + cleanup(ctx, (String)null); + return; + } - System.out.println("StoreFruit: connecting to " + ldapUri); - DirContext ctx = new InitialDirContext(env); - Fruit fruit = null; - String dn = "cn=myfruit"; - String dn2 = "cn=myapple"; + try { + ctx.bind(dn2, new Fruit("apple")); + System.out.println("StoreFruit: created entry '" + dn2 + "'"); + } catch (NameAlreadyBoundException e) { + System.err.println("StoreFruit: entry '" + dn2 + + "' already exists"); + cleanup(ctx, dn); + return; + } - try { - fruit = new Fruit("orange"); - ctx.bind(dn, fruit); - System.out.println("StoreFruit: created entry '" + dn + "'"); - } catch (NameAlreadyBoundException e) { - System.err.println("StoreFruit: entry '" + dn + - "' already exists"); - cleanup(ctx, (String)null); - return; - } + /* + * Retrieve fruit objects from the LDAP directory + */ - try { - ctx.bind(dn2, new Fruit("apple")); - System.out.println("StoreFruit: created entry '" + dn2 + "'"); - } catch (NameAlreadyBoundException e) { - System.err.println("StoreFruit: entry '" + dn2 + - "' already exists"); - cleanup(ctx, dn); - return; - } + try { + Fruit fruit2 = (Fruit) ctx.lookup(dn); + System.out.println("StoreFruit: retrieved object: " + fruit2); + } catch (NamingException e) { + System.err.println("StoreFruit: error retrieving entry '" + + dn + "' " + e); + e.printStackTrace(); + cleanup(ctx, dn, dn2); + return; + } - /* - * Retrieve fruit objects from the LDAP directory - */ + try { + Fruit fruit3 = (Fruit) ctx.lookup(dn2); + System.out.println("StoreFruit: retrieved object: " + fruit3); + } catch (NamingException e) { + System.err.println("StoreFruit: error retrieving entry '" + + dn2 + "' " + e); + e.printStackTrace(); + cleanup(ctx, dn, dn2); + return; + } - try { - Fruit fruit2 = (Fruit) ctx.lookup(dn); - System.out.println("StoreFruit: retrieved object: " + fruit2); - } catch (NamingException e) { - System.err.println("StoreFruit: error retrieving entry '" + - dn + "' " + e); - e.printStackTrace(); cleanup(ctx, dn, dn2); - return; } - - try { - Fruit fruit3 = (Fruit) ctx.lookup(dn2); - System.out.println("StoreFruit: retrieved object: " + fruit3); - } catch (NamingException e) { - System.err.println("StoreFruit: error retrieving entry '" + - dn2 + "' " + e); - e.printStackTrace(); - cleanup(ctx, dn, dn2); - return; - } - - cleanup(ctx, dn, dn2); } /* diff --git a/test/jdk/javax/naming/module/src/test/test/StoreObject.java b/test/jdk/javax/naming/module/src/test/test/StoreObject.java index 2834321962f..ce1625ee8d9 100644 --- a/test/jdk/javax/naming/module/src/test/test/StoreObject.java +++ b/test/jdk/javax/naming/module/src/test/test/StoreObject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2018, 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 @@ -30,6 +30,7 @@ package test; import java.awt.event.ActionEvent; +import java.io.PrintStream; import java.net.*; import java.util.*; import javax.naming.*; @@ -37,11 +38,17 @@ import javax.naming.directory.*; public class StoreObject { + static { + final PrintStream out = new PrintStream(System.out, true); + final PrintStream err = new PrintStream(System.err, true); + + System.setOut(out); + System.setErr(err); + } + // LDAP capture file private static final String LDAP_CAPTURE_FILE = System.getProperty("test.src") + "/src/test/test/StoreObject.ldap"; - // LDAPServer socket - private static ServerSocket serverSocket; public static void main(String[] args) throws Exception { @@ -64,89 +71,91 @@ public class StoreObject { * Launch the LDAP server with the StoreObject.ldap capture file */ - serverSocket = new ServerSocket(0); - new Thread(new Runnable() { - @Override - public void run() { - try { - new LDAPServer(serverSocket, LDAP_CAPTURE_FILE); - } catch (Exception e) { - System.out.println("ERROR: unable to launch LDAP server"); - e.printStackTrace(); - } + try (ServerSocket serverSocket = new ServerSocket()) { + serverSocket.bind(new InetSocketAddress(InetAddress.getLoopbackAddress(), 0)); + new Thread(new Runnable() { + @Override + public void run() { + try { + new LDAPServer(serverSocket, LDAP_CAPTURE_FILE); + } catch (Exception e) { + System.out.println("ERROR: unable to launch LDAP server"); + e.printStackTrace(); + } + } + }).start(); + + /* + * Store objects in the LDAP directory + */ + + Hashtable env = new Hashtable<>(); + env.put(Context.INITIAL_CONTEXT_FACTORY, + "com.sun.jndi.ldap.LdapCtxFactory"); + URI ldapUri = new URI(args[0]); + if (ldapUri.getPort() == -1) { + ldapUri = new URI(ldapUri.getScheme(), null, ldapUri.getHost(), + serverSocket.getLocalPort(), ldapUri.getPath(), null, null); + } + env.put(Context.PROVIDER_URL, ldapUri.toString()); + if (args[args.length - 1].equalsIgnoreCase("-trace")) { + env.put("com.sun.jndi.ldap.trace.ber", System.out); } - }).start(); - /* - * Store objects in the LDAP directory - */ + System.out.println("StoreObject: connecting to " + ldapUri); + DirContext ctx = new InitialDirContext(env); + String dn = "cn=myevent"; + String dn2 = "cn=myevent2"; - Hashtable env = new Hashtable<>(); - env.put(Context.INITIAL_CONTEXT_FACTORY, - "com.sun.jndi.ldap.LdapCtxFactory"); - URI ldapUri = new URI(args[0]); - if (ldapUri.getPort() == -1) { - ldapUri = new URI(ldapUri.getScheme(), null, ldapUri.getHost(), - serverSocket.getLocalPort(), ldapUri.getPath(), null, null); - } - env.put(Context.PROVIDER_URL, ldapUri.toString()); - if (args[args.length - 1].equalsIgnoreCase("-trace")) { - env.put("com.sun.jndi.ldap.trace.ber", System.out); - } + try { + ctx.bind(dn, new ActionEvent("", 1, "Hello1")); + System.out.println("StoreObject: created entry '" + dn + "'"); + } catch (NameAlreadyBoundException e) { + System.err.println("StoreObject: entry '" + dn + + "' already exists"); + cleanup(ctx, (String)null); + return; + } - System.out.println("StoreObject: connecting to " + ldapUri); - DirContext ctx = new InitialDirContext(env); - String dn = "cn=myevent"; - String dn2 = "cn=myevent2"; + try { + ctx.bind(dn2, new ActionEvent("", 2, "Hello2")); + System.out.println("StoreObject: created entry '" + dn2 + "'"); + } catch (NameAlreadyBoundException e) { + System.err.println("StoreObject: entry '" + dn2 + + "' already exists"); + cleanup(ctx, dn); + return; + } - try { - ctx.bind(dn, new ActionEvent("", 1, "Hello1")); - System.out.println("StoreObject: created entry '" + dn + "'"); - } catch (NameAlreadyBoundException e) { - System.err.println("StoreObject: entry '" + dn + - "' already exists"); - cleanup(ctx, (String)null); - return; - } + /* + * Retrieve objects from the LDAP directory + */ - try { - ctx.bind(dn2, new ActionEvent("", 2, "Hello2")); - System.out.println("StoreObject: created entry '" + dn2 + "'"); - } catch (NameAlreadyBoundException e) { - System.err.println("StoreObject: entry '" + dn2 + - "' already exists"); - cleanup(ctx, dn); - return; - } + try { + ActionEvent b = (ActionEvent) ctx.lookup(dn); + System.out.println("StoreObject: retrieved object: " + b); + } catch (NamingException e) { + System.err.println("StoreObject: error retrieving entry '" + + dn + "' " + e); + e.printStackTrace(); + cleanup(ctx, dn, dn2); + return; + } - /* - * Retrieve objects from the LDAP directory - */ + try { + ActionEvent t = (ActionEvent) ctx.lookup(dn2); + System.out.println("StoreObject: retrieved object: " + t); + } catch (NamingException e) { + System.err.println("StoreObject: error retrieving entry '" + + dn2 + "' " + e); + e.printStackTrace(); + cleanup(ctx, dn, dn2); + return; + } - try { - ActionEvent b = (ActionEvent) ctx.lookup(dn); - System.out.println("StoreObject: retrieved object: " + b); - } catch (NamingException e) { - System.err.println("StoreObject: error retrieving entry '" + - dn + "' " + e); - e.printStackTrace(); cleanup(ctx, dn, dn2); - return; + ctx.close(); } - - try { - ActionEvent t = (ActionEvent) ctx.lookup(dn2); - System.out.println("StoreObject: retrieved object: " + t); - } catch (NamingException e) { - System.err.println("StoreObject: error retrieving entry '" + - dn2 + "' " + e); - e.printStackTrace(); - cleanup(ctx, dn, dn2); - return; - } - - cleanup(ctx, dn, dn2); - ctx.close(); } /* diff --git a/test/jdk/javax/naming/module/src/test/test/StorePerson.java b/test/jdk/javax/naming/module/src/test/test/StorePerson.java index 4b6e174625f..6a5baebe5a9 100644 --- a/test/jdk/javax/naming/module/src/test/test/StorePerson.java +++ b/test/jdk/javax/naming/module/src/test/test/StorePerson.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2018, 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 @@ -31,6 +31,7 @@ package test; +import java.io.PrintStream; import java.net.*; import java.util.*; import javax.naming.*; @@ -40,11 +41,17 @@ import org.example.person.Person; public class StorePerson { + static { + final PrintStream out = new PrintStream(System.out, true); + final PrintStream err = new PrintStream(System.err, true); + + System.setOut(out); + System.setErr(err); + } + // LDAP capture file private static final String LDAP_CAPTURE_FILE = System.getProperty("test.src") + "/src/test/test/StorePerson.ldap"; - // LDAPServer socket - private static ServerSocket serverSocket; public static void main(String[] args) throws Exception { @@ -67,115 +74,116 @@ public class StorePerson { * Launch the LDAP server with the StorePerson.ldap capture file */ - serverSocket = new ServerSocket(0); - new Thread(new Runnable() { - @Override - public void run() { - try { - new LDAPServer(serverSocket, LDAP_CAPTURE_FILE); - } catch (Exception e) { - System.out.println("ERROR: unable to launch LDAP server"); - e.printStackTrace(); - } + try (ServerSocket serverSocket = new ServerSocket()) { + serverSocket.bind(new InetSocketAddress(InetAddress.getLoopbackAddress(), 0)); + new Thread(new Runnable() { + @Override + public void run() { + try { + new LDAPServer(serverSocket, LDAP_CAPTURE_FILE); + } catch (Exception e) { + System.out.println("ERROR: unable to launch LDAP server"); + e.printStackTrace(); + } + } + }).start(); + + /* + * Store Person objects in the LDAP directory + */ + + Hashtable env = new Hashtable<>(); + env.put(Context.INITIAL_CONTEXT_FACTORY, + "com.sun.jndi.ldap.LdapCtxFactory"); + URI ldapUri = new URI(args[0]); + if (ldapUri.getPort() == -1) { + ldapUri = new URI(ldapUri.getScheme(), null, ldapUri.getHost(), + serverSocket.getLocalPort(), ldapUri.getPath(), null, null); } - }).start(); - - /* - * Store Person objects in the LDAP directory - */ - - Hashtable env = new Hashtable<>(); - env.put(Context.INITIAL_CONTEXT_FACTORY, - "com.sun.jndi.ldap.LdapCtxFactory"); - URI ldapUri = new URI(args[0]); - if (ldapUri.getPort() == -1) { - ldapUri = new URI(ldapUri.getScheme(), null, ldapUri.getHost(), - serverSocket.getLocalPort(), ldapUri.getPath(), null, null); - } - env.put(Context.PROVIDER_URL, ldapUri.toString()); - if (args[args.length - 1].equalsIgnoreCase("-trace")) { - env.put("com.sun.jndi.ldap.trace.ber", System.out); - } - - // Specify the factory classname explicitly - env.put(Context.STATE_FACTORIES, "org.example.person.PersonFactory"); - env.put(Context.OBJECT_FACTORIES, "org.example.person.PersonFactory"); - - System.out.println("StorePerson: connecting to " + ldapUri); - DirContext ctx = new InitialDirContext(env); - Person person = null; - String name = "John Smith"; - String dn = "cn=" + name; - - try { - person = new Person(name, "Smith"); - person.setMailAddress("jsmith@smith.com"); - ctx.bind(dn, person); - System.out.println("StorePerson: created entry '" + dn + "'"); - } catch (NameAlreadyBoundException e) { - System.err.println("StorePerson: entry '" + dn + - "' already exists"); - cleanup(ctx, (String)null); - return; - } - - name = "Jill Smyth"; - String dn2 = "cn=" + name; - Person person2 = new Person(name, "Smyth"); - person2.setMailAddress("jsmyth@smith.com"); - - try { - ctx.bind(dn2, person2); - System.out.println("StorePerson: created entry '" + dn2 + "'"); - } catch (NameAlreadyBoundException e) { - System.err.println("StorePerson: entry '" + dn2 + - "' already exists"); - cleanup(ctx, dn); - return; - } - - /* - * Retrieve Person objects from the LDAP directory - */ - - try { - Person person3 = (Person) ctx.lookup(dn); - System.out.println("StorePerson: retrieved object: " + person3); - if (person.getAttributes().equals(person3.getAttributes())) { - System.out.println( - "StorePerson: retrieved person matches original"); - } else { - System.out.println( - "StorePerson: retrieved person does NOT match original"); + env.put(Context.PROVIDER_URL, ldapUri.toString()); + if (args[args.length - 1].equalsIgnoreCase("-trace")) { + env.put("com.sun.jndi.ldap.trace.ber", System.out); } - } catch (NamingException e) { - System.err.println("StorePerson: error retrieving entry '" + - dn + "' " + e); - e.printStackTrace(); + + // Specify the factory classname explicitly + env.put(Context.STATE_FACTORIES, "org.example.person.PersonFactory"); + env.put(Context.OBJECT_FACTORIES, "org.example.person.PersonFactory"); + + System.out.println("StorePerson: connecting to " + ldapUri); + DirContext ctx = new InitialDirContext(env); + Person person = null; + String name = "John Smith"; + String dn = "cn=" + name; + + try { + person = new Person(name, "Smith"); + person.setMailAddress("jsmith@smith.com"); + ctx.bind(dn, person); + System.out.println("StorePerson: created entry '" + dn + "'"); + } catch (NameAlreadyBoundException e) { + System.err.println("StorePerson: entry '" + dn + + "' already exists"); + cleanup(ctx, (String)null); + return; + } + + name = "Jill Smyth"; + String dn2 = "cn=" + name; + Person person2 = new Person(name, "Smyth"); + person2.setMailAddress("jsmyth@smith.com"); + + try { + ctx.bind(dn2, person2); + System.out.println("StorePerson: created entry '" + dn2 + "'"); + } catch (NameAlreadyBoundException e) { + System.err.println("StorePerson: entry '" + dn2 + + "' already exists"); + cleanup(ctx, dn); + return; + } + + /* + * Retrieve Person objects from the LDAP directory + */ + + try { + Person person3 = (Person) ctx.lookup(dn); + System.out.println("StorePerson: retrieved object: " + person3); + if (person.getAttributes().equals(person3.getAttributes())) { + System.out.println( + "StorePerson: retrieved person matches original"); + } else { + System.out.println( + "StorePerson: retrieved person does NOT match original"); + } + } catch (NamingException e) { + System.err.println("StorePerson: error retrieving entry '" + + dn + "' " + e); + e.printStackTrace(); + cleanup(ctx, dn, dn2); + return; + } + + try { + Person person4 = (Person) ctx.lookup(dn2); + System.out.println("StorePerson: retrieved object: " + person4); + if (person2.getAttributes().equals(person4.getAttributes())) { + System.out.println( + "StorePerson: retrieved person matches original"); + } else { + System.out.println( + "StorePerson: retrieved person does NOT match original"); + } + } catch (NamingException e) { + System.err.println("StorePerson: error retrieving entry '" + + dn2 + "' " + e); + e.printStackTrace(); + cleanup(ctx, dn, dn2); + return; + } + cleanup(ctx, dn, dn2); - return; } - - try { - Person person4 = (Person) ctx.lookup(dn2); - System.out.println("StorePerson: retrieved object: " + person4); - if (person2.getAttributes().equals(person4.getAttributes())) { - System.out.println( - "StorePerson: retrieved person matches original"); - } else { - System.out.println( - "StorePerson: retrieved person does NOT match original"); - } - } catch (NamingException e) { - System.err.println("StorePerson: error retrieving entry '" + - dn2 + "' " + e); - e.printStackTrace(); - cleanup(ctx, dn, dn2); - return; - } - - cleanup(ctx, dn, dn2); - return; } /* diff --git a/test/jdk/javax/naming/module/src/test/test/StoreRemote.java b/test/jdk/javax/naming/module/src/test/test/StoreRemote.java index 95dea1bd327..a7c14138aae 100644 --- a/test/jdk/javax/naming/module/src/test/test/StoreRemote.java +++ b/test/jdk/javax/naming/module/src/test/test/StoreRemote.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2018, 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,11 +40,17 @@ import org.example.hello.*; public class StoreRemote { + static { + final PrintStream out = new PrintStream(System.out, true); + final PrintStream err = new PrintStream(System.err, true); + + System.setOut(out); + System.setErr(err); + } + // LDAP capture file private static final String LDAP_CAPTURE_FILE = System.getProperty("test.src") + "/src/test/test/StoreRemote.ldap"; - // LDAPServer socket - private static ServerSocket serverSocket; public static void main(String[] args) throws Exception { @@ -67,77 +73,79 @@ public class StoreRemote { * Launch the LDAP server with the StoreRemote.ldap capture file */ - serverSocket = new ServerSocket(0); - new Thread(new Runnable() { - @Override - public void run() { - try { - new LDAPServer(serverSocket, LDAP_CAPTURE_FILE); - } catch (Exception e) { - System.out.println("ERROR: unable to launch LDAP server"); - e.printStackTrace(); - } + try (ServerSocket serverSocket = new ServerSocket()){ + serverSocket.bind(new InetSocketAddress(InetAddress.getLoopbackAddress(), 0)); + new Thread(new Runnable() { + @Override + public void run() { + try { + new LDAPServer(serverSocket, LDAP_CAPTURE_FILE); + } catch (Exception e) { + System.out.println("ERROR: unable to launch LDAP server"); + e.printStackTrace(); + } + } + }).start(); + + /* + * Store a Remote object in the LDAP directory + */ + + Hashtable env = new Hashtable<>(); + env.put(Context.INITIAL_CONTEXT_FACTORY, + "com.sun.jndi.ldap.LdapCtxFactory"); + URI ldapUri = new URI(args[0]); + if (ldapUri.getPort() == -1) { + ldapUri = new URI(ldapUri.getScheme(), null, ldapUri.getHost(), + serverSocket.getLocalPort(), ldapUri.getPath(), null, null); + } + env.put(Context.PROVIDER_URL, ldapUri.toString()); + if (args[args.length - 1].equalsIgnoreCase("-trace")) { + env.put("com.sun.jndi.ldap.trace.ber", System.out); } - }).start(); - /* - * Store a Remote object in the LDAP directory - */ + System.out.println("StoreRemote: connecting to " + ldapUri); + DirContext ctx = new InitialDirContext(env); + String dn = "cn=myremote"; - Hashtable env = new Hashtable<>(); - env.put(Context.INITIAL_CONTEXT_FACTORY, - "com.sun.jndi.ldap.LdapCtxFactory"); - URI ldapUri = new URI(args[0]); - if (ldapUri.getPort() == -1) { - ldapUri = new URI(ldapUri.getScheme(), null, ldapUri.getHost(), - serverSocket.getLocalPort(), ldapUri.getPath(), null, null); - } - env.put(Context.PROVIDER_URL, ldapUri.toString()); - if (args[args.length - 1].equalsIgnoreCase("-trace")) { - env.put("com.sun.jndi.ldap.trace.ber", System.out); - } + try { + Hello hello = new HelloImpl(); + ctx.bind(dn, hello); + System.out.println("StoreRemote: created entry '" + dn + "'"); - System.out.println("StoreRemote: connecting to " + ldapUri); - DirContext ctx = new InitialDirContext(env); - String dn = "cn=myremote"; + // Explicitly release the RMI object + UnicastRemoteObject.unexportObject(hello, true); - try { - Hello hello = new HelloImpl(); - ctx.bind(dn, hello); - System.out.println("StoreRemote: created entry '" + dn + "'"); + } catch (NameAlreadyBoundException e) { + System.err.println("StoreRemote: entry '" + dn + + "' already exists"); + cleanup(ctx, (String)null); + return; + } - // Explicitly release the RMI object - UnicastRemoteObject.unexportObject(hello, true); + /* + * Retrieve the Remote object from the LDAP directory + */ - } catch (NameAlreadyBoundException e) { - System.err.println("StoreRemote: entry '" + dn + - "' already exists"); - cleanup(ctx, (String)null); - return; - } + try { + Hello obj = (Hello) ctx.lookup(dn); + System.out.println("StoreRemote: retrieved object: " + obj); + System.out.println("StoreRemote: calling Hello.sayHello()...\n" + + obj.sayHello()); - /* - * Retrieve the Remote object from the LDAP directory - */ + // Explicitly release the RMI object + UnicastRemoteObject.unexportObject(obj, true); - try { - Hello obj = (Hello) ctx.lookup(dn); - System.out.println("StoreRemote: retrieved object: " + obj); - System.out.println("StoreRemote: calling Hello.sayHello()...\n" + - obj.sayHello()); + } catch (NamingException e) { + System.err.println("StoreRemote: error retrieving entry '" + + dn + "' " + e); + e.printStackTrace(); + cleanup(ctx, dn); + return; + } - // Explicitly release the RMI object - UnicastRemoteObject.unexportObject(obj, true); - - } catch (NamingException e) { - System.err.println("StoreRemote: error retrieving entry '" + - dn + "' " + e); - e.printStackTrace(); cleanup(ctx, dn); - return; } - - cleanup(ctx, dn); } /* From 1ac444ad878dfbe68a3de6c4479feb3516503809 Mon Sep 17 00:00:00 2001 From: Chris Hegarty Date: Tue, 9 Oct 2018 13:31:50 +0100 Subject: [PATCH 043/124] 8211902: broken link in java.net.http.WebSocket.Builder Reviewed-by: alanb, dfuchs --- src/java.net.http/share/classes/java/net/http/WebSocket.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/java.net.http/share/classes/java/net/http/WebSocket.java b/src/java.net.http/share/classes/java/net/http/WebSocket.java index d76e48bee72..9833ba5edc4 100644 --- a/src/java.net.http/share/classes/java/net/http/WebSocket.java +++ b/src/java.net.http/share/classes/java/net/http/WebSocket.java @@ -197,9 +197,9 @@ public interface WebSocket { *
  • {@link SecurityException} - * if a security manager has been installed and it denies * {@link java.net.URLPermission access} to {@code uri}. - * Security checks + * Security checks * contains more information relating to the security context - * in which the the listener is invoked. + * in which the listener is invoked. *
  • {@link IllegalArgumentException} - * if any of the arguments of this builder's methods are * illegal From 02a3be9920116b063a6de3ef09cfad18db4a2a59 Mon Sep 17 00:00:00 2001 From: Claes Redestad Date: Tue, 9 Oct 2018 14:30:06 +0200 Subject: [PATCH 044/124] 8211859: Avoid initializing AtomicBoolean from RandomAccessFile Reviewed-by: alanb --- .../classes/java/io/RandomAccessFile.java | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/java.base/share/classes/java/io/RandomAccessFile.java b/src/java.base/share/classes/java/io/RandomAccessFile.java index 55abd462ce8..73b534bf2f9 100644 --- a/src/java.base/share/classes/java/io/RandomAccessFile.java +++ b/src/java.base/share/classes/java/io/RandomAccessFile.java @@ -71,7 +71,9 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable { */ private final String path; - private final AtomicBoolean closed = new AtomicBoolean(false); + private final Object closeLock = new Object(); + + private volatile boolean closed; private static final int O_RDONLY = 1; private static final int O_RDWR = 2; @@ -301,7 +303,7 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable { if (fc == null) { this.channel = fc = FileChannelImpl.open(fd, path, true, rw, false, this); - if (closed.get()) { + if (closed) { try { fc.close(); } catch (IOException ioe) { @@ -638,14 +640,21 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable { * @spec JSR-51 */ public void close() throws IOException { - if (!closed.compareAndSet(false, true)) { - // if compareAndSet() returns false closed was already true + if (closed) { return; } + synchronized (closeLock) { + if (closed) { + return; + } + closed = true; + } FileChannel fc = channel; if (fc != null) { - fc.close(); + // possible race with getChannel(), benign since + // FileChannel.close is final and idempotent + fc.close(); } fd.closeAll(new Closeable() { From a6cbbcf3348f06ea617f3ff7bf33189682c881ec Mon Sep 17 00:00:00 2001 From: Gunter Haug Date: Tue, 9 Oct 2018 15:06:27 +0200 Subject: [PATCH 045/124] 8211768: [s390] Implement JFR profiling Reviewed-by: simonis, mdoerr --- src/hotspot/cpu/s390/frame_s390.cpp | 135 +++++++++++++++++- src/hotspot/cpu/s390/frame_s390.hpp | 5 +- src/hotspot/cpu/s390/frame_s390.inline.hpp | 7 +- .../os_cpu/linux_s390/thread_linux_s390.cpp | 47 +++++- 4 files changed, 182 insertions(+), 12 deletions(-) diff --git a/src/hotspot/cpu/s390/frame_s390.cpp b/src/hotspot/cpu/s390/frame_s390.cpp index 9ba85eb0669..95b0d7fd98c 100644 --- a/src/hotspot/cpu/s390/frame_s390.cpp +++ b/src/hotspot/cpu/s390/frame_s390.cpp @@ -53,14 +53,135 @@ void RegisterMap::check_location_valid() { bool frame::safe_for_sender(JavaThread *thread) { bool safe = false; - address cursp = (address)sp(); - address curfp = (address)fp(); - if ((cursp != NULL && curfp != NULL && - (cursp <= thread->stack_base() && cursp >= thread->stack_base() - thread->stack_size())) && - (curfp <= thread->stack_base() && curfp >= thread->stack_base() - thread->stack_size())) { - safe = true; + address sp = (address)_sp; + address fp = (address)_fp; + address unextended_sp = (address)_unextended_sp; + + // Consider stack guards when trying to determine "safe" stack pointers + static size_t stack_guard_size = os::uses_stack_guard_pages() ? + JavaThread::stack_red_zone_size() + JavaThread::stack_yellow_reserved_zone_size() : 0; + size_t usable_stack_size = thread->stack_size() - stack_guard_size; + + // sp must be within the usable part of the stack (not in guards) + bool sp_safe = (sp < thread->stack_base()) && + (sp >= thread->stack_base() - usable_stack_size); + + + if (!sp_safe) { + return false; } - return safe; + + // Unextended sp must be within the stack + bool unextended_sp_safe = (unextended_sp < thread->stack_base()); + + if (!unextended_sp_safe) { + return false; + } + + // An fp must be within the stack and above (but not equal) sp. + bool fp_safe = (fp <= thread->stack_base()) && (fp > sp); + // An interpreter fp must be within the stack and above (but not equal) sp. + // Moreover, it must be at least the size of the z_ijava_state structure. + bool fp_interp_safe = (fp <= thread->stack_base()) && (fp > sp) && + ((fp - sp) >= z_ijava_state_size); + + // We know sp/unextended_sp are safe, only fp is questionable here + + // If the current frame is known to the code cache then we can attempt to + // to construct the sender and do some validation of it. This goes a long way + // toward eliminating issues when we get in frame construction code + + if (_cb != NULL ) { + // Entry frame checks + if (is_entry_frame()) { + // An entry frame must have a valid fp. + return fp_safe && is_entry_frame_valid(thread); + } + + // Now check if the frame is complete and the test is + // reliable. Unfortunately we can only check frame completeness for + // runtime stubs. Other generic buffer blobs are more + // problematic so we just assume they are OK. Adapter blobs never have a + // complete frame and are never OK. nmethods should be OK on s390. + if (!_cb->is_frame_complete_at(_pc)) { + if (_cb->is_adapter_blob() || _cb->is_runtime_stub()) { + return false; + } + } + + // Could just be some random pointer within the codeBlob. + if (!_cb->code_contains(_pc)) { + return false; + } + + if (is_interpreted_frame() && !fp_interp_safe) { + return false; + } + + z_abi_160* sender_abi = (z_abi_160*) fp; + intptr_t* sender_sp = (intptr_t*) sender_abi->callers_sp; + address sender_pc = (address) sender_abi->return_pc; + + // We must always be able to find a recognizable pc. + CodeBlob* sender_blob = CodeCache::find_blob_unsafe(sender_pc); + if (sender_blob == NULL) { + return false; + } + + // Could be a zombie method + if (sender_blob->is_zombie() || sender_blob->is_unloaded()) { + return false; + } + + // It should be safe to construct the sender though it might not be valid. + + frame sender(sender_sp, sender_pc); + + // Do we have a valid fp? + address sender_fp = (address) sender.fp(); + + // sender_fp must be within the stack and above (but not + // equal) current frame's fp. + if (sender_fp > thread->stack_base() || sender_fp <= fp) { + return false; + } + + // If the potential sender is the interpreter then we can do some more checking. + if (Interpreter::contains(sender_pc)) { + return sender.is_interpreted_frame_valid(thread); + } + + // Could just be some random pointer within the codeBlob. + if (!sender.cb()->code_contains(sender_pc)) { + return false; + } + + // We should never be able to see an adapter if the current frame is something from code cache. + if (sender_blob->is_adapter_blob()) { + return false; + } + + if (sender.is_entry_frame()) { + return sender.is_entry_frame_valid(thread); + } + + // Frame size is always greater than zero. If the sender frame size is zero or less, + // something is really weird and we better give up. + if (sender_blob->frame_size() <= 0) { + return false; + } + + return true; + } + + // Must be native-compiled frame. Since sender will try and use fp to find + // linkages it must be safe + + if (!fp_safe) { + return false; + } + + return true; } bool frame::is_interpreted_frame() const { diff --git a/src/hotspot/cpu/s390/frame_s390.hpp b/src/hotspot/cpu/s390/frame_s390.hpp index 22049107153..e7312676c7f 100644 --- a/src/hotspot/cpu/s390/frame_s390.hpp +++ b/src/hotspot/cpu/s390/frame_s390.hpp @@ -491,9 +491,12 @@ static int interpreter_frame_interpreterstate_size_in_bytes(); static int interpreter_frame_monitor_size_in_bytes(); - private: // template interpreter state + inline z_ijava_state* ijava_state_unchecked() const; + + private: + inline z_ijava_state* ijava_state() const; // Where z_ijava_state.monitors is saved. diff --git a/src/hotspot/cpu/s390/frame_s390.inline.hpp b/src/hotspot/cpu/s390/frame_s390.inline.hpp index 55cf4c33b78..6cfee055314 100644 --- a/src/hotspot/cpu/s390/frame_s390.inline.hpp +++ b/src/hotspot/cpu/s390/frame_s390.inline.hpp @@ -77,8 +77,13 @@ inline frame::frame(void* sp, void* pc, void* unextended_sp) : #endif // template interpreter state -inline frame::z_ijava_state* frame::ijava_state() const { +inline frame::z_ijava_state* frame::ijava_state_unchecked() const { z_ijava_state* state = (z_ijava_state*) ((uintptr_t)fp() - z_ijava_state_size); + return state; +} + +inline frame::z_ijava_state* frame::ijava_state() const { + z_ijava_state* state = ijava_state_unchecked(); assert(state->magic == (intptr_t) frame::z_istate_magic_number, "wrong z_ijava_state in interpreter frame (no magic found)"); return state; diff --git a/src/hotspot/os_cpu/linux_s390/thread_linux_s390.cpp b/src/hotspot/os_cpu/linux_s390/thread_linux_s390.cpp index 549c0444bf9..836738f197e 100644 --- a/src/hotspot/os_cpu/linux_s390/thread_linux_s390.cpp +++ b/src/hotspot/os_cpu/linux_s390/thread_linux_s390.cpp @@ -42,10 +42,51 @@ frame JavaThread::pd_last_frame() { } bool JavaThread::pd_get_top_frame_for_profiling(frame* fr_addr, void* ucontext, bool isInJava) { - ucontext_t* uc = (ucontext_t*) ucontext; - *fr_addr = frame((intptr_t*)uc->uc_mcontext.gregs[15/*REG_SP*/], + assert(this->is_Java_thread(), "must be JavaThread"); + + // If we have a last_Java_frame, then we should use it even if + // isInJava == true. It should be more reliable than ucontext info. + if (has_last_Java_frame() && frame_anchor()->walkable()) { + *fr_addr = pd_last_frame(); + return true; + } + + if (isInJava) { + ucontext_t* uc = (ucontext_t*) ucontext; + frame ret_frame((intptr_t*)uc->uc_mcontext.gregs[15/*Z_SP*/], (address)uc->uc_mcontext.psw.addr); - return true; + + if (ret_frame.pc() == NULL) { + // ucontext wasn't useful + return false; + } + + if (ret_frame.is_interpreted_frame()) { + frame::z_ijava_state* istate = ret_frame.ijava_state_unchecked(); + if (!((Method*)(istate->method))->is_metaspace_object()) { + return false; + } + uint64_t reg_bcp = uc->uc_mcontext.gregs[13/*Z_BCP*/]; + uint64_t istate_bcp = istate->bcp; + uint64_t code_start = (uint64_t)(((Method*)(istate->method))->code_base()); + uint64_t code_end = (uint64_t)(((Method*)istate->method)->code_base() + ((Method*)istate->method)->code_size()); + if (istate_bcp >= code_start && istate_bcp < code_end) { + // we have a valid bcp, don't touch it, do nothing + } else if (reg_bcp >= code_start && reg_bcp < code_end) { + istate->bcp = reg_bcp; + } else { + return false; + } + } + if (!ret_frame.safe_for_sender(this)) { + // nothing else to try if the frame isn't good + return false; + } + *fr_addr = ret_frame; + return true; + } + // nothing else to try + return false; } // Forte Analyzer AsyncGetCallTrace profiling support is not implemented on Linux/S390x. From 182a991df26e19f73aa8e2f7af2c1416f005c1d6 Mon Sep 17 00:00:00 2001 From: Goetz Lindenmaier Date: Tue, 9 Oct 2018 16:03:56 +0200 Subject: [PATCH 046/124] 8211856: [ppc, s390] ProblemList some failing tests Reviewed-by: kvn, mdoerr --- test/hotspot/jtreg/ProblemList.txt | 42 ++++++++++++++++-------------- test/jdk/ProblemList.txt | 10 ++++++- 2 files changed, 31 insertions(+), 21 deletions(-) diff --git a/test/hotspot/jtreg/ProblemList.txt b/test/hotspot/jtreg/ProblemList.txt index a9014d2c266..7f11e087980 100644 --- a/test/hotspot/jtreg/ProblemList.txt +++ b/test/hotspot/jtreg/ProblemList.txt @@ -59,6 +59,8 @@ applications/ctw/modules/jdk_jconsole.java 8189604 windows-all compiler/cpuflags/TestAESIntrinsicsOnSupportedConfig.java 8190680 generic-all +compiler/runtime/Test8168712.java 8211769,8211771 generic-ppc64,generic-ppc64le,linux-s390x + ############################################################################# # :hotspot_gc @@ -91,50 +93,50 @@ runtime/SharedArchiveFile/SASymbolTableTest.java 8193639 solaris-all serviceability/sa/ClhsdbAttach.java 8193639 solaris-all serviceability/sa/ClhsdbCDSCore.java 8193639 solaris-all -serviceability/sa/ClhsdbCDSJstackPrintAll.java 8193639 solaris-all +serviceability/sa/ClhsdbCDSJstackPrintAll.java 8193639,8211767 solaris-all,linux-ppc64le,linux-ppc64 serviceability/sa/CDSJMapClstats.java 8193639 solaris-all serviceability/sa/ClhsdbField.java 8193639 solaris-all -serviceability/sa/ClhsdbFindPC.java 8193639 solaris-all +serviceability/sa/ClhsdbFindPC.java 8193639,8211767 solaris-all,linux-ppc64le,linux-ppc64 serviceability/sa/ClhsdbFlags.java 8193639 solaris-all -serviceability/sa/ClhsdbInspect.java 8193639 solaris-all -serviceability/sa/ClhsdbJdis.java 8193639 solaris-all -serviceability/sa/ClhsdbJhisto.java 8193639 solaris-all -serviceability/sa/ClhsdbJstack.java 8193639 solaris-all +serviceability/sa/ClhsdbInspect.java 8193639,8211767 solaris-all,linux-ppc64le,linux-ppc64 +serviceability/sa/ClhsdbJdis.java 8193639,8211767 solaris-all,linux-ppc64le,linux-ppc64 +serviceability/sa/ClhsdbJhisto.java 8193639,8211767 solaris-all,linux-ppc64le,linux-ppc64 +serviceability/sa/ClhsdbJstack.java 8193639,8211767 solaris-all,linux-ppc64le,linux-ppc64 serviceability/sa/ClhsdbLongConstant.java 8193639 solaris-all -serviceability/sa/ClhsdbPmap.java 8193639 solaris-all +serviceability/sa/ClhsdbPmap.java 8193639,8211767 solaris-all,linux-ppc64le,linux-ppc64 serviceability/sa/ClhsdbPrintAll.java 8193639 solaris-all -serviceability/sa/ClhsdbPrintAs.java 8193639 solaris-all +serviceability/sa/ClhsdbPrintAs.java 8193639,8211767 solaris-all,linux-ppc64le,linux-ppc64 serviceability/sa/ClhsdbPrintStatics.java 8193639 solaris-all -serviceability/sa/ClhsdbPstack.java 8193639 solaris-all +serviceability/sa/ClhsdbPstack.java 8193639,8211767 solaris-all,linux-ppc64le,linux-ppc64 serviceability/sa/ClhsdbRegionDetailsScanOopsForG1.java 8193639 solaris-all -serviceability/sa/ClhsdbScanOops.java 8193639 solaris-all -serviceability/sa/ClhsdbSource.java 8193639 solaris-all +serviceability/sa/ClhsdbScanOops.java 8193639,8211767 solaris-all,linux-ppc64le,linux-ppc64 +serviceability/sa/ClhsdbSource.java 8193639,8211767 solaris-all,linux-ppc64le,linux-ppc64 serviceability/sa/ClhsdbSymbol.java 8193639 solaris-all serviceability/sa/ClhsdbSymbolTable.java 8193639 solaris-all -serviceability/sa/ClhsdbThread.java 8193639 solaris-all +serviceability/sa/ClhsdbThread.java 8193639,8211767 solaris-all,linux-ppc64le,linux-ppc64 serviceability/sa/ClhsdbVmStructsDump.java 8193639 solaris-all -serviceability/sa/ClhsdbWhere.java 8193639 solaris-all -serviceability/sa/DeadlockDetectionTest.java 8193639 solaris-all -serviceability/sa/JhsdbThreadInfoTest.java 8193639 solaris-all +serviceability/sa/ClhsdbWhere.java 8193639,8211767 solaris-all,linux-ppc64le,linux-ppc64 +serviceability/sa/DeadlockDetectionTest.java 8193639,8211767 solaris-all,linux-ppc64le,linux-ppc64 +serviceability/sa/JhsdbThreadInfoTest.java 8193639,8211767 solaris-all,linux-ppc64le,linux-ppc64 serviceability/sa/jmap-hprof/JMapHProfLargeHeapTest.java 8193639 solaris-all serviceability/sa/sadebugd/SADebugDTest.java 8163805 generic-all serviceability/sa/TestClassDump.java 8193639 solaris-all -serviceability/sa/TestClhsdbJstackLock.java 8193639 solaris-all -serviceability/sa/TestCpoolForInvokeDynamic.java 8193639 solaris-all +serviceability/sa/TestClhsdbJstackLock.java 8193639,8211767 solaris-all,linux-ppc64le,linux-ppc64 +serviceability/sa/TestCpoolForInvokeDynamic.java 8193639,8211767 solaris-all,linux-ppc64le,linux-ppc64 serviceability/sa/TestDefaultMethods.java 8193639 solaris-all serviceability/sa/TestG1HeapRegion.java 8193639 solaris-all serviceability/sa/TestHeapDumpForInvokeDynamic.java 8193639 solaris-all serviceability/sa/TestHeapDumpForLargeArray.java 8193639 solaris-all serviceability/sa/TestInstanceKlassSize.java 8193639 solaris-all serviceability/sa/TestInstanceKlassSizeForInterface.java 8193639 solaris-all -serviceability/sa/TestIntConstant.java 8193639 solaris-all -serviceability/sa/TestJhsdbJstackLock.java 8193639 solaris-all +serviceability/sa/TestIntConstant.java 8193639,8211767 solaris-all,linux-ppc64le,linux-ppc64 +serviceability/sa/TestJhsdbJstackLock.java 8193639,8211767 solaris-all,linux-ppc64le,linux-ppc64 serviceability/sa/TestJmapCore.java 8193639 solaris-all serviceability/sa/TestJmapCoreMetaspace.java 8193639 solaris-all serviceability/sa/TestPrintMdo.java 8193639 solaris-all serviceability/sa/TestRevPtrsForInvokeDynamic.java 8191270 generic-all serviceability/sa/TestType.java 8193639 solaris-all -serviceability/sa/TestUniverse.java#id0 8193639 solaris-all +serviceability/sa/TestUniverse.java#id0 8193639,8211767 solaris-all,linux-ppc64le,linux-ppc64 ############################################################################# diff --git a/test/jdk/ProblemList.txt b/test/jdk/ProblemList.txt index 91fe51f3600..d5bd1ef73f2 100644 --- a/test/jdk/ProblemList.txt +++ b/test/jdk/ProblemList.txt @@ -508,6 +508,8 @@ java/beans/XMLEncoder/Test6570354.java 8015593 macosx-all # jdk_lang java/lang/StringCoding/CheckEncodings.sh 7008363 generic-all +java/lang/ProcessBuilder/PipelineTest.java 8211844 aix-ppc64 +java/lang/ProcessHandle/InfoTest.java 8211847 aix-ppc64 ############################################################################ @@ -556,6 +558,8 @@ java/net/MulticastSocket/SetGetNetworkInterfaceTest.java 8207404 aix-all java/net/DatagramSocket/SendDatagramToBadAddress.java 7143960 macosx-all +java/net/ServerSocket/AcceptInheritHandle.java 8211854 aix-ppc64 + ############################################################################ # jdk_nio @@ -564,6 +568,8 @@ java/nio/Buffer/EqualsCompareTest.java 8193917 solaris- java/nio/channels/DatagramChannel/ChangingAddress.java 7141822 macosx-all +java/nio/channels/AsynchronousSocketChannel/StressLoopback.java 8211851 aix-ppc64 + java/nio/channels/Selector/Wakeup.java 6963118 windows-all java/nio/file/WatchService/Basic.java 7158947 solaris-all Solaris 11 @@ -571,6 +577,8 @@ java/nio/file/WatchService/MayFlies.java 7158947 solaris- java/nio/file/WatchService/LotsOfCancels.java 8188039 solaris-all Solaris 11 java/nio/file/WatchService/LotsOfEvents.java 7158947 solaris-all Solaris 11 +sun/nio/cs/OLD/TestIBMDB.java 8211841 aix-ppc64 + ############################################################################ # jdk_rmi @@ -852,7 +860,7 @@ com/sun/jdi/NashornPopFrameTest.java 8187143 generic- # svc_tools sun/tools/jstat/jstatClassloadOutput1.sh 8173942 generic-all -sun/tools/jhsdb/BasicLauncherTest.java 8193639 solaris-all +sun/tools/jhsdb/BasicLauncherTest.java 8193639,8211767 solaris-all,linux-ppc64,linux-ppc64le sun/tools/jhsdb/HeapDumpTest.java 8193639 solaris-all From 7b7315dbeddb37bb882f7d829af13912d3e841cf Mon Sep 17 00:00:00 2001 From: Gary Adams Date: Mon, 8 Oct 2018 14:57:07 -0400 Subject: [PATCH 047/124] 8201603: MonitorContendedEnter failure in nsk/jvmti/scenarios/contention/TC02/tc02t001 Reviewed-by: cjplummer --- .../nsk/jvmti/scenarios/contention/TC02/tc02t001.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/contention/TC02/tc02t001.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/contention/TC02/tc02t001.java index c4f24d73bfc..b3174091303 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/contention/TC02/tc02t001.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/contention/TC02/tc02t001.java @@ -71,7 +71,7 @@ public class tc02t001 extends DebugeeClass { thread.waitingBarrier1.unlock(); try { - Thread.sleep(100); + Thread.sleep(1000); // Wait for contended "synchronized (M)" thread.M.wait(timeout); } catch (InterruptedException e) { throw new Failure(e); @@ -79,7 +79,7 @@ public class tc02t001 extends DebugeeClass { thread.waitingBarrier2.unlock(); try { - Thread.sleep(100); + Thread.sleep(1000); // Wait for contended "synchronized (M)" thread.M.wait(timeout); } catch (InterruptedException e) { throw new Failure(e); @@ -87,7 +87,7 @@ public class tc02t001 extends DebugeeClass { thread.waitingBarrier3.unlock(); try { - Thread.sleep(100); + Thread.sleep(1000); // Wait for contended "synchronized (M)" thread.M.wait(timeout); } catch (InterruptedException e) { throw new Failure(e); From fe3bd4703e876d26290b9a484c66b4cd37515eb7 Mon Sep 17 00:00:00 2001 From: Roman Kennke Date: Fri, 5 Oct 2018 23:45:02 +0200 Subject: [PATCH 048/124] 8211792: Fix misplaced BarrierSet forward declarations Reviewed-by: shade, zgu --- src/hotspot/share/interpreter/templateTable.hpp | 1 + src/hotspot/share/oops/oop.hpp | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hotspot/share/interpreter/templateTable.hpp b/src/hotspot/share/interpreter/templateTable.hpp index 695be6e395b..dc23da6c17c 100644 --- a/src/hotspot/share/interpreter/templateTable.hpp +++ b/src/hotspot/share/interpreter/templateTable.hpp @@ -36,6 +36,7 @@ // and the snippet generator, a template is assigned to each bytecode which can be // used to generate the bytecode's implementation if needed. +class BarrierSet; class InterpreterMacroAssembler; // A Template describes the properties of a code template for a given bytecode diff --git a/src/hotspot/share/oops/oop.hpp b/src/hotspot/share/oops/oop.hpp index 0e57e46d29c..d456dd92ae4 100644 --- a/src/hotspot/share/oops/oop.hpp +++ b/src/hotspot/share/oops/oop.hpp @@ -46,7 +46,6 @@ class OopClosure; class ScanClosure; class FastScanClosure; class FilteringClosure; -class BarrierSet; class CMSIsAliveClosure; class PSPromotionManager; From 8891582e9f8d533edf410a14866e7e380ee5d064 Mon Sep 17 00:00:00 2001 From: Alex Menkov Date: Tue, 9 Oct 2018 12:26:29 -0700 Subject: [PATCH 049/124] 8211292: [TEST] convert com/sun/jdi/DeferredStepTest.sh test Reviewed-by: sspitsyn, jcbeyler --- test/jdk/com/sun/jdi/DeferredStepTest.java | 180 +++ test/jdk/com/sun/jdi/DeferredStepTest.sh | 183 --- test/jdk/com/sun/jdi/ShellScaffold.sh | 1221 -------------------- test/jdk/com/sun/jdi/ZZZcleanup.sh | 56 - 4 files changed, 180 insertions(+), 1460 deletions(-) create mode 100644 test/jdk/com/sun/jdi/DeferredStepTest.java delete mode 100644 test/jdk/com/sun/jdi/DeferredStepTest.sh delete mode 100644 test/jdk/com/sun/jdi/ShellScaffold.sh delete mode 100644 test/jdk/com/sun/jdi/ZZZcleanup.sh diff --git a/test/jdk/com/sun/jdi/DeferredStepTest.java b/test/jdk/com/sun/jdi/DeferredStepTest.java new file mode 100644 index 00000000000..a78f7ee8686 --- /dev/null +++ b/test/jdk/com/sun/jdi/DeferredStepTest.java @@ -0,0 +1,180 @@ +/* + * Copyright (c) 2002, 2018, 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. + * + * 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 4629548 + * @summary Deferred StepRequests are lost in multithreaded debuggee + * @comment converted from test/jdk/com/sun/jdi/DeferredStepTest.sh + * + * @library /test/lib + * @build DeferredStepTest + * @run main/othervm DeferredStepTest + */ + +import jdk.test.lib.Asserts; +import jdk.test.lib.Utils; +import lib.jdb.JdbCommand; +import lib.jdb.JdbTest; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import java.util.stream.Collectors; + +class DeferredStepTestTarg { + static class jj1 implements Runnable { + public void run() { + int count = 0; + + for ( int ii = 0; ii < 10; ii++) { + int intInPotato04 = 666; + ++count; // @1 breakpoint + System.out.println("Thread: " + Thread.currentThread().getName()); + } + } + } + + static class jj2 implements Runnable { + public void run() { + int count2 = 0; + + for (int ii = 0; ii < 10; ii++) { + String StringInPotato05 = "I am"; + ++count2; // @2 breakpoint + System.out.println("Thread: " + Thread.currentThread().getName()); + } + } + } + + public static void main(String argv[]) { + System.out.println("Version = " + System.getProperty("java.version")); + + jj1 obj1 = new jj1(); + jj2 obj2 = new jj2(); + new Thread(obj1, "jj1").start(); + new Thread(obj2, "jj2").start(); + } +} + +public class DeferredStepTest extends JdbTest { + public static void main(String argv[]) { + new DeferredStepTest().run(); + } + + private DeferredStepTest() { + super(DeferredStepTestTarg.class.getName()); + } + + private static class ThreadData { + int lastLine = -1; // line of the last stop + int minLine = -1; // min line (-1 means "not known yet") + int maxLine = -1; // max line (-1 means "not known yet") + } + + private Map threadData = new HashMap<>(); + + private Pattern threadRegexp = Pattern.compile("^(.+)\\[\\d+\\].*"); + private Pattern lineRegexp = Pattern.compile("^(\\d+)\\b.*", Pattern.MULTILINE); + + // returns the 1st group of the pattern. + private String parse(Pattern p, String input) { + Matcher m = p.matcher(input); + if (!m.find()) { + throw new RuntimeException("Input '" + input + "' does not matches '" + p.pattern() + "'"); + } + return m.group(1); + } + + private void next() { + List reply = jdb.command(JdbCommand.next()); + /* + * Each "next" produces something like ("Breakpoint hit" line only if the line has BP) + * Step completed: + * Breakpoint hit: "thread=jj2", DeferredStepTestTarg$jj2.run(), line=74 bci=12 + * 74 ++count2; // @2 breakpoint + * + * jj2[1] + */ + // detect thread from the last line + String lastLine = reply.get(reply.size() - 1); + String threadName = parse(threadRegexp, lastLine); + String wholeReply = reply.stream().collect(Collectors.joining(Utils.NEW_LINE)); + int lineNum = Integer.parseInt(parse(lineRegexp, wholeReply)); + + System.out.println("got: thread=" + threadName + ", line=" + lineNum); + + ThreadData data = threadData.get(threadName); + if (data == null) { + data = new ThreadData(); + threadData.put(threadName, data); + } + processThreadData(threadName, lineNum, data); + } + + private void processThreadData(String threadName, int lineNum, ThreadData data) { + int lastLine = data.lastLine; + data.lastLine = lineNum; + if (lastLine < 0) { + // the 1st stop in the thread + return; + } + if (lineNum == lastLine + 1) { + // expected. + return; + } + if (lineNum < lastLine) { + // looks like step to the beginning of the cycle + if (data.minLine > 0) { + // minLine and maxLine are not set - verify + Asserts.assertEquals(lineNum, data.minLine, threadName + " - minLine"); + Asserts.assertEquals(lastLine, data.maxLine, threadName + " - maxLine"); + } else { + // set minLine/maxLine + data.minLine = lineNum; + data.maxLine = lastLine; + } + return; + } + throw new RuntimeException(threadName + " (line " + lineNum + ") - unexpected." + + " lastLine=" + lastLine + ", minLine=" + data.minLine + ", maxLine=" + data.maxLine); + } + + @Override + protected void runCases() { + setBreakpoints(jdb, DeferredStepTestTarg.jj1.class.getName(), + getTestSourcePath("DeferredStepTest.java"), 1); + setBreakpoints(jdb, DeferredStepTestTarg.jj2.class.getName(), + getTestSourcePath("DeferredStepTest.java"), 2); + + // Run to breakpoint #1 + jdb.command(JdbCommand.run()); + + // 2 cycles with 4 lines each - maximum 80 stops + for (int i=0; i<50; i++) { + next(); + } + } +} diff --git a/test/jdk/com/sun/jdi/DeferredStepTest.sh b/test/jdk/com/sun/jdi/DeferredStepTest.sh deleted file mode 100644 index 82e97ff19b9..00000000000 --- a/test/jdk/com/sun/jdi/DeferredStepTest.sh +++ /dev/null @@ -1,183 +0,0 @@ -#!/bin/sh - -# -# Copyright (c) 2002, 2014, 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. -# -# 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 -# This is a manual test. The script isn't smart enough -# to detect the correct ordering of the output since it -# is produced by multiple threads and can be interleaved -# in many different ways. -# -# @bug 4629548 -# @summary Deferred StepRequests are lost in multithreaded debuggee -# @author Jim Holmlund -# -# @run shell/manual DeferredStepTest.sh - -# Run this script to see the bug. See comments at the end -# of the .java file for info on what the bug looks like. - -# These are variables that can be set to control execution - -#pkg=untitled7 -classname=DeferredStepTest -#compileOptions=-g -#java=java_g -#mode=-Xcomp - -createJavaFile() -{ - cat < $classname.java.1 -public class $classname { - static class jj1 implements Runnable { - public void run() { - int count = 0; - - for ( int ii = 0; ii < 10; ii++) { // line 6 - int intInPotato04 = 666; // line 7 - ++count; // line 8; @1 breakpoint - System.out.println("Thread: " + Thread.currentThread().getName()); // line 9 - } - } - } - - static class jj2 implements Runnable { - public void run() { - int count2 = 0; - - for (int ii = 0; ii < 10; ii++) { // line 18 - String StringInPotato05 = "I am"; // line 19 - ++count2; // line 20; @1 breakpoint - System.out.println("Thread: " + Thread.currentThread().getName()); // line 21 - } - } - } - - public static void main(String argv[]) { - System.out.println("Version = " + System.getProperty("java.version")); - - jj1 aRP = new jj1(); - jj2 asRP = new jj2(); - new Thread(aRP, "jj1 *").start(); - new Thread(asRP, "jj2 **").start(); -// new Thread(aRP, "jj3 ***").start(); -// new Thread(asRP, "jj4 ****").start(); - } -} - -/**************************** -To see this bug, do this - - jdb DeferredStep - stop at DeferredStepTest$jj1:8 - stop at DeferredStepTest$jj2:20 - run - next - next - : - -********/ - -EOF -} - -#sleepcmd="sleep 2" - -# This is called to feed cmds to jdb. -dojdbCmds() -{ - #set -x - # We can't use setBkpts because it can only set bkpts in one class :-( - #setBkpts @1 - cmd stop at $classname'$jj1:8' - cmd stop at $classname'$jj2:20' - #cmd run; $sleepcmd - runToBkpt @1 - cmd next; $sleepcmd - cmd next; $sleepcmd - cmd next; $sleepcmd - cmd next; $sleepcmd - cmd next; $sleepcmd - cmd next; $sleepcmd - cmd next; $sleepcmd - cmd next; $sleepcmd - cmd next; $sleepcmd - cmd next; $sleepcmd - cmd next; $sleepcmd - cmd next; $sleepcmd - cmd next; $sleepcmd - cmd next; $sleepcmd - cmd next; $sleepcmd -} - -mysetup() -{ - if [ -z "$TESTSRC" ] ; then - TESTSRC=. - fi - - for ii in . $TESTSRC $TESTSRC/.. ; do - if [ -r "$ii/ShellScaffold.sh" ] ; then - . $ii/ShellScaffold.sh - break - fi - done -} - - -# You could replace this next line with the contents -# of ShellScaffold.sh and this script will run just the same. -mysetup - -cat < To use a package, define it here and put -# package $pkg -# in your java file -# classname= Omit this to use the default class name, 'shtest'. - -# compileOptions= compile options for at least the first compile, -# eg, compileOptions=-g -# compileOptions2= Options for the 2nd, ..., compile. compileOptions1 -# is used if this is not set. To use no compile -# options for the 2nd ... compiles, do -# compileOptions2=none -# -# mode=-Xcomp or mode=-Xint to run in these modes. These should not -# really be used since the tests are normally -# run in both modes. -# javacCmd=path-to-javac to use a non-standard javac for compiling -# compileOptions= Options to pass to javac -# -# See RedefineException.sh as an example of a caller script. -# -# To do RedefineClasses operations, embed @1 tags in the .java -# file to tell this script how to modify it to produce the 2nd -# version of the .class file to be used in the redefine operation. -# Here are examples of each editting tag and what change -# it causes in the new file. Note that blanks are not preserved -# in these editing operations. -# -# @1 uncomment -# orig: // @1 uncomment gus = 89; -# new: gus = 89; -# -# @1 commentout -# orig: gus = 89 // @1 commentout -# new: // gus = 89 // @1 commentout -# -# @1 delete -# orig: gus = 89 // @1 delete -# new: entire line deleted -# -# @1 newline -# orig: gus = 89; // @1 newline gus++; -# new: gus = 89; // -# gus++; -# -# @1 replace -# orig: gus = 89; // @1 replace gus = 90; -# new: gus = 90; -# -# The only other tag supported is @1 breakpoint. The setbkpts function -# sets bkpts at all lines that contain this string. -# -# Currently, all these tags are start with @1. It is envisioned that this script -# could be ehanced to allow multiple cycles of redefines by allowing -# @2, @3, ... tags. IE, processing the @i tags in the ith version of -# the file will produce the i+1th version of the file. -# -# There are problem with jtreg leaving behind orphan java and jdb processes -# when this script is run. Sometimes, on some platforms, it just doesn't -# get them all killed properly. -# The solution is to put a magic word in the cmd lines of background java -# and jdb processes this script launches. We can then do the right kind -# of ps cmds to find all these processes and kill them. We do this by -# trapping the completion of this script. -# -# An associated problem is that our trap handler (cleanup) doesn't -# always get called when jtreg terminates a test. This can leave tests -# hanging but following tests should run ok because each test uses -# unique names for the port and temp files (based on the PID returned -# by $$). -# -# mks 6.2a on win 98 presents two problems: -# $! returns the PID as a negative number whereas ps returns -# it in the form 0xFFF.... This means our trick of -# of using $! to get the PIDs of the jdb and debuggee processes -# doesn't work. This will cause some error cases to fail -# with a jtreg timeout instead of failing more gracefully. -# -# There is no form of the ps command that will show the whole -# cmd line. Thus, the magic keyword trick doesn't work. We -# resort to just killing java.exe and jdb.exes -# -# pid usage: -# debuggeepid: used in jdb process to detect if debuggee has died. -# - waitForDebuggeeMsg: fail if debuggee is gone -# -# jdbpid: dofail: used to detect if in main process or jdb process -# waitforfinish: quit if the jdb process is gone - -#killcmd=/bin/kill -killcmd=kill - -# This can be increased if timing seems to be an issue. -sleep_seconds=1 -timeout_factor=1 -if [ -n "$TESTTIMEOUTFACTOR" ] ; then - # convert float value to int - timeout_factor=$(echo $TESTTIMEOUTFACTOR | awk '{printf "%d\n", int($1)}') -fi - -echo "ShellScaffold.sh: Running with timeout_factor = $timeout_factor" >& 2 -topPid=$$ - -# Be careful to echo to >& in these general functions. -# If they are called from the functions that are sending -# cmds to jdb, then stdout is redirected to jdb. -cleanup() -{ - if [ -r "$failFile" ] ; then - ls -l "$failFile" >&2 - echo "" >&2 - cat "$failFile" >&2 - echo "" >&2 - fi - - # Kill all processes that have our special - # keyword in their cmd line. - killOrphans cleanup $jdbKeyword - killOrphans cleanup $debuggeeKeyword -} - -# Kill all processes with $2 in their cmd lines -# Print a msg about this using $1 as the prefix -killOrphans() -{ - str=$2 - - if [ -z "$isCygwin" ] ; then - toBeKilled=`$psCmd | $grep -v grep | $grep -i $str | awk '{print $1}' | tr '\n\r' ' '` - else - # The cygwin ps command doesn't show the options passed to a cmd. - # We will use jps to get the win PID of the command, and - # then use ps to find the cygwin pid to be killed. - # The form of a ps output line is - # ^ ddddd dddd dddd dddd.* - # where the 4th digits are the win pid and the first - # are the cygwin pid. - if [ -r "$jdk/bin/$jstack" ] ; then - winPid=`$jdk/bin/jps -v | $grep -i $str | sed -e 's@ .*@@'` - if [ ! -z "$winPid" ] ; then - # Here is a way to kill using a win cmd and the win PID. - #echo "$1: taskkill /F $winPid" >& 2 - #taskkill /F /PID $winPid - - toBeKilled=`$psCmd | $grep -v grep | \ - $grep '^ +[0-9]+ +[0-9]+ +[0-9]+ +'"$winPid" |\ - awk '{print $1}' | tr '\n\r' ' '` - fi - else - # Well, too bad - we can't find what to kill. - toBeKilled= - fi - fi - - if [ ! -z "$toBeKilled" ] ; then - echo "$1: kill -9 $toBeKilled" >& 2 - kill -9 $toBeKilled - fi -} - -# Returns 0 if $1 is the pid of a running process -findPid() -{ - if [ -z "$1" ] ; then - return 1 - fi - - case "$osname" in - SunOS | AIX) - $psCmd | $grep '^ *'"$1 " > $devnull 2>&1 - res=$? - ;; - Windows* | CYGWIN*) - # Don't use ps on cygwin since it sometimes misses - # some processes (!). - tasklist /NH | $grep " $1 " > $devnull 2>&1 - res=$? - ;; - *) - # Never use plain 'ps', which requires a "controlling terminal" - # and will fail with a "ps: no controlling terminal" error. - # Running under 'rsh' will cause this ps error. - $psCmd -e | $grep '^ *'"$1 " > $devnull 2>&1 - res=$? - ;; - esac - return $res -} - -setup() -{ - failed= - # This is used to tag each java and jdb cmd we issue so - # we can kill them at the end of the run. - - orphanKeyword=HANGINGJAVA-$$ - debuggeeKeyword=${orphanKeyword}_DEB - jdbKeyword=${orphanKeyword}_JDB - baseArgs=-D${debuggeeKeyword} - if [ -z "$TESTCLASSES" ] ; then - echo "--Warning: TESTCLASSES is not defined; using TESTCLASSES=." - echo " You should run: " - echo " runregress $0 -no" - echo " or" - echo " (setenv TESTCLASSES .; $0 $*)" - TESTCLASSES=. - fi - if [ ! -z "$TESTJAVA" ] ; then - jdk="$TESTJAVA" - else - echo "--Error: TESTJAVA must be defined as the pathname of a jdk to test." - exit 1 - fi - - ulimitCmd= - osname=`uname -s` - isCygwin= - case "$osname" in - Windows* | CYGWIN*) - devnull=NUL - case "$osname" in - CYGWIN*) - isCygwin=1 - devnull=/dev/null - ;; - esac - - if [ -r $jdk/bin/dt_shmem.dll ] ; then - transport=dt_shmem - address=kkkk.$$ - else - transport=dt_socket - address= - fi - baseArgs="$baseArgs -XX:-ShowMessageBoxOnError" - # jtreg puts \\s in TESTCLASSES and some uses, eg. echo - # treat them as control chars on mks (eg \t is tab) - # Oops; windows mks really seems to want this cat line - # to start in column 1 - if [ -w "$Temp" ] ; then - tmpFile=$Temp/tmp.$$ - elif [ -w "$TEMP" ] ; then - tmpFile=$TEMP/tmp.$$ - else - tmpFile=tmp.$$ - fi -cat <$tmpFile -$TESTCLASSES -EOF - TESTCLASSES=`cat $tmpFile | sed -e 's@\\\\@/@g'` - rm -f $tmpFile - # on mks - grep=egrep - psCmd=ps - jstack=jstack.exe - ;; - SunOS | Linux | Darwin | AIX) - transport=dt_socket - address= - devnull=/dev/null - grep=egrep - jstack=jstack - # On linux, core files take a long time, and can leave - # zombie processes - if [ "$osname" = SunOS ] ; then - # Experiments show Solaris '/usr/ucb/ps -axwww' and - # '/usr/bin/pgrep -f -l' provide the same small amount of the - # argv string (PRARGSZ=80 in /usr/include/sys/procfs.h) - # 1) This seems to have been working OK in ShellScaffold. - # 2) OpenSolaris does not provide /usr/ucb/ps, so use pgrep - # instead - # The alternative would be to use /usr/bin/pargs [pid] to get - # all the args for a process, splice them back into one - # long string, then grep. - UU=`/usr/xpg4/bin/id -u -n` - psCmd="pgrep -f -l -U $UU" - else - ulimit -c 0 - # See bug 6238593. - psCmd="ps axwww" - fi - ;; - *) - echo "--Error: Unknown result from 'uname -s': $osname" - exit 1 - ;; - esac - - - tmpFileDir=$TESTCLASSES/aa$$ - TESTCLASSES=$tmpFileDir - - mkdir -p $tmpFileDir - - # This must not contain 'jdb' or it shows up - # in grep of ps output for some platforms - jdbOutFile=$tmpFileDir/jxdbOutput.txt - rm -f $jdbOutFile - touch $jdbOutFile - - debuggeeOutFile=$tmpFileDir/debuggeeOutput.txt - failFile=$tmpFileDir/testFailed - debuggeepidFile=$tmpFileDir/debuggeepid - rm -f $failFile $debuggeepidFile - if [ -f "$failFile" ]; then - echo "ERROR: unable to delete existing failFile:" >&2 - ls -l "$failFile" >&2 - fi - - if [ -z "$pkg" ] ; then - pkgSlash= - pkgDot= - redefineSubdir=. - else - pkgSlash=$pkg/ - pkgDot=$pkg. - redefineSubdir=$pkgSlash - fi - if [ -z "$classname" ] ; then - classname=shtest - fi - - if [ -z "$java" ] ; then - java=java - fi - - if [ -z "$jdb" ] ; then - jdb=$jdk/bin/jdb - fi - -####################################################3 -####################################################3 -####################################################3 -####################################################3 -# sol: this gets all processes killed but -# no jstack -# linux same as above -# win mks: No dice; processes still running - trap "cleanup" 0 1 2 3 4 6 9 10 15 - - jdbOptions="$jdbOptions -J-D${jdbKeyword}" -} - -docompile() -{ - if [ "$compile" = 0 ] ; then - return - fi - saveDir=`pwd` - cd $tmpFileDir - rm -f *.java - createJavaFile $classname - - # Compile two versions of the file, the original and with the - # indicated lines modified. - cp $classname.java.1 $classname.java - echo "--Compiling first version of `pwd`/$classname.java with options: $compileOptions" - # Result is in $pkgSlash$classname.class - - if [ -z "$javacCmd" ] ; then - javacCmd=$jdk/bin/javac - fi - - echo "compiling " `ls *.java` - $javacCmd $compileOptions -d . *.java - if [ $? != 0 ] ; then - dofail "First compile failed" - fi - if [ -r vers1 ] ; then - rm -rf vers1 - fi - mkdir -p vers1 - mv *.class vers1 - if [ ! -z "$compileOptions2" ] ; then - if [ "$compileOptions2" = none ] ; then - compileOptions= - else - compileOptions=$compileOptions2 - fi - fi - - while [ 1 = 1 ] ; do - # Not really a loop; just a way to avoid goto - # by using breaks - sed -e '/@1 *delete/ d' \ - -e 's! *// *@1 *uncomment! !' \ - -e 's!\(.*@1 *commentout\)!//\1!' \ - -e 's/@1 *newline/\ - /' \ - -e 's/.*@1 *replace//' \ - $classname.java.1 >$classname.java - - cmp -s $classname.java.1 $classname.java - if [ $? = 0 ] ; then - break - fi - echo - echo "--Compiling second version of `pwd`/$classname.java with $compileOptions" - $javacCmd $compileOptions -d . $classname.java - if [ $? != 0 ] ; then - dofail "Second compile failed" - fi - if [ -r vers2 ] ; then - rm -rf vers2 - fi - mkdir -p vers2 - mv *.class vers2 - mv $classname.java $classname.java.2 - cp $classname.java.1 $classname.java - - ###### Do the same for @2, and @3 allowing 3 redefines to occur. - ###### If I had more time to write sed cmds, I would do - ###### this in a loop. But, I don't think we will ever need - ###### more than 3 redefines. - sed -e '/@2 *delete/ d' \ - -e 's! *// *@2 *uncomment! !' \ - -e 's!\(.*@2 *commentout\)!//\1!' \ - -e 's/@2 *newline/\ - /' \ - -e 's/.*@2 *replace//' \ - $classname.java.2 >$classname.java - cmp -s $classname.java.2 $classname.java - if [ $? = 0 ] ; then - break - fi - echo - echo "--Compiling third version of `pwd`/$classname.java with $compileOptions" - $javacCmd $compileOptions -d . $classname.java - if [ $? != 0 ] ; then - dofail "Third compile failed" - fi - if [ -r vers3 ] ; then - rm -rf vers3 - fi - mkdir -p vers3 - mv *.class vers3 - mv $classname.java $classname.java.3 - cp $classname.java.1 $classname.java - - ######## - sed -e '/@3 *delete/ d' \ - -e 's! *// *@3 *uncomment! !' \ - -e 's!\(.*@3 *commentout\)!//\1!' \ - -e 's/@3 *newline/\ - /' \ - -e 's/.*@3 *replace//' \ - $classname.java.3 >$classname.java - cmp -s $classname.java.3 $classname.java - if [ $? = 0 ] ; then - break - fi - echo - echo "--Compiling fourth version of `pwd`/$classname.java with $compileOptions" - $javacCmd $compileOptions -d . $classname.java - if [ $? != 0 ] ; then - dofail "fourth compile failed" - fi - if [ -r vers4 ] ; then - rm -rf vers4 - fi - mkdir -p vers4 - mv *.class vers4 - mv $classname.java $classname.java.4 - cp $classname.java.1 $classname.java - break - fgrep @4 $classname.java - if [ $? = 0 ] ; then - echo "--Error: @4 and above are not yet allowed" - exit 1 - fi - done - - cp vers1/* $redefineSubdir - cd $saveDir -} - -# Send a cmd to jdb and wait for the jdb prompt to appear. -# We don't want to allow > as a prompt because if the debuggee -# runs for awhile after a command, jdb will show this prompt -# but is not really ready to accept another command for the -# debuggee - ie, a cont in this state will be ignored. -# If it ever becomes necessary to send a jdb command before -# a main[10] form of prompt appears, then this -# code will have to be modified. -# -# Specify $1 = allowExit to show that the command given -# allows JDB to exit -cmd() -{ - allowExit= - case "$1" in - allowExit) - allowExit="allowExit" - shift - ;; - exitJdb) - # Quit JDB only with this cmd() invocation - echo "--Sending cmd: quit" >& 2 - echo quit - echo "--Quit cmd was sent" >& 2 - # See 6562090. Maybe there is a way that the exit - # can cause jdb to not get the quit. - sleep 5 - - # The exit code value here doesn't matter since this function - # is called as part of a pipeline and it is not the last command - # in the pipeline. - exit 1 - ;; - esac - command=$* - - if [ -z "$command" ] ; then - dofail "Command can't be a null string. Test failure" - fi - if [ "$command" = "quit" -o "$command" = "exit" ] ; then - # We don't want the test to manually quit jdb, - # we will do it in the end automatically - dofail "It's not allowed to send quit or exit commands from the test" - fi - if [ -r "$failFile" ] ; then - # failFile exists, it's better to finish execution - dofinish "quit" - fi - - # $jdbOutFile always exists here and is non empty - # because after starting jdb, we waited - # for the prompt. - fileSize=`wc -c $jdbOutFile | awk '{ print $1 }'` - echo "--Sending cmd: " $command >&2 - - # jjh: We have a few intermittent failures here. - # It is as if every so often, jdb doesn't - # get the first cmd that is sent to it here. - # (actually, I have seen it get the first cmd ok, - # but then not get some subsequent cmd). - # It seems like jdb really doesn't get the cmd; jdb's response - # does not appear in the jxdboutput file. It contains: - # main[1] - # The application has been disconnected - - # Is it possible - # that jdb got the cmd ok, but its response didn't make - # it to the jxdboutput file? If so, why did 'The application - # has been disconnected' make it? - - # This causes the following loop to timeout and the test to fail. - # The above echo works because the cmd (stop at ...) - # is in the System.err shown in the .jtr file. - # Also, the cmd is shown in the 'jdb never responded ...' - # msg output below after the timeout. - # And, we know jdb is started because the main[1] output is in the .jtr - # file. And, we wouldn't have gotten here if mydojdbcmds hadn't - # seen the ]. - echo $command - - # Now we have to wait for the next jdb prompt. We wait for a pattern - # to appear in the last line of jdb output. Normally, the prompt is - # - # 1) ^main[89] @ - # - # where ^ means start of line, and @ means end of file with no end of line - # and 89 is the current command counter. But we have complications e.g., - # the following jdb output can appear: - # - # 2) a[89] = 10 - # - # The above form is an array assignment and not a prompt. - # - # 3) ^main[89] main[89] ... - # - # This occurs if the next cmd is one that causes no jdb output, e.g., - # 'trace methods'. - # - # 4) ^main[89] [main[89]] .... > @ - # - # jdb prints a > as a prompt after something like a cont. - # Thus, even though the above is the last 'line' in the file, it - # isn't the next prompt we are waiting for after the cont completes. - # HOWEVER, sometimes we see this for a cont command: - # - # ^main[89] $ - # - # - # 5) ^main[89] > @ - # - # i.e., the > prompt comes out AFTER the prompt we we need to wait for. - # - # So, how do we know when the next prompt has appeared?? - # 1. Search for - # main[89] $ - # This will handle cases 1, 2, 3 - # 2. This leaves cases 4 and 5. - # - # What if we wait for 4 more chars to appear and then search for - # - # main[89] [>]$ - # - # on the last line? - # - # a. if we are currently at - # - # ^main[89] main[89] @ - # - # and a 'trace methods comes in, we will wait until at least - # - # ^main[89] main[89] main@ - # - # and then the search will find the new prompt when it completes. - # - # b. if we are currently at - # - # ^main[89] main[89] @ - # - # and the first form of cont comes in, then we will see - # - # ^main[89] main[89] > $ - # ^x@ - # - # where x is the first char of the msg output when the bkpt is hit - # and we will start our search, which will find the prompt - # when it comes out after the bkpt output, with or without the - # trailing > - # - - # wait for 4 new chars to appear in the jdb output - count=0 - desiredFileSize=`expr $fileSize + 4` - msg1=`echo At start: cmd/size/waiting : $command / $fileSize / \`date\`` - timeLimit=`expr 60 * $timeout_factor` - while [ 1 = 1 ] ; do - newFileSize=`wc -c $jdbOutFile | awk '{ print $1 } '` - #echo jj: desired = $desiredFileSize, new = $newFileSize >& 2 - - done=`expr $newFileSize \>= $desiredFileSize` - if [ $done = 1 ] ; then - break - fi - sleep ${sleep_seconds} - count=`expr $count + ${sleep_seconds}` - if [ $count -gt $timeLimit ] ; then - # record some debug info. - echo "--DEBUG: jdb $$ didn't respond to command in $count secs: $command" >& 2 - echo "--DEBUG:" $msg1 >& 2 - echo "--DEBUG: "done size/waiting : / $newFileSize / `date` >& 2 - echo "-- $jdbOutFile follows-------------------------------" >& 2 - cat $jdbOutFile >& 2 - echo "------------------------------------------" >& 2 - dojstack - dofail "jdb never responded to command: $command" - fi - done - # Note that this assumes just these chars in thread names. - waitForJdbMsg '[a-zA-Z0-9_-][a-zA-Z0-9_-]*\[[1-9][0-9]*\] [ >]*$' 1 $allowExit -} - -setBkpts() -{ - # Can set multiple bkpts, but only in one class. - # $1 is the bkpt name, eg, @1 - allLines=`$grep -n "$1 *breakpoint" $tmpFileDir/$classname.java.1 | sed -e 's@^\([0-9]*\).*@\1@g'` - for ii in $allLines ; do - cmd "stop at $pkgDot$classname:$ii" - done -} - -runToBkpt() -{ - # Don't pass allowExit here as we don't want JDB to unexpectedly exit - cmd run - # Don't need to do this - the above waits for the next prompt which comes out - # AFTER the Breakpoint hit message. - # Wait for jdb to hit the bkpt - #waitForJdbMsg "Breakpoint hit" 5 -} - -contToBkpt() -{ - # Don't pass allowExit here as we don't want JDB to unexpectedly exit - cmd cont - # Don't need to do this - the above waits for the next prompt which comes out - # AFTER the Breakpoint hit message. - # Wait for jdb to hit the bkpt - #waitForJdbMsg "Breakpoint hit" 5 -} - - -# Wait until string $1 appears in the output file, within the last $2 lines -# If $3 is allowExit, then don't fail if jdb exits before -# the desired string appears. -waitForJdbMsg() -{ - # This can be called from the jdb thread which doesn't - # have access to $debuggeepid, so we have to read it from the file. - nlines=$2 - allowExit="$3" - myCount=0 - timeLimit=`expr 40 * $timeout_factor` # wait a max of this many secs for a response from a jdb command - - while [ 1 = 1 ] ; do - if [ -r $jdbOutFile ] ; then - # Something here causes jdb to complain about Unrecognized cmd on x86. - tail -$nlines $jdbOutFile | $grep -s "$1" > $devnull 2>&1 - if [ $? = 0 ] ; then - # Found desired string - break - fi - fi - tail -2 $jdbOutFile | $grep -s "The application exited" > $devnull 2>&1 - if [ $? = 0 ] ; then - # Found 'The application exited' - echo "--JDB finished: The application exited" >&2 - if [ ! -z "$allowExit" ] ; then - # Exit is allowed - dofinish - fi - # Otherwise, it is an error if we don't find $1 - if [ -r $jdbOutFile ] ; then - tail -$nlines $jdbOutFile | $grep -s "$1" > $devnull 2>&1 - if [ $? = 0 ] ; then - break - fi - fi - dofail "JDB unexpectedly finished: Waited for jdb msg $1, but it never appeared" - fi - - sleep ${sleep_seconds} - findPid $topPid - if [ $? != 0 ] ; then - echo "--Top process ($topPid) is dead. We better die too" >&2 - dojstack - exit 1 - fi - - myCount=`expr $myCount + ${sleep_seconds}` - if [ $myCount -gt $timeLimit ] ; then - echo "--Fail: waitForJdbMsg timed out after $timeLimit seconds, looking for /$1/, in $nlines lines; exiting" >> $failFile - echo "vv jdbOutFile vvvvvvvvvvvvvvvvvvvvvvvvvvvv" >& 2 - cat $jdbOutFile >& 2 - echo "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" >& 2 - dojstack - exit 1 - fi - done - -} - -# Finishes JDB execution -# Specify command to finish if it's needed -dofinish() -{ - if [ ! -z "$*" ] ; then - echo "--Finish execution with sending \"$*\" command to JDB" >&2 - cmd "exitJdb" "$*" - else - echo "--Finish without sending \"quit\" command to JDB" >&2 - fi - exit 0 -} - -# $1 is the string to print. If $2 exists, -# it is the name of a file to print, ie, the name -# of the file that contains the $1 string. -dofail() -{ - if [ ! -z "$jdbpid" ] ; then - # we are in the main process instead of the jdb process - echo " " >> $failFile - echo "--Fail: main: $*" >> $failFile - else - # Kill the debuggee ; it could be hung so - # we want to get rid of it as soon as possible. - killOrphans "killing debuggee" $debuggeeKeyword - # Kill debugger, it could be hung - killOrphans "killing debugger" $jdbKeyword - - echo " " >>$failFile - echo "--Fail: $*" >> $failFile - fi - if [ ! -z "$2" ] ; then - echo "---- contents of $2 follows -------" >> $failFile - cat "$2" >> $failFile - echo "---------------" >>$failFile - fi - exit 1 -} - - -redefineClass() -{ - if [ -z "$1" ] ; then - vers=2 - else - vers=`echo $1 | sed -e 's/@//'` - vers=`expr $vers + 1` - fi - - cmd "redefine $pkgDot$classname $tmpFileDir/vers$vers/$classname.class" - - cp $tmpFileDir/$classname.java.$vers \ - $tmpFileDir/$classname.java -} - -mydojdbCmds() -{ - # Wait for jdb to start before we start sending cmds - waitForJdbMsg ']' 1 - # Send commands from the test - dojdbCmds - # Finish jdb with quit command - dofinish "quit" -} - -startJdb() -{ - if [ ! -r "$jdb" -a ! -r "$jdb.exe" ] ; then - dofail "$jdb does not exist" - fi - echo - echo "--Starting jdb, address=$address" - if [ -z "$address" ] ; then - # Let jdb choose the port and write it to stdout - mydojdbCmds | $jdb $jdbOptions -listenany | tee $jdbOutFile & - - while [ 1 ] ; do - lastLine=`$grep 'Listening at address' $jdbOutFile` - if [ ! -z "$lastLine" ] ; then - break - fi - sleep 1 - done - # jjh: we got the address ok, and seemed to start the debuggee - address=`echo $lastLine | sed -e 's@.*: *@@'` - else - mydojdbCmds | $jdb $jdbOptions -listen $address | tee $jdbOutFile & - fi - #echo address = $address - - - # this gets the pid of tee, at least it does on solaris - jdbpid=$! - - # This fails on linux because there is an entry for each thread in jdb - # so we get a list of numbers in jdbpid - # jdbpid=`$psCmd | $grep -v grep | $grep ${orphanKeyword}_JDB | awk '{print $1}' | tr '\n\r' ' '` -} - -startDebuggee() -{ - args="$TESTVMOPTS $TESTJAVAOPTS" - - if [ ! -z "$args" ] ; then - echo "--Starting debuggee with args from TESTVMOPTS and/or TESTJAVAOPTS: $args" - else - echo "--Starting debuggee" - fi - - debuggeepid= - waitForJdbMsg Listening 4 - - beOption="-agentlib:jdwp=transport=$transport,address=$address,server=n,suspend=y" -# beOption="-Xdebug -Xrunjdwp:transport=$transport,address=$address,server=n,suspend=y" - - thecmd="$jdk/bin/$java $mode -classpath $tmpFileDir $baseArgs $args \ - -Djtreg.classDir=$TESTCLASSES \ - -showversion \ - $beOption \ - $pkgDot$classname" - echo "Cmd: $thecmd" - - sh -c "$thecmd | tee $debuggeeOutFile" & - - # Note that the java cmd and the tee cmd will be children of - # the sh process. We can use that to find them to kill them. - debuggeepid=$! - - # Save this in a place where the jdb process can find it. - # Note that it is possible for the java cmd to abort during startup - # due to a bad classpath or whatever. - echo $debuggeepid > $debuggeepidFile -} - -dojstack() -{ - if [ -r "$jdk/bin/$jstack" ] ; then - # If jstack exists, so will jps - # Show stack traces of jdb and debuggee as a possible debugging aid. - jdbCmd=`$jdk/bin/jps -v | $grep $jdbKeyword` - realJdbPid=`echo "$jdbCmd" | sed -e 's@ .*@@'` - if [ ! -z "$realJdbPid" ] ; then - echo "-- jdb process info ----------------------" >&2 - echo " $jdbCmd" >&2 - echo "-- jdb threads: jstack $realJdbPid" >&2 - $jdk/bin/$jstack $realJdbPid >&2 - echo "------------------------------------------" >&2 - echo >&2 - fi - debuggeeCmd=`$jdk/bin/jps -v | $grep $debuggeeKeyword` - realDebuggeePid=`echo "$debuggeeCmd" | sed -e 's@ .*@@'` - if [ ! -z "$realDebuggeePid" ] ; then - echo "-- debuggee process info ----------------------" >&2 - echo " $debuggeeCmd" >&2 - echo "-- debuggee threads: jstack $moption $realDebuggeePid" >&2 - $jdk/bin/$jstack $realDebuggeePid >&2 - echo "=============================================" >&2 - echo >&2 - fi - fi -} - -waitForFinish() -{ - # This is the main process - # Wait for the jdb process to finish, or some error to occur - - while [ 1 = 1 ] ; do - findPid $jdbpid - if [ $? != 0 ] ; then - break - fi - - # (Don't use jdbFailIfPresent here since it is not safe - # to call from different processes) - $grep -s 'Input stream closed' $jdbOutFile > $devnull 2>&1 - if [ $? = 0 ] ; then - dofail "jdb input stream closed prematurely" - fi - - # If a failure has occured, quit - if [ -r "$failFile" ] ; then - break - fi - - sleep ${sleep_seconds} - done - - # jdb exited because its input stream closed prematurely - # (Don't use jdbFailIfPresent here since it is not safe - # to call from different processes) - $grep -s 'Input stream closed' $jdbOutFile > $devnull 2>&1 - if [ $? = 0 ] ; then - dofail "jdb input stream closed prematurely" - fi - - # It is necessary here to avoid the situation when JDB exited but - # mydojdbCmds() didn't finish because it waits for JDB message - # in waitForJdbMsg(), at the same time main process will finish - # the execution with no errors. - # To avoid that, wait for spawned processes to finish - case "$osname" in - SunOS) - # `wait` function doesn't work in Solaris shell as in bash, - # so create replacement that finds mydojdbCmds() shell process - # and waits for its finish - cmdsPid= - # get list of processes except main process with $topPid - processes=`$psCmd | $grep -v "$grep" | $grep -v $topPid | awk '{print $1}'` - for pid in $processes; do - # for each process grep its full args string for test name $0 - # $0 contains full test name with path - pargs -l $pid 2>$devnull | $grep "$0" >$devnull 2>&1 - if [ $? = 0 ] ; then - cmdsPid=$pid - break - fi - done - echo "--waitForFinish: Waiting for mydojdbCmds() to finish" >&2 - while [ 1 = 1 ] ; do - findPid $cmdsPid - if [ $? != 0 ] ; then - break - fi - sleep ${sleep_seconds} - done - ;; - *) - echo "--waitForFinish: Waiting for all processes to finish" >&2 - wait - ;; - esac - - if [ -r "$failFile" ] ; then - ls -l "$failFile" >&2 - echo "" >&2 - cat "$failFile" >&2 - echo "" >&2 - exit 1 - fi -} - -# $1 is the filename, $2 is the string to look for, -# $3 is the number of lines to search (from the end) -grepForString() -{ - if [ -z "$3" ] ; then - theCmd=cat - else - theCmd="tail -$3" - fi - - case "$2" in - *\>*) - # Target string contains a '>' so we better not ignore it - $theCmd $1 | $grep -s "$2" > $devnull 2>&1 - stat="$?" - ;; - *) - # Target string does not contain a '>'. - # NOTE: if $1 does not end with a new line, piping it to sed - # doesn't include the chars on the last line. Detect this - # case, and add a new line. - theFile="$1" - if [ `tail -1 "$theFile" | wc -l | sed -e 's@ @@g'` = 0 ] ; then - # The target file doesn't end with a new line so we have - # add one to a copy of the target file so the sed command - # below can filter that last line. - cp "$theFile" "$theFile.tmp" - theFile="$theFile.tmp" - echo >> "$theFile" - fi - - # See bug 6220903. Sometimes the jdb prompt chars ('> ') can - # get interleaved in the target file which can keep us from - # matching the target string. - $theCmd "$theFile" | sed -e 's@> @@g' -e 's@>@@g' \ - | $grep -s "$2" > $devnull 2>&1 - stat=$? - if [ "$theFile" != "$1" ]; then - # remove the copy of the target file - rm -f "$theFile" - fi - unset theFile - esac - - return $stat -} - -# $1 is the filename, $2 is the regexp to match and return, -# $3 is the number of lines to search (from the end) -matchRegexp() -{ - if [ -z "$3" ] ; then - theCmd=cat - else - theCmd="tail -$3" - fi - - case "$2" in - *\>*) - # Target string contains a '>' so we better not ignore it - res=`$theCmd $1 | sed -e "$2"` - ;; - *) - # Target string does not contain a '>'. - # NOTE: if $1 does not end with a new line, piping it to sed - # doesn't include the chars on the last line. Detect this - # case, and add a new line. - theFile="$1" - if [ `tail -1 "$theFile" | wc -l | sed -e 's@ @@g'` = 0 ] ; then - # The target file doesn't end with a new line so we have - # add one to a copy of the target file so the sed command - # below can filter that last line. - cp "$theFile" "$theFile.tmp" - theFile="$theFile.tmp" - echo >> "$theFile" - fi - - # See bug 6220903. Sometimes the jdb prompt chars ('> ') can - # get interleaved in the target file which can keep us from - # matching the target string. - res=`$theCmd "$theFile" | sed -e 's@> @@g' -e 's@>@@g' \ - | sed -e "$2"` - if [ "$theFile" != "$1" ]; then - # remove the copy of the target file - rm -f "$theFile" - fi - unset theFile - esac - return $res -} - -# $1 is the filename, $2 is the string to look for, -# $3 is the number of lines to search (from the end) -failIfPresent() -{ - if [ -r "$1" ] ; then - grepForString "$1" "$2" "$3" - if [ $? = 0 ] ; then - dofail "Error output found: \"$2\" in $1" $1 - fi - fi -} - -# $1 is the filename, $2 is the string to look for -# $3 is the number of lines to search (from the end) -failIfNotPresent() -{ - if [ ! -r "$1" ] ; then - dofail "Required output \"$2\" not found in $1" - fi - grepForString "$1" "$2" "$3" - if [ $? != 0 ] ; then - dofail "Required output \"$2\" not found in $1" $1 - fi - -} - -# fail if $1 is not in the jdb output -# $2 is the number of lines to search (from the end) -jdbFailIfNotPresent() -{ - failIfNotPresent $jdbOutFile "$1" $2 -} - -# fail if $1 is not in the debuggee output -# $2 is the number of lines to search (from the end) -debuggeeFailIfNotPresent() -{ - failIfNotPresent $debuggeeOutFile "$1" $2 -} - -# fail if $1 is in the jdb output -# $2 is the number of lines to search (from the end) -jdbFailIfPresent() -{ - failIfPresent $jdbOutFile "$1" $2 -} - -# fail if $1 is in the debuggee output -# $2 is the number of lines to search (from the end) -debuggeeFailIfPresent() -{ - failIfPresent $debuggeeOutFile "$1" $2 -} - -# match and return the output from the regexp $1 in the debuggee output -# $2 is the number of lines to search (from the end) -debuggeeMatchRegexp() -{ - matchRegexp $debuggeeOutFile "$1" $2 -} - - -# This should really be named 'done' instead of pass. -pass() -{ - if [ ! -r "$failFile" ] ; then - echo - echo "--Done: test passed" - exit 0 - else - ls -l "$failFile" >&2 - echo "" >&2 - cat "$failFile" >&2 - echo "" >&2 - fi -} - -runit() -{ - setup - docompile - startJdb - startDebuggee - waitForFinish - - # in hs_err file from 1.3.1 - debuggeeFailIfPresent "Virtual Machine Error" - - # in hs_err file from 1.4.2, 1.5: An unexpected error - debuggeeFailIfPresent "An unexpected error" - - # in hs_err file from 1.4.2, 1.5: Internal error - debuggeeFailIfPresent "Internal error" - - - # Don't know how this arises - debuggeeFailIfPresent "An unexpected exception" - - # Don't know how this arises - debuggeeFailIfPresent "Internal exception" -} diff --git a/test/jdk/com/sun/jdi/ZZZcleanup.sh b/test/jdk/com/sun/jdi/ZZZcleanup.sh deleted file mode 100644 index 12506166153..00000000000 --- a/test/jdk/com/sun/jdi/ZZZcleanup.sh +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/sh - -# -# Copyright (c) 2002, 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. -# -# 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 1234567 -# @summary no bug -# @author Jim Holmlund -# -# @run shell ZZZcleanup.sh - -# This is run by jtreg after all other tests in -# this dir have run. It kills any orphan -# processes that have been left. -# If you can figure out a better way, let me know - -mysetup() -{ - if [ -z "$TESTSRC" ] ; then - TESTSRC=. - fi - - for ii in . $TESTSRC $TESTSRC/.. ; do - if [ -r "$ii/ShellScaffold.sh" ] ; then - . $ii/ShellScaffold.sh - break - fi - done -} - -# You could replace this next line with the contents -# of ShellScaffold.sh and this script will run just the same. -mysetup -setup -pass From 856f4fe28b56bdaebbc06ded59d89064b380bbf1 Mon Sep 17 00:00:00 2001 From: Chris Hegarty Date: Tue, 9 Oct 2018 20:32:24 +0100 Subject: [PATCH 050/124] 8211927: Add additional diagnostic information to java/net/BindException/Test.java Reviewed-by: dfuchs --- test/jdk/java/net/BindException/Test.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/test/jdk/java/net/BindException/Test.java b/test/jdk/java/net/BindException/Test.java index ab13b083ffe..4e4eed93d7b 100644 --- a/test/jdk/java/net/BindException/Test.java +++ b/test/jdk/java/net/BindException/Test.java @@ -26,9 +26,15 @@ * @bug 4417734 * @key intermittent * @summary Test that we get a BindException in all expected combinations + * @library /test/lib + * @build jdk.test.lib.NetworkConfiguration + * jdk.test.lib.Platform + * @run main Test -d */ + import java.net.*; import java.util.Enumeration; +import jdk.test.lib.NetworkConfiguration; public class Test { @@ -106,6 +112,7 @@ public class Test { } catch (BindException be) { gotBindException = true; + failed_exc = be; } catch (Exception e) { failed = true; failed_exc = e; @@ -152,6 +159,7 @@ public class Test { if (!failed) { if (gotBindException) { System.out.println("Got expected BindException - test passed!"); + failed_exc.printStackTrace(System.out); } else { System.out.println("No BindException as expected - test passed!"); } @@ -160,6 +168,7 @@ public class Test { } if (gotBindException) { System.out.println("BindException unexpected - test failed!!!"); + failed_exc.printStackTrace(System.out); } else { System.out.println("No bind failure as expected - test failed!!!"); } @@ -206,6 +215,11 @@ public class Test { */ InetAddress addrs[] = { ia4_this, ia6_this }; + if (!silent) { + System.out.println("Using ia4_this:" + ia4_this); + System.out.println("Using ia6_this:" + ia6_this); + } + Object tests[][] = getTestCombinations(); for (int i=0; i 0) { + System.err.println("********************************"); + NetworkConfiguration.printSystemConfiguration(System.err); + System.out.println("********************************"); throw new Exception(failures + " tests(s) failed - see log"); } } From 4f4a2385c58f19662e4b56551a72fa4af0d4acc7 Mon Sep 17 00:00:00 2001 From: Xueming Shen Date: Tue, 9 Oct 2018 12:36:51 -0700 Subject: [PATCH 051/124] 8211880: Broken links in java.util.jar Reviewed-by: alanb, mchung, martin --- src/java.base/share/classes/java/util/jar/Attributes.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/java.base/share/classes/java/util/jar/Attributes.java b/src/java.base/share/classes/java/util/jar/Attributes.java index 5d4b7e0db8b..61b7c1613e9 100644 --- a/src/java.base/share/classes/java/util/jar/Attributes.java +++ b/src/java.base/share/classes/java/util/jar/Attributes.java @@ -550,7 +550,7 @@ public class Attributes implements Map, Cloneable { * {@code Name} object for {@code Manifest-Version} * manifest attribute. This attribute indicates the version number * of the manifest standard to which a JAR file's manifest conforms. - * @see + * @see * Manifest and Signature Specification */ public static final Name MANIFEST_VERSION = new Name("Manifest-Version"); @@ -558,7 +558,7 @@ public class Attributes implements Map, Cloneable { /** * {@code Name} object for {@code Signature-Version} * manifest attribute used when signing JAR files. - * @see + * @see * Manifest and Signature Specification */ public static final Name SIGNATURE_VERSION = new Name("Signature-Version"); @@ -572,7 +572,7 @@ public class Attributes implements Map, Cloneable { /** * {@code Name} object for {@code Class-Path} * manifest attribute. - * @see + * @see * JAR file specification */ public static final Name CLASS_PATH = new Name("Class-Path"); From a2ad8f419f34deed5fc0c6f4e78d8b7c0bea4e63 Mon Sep 17 00:00:00 2001 From: Jiangli Zhou Date: Tue, 9 Oct 2018 15:58:07 -0400 Subject: [PATCH 052/124] 8206009: Move CDS java heap object archiving code to heapShared.hpp and heapShared.cpp Restructure and cleanup java heap object archiving code. Reviewed-by: coleenp, iklam --- src/hotspot/share/classfile/javaClasses.cpp | 25 +- src/hotspot/share/classfile/stringTable.cpp | 12 +- .../share/classfile/systemDictionary.cpp | 5 +- src/hotspot/share/gc/g1/g1Allocator.hpp | 2 +- .../share/gc/g1/g1Allocator.inline.hpp | 2 +- src/hotspot/share/gc/g1/g1CollectedHeap.cpp | 3 +- .../gc/g1/g1FullGCOopClosures.inline.hpp | 2 +- src/hotspot/share/gc/g1/g1HeapVerifier.cpp | 2 +- src/hotspot/share/memory/filemap.cpp | 10 +- src/hotspot/share/memory/heapShared.cpp | 213 ++++++++++++++++-- src/hotspot/share/memory/heapShared.hpp | 79 ++++++- .../share/memory/heapShared.inline.hpp | 7 + src/hotspot/share/memory/metaspaceShared.cpp | 185 ++------------- src/hotspot/share/memory/metaspaceShared.hpp | 60 +---- src/hotspot/share/memory/universe.cpp | 16 +- src/hotspot/share/oops/constantPool.cpp | 7 +- src/hotspot/share/oops/cpCache.cpp | 3 +- src/hotspot/share/oops/klass.cpp | 3 +- src/hotspot/share/oops/oop.cpp | 6 +- src/hotspot/share/oops/oop.hpp | 2 +- src/hotspot/share/oops/oop.inline.hpp | 4 +- src/hotspot/share/prims/whitebox.cpp | 9 +- 22 files changed, 350 insertions(+), 307 deletions(-) diff --git a/src/hotspot/share/classfile/javaClasses.cpp b/src/hotspot/share/classfile/javaClasses.cpp index 3f3ec150f54..f94f5c655d6 100644 --- a/src/hotspot/share/classfile/javaClasses.cpp +++ b/src/hotspot/share/classfile/javaClasses.cpp @@ -36,8 +36,9 @@ #include "interpreter/linkResolver.hpp" #include "logging/log.hpp" #include "logging/logStream.hpp" +#include "memory/heapShared.inline.hpp" +#include "memory/metaspaceShared.hpp" #include "memory/oopFactory.hpp" -#include "memory/metaspaceShared.inline.hpp" #include "memory/resourceArea.hpp" #include "memory/universe.hpp" #include "oops/fieldStreams.hpp" @@ -750,7 +751,7 @@ static void initialize_static_field(fieldDescriptor* fd, Handle mirror, TRAPS) { { assert(fd->signature() == vmSymbols::string_signature(), "just checking"); - if (DumpSharedSpaces && MetaspaceShared::is_archive_object(mirror())) { + if (DumpSharedSpaces && HeapShared::is_archived_object(mirror())) { // Archive the String field and update the pointer. oop s = mirror()->obj_field(fd->offset()); oop archived_s = StringTable::create_archived_string(s, CHECK); @@ -788,7 +789,7 @@ void java_lang_Class::fixup_mirror(Klass* k, TRAPS) { } if (k->is_shared() && k->has_raw_archived_mirror()) { - if (MetaspaceShared::open_archive_heap_region_mapped()) { + if (HeapShared::open_archive_heap_region_mapped()) { bool present = restore_archived_mirror(k, Handle(), Handle(), Handle(), CHECK); assert(present, "Missing archived mirror for %s", k->external_name()); return; @@ -1011,14 +1012,14 @@ class ResetMirrorField: public FieldClosure { }; void java_lang_Class::archive_basic_type_mirrors(TRAPS) { - assert(MetaspaceShared::is_heap_object_archiving_allowed(), - "MetaspaceShared::is_heap_object_archiving_allowed() must be true"); + assert(HeapShared::is_heap_object_archiving_allowed(), + "HeapShared::is_heap_object_archiving_allowed() must be true"); for (int t = 0; t <= T_VOID; t++) { oop m = Universe::_mirrors[t]; if (m != NULL) { // Update the field at _array_klass_offset to point to the relocated array klass. - oop archived_m = MetaspaceShared::archive_heap_object(m, THREAD); + oop archived_m = HeapShared::archive_heap_object(m, THREAD); assert(archived_m != NULL, "sanity"); Klass *ak = (Klass*)(archived_m->metadata_field(_array_klass_offset)); assert(ak != NULL || t == T_VOID, "should not be NULL"); @@ -1071,8 +1072,8 @@ void java_lang_Class::archive_basic_type_mirrors(TRAPS) { // be used at runtime, new mirror object is created for the shared // class. The _has_archived_raw_mirror is cleared also during the process. oop java_lang_Class::archive_mirror(Klass* k, TRAPS) { - assert(MetaspaceShared::is_heap_object_archiving_allowed(), - "MetaspaceShared::is_heap_object_archiving_allowed() must be true"); + assert(HeapShared::is_heap_object_archiving_allowed(), + "HeapShared::is_heap_object_archiving_allowed() must be true"); // Mirror is already archived if (k->has_raw_archived_mirror()) { @@ -1101,7 +1102,7 @@ oop java_lang_Class::archive_mirror(Klass* k, TRAPS) { } // Now start archiving the mirror object - oop archived_mirror = MetaspaceShared::archive_heap_object(mirror, THREAD); + oop archived_mirror = HeapShared::archive_heap_object(mirror, THREAD); if (archived_mirror == NULL) { return NULL; } @@ -1139,7 +1140,7 @@ oop java_lang_Class::process_archived_mirror(Klass* k, oop mirror, if (k->is_typeArray_klass()) { // The primitive type mirrors are already archived. Get the archived mirror. oop comp_mirror = java_lang_Class::component_mirror(mirror); - archived_comp_mirror = MetaspaceShared::find_archived_heap_object(comp_mirror); + archived_comp_mirror = HeapShared::find_archived_heap_object(comp_mirror); assert(archived_comp_mirror != NULL, "Must be"); } else { assert(k->is_objArray_klass(), "Must be"); @@ -1202,7 +1203,7 @@ bool java_lang_Class::restore_archived_mirror(Klass *k, return true; } - oop m = MetaspaceShared::materialize_archived_object(k->archived_java_mirror_raw_narrow()); + oop m = HeapShared::materialize_archived_object(k->archived_java_mirror_raw_narrow()); if (m == NULL) { return false; @@ -1211,7 +1212,7 @@ bool java_lang_Class::restore_archived_mirror(Klass *k, log_debug(cds, mirror)("Archived mirror is: " PTR_FORMAT, p2i(m)); // mirror is archived, restore - assert(MetaspaceShared::is_archive_object(m), "must be archived mirror object"); + assert(HeapShared::is_archived_object(m), "must be archived mirror object"); Handle mirror(THREAD, m); if (!k->is_array_klass()) { diff --git a/src/hotspot/share/classfile/stringTable.cpp b/src/hotspot/share/classfile/stringTable.cpp index 1231e3729ac..ec95e572c98 100644 --- a/src/hotspot/share/classfile/stringTable.cpp +++ b/src/hotspot/share/classfile/stringTable.cpp @@ -36,7 +36,6 @@ #include "memory/allocation.inline.hpp" #include "memory/filemap.hpp" #include "memory/heapShared.inline.hpp" -#include "memory/metaspaceShared.inline.hpp" #include "memory/resourceArea.hpp" #include "memory/universe.hpp" #include "oops/access.inline.hpp" @@ -798,18 +797,17 @@ oop StringTable::lookup_shared(const jchar* name, int len, unsigned int hash) { oop StringTable::create_archived_string(oop s, Thread* THREAD) { assert(DumpSharedSpaces, "this function is only used with -Xshare:dump"); - if (MetaspaceShared::is_archive_object(s)) { + if (HeapShared::is_archived_object(s)) { return s; } oop new_s = NULL; typeArrayOop v = java_lang_String::value_no_keepalive(s); - typeArrayOop new_v = - (typeArrayOop)MetaspaceShared::archive_heap_object(v, THREAD); + typeArrayOop new_v = (typeArrayOop)HeapShared::archive_heap_object(v, THREAD); if (new_v == NULL) { return NULL; } - new_s = MetaspaceShared::archive_heap_object(s, THREAD); + new_s = HeapShared::archive_heap_object(s, THREAD); if (new_s == NULL) { return NULL; } @@ -847,14 +845,14 @@ struct CopyToArchive : StackObj { }; void StringTable::copy_shared_string_table(CompactHashtableWriter* writer) { - assert(MetaspaceShared::is_heap_object_archiving_allowed(), "must be"); + assert(HeapShared::is_heap_object_archiving_allowed(), "must be"); CopyToArchive copy(writer); StringTable::the_table()->_local_table->do_scan(Thread::current(), copy); } void StringTable::write_to_archive() { - assert(MetaspaceShared::is_heap_object_archiving_allowed(), "must be"); + assert(HeapShared::is_heap_object_archiving_allowed(), "must be"); _shared_table.reset(); int num_buckets = CompactHashtableWriter::default_num_buckets( diff --git a/src/hotspot/share/classfile/systemDictionary.cpp b/src/hotspot/share/classfile/systemDictionary.cpp index 3940daba703..194cc9320f2 100644 --- a/src/hotspot/share/classfile/systemDictionary.cpp +++ b/src/hotspot/share/classfile/systemDictionary.cpp @@ -52,6 +52,7 @@ #include "logging/log.hpp" #include "logging/logStream.hpp" #include "memory/filemap.hpp" +#include "memory/heapShared.hpp" #include "memory/metaspaceClosure.hpp" #include "memory/oopFactory.hpp" #include "memory/resourceArea.hpp" @@ -2037,13 +2038,13 @@ void SystemDictionary::resolve_preloaded_classes(TRAPS) { // ConstantPool::restore_unshareable_info (restores the archived // resolved_references array object). // - // MetaspaceShared::fixup_mapped_heap_regions() fills the empty + // HeapShared::fixup_mapped_heap_regions() fills the empty // spaces in the archived heap regions and may use // SystemDictionary::Object_klass(), so we can do this only after // Object_klass is resolved. See the above resolve_wk_klasses_through() // call. No mirror objects are accessed/restored in the above call. // Mirrors are restored after java.lang.Class is loaded. - MetaspaceShared::fixup_mapped_heap_regions(); + HeapShared::fixup_mapped_heap_regions(); // Initialize the constant pool for the Object_class Object_klass()->constants()->restore_unshareable_info(CHECK); diff --git a/src/hotspot/share/gc/g1/g1Allocator.hpp b/src/hotspot/share/gc/g1/g1Allocator.hpp index 0a8f99e1377..4d5d052cc25 100644 --- a/src/hotspot/share/gc/g1/g1Allocator.hpp +++ b/src/hotspot/share/gc/g1/g1Allocator.hpp @@ -270,7 +270,7 @@ public: // Check if the object is in open archive static inline bool is_open_archive_object(oop object); // Check if the object is either in closed archive or open archive - static inline bool is_archive_object(oop object); + static inline bool is_archived_object(oop object); private: static bool _archive_check_enabled; diff --git a/src/hotspot/share/gc/g1/g1Allocator.inline.hpp b/src/hotspot/share/gc/g1/g1Allocator.inline.hpp index 10b5f315d62..05501c9d323 100644 --- a/src/hotspot/share/gc/g1/g1Allocator.inline.hpp +++ b/src/hotspot/share/gc/g1/g1Allocator.inline.hpp @@ -141,7 +141,7 @@ inline bool G1ArchiveAllocator::is_open_archive_object(oop object) { return (archive_check_enabled() && in_open_archive_range(object)); } -inline bool G1ArchiveAllocator::is_archive_object(oop object) { +inline bool G1ArchiveAllocator::is_archived_object(oop object) { return (archive_check_enabled() && (in_closed_archive_range(object) || in_open_archive_range(object))); } diff --git a/src/hotspot/share/gc/g1/g1CollectedHeap.cpp b/src/hotspot/share/gc/g1/g1CollectedHeap.cpp index 8253f1ed8f1..c23980757bb 100644 --- a/src/hotspot/share/gc/g1/g1CollectedHeap.cpp +++ b/src/hotspot/share/gc/g1/g1CollectedHeap.cpp @@ -80,7 +80,6 @@ #include "logging/log.hpp" #include "memory/allocation.hpp" #include "memory/iterator.hpp" -#include "memory/metaspaceShared.inline.hpp" #include "memory/resourceArea.hpp" #include "oops/access.inline.hpp" #include "oops/compressedOops.inline.hpp" @@ -827,7 +826,7 @@ void G1CollectedHeap::dealloc_archive_regions(MemRegion* ranges, size_t count) { oop G1CollectedHeap::materialize_archived_object(oop obj) { assert(obj != NULL, "archived obj is NULL"); - assert(MetaspaceShared::is_archive_object(obj), "must be archived object"); + assert(G1ArchiveAllocator::is_archived_object(obj), "must be archived object"); // Loading an archived object makes it strongly reachable. If it is // loaded during concurrent marking, it must be enqueued to the SATB diff --git a/src/hotspot/share/gc/g1/g1FullGCOopClosures.inline.hpp b/src/hotspot/share/gc/g1/g1FullGCOopClosures.inline.hpp index f19a578460b..4e32b6f5cbf 100644 --- a/src/hotspot/share/gc/g1/g1FullGCOopClosures.inline.hpp +++ b/src/hotspot/share/gc/g1/g1FullGCOopClosures.inline.hpp @@ -68,7 +68,7 @@ template inline void G1AdjustClosure::adjust_pointer(T* p) { oop obj = CompressedOops::decode_not_null(heap_oop); assert(Universe::heap()->is_in(obj), "should be in heap"); - if (G1ArchiveAllocator::is_archive_object(obj)) { + if (G1ArchiveAllocator::is_archived_object(obj)) { // We never forward archive objects. return; } diff --git a/src/hotspot/share/gc/g1/g1HeapVerifier.cpp b/src/hotspot/share/gc/g1/g1HeapVerifier.cpp index 7c19509698c..a316c7a34e1 100644 --- a/src/hotspot/share/gc/g1/g1HeapVerifier.cpp +++ b/src/hotspot/share/gc/g1/g1HeapVerifier.cpp @@ -248,7 +248,7 @@ public: oop obj = RawAccess<>::oop_load(p); if (_hr->is_open_archive()) { - guarantee(obj == NULL || G1ArchiveAllocator::is_archive_object(obj), + guarantee(obj == NULL || G1ArchiveAllocator::is_archived_object(obj), "Archive object at " PTR_FORMAT " references a non-archive object at " PTR_FORMAT, p2i(p), p2i(obj)); } else { diff --git a/src/hotspot/share/memory/filemap.cpp b/src/hotspot/share/memory/filemap.cpp index 66864197b89..16eb8c692dd 100644 --- a/src/hotspot/share/memory/filemap.cpp +++ b/src/hotspot/share/memory/filemap.cpp @@ -191,7 +191,7 @@ void FileMapHeader::populate(FileMapInfo* mapinfo, size_t alignment) { _shared_path_table_size = mapinfo->_shared_path_table_size; _shared_path_table = mapinfo->_shared_path_table; _shared_path_entry_size = mapinfo->_shared_path_entry_size; - if (MetaspaceShared::is_heap_object_archiving_allowed()) { + if (HeapShared::is_heap_object_archiving_allowed()) { _heap_reserved = Universe::heap()->reserved_region(); } @@ -908,7 +908,7 @@ MemRegion FileMapInfo::get_heap_regions_range_with_current_oop_encoding_mode() { // regions may be added. GC may mark and update references in the mapped // open archive objects. void FileMapInfo::map_heap_regions_impl() { - if (!MetaspaceShared::is_heap_object_archiving_allowed()) { + if (!HeapShared::is_heap_object_archiving_allowed()) { log_info(cds)("CDS heap data is being ignored. UseG1GC, " "UseCompressedOops and UseCompressedClassPointers are required."); return; @@ -1000,7 +1000,7 @@ void FileMapInfo::map_heap_regions_impl() { MetaspaceShared::max_open_archive_heap_region, &num_open_archive_heap_ranges, true /* open */)) { - MetaspaceShared::set_open_archive_heap_region_mapped(); + HeapShared::set_open_archive_heap_region_mapped(); } } } @@ -1014,7 +1014,7 @@ void FileMapInfo::map_heap_regions() { assert(string_ranges == NULL && num_string_ranges == 0, "sanity"); } - if (!MetaspaceShared::open_archive_heap_region_mapped()) { + if (!HeapShared::open_archive_heap_region_mapped()) { assert(open_archive_heap_ranges == NULL && num_open_archive_heap_ranges == 0, "sanity"); } } @@ -1160,7 +1160,7 @@ bool FileMapInfo::verify_region_checksum(int i) { if ((MetaspaceShared::is_string_region(i) && !StringTable::shared_string_mapped()) || (MetaspaceShared::is_open_archive_heap_region(i) && - !MetaspaceShared::open_archive_heap_region_mapped())) { + !HeapShared::open_archive_heap_region_mapped())) { return true; // archived heap data is not mapped } const char* buf = region_addr(i); diff --git a/src/hotspot/share/memory/heapShared.cpp b/src/hotspot/share/memory/heapShared.cpp index c55415caf78..69e10b1767e 100644 --- a/src/hotspot/share/memory/heapShared.cpp +++ b/src/hotspot/share/memory/heapShared.cpp @@ -24,25 +24,200 @@ #include "precompiled.hpp" #include "classfile/javaClasses.inline.hpp" +#include "classfile/stringTable.hpp" #include "classfile/symbolTable.hpp" #include "classfile/vmSymbols.hpp" #include "logging/log.hpp" #include "logging/logMessage.hpp" #include "logging/logStream.hpp" +#include "memory/filemap.hpp" #include "memory/heapShared.inline.hpp" #include "memory/iterator.inline.hpp" #include "memory/metadataFactory.hpp" #include "memory/metaspaceClosure.hpp" -#include "memory/metaspaceShared.inline.hpp" #include "memory/resourceArea.hpp" #include "oops/compressedOops.inline.hpp" #include "oops/oop.inline.hpp" #include "runtime/fieldDescriptor.inline.hpp" +#include "runtime/safepointVerifiers.hpp" #include "utilities/bitMap.inline.hpp" +#if INCLUDE_G1GC +#include "gc/g1/g1CollectedHeap.hpp" +#endif #if INCLUDE_CDS_JAVA_HEAP + +bool HeapShared::_open_archive_heap_region_mapped = false; +bool HeapShared::_archive_heap_region_fixed = false; + address HeapShared::_narrow_oop_base; int HeapShared::_narrow_oop_shift; + +//////////////////////////////////////////////////////////////// +// +// Java heap object archiving support +// +//////////////////////////////////////////////////////////////// +void HeapShared::fixup_mapped_heap_regions() { + FileMapInfo *mapinfo = FileMapInfo::current_info(); + mapinfo->fixup_mapped_heap_regions(); + set_archive_heap_region_fixed(); +} + +unsigned HeapShared::oop_hash(oop const& p) { + assert(!p->mark()->has_bias_pattern(), + "this object should never have been locked"); // so identity_hash won't safepoin + unsigned hash = (unsigned)p->identity_hash(); + return hash; +} + +HeapShared::ArchivedObjectCache* HeapShared::_archived_object_cache = NULL; +oop HeapShared::find_archived_heap_object(oop obj) { + assert(DumpSharedSpaces, "dump-time only"); + ArchivedObjectCache* cache = archived_object_cache(); + oop* p = cache->get(obj); + if (p != NULL) { + return *p; + } else { + return NULL; + } +} + +oop HeapShared::archive_heap_object(oop obj, Thread* THREAD) { + assert(DumpSharedSpaces, "dump-time only"); + + oop ao = find_archived_heap_object(obj); + if (ao != NULL) { + // already archived + return ao; + } + + int len = obj->size(); + if (G1CollectedHeap::heap()->is_archive_alloc_too_large(len)) { + log_debug(cds, heap)("Cannot archive, object (" PTR_FORMAT ") is too large: " SIZE_FORMAT, + p2i(obj), (size_t)obj->size()); + return NULL; + } + + // Pre-compute object identity hash at CDS dump time. + obj->identity_hash(); + + oop archived_oop = (oop)G1CollectedHeap::heap()->archive_mem_allocate(len); + if (archived_oop != NULL) { + Copy::aligned_disjoint_words((HeapWord*)obj, (HeapWord*)archived_oop, len); + MetaspaceShared::relocate_klass_ptr(archived_oop); + ArchivedObjectCache* cache = archived_object_cache(); + cache->put(obj, archived_oop); + log_debug(cds, heap)("Archived heap object " PTR_FORMAT " ==> " PTR_FORMAT, + p2i(obj), p2i(archived_oop)); + } else { + log_error(cds, heap)( + "Cannot allocate space for object " PTR_FORMAT " in archived heap region", + p2i(obj)); + vm_exit(1); + } + return archived_oop; +} + +oop HeapShared::materialize_archived_object(narrowOop v) { + assert(archive_heap_region_fixed(), + "must be called after archive heap regions are fixed"); + if (!CompressedOops::is_null(v)) { + oop obj = HeapShared::decode_from_archive(v); + return G1CollectedHeap::heap()->materialize_archived_object(obj); + } + return NULL; +} + +void HeapShared::archive_klass_objects(Thread* THREAD) { + GrowableArray* klasses = MetaspaceShared::collected_klasses(); + assert(klasses != NULL, "sanity"); + for (int i = 0; i < klasses->length(); i++) { + Klass* k = klasses->at(i); + + // archive mirror object + java_lang_Class::archive_mirror(k, CHECK); + + // archive the resolved_referenes array + if (k->is_instance_klass()) { + InstanceKlass* ik = InstanceKlass::cast(k); + ik->constants()->archive_resolved_references(THREAD); + } + } +} + +void HeapShared::archive_java_heap_objects(GrowableArray *closed, + GrowableArray *open) { + if (!is_heap_object_archiving_allowed()) { + if (log_is_enabled(Info, cds)) { + log_info(cds)( + "Archived java heap is not supported as UseG1GC, " + "UseCompressedOops and UseCompressedClassPointers are required." + "Current settings: UseG1GC=%s, UseCompressedOops=%s, UseCompressedClassPointers=%s.", + BOOL_TO_STR(UseG1GC), BOOL_TO_STR(UseCompressedOops), + BOOL_TO_STR(UseCompressedClassPointers)); + } + return; + } + + { + NoSafepointVerifier nsv; + + // Cache for recording where the archived objects are copied to + create_archived_object_cache(); + + tty->print_cr("Dumping objects to closed archive heap region ..."); + NOT_PRODUCT(StringTable::verify()); + copy_closed_archive_heap_objects(closed); + + tty->print_cr("Dumping objects to open archive heap region ..."); + copy_open_archive_heap_objects(open); + + destroy_archived_object_cache(); + } + + G1HeapVerifier::verify_archive_regions(); +} + +void HeapShared::copy_closed_archive_heap_objects( + GrowableArray * closed_archive) { + assert(is_heap_object_archiving_allowed(), "Cannot archive java heap objects"); + + Thread* THREAD = Thread::current(); + G1CollectedHeap::heap()->begin_archive_alloc_range(); + + // Archive interned string objects + StringTable::write_to_archive(); + + G1CollectedHeap::heap()->end_archive_alloc_range(closed_archive, + os::vm_allocation_granularity()); +} + +void HeapShared::copy_open_archive_heap_objects( + GrowableArray * open_archive) { + assert(is_heap_object_archiving_allowed(), "Cannot archive java heap objects"); + + Thread* THREAD = Thread::current(); + G1CollectedHeap::heap()->begin_archive_alloc_range(true /* open */); + + java_lang_Class::archive_basic_type_mirrors(THREAD); + + archive_klass_objects(THREAD); + + archive_object_subgraphs(THREAD); + + G1CollectedHeap::heap()->end_archive_alloc_range(open_archive, + os::vm_allocation_granularity()); +} + +void HeapShared::init_narrow_oop_decoding(address base, int shift) { + _narrow_oop_base = base; + _narrow_oop_shift = shift; +} + +// +// Subgraph archiving support +// HeapShared::DumpTimeKlassSubGraphInfoTable* HeapShared::_dump_time_subgraph_info_table = NULL; HeapShared::RunTimeKlassSubGraphInfoTable HeapShared::_run_time_subgraph_info_table; @@ -214,7 +389,7 @@ void HeapShared::serialize_subgraph_info_table_header(SerializeClosure* soc) { } void HeapShared::initialize_from_archived_subgraph(Klass* k) { - if (!MetaspaceShared::open_archive_heap_region_mapped()) { + if (!open_archive_heap_region_mapped()) { return; // nothing to do } assert(!DumpSharedSpaces, "Should not be called with DumpSharedSpaces"); @@ -274,8 +449,7 @@ void HeapShared::initialize_from_archived_subgraph(Klass* k) { // The object refereced by the field becomes 'known' by GC from this // point. All objects in the subgraph reachable from the object are // also 'known' by GC. - oop v = MetaspaceShared::materialize_archived_object( - entry_field_records->at(i+1)); + oop v = materialize_archived_object(entry_field_records->at(i+1)); m->obj_field_put(field_offset, v); i += 2; @@ -310,7 +484,7 @@ class WalkOopAndArchiveClosure: public BasicOopIterateClosure { template void do_oop_work(T *p) { oop obj = RawAccess<>::oop_load(p); if (!CompressedOops::is_null(obj)) { - assert(!MetaspaceShared::is_archive_object(obj), + assert(!HeapShared::is_archived_object(obj), "original objects must not point to archived objects"); size_t field_delta = pointer_delta(p, _orig_referencing_obj, sizeof(char)); @@ -329,7 +503,7 @@ class WalkOopAndArchiveClosure: public BasicOopIterateClosure { oop archived = HeapShared::archive_reachable_objects_from(_level + 1, _subgraph_info, obj, THREAD); assert(archived != NULL, "VM should have exited with unarchivable objects for _level > 1"); - assert(MetaspaceShared::is_archive_object(archived), "must be"); + assert(HeapShared::is_archived_object(archived), "must be"); if (!_record_klasses_only) { // Update the reference in the archived copy of the referencing object. @@ -347,7 +521,7 @@ class WalkOopAndArchiveClosure: public BasicOopIterateClosure { // (3) Record the klasses of all orig_obj and all reachable objects. oop HeapShared::archive_reachable_objects_from(int level, KlassSubGraphInfo* subgraph_info, oop orig_obj, TRAPS) { assert(orig_obj != NULL, "must be"); - assert(!MetaspaceShared::is_archive_object(orig_obj), "sanity"); + assert(!is_archived_object(orig_obj), "sanity"); // java.lang.Class instances cannot be included in an archived // object sub-graph. @@ -356,7 +530,7 @@ oop HeapShared::archive_reachable_objects_from(int level, KlassSubGraphInfo* sub vm_exit(1); } - oop archived_obj = MetaspaceShared::find_archived_heap_object(orig_obj); + oop archived_obj = find_archived_heap_object(orig_obj); if (java_lang_String::is_instance(orig_obj) && archived_obj != NULL) { // To save time, don't walk strings that are already archived. They just contain // pointers to a type array, whose klass doesn't need to be recorded. @@ -373,7 +547,7 @@ oop HeapShared::archive_reachable_objects_from(int level, KlassSubGraphInfo* sub bool record_klasses_only = (archived_obj != NULL); if (archived_obj == NULL) { ++_num_new_archived_objs; - archived_obj = MetaspaceShared::archive_heap_object(orig_obj, THREAD); + archived_obj = archive_heap_object(orig_obj, THREAD); if (archived_obj == NULL) { // Skip archiving the sub-graph referenced from the current entry field. ResourceMark rm; @@ -447,7 +621,7 @@ void HeapShared::archive_reachable_objects_from_static_field(InstanceKlass *k, assert(k->is_shared_boot_class(), "must be boot class"); oop m = k->java_mirror(); - oop archived_m = MetaspaceShared::find_archived_heap_object(m); + oop archived_m = find_archived_heap_object(m); if (CompressedOops::is_null(archived_m)) { return; } @@ -508,7 +682,7 @@ void HeapShared::verify_subgraph_from_static_field(InstanceKlass* k, int field_o assert(k->is_shared_boot_class(), "must be boot class"); oop m = k->java_mirror(); - oop archived_m = MetaspaceShared::find_archived_heap_object(m); + oop archived_m = find_archived_heap_object(m); if (CompressedOops::is_null(archived_m)) { return; } @@ -519,7 +693,7 @@ void HeapShared::verify_subgraph_from_static_field(InstanceKlass* k, int field_o } void HeapShared::verify_subgraph_from(oop orig_obj) { - oop archived_obj = MetaspaceShared::find_archived_heap_object(orig_obj); + oop archived_obj = find_archived_heap_object(orig_obj); if (archived_obj == NULL) { // It's OK for the root of a subgraph to be not archived. See comments in // archive_reachable_objects_from(). @@ -546,11 +720,11 @@ void HeapShared::verify_reachable_objects_from(oop obj, bool is_archived) { set_has_been_seen_during_subgraph_recording(obj); if (is_archived) { - assert(MetaspaceShared::is_archive_object(obj), "must be"); - assert(MetaspaceShared::find_archived_heap_object(obj) == NULL, "must be"); + assert(is_archived_object(obj), "must be"); + assert(find_archived_heap_object(obj) == NULL, "must be"); } else { - assert(!MetaspaceShared::is_archive_object(obj), "must be"); - assert(MetaspaceShared::find_archived_heap_object(obj) != NULL, "must be"); + assert(!is_archived_object(obj), "must be"); + assert(find_archived_heap_object(obj) != NULL, "must be"); } VerifySharedOopClosure walker(is_archived); @@ -670,7 +844,7 @@ void HeapShared::init_archivable_static_fields(Thread* THREAD) { } } -void HeapShared::archive_static_fields(Thread* THREAD) { +void HeapShared::archive_object_subgraphs(Thread* THREAD) { // For each class X that has one or more archived fields: // [1] Dump the subgraph of each archived field // [2] Create a list of all the class of the objects that can be reached @@ -767,11 +941,6 @@ ResourceBitMap HeapShared::calculate_oopmap(MemRegion region) { return oopmap; } -void HeapShared::init_narrow_oop_decoding(address base, int shift) { - _narrow_oop_base = base; - _narrow_oop_shift = shift; -} - // Patch all the embedded oop pointers inside an archived heap region, // to be consistent with the runtime oop encoding. class PatchEmbeddedPointers: public BitMapClosure { diff --git a/src/hotspot/share/memory/heapShared.hpp b/src/hotspot/share/memory/heapShared.hpp index 92c10e41120..2e357949ba6 100644 --- a/src/hotspot/share/memory/heapShared.hpp +++ b/src/hotspot/share/memory/heapShared.hpp @@ -107,7 +107,22 @@ class ArchivedKlassSubGraphInfoRecord { class HeapShared: AllStatic { friend class VerifySharedOopClosure; private: + #if INCLUDE_CDS_JAVA_HEAP + static bool _open_archive_heap_region_mapped; + static bool _archive_heap_region_fixed; + + static bool oop_equals(oop const& p1, oop const& p2) { + return oopDesc::equals(p1, p2); + } + static unsigned oop_hash(oop const& p); + + typedef ResourceHashtable ArchivedObjectCache; + static ArchivedObjectCache* _archived_object_cache; static bool klass_equals(Klass* const& p1, Klass* const& p2) { return primitive_equals(p1, p2); @@ -164,14 +179,6 @@ class HeapShared: AllStatic { static address _narrow_oop_base; static int _narrow_oop_shift; - static bool oop_equals(oop const& p1, oop const& p2) { - return primitive_equals(p1, p2); - } - - static unsigned oop_hash(oop const& p) { - return primitive_hash
    ((address)p); - } - typedef ResourceHashtable *closed, + GrowableArray *open); + static void copy_closed_archive_heap_objects(GrowableArray * closed_archive); + static void copy_open_archive_heap_objects(GrowableArray * open_archive); +#endif // INCLUDE_CDS_JAVA_HEAP + + public: + static bool is_heap_object_archiving_allowed() { + CDS_JAVA_HEAP_ONLY(return (UseG1GC && UseCompressedOops && UseCompressedClassPointers);) + NOT_CDS_JAVA_HEAP(return false;) + } + + static void set_open_archive_heap_region_mapped() { + CDS_JAVA_HEAP_ONLY(_open_archive_heap_region_mapped = true); + NOT_CDS_JAVA_HEAP_RETURN; + } + static bool open_archive_heap_region_mapped() { + CDS_JAVA_HEAP_ONLY(return _open_archive_heap_region_mapped); + NOT_CDS_JAVA_HEAP_RETURN_(false); + } + + static void fixup_mapped_heap_regions() NOT_CDS_JAVA_HEAP_RETURN; + + inline static bool is_archived_object(oop p) NOT_CDS_JAVA_HEAP_RETURN_(false); + + static void archive_java_heap_objects() NOT_CDS_JAVA_HEAP_RETURN; + static char* read_archived_subgraph_infos(char* buffer) NOT_CDS_JAVA_HEAP_RETURN_(buffer); static void write_archived_subgraph_infos() NOT_CDS_JAVA_HEAP_RETURN; static void initialize_from_archived_subgraph(Klass* k) NOT_CDS_JAVA_HEAP_RETURN; @@ -225,7 +284,7 @@ class HeapShared: AllStatic { size_t oopmap_in_bits) NOT_CDS_JAVA_HEAP_RETURN; static void init_archivable_static_fields(Thread* THREAD) NOT_CDS_JAVA_HEAP_RETURN; - static void archive_static_fields(Thread* THREAD) NOT_CDS_JAVA_HEAP_RETURN; + static void archive_object_subgraphs(Thread* THREAD) NOT_CDS_JAVA_HEAP_RETURN; static void write_subgraph_info_table() NOT_CDS_JAVA_HEAP_RETURN; static void serialize_subgraph_info_table_header(SerializeClosure* soc) NOT_CDS_JAVA_HEAP_RETURN; diff --git a/src/hotspot/share/memory/heapShared.inline.hpp b/src/hotspot/share/memory/heapShared.inline.hpp index e7b011c9dff..8a279b46e8c 100644 --- a/src/hotspot/share/memory/heapShared.inline.hpp +++ b/src/hotspot/share/memory/heapShared.inline.hpp @@ -27,9 +27,16 @@ #include "oops/compressedOops.inline.hpp" #include "memory/heapShared.hpp" +#if INCLUDE_G1GC +#include "gc/g1/g1Allocator.inline.hpp" +#endif #if INCLUDE_CDS_JAVA_HEAP +bool HeapShared::is_archived_object(oop p) { + return (p == NULL) ? false : G1ArchiveAllocator::is_archived_object(p); +} + inline oop HeapShared::decode_from_archive(narrowOop v) { assert(!CompressedOops::is_null(v), "narrow oop value can never be zero"); oop result = (oop)(void*)((uintptr_t)_narrow_oop_base + ((uintptr_t)v << _narrow_oop_shift)); diff --git a/src/hotspot/share/memory/metaspaceShared.cpp b/src/hotspot/share/memory/metaspaceShared.cpp index 930b57457af..53102b12dd5 100644 --- a/src/hotspot/share/memory/metaspaceShared.cpp +++ b/src/hotspot/share/memory/metaspaceShared.cpp @@ -75,8 +75,6 @@ MetaspaceSharedStats MetaspaceShared::_stats; bool MetaspaceShared::_has_error_classes; bool MetaspaceShared::_archive_loading_failed = false; bool MetaspaceShared::_remapped_readwrite = false; -bool MetaspaceShared::_open_archive_heap_region_mapped = false; -bool MetaspaceShared::_archive_heap_region_fixed = false; address MetaspaceShared::_cds_i2i_entry_code_buffers = NULL; size_t MetaspaceShared::_cds_i2i_entry_code_buffers_size = 0; size_t MetaspaceShared::_core_spaces_size = 0; @@ -108,7 +106,7 @@ size_t MetaspaceShared::_core_spaces_size = 0; // [5] C++ vtables are copied into the md region. // [6] Original class files are copied into the od region. // -// The s0/s1 and oa0/oa1 regions are populated inside MetaspaceShared::dump_java_heap_objects. +// The s0/s1 and oa0/oa1 regions are populated inside HeapShared::archive_java_heap_objects. // Their layout is independent of the other 5 regions. class DumpRegion { @@ -454,6 +452,10 @@ address MetaspaceShared::cds_i2i_entry_code_buffers(size_t total_size) { // is run at a safepoint just before exit, this is the entire set of classes. static GrowableArray* _global_klass_objects; +GrowableArray* MetaspaceShared::collected_klasses() { + return _global_klass_objects; +} + static void collect_array_classes(Klass* k) { _global_klass_objects->append_if_missing(k); if (k->is_array_klass()) { @@ -512,7 +514,7 @@ static void remove_java_mirror_in_classes() { } static void clear_basic_type_mirrors() { - assert(!MetaspaceShared::is_heap_object_archiving_allowed(), "Sanity"); + assert(!HeapShared::is_heap_object_archiving_allowed(), "Sanity"); Universe::set_int_mirror(NULL); Universe::set_float_mirror(NULL); Universe::set_double_mirror(NULL); @@ -850,7 +852,7 @@ public: if (*o == NULL) { _dump_region->append_intptr_t(0); } else { - assert(MetaspaceShared::is_heap_object_archiving_allowed(), + assert(HeapShared::is_heap_object_archiving_allowed(), "Archiving heap object is not allowed"); _dump_region->append_intptr_t( (intptr_t)CompressedOops::encode_not_null(*o)); @@ -1329,7 +1331,7 @@ char* VM_PopulateDumpSharedSpace::dump_read_only_tables() { SystemDictionary::reorder_dictionary_for_sharing(); tty->print("Removing java_mirror ... "); - if (!MetaspaceShared::is_heap_object_archiving_allowed()) { + if (!HeapShared::is_heap_object_archiving_allowed()) { clear_basic_type_mirrors(); } remove_java_mirror_in_classes(); @@ -1798,47 +1800,18 @@ bool MetaspaceShared::try_link_class(InstanceKlass* ik, TRAPS) { #if INCLUDE_CDS_JAVA_HEAP void VM_PopulateDumpSharedSpace::dump_java_heap_objects() { - if (!MetaspaceShared::is_heap_object_archiving_allowed()) { - if (log_is_enabled(Info, cds)) { - log_info(cds)( - "Archived java heap is not supported as UseG1GC, " - "UseCompressedOops and UseCompressedClassPointers are required." - "Current settings: UseG1GC=%s, UseCompressedOops=%s, UseCompressedClassPointers=%s.", - BOOL_TO_STR(UseG1GC), BOOL_TO_STR(UseCompressedOops), - BOOL_TO_STR(UseCompressedClassPointers)); - } - return; - } - - { - NoSafepointVerifier nsv; - - // Cache for recording where the archived objects are copied to - MetaspaceShared::create_archive_object_cache(); - - tty->print_cr("Dumping objects to closed archive heap region ..."); - NOT_PRODUCT(StringTable::verify()); - // The closed space has maximum two regions. See FileMapInfo::write_archive_heap_regions() for details. - _closed_archive_heap_regions = new GrowableArray(2); - MetaspaceShared::dump_closed_archive_heap_objects(_closed_archive_heap_regions); - - tty->print_cr("Dumping objects to open archive heap region ..."); - _open_archive_heap_regions = new GrowableArray(2); - MetaspaceShared::dump_open_archive_heap_objects(_open_archive_heap_regions); - - MetaspaceShared::destroy_archive_object_cache(); - } - - G1HeapVerifier::verify_archive_regions(); - - { - ArchiveCompactor::OtherROAllocMark mark; - HeapShared::write_subgraph_info_table(); - } + // The closed and open archive heap space has maximum two regions. + // See FileMapInfo::write_archive_heap_regions() for details. + _closed_archive_heap_regions = new GrowableArray(2); + _open_archive_heap_regions = new GrowableArray(2); + HeapShared::archive_java_heap_objects(_closed_archive_heap_regions, + _open_archive_heap_regions); + ArchiveCompactor::OtherROAllocMark mark; + HeapShared::write_subgraph_info_table(); } void VM_PopulateDumpSharedSpace::dump_archive_heap_oopmaps() { - if (MetaspaceShared::is_heap_object_archiving_allowed()) { + if (HeapShared::is_heap_object_archiving_allowed()) { _closed_archive_heap_oopmaps = new GrowableArray(2); dump_archive_heap_oopmaps(_closed_archive_heap_regions, _closed_archive_heap_oopmaps); @@ -1866,124 +1839,6 @@ void VM_PopulateDumpSharedSpace::dump_archive_heap_oopmaps(GrowableArrayappend(info); } } - -void MetaspaceShared::dump_closed_archive_heap_objects( - GrowableArray * closed_archive) { - assert(is_heap_object_archiving_allowed(), "Cannot dump java heap objects"); - - Thread* THREAD = Thread::current(); - G1CollectedHeap::heap()->begin_archive_alloc_range(); - - // Archive interned string objects - StringTable::write_to_archive(); - - G1CollectedHeap::heap()->end_archive_alloc_range(closed_archive, - os::vm_allocation_granularity()); -} - -void MetaspaceShared::dump_open_archive_heap_objects( - GrowableArray * open_archive) { - assert(UseG1GC, "Only support G1 GC"); - assert(UseCompressedOops && UseCompressedClassPointers, - "Only support UseCompressedOops and UseCompressedClassPointers enabled"); - - Thread* THREAD = Thread::current(); - G1CollectedHeap::heap()->begin_archive_alloc_range(true /* open */); - - java_lang_Class::archive_basic_type_mirrors(THREAD); - - MetaspaceShared::archive_klass_objects(THREAD); - - HeapShared::archive_static_fields(THREAD); - - G1CollectedHeap::heap()->end_archive_alloc_range(open_archive, - os::vm_allocation_granularity()); -} - -unsigned MetaspaceShared::obj_hash(oop const& p) { - assert(!p->mark()->has_bias_pattern(), - "this object should never have been locked"); // so identity_hash won't safepoint - unsigned hash = (unsigned)p->identity_hash(); - return hash; -} - -MetaspaceShared::ArchivedObjectCache* MetaspaceShared::_archive_object_cache = NULL; -oop MetaspaceShared::find_archived_heap_object(oop obj) { - assert(DumpSharedSpaces, "dump-time only"); - ArchivedObjectCache* cache = MetaspaceShared::archive_object_cache(); - oop* p = cache->get(obj); - if (p != NULL) { - return *p; - } else { - return NULL; - } -} - -oop MetaspaceShared::archive_heap_object(oop obj, Thread* THREAD) { - assert(DumpSharedSpaces, "dump-time only"); - - oop ao = find_archived_heap_object(obj); - if (ao != NULL) { - // already archived - return ao; - } - - int len = obj->size(); - if (G1CollectedHeap::heap()->is_archive_alloc_too_large(len)) { - log_debug(cds, heap)("Cannot archive, object (" PTR_FORMAT ") is too large: " SIZE_FORMAT, - p2i(obj), (size_t)obj->size()); - return NULL; - } - - int hash = obj->identity_hash(); - oop archived_oop = (oop)G1CollectedHeap::heap()->archive_mem_allocate(len); - if (archived_oop != NULL) { - Copy::aligned_disjoint_words((HeapWord*)obj, (HeapWord*)archived_oop, len); - relocate_klass_ptr(archived_oop); - ArchivedObjectCache* cache = MetaspaceShared::archive_object_cache(); - cache->put(obj, archived_oop); - log_debug(cds, heap)("Archived heap object " PTR_FORMAT " ==> " PTR_FORMAT, - p2i(obj), p2i(archived_oop)); - } else { - log_error(cds, heap)( - "Cannot allocate space for object " PTR_FORMAT " in archived heap region", - p2i(obj)); - vm_exit(1); - } - return archived_oop; -} - -oop MetaspaceShared::materialize_archived_object(narrowOop v) { - assert(archive_heap_region_fixed(), - "must be called after archive heap regions are fixed"); - if (!CompressedOops::is_null(v)) { - oop obj = HeapShared::decode_from_archive(v); - return G1CollectedHeap::heap()->materialize_archived_object(obj); - } - return NULL; -} - -void MetaspaceShared::archive_klass_objects(Thread* THREAD) { - int i; - for (i = 0; i < _global_klass_objects->length(); i++) { - Klass* k = _global_klass_objects->at(i); - - // archive mirror object - java_lang_Class::archive_mirror(k, CHECK); - - // archive the resolved_referenes array - if (k->is_instance_klass()) { - InstanceKlass* ik = InstanceKlass::cast(k); - ik->constants()->archive_resolved_references(THREAD); - } - } -} - -void MetaspaceShared::fixup_mapped_heap_regions() { - FileMapInfo *mapinfo = FileMapInfo::current_info(); - mapinfo->fixup_mapped_heap_regions(); - set_archive_heap_region_fixed(); -} #endif // INCLUDE_CDS_JAVA_HEAP // Closure for serializing initialization data in from a data area @@ -2023,12 +1878,12 @@ public: void do_oop(oop *p) { narrowOop o = (narrowOop)nextPtr(); - if (o == 0 || !MetaspaceShared::open_archive_heap_region_mapped()) { + if (o == 0 || !HeapShared::open_archive_heap_region_mapped()) { p = NULL; } else { - assert(MetaspaceShared::is_heap_object_archiving_allowed(), + assert(HeapShared::is_heap_object_archiving_allowed(), "Archived heap object is not allowed"); - assert(MetaspaceShared::open_archive_heap_region_mapped(), + assert(HeapShared::open_archive_heap_region_mapped(), "Open archive heap region is not mapped"); *p = HeapShared::decode_from_archive(o); } diff --git a/src/hotspot/share/memory/metaspaceShared.hpp b/src/hotspot/share/memory/metaspaceShared.hpp index f0dc36a9cb7..eeb5b455d65 100644 --- a/src/hotspot/share/memory/metaspaceShared.hpp +++ b/src/hotspot/share/memory/metaspaceShared.hpp @@ -58,8 +58,6 @@ class MetaspaceShared : AllStatic { static bool _has_error_classes; static bool _archive_loading_failed; static bool _remapped_readwrite; - static bool _open_archive_heap_region_mapped; - static bool _archive_heap_region_fixed; static address _cds_i2i_entry_code_buffers; static size_t _cds_i2i_entry_code_buffers_size; static size_t _core_spaces_size; @@ -93,63 +91,7 @@ class MetaspaceShared : AllStatic { static int preload_classes(const char * class_list_path, TRAPS) NOT_CDS_RETURN_(0); -#if INCLUDE_CDS_JAVA_HEAP - private: - static bool obj_equals(oop const& p1, oop const& p2) { - return p1 == p2; - } - static unsigned obj_hash(oop const& p); - - typedef ResourceHashtable ArchivedObjectCache; - static ArchivedObjectCache* _archive_object_cache; - - public: - static ArchivedObjectCache* archive_object_cache() { - return _archive_object_cache; - } - static oop find_archived_heap_object(oop obj); - static oop archive_heap_object(oop obj, Thread* THREAD); - static oop materialize_archived_object(narrowOop v); - static void archive_klass_objects(Thread* THREAD); - - static void set_archive_heap_region_fixed() { - _archive_heap_region_fixed = true; - } - - static bool archive_heap_region_fixed() { - return _archive_heap_region_fixed; - } -#endif - - inline static bool is_archive_object(oop p) NOT_CDS_JAVA_HEAP_RETURN_(false); - - static bool is_heap_object_archiving_allowed() { - CDS_JAVA_HEAP_ONLY(return (UseG1GC && UseCompressedOops && UseCompressedClassPointers);) - NOT_CDS_JAVA_HEAP(return false;) - } - static void create_archive_object_cache() { - CDS_JAVA_HEAP_ONLY(_archive_object_cache = new (ResourceObj::C_HEAP, mtClass)ArchivedObjectCache();); - } - static void destroy_archive_object_cache() { - CDS_JAVA_HEAP_ONLY(delete _archive_object_cache; _archive_object_cache = NULL;); - } - static void fixup_mapped_heap_regions() NOT_CDS_JAVA_HEAP_RETURN; - - static void dump_closed_archive_heap_objects(GrowableArray * closed_archive) NOT_CDS_JAVA_HEAP_RETURN; - - static void dump_open_archive_heap_objects(GrowableArray * open_archive) NOT_CDS_JAVA_HEAP_RETURN; - static void set_open_archive_heap_region_mapped() { - CDS_JAVA_HEAP_ONLY(_open_archive_heap_region_mapped = true); - NOT_CDS_JAVA_HEAP_RETURN; - } - static bool open_archive_heap_region_mapped() { - CDS_JAVA_HEAP_ONLY(return _open_archive_heap_region_mapped); - NOT_CDS_JAVA_HEAP_RETURN_(false); - } + static GrowableArray* collected_klasses(); static ReservedSpace* shared_rs() { CDS_ONLY(return &_shared_rs); diff --git a/src/hotspot/share/memory/universe.cpp b/src/hotspot/share/memory/universe.cpp index c1801e3f164..b62f6281a25 100644 --- a/src/hotspot/share/memory/universe.cpp +++ b/src/hotspot/share/memory/universe.cpp @@ -39,6 +39,7 @@ #include "interpreter/interpreter.hpp" #include "logging/log.hpp" #include "logging/logStream.hpp" +#include "memory/heapShared.hpp" #include "memory/filemap.hpp" #include "memory/metadataFactory.hpp" #include "memory/metaspaceClosure.hpp" @@ -242,8 +243,15 @@ void Universe::serialize(SerializeClosure* f) { f->do_ptr((void**)&_objectArrayKlassObj); #if INCLUDE_CDS_JAVA_HEAP - // The mirrors are NULL if MetaspaceShared::is_heap_object_archiving_allowed - // is false. +#ifdef ASSERT + if (DumpSharedSpaces && !HeapShared::is_heap_object_archiving_allowed()) { + assert(_int_mirror == NULL && _float_mirror == NULL && + _double_mirror == NULL && _byte_mirror == NULL && + _bool_mirror == NULL && _char_mirror == NULL && + _long_mirror == NULL && _short_mirror == NULL && + _void_mirror == NULL, "mirrors should be NULL"); + } +#endif f->do_oop(&_int_mirror); f->do_oop(&_float_mirror); f->do_oop(&_double_mirror); @@ -422,9 +430,9 @@ void Universe::genesis(TRAPS) { void Universe::initialize_basic_type_mirrors(TRAPS) { #if INCLUDE_CDS_JAVA_HEAP if (UseSharedSpaces && - MetaspaceShared::open_archive_heap_region_mapped() && + HeapShared::open_archive_heap_region_mapped() && _int_mirror != NULL) { - assert(MetaspaceShared::is_heap_object_archiving_allowed(), "Sanity"); + assert(HeapShared::is_heap_object_archiving_allowed(), "Sanity"); assert(_float_mirror != NULL && _double_mirror != NULL && _byte_mirror != NULL && _byte_mirror != NULL && _bool_mirror != NULL && _char_mirror != NULL && diff --git a/src/hotspot/share/oops/constantPool.cpp b/src/hotspot/share/oops/constantPool.cpp index 9b84e21770c..5e2846a0317 100644 --- a/src/hotspot/share/oops/constantPool.cpp +++ b/src/hotspot/share/oops/constantPool.cpp @@ -33,6 +33,7 @@ #include "interpreter/linkResolver.hpp" #include "memory/allocation.inline.hpp" #include "memory/heapInspection.hpp" +#include "memory/heapShared.hpp" #include "memory/metadataFactory.hpp" #include "memory/metaspaceClosure.hpp" #include "memory/metaspaceShared.hpp" @@ -295,7 +296,7 @@ void ConstantPool::archive_resolved_references(Thread* THREAD) { } } - oop archived = MetaspaceShared::archive_heap_object(rr, THREAD); + oop archived = HeapShared::archive_heap_object(rr, THREAD); // If the resolved references array is not archived (too large), // the 'archived' object is NULL. No need to explicitly check // the return value of archive_heap_object here. At runtime, the @@ -340,7 +341,7 @@ void ConstantPool::restore_unshareable_info(TRAPS) { if (SystemDictionary::Object_klass_loaded()) { ClassLoaderData* loader_data = pool_holder()->class_loader_data(); #if INCLUDE_CDS_JAVA_HEAP - if (MetaspaceShared::open_archive_heap_region_mapped() && + if (HeapShared::open_archive_heap_region_mapped() && _cache->archived_references() != NULL) { oop archived = _cache->archived_references(); // Create handle for the archived resolved reference array object @@ -373,7 +374,7 @@ void ConstantPool::remove_unshareable_info() { // If archiving heap objects is not allowed, clear the resolved references. // Otherwise, it is cleared after the resolved references array is cached // (see archive_resolved_references()). - if (!MetaspaceShared::is_heap_object_archiving_allowed()) { + if (!HeapShared::is_heap_object_archiving_allowed()) { set_resolved_references(NULL); } diff --git a/src/hotspot/share/oops/cpCache.cpp b/src/hotspot/share/oops/cpCache.cpp index cb95b635fbf..77c2305e445 100644 --- a/src/hotspot/share/oops/cpCache.cpp +++ b/src/hotspot/share/oops/cpCache.cpp @@ -30,6 +30,7 @@ #include "interpreter/linkResolver.hpp" #include "interpreter/rewriter.hpp" #include "logging/log.hpp" +#include "memory/heapShared.hpp" #include "memory/metadataFactory.hpp" #include "memory/metaspaceClosure.hpp" #include "memory/metaspaceShared.hpp" @@ -777,7 +778,7 @@ oop ConstantPoolCache::archived_references() { if (CompressedOops::is_null(_archived_references)) { return NULL; } - return MetaspaceShared::materialize_archived_object(_archived_references); + return HeapShared::materialize_archived_object(_archived_references); } void ConstantPoolCache::set_archived_references(oop o) { diff --git a/src/hotspot/share/oops/klass.cpp b/src/hotspot/share/oops/klass.cpp index db6bf64ea70..a9da8f9269c 100644 --- a/src/hotspot/share/oops/klass.cpp +++ b/src/hotspot/share/oops/klass.cpp @@ -32,6 +32,7 @@ #include "gc/shared/collectedHeap.inline.hpp" #include "logging/log.hpp" #include "memory/heapInspection.hpp" +#include "memory/heapShared.hpp" #include "memory/metadataFactory.hpp" #include "memory/metaspaceClosure.hpp" #include "memory/metaspaceShared.hpp" @@ -542,7 +543,7 @@ void Klass::restore_unshareable_info(ClassLoaderData* loader_data, Handle protec if (this->has_raw_archived_mirror()) { ResourceMark rm; log_debug(cds, mirror)("%s has raw archived mirror", external_name()); - if (MetaspaceShared::open_archive_heap_region_mapped()) { + if (HeapShared::open_archive_heap_region_mapped()) { bool present = java_lang_Class::restore_archived_mirror(this, loader, module_handle, protection_domain, CHECK); diff --git a/src/hotspot/share/oops/oop.cpp b/src/hotspot/share/oops/oop.cpp index ef5f8b9dc72..eda422cb305 100644 --- a/src/hotspot/share/oops/oop.cpp +++ b/src/hotspot/share/oops/oop.cpp @@ -25,7 +25,7 @@ #include "precompiled.hpp" #include "classfile/altHashing.hpp" #include "classfile/javaClasses.inline.hpp" -#include "memory/metaspaceShared.inline.hpp" +#include "memory/heapShared.inline.hpp" #include "memory/resourceArea.hpp" #include "oops/access.inline.hpp" #include "oops/oop.inline.hpp" @@ -144,8 +144,8 @@ bool oopDesc::is_unlocked_oop() const { } #if INCLUDE_CDS_JAVA_HEAP -bool oopDesc::is_archive_object(oop p) { - return MetaspaceShared::is_archive_object(p); +bool oopDesc::is_archived_object(oop p) { + return HeapShared::is_archived_object(p); } #endif #endif // PRODUCT diff --git a/src/hotspot/share/oops/oop.hpp b/src/hotspot/share/oops/oop.hpp index d456dd92ae4..e6665b65172 100644 --- a/src/hotspot/share/oops/oop.hpp +++ b/src/hotspot/share/oops/oop.hpp @@ -255,7 +255,7 @@ class oopDesc { static bool is_oop_or_null(oop obj, bool ignore_mark_word = false); #ifndef PRODUCT inline bool is_unlocked_oop() const; - static bool is_archive_object(oop p) NOT_CDS_JAVA_HEAP_RETURN_(false); + static bool is_archived_object(oop p) NOT_CDS_JAVA_HEAP_RETURN_(false); #endif // garbage collection diff --git a/src/hotspot/share/oops/oop.inline.hpp b/src/hotspot/share/oops/oop.inline.hpp index ae2f6f76877..bcc44b24eb3 100644 --- a/src/hotspot/share/oops/oop.inline.hpp +++ b/src/hotspot/share/oops/oop.inline.hpp @@ -351,8 +351,8 @@ void oopDesc::forward_to(oop p) { "forwarding to something not aligned"); assert(Universe::heap()->is_in_reserved(p), "forwarding to something not in heap"); - assert(!is_archive_object(oop(this)) && - !is_archive_object(p), + assert(!is_archived_object(oop(this)) && + !is_archived_object(p), "forwarding archive object"); markOop m = markOopDesc::encode_pointer_as_mark(p); assert(m->decode_pointer() == p, "encoding must be reversable"); diff --git a/src/hotspot/share/prims/whitebox.cpp b/src/hotspot/share/prims/whitebox.cpp index 5aea49e0ea0..a407d8c6e20 100644 --- a/src/hotspot/share/prims/whitebox.cpp +++ b/src/hotspot/share/prims/whitebox.cpp @@ -36,8 +36,9 @@ #include "gc/shared/gcConfig.hpp" #include "gc/shared/genCollectedHeap.hpp" #include "jvmtifiles/jvmtiEnv.hpp" +#include "memory/heapShared.inline.hpp" +#include "memory/metaspaceShared.hpp" #include "memory/metadataFactory.hpp" -#include "memory/metaspaceShared.inline.hpp" #include "memory/iterator.hpp" #include "memory/resourceArea.hpp" #include "memory/universe.hpp" @@ -1765,7 +1766,7 @@ WB_END WB_ENTRY(jboolean, WB_IsShared(JNIEnv* env, jobject wb, jobject obj)) oop obj_oop = JNIHandles::resolve(obj); - return MetaspaceShared::is_archive_object(obj_oop); + return HeapShared::is_archived_object(obj_oop); WB_END WB_ENTRY(jboolean, WB_IsSharedClass(JNIEnv* env, jobject wb, jclass clazz)) @@ -1789,7 +1790,7 @@ WB_ENTRY(jobject, WB_GetResolvedReferences(JNIEnv* env, jobject wb, jclass clazz WB_END WB_ENTRY(jboolean, WB_AreOpenArchiveHeapObjectsMapped(JNIEnv* env)) - return MetaspaceShared::open_archive_heap_region_mapped(); + return HeapShared::open_archive_heap_region_mapped(); WB_END WB_ENTRY(jboolean, WB_IsCDSIncludedInVmBuild(JNIEnv* env)) @@ -1807,7 +1808,7 @@ WB_ENTRY(jboolean, WB_IsCDSIncludedInVmBuild(JNIEnv* env)) WB_END WB_ENTRY(jboolean, WB_IsJavaHeapArchiveSupported(JNIEnv* env)) - return MetaspaceShared::is_heap_object_archiving_allowed(); + return HeapShared::is_heap_object_archiving_allowed(); WB_END From 11da699d9eacd17bb955b3ee5a299134f56bb4c2 Mon Sep 17 00:00:00 2001 From: Jean Christophe Beyler Date: Tue, 9 Oct 2018 13:22:19 -0700 Subject: [PATCH 053/124] 8211905: Remove multiple casts for EM06 file Remove multiple casts for EM06 file Reviewed-by: sspitsyn, cjplummer --- .../nsk/jvmti/scenarios/events/EM06/em06t001/em06t001.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM06/em06t001/em06t001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM06/em06t001/em06t001.cpp index 6f836b5186b..2920cbff1c6 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM06/em06t001/em06t001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM06/em06t001/em06t001.cpp @@ -73,8 +73,7 @@ handler(jvmtiEvent event, jvmtiEnv* jvmti, JNIEnv* jni_env, return; } - jclassName = (jstring) (jstring) (jstring) (jstring) (jstring) (jstring) (jstring) (jstring) (jstring) NSK_CPP_STUB3(CallObjectMethod, jni_env, klass, - methodID); + jclassName = (jstring) NSK_CPP_STUB3(CallObjectMethod, jni_env, klass, methodID); className = NSK_CPP_STUB3(GetStringUTFChars, jni_env, jclassName, 0); From a59b517d2a18afe6c535cdfddd86109b589a9c54 Mon Sep 17 00:00:00 2001 From: Gary Adams Date: Tue, 9 Oct 2018 07:33:15 -0400 Subject: [PATCH 054/124] 8211324: Link to java.lang.ThreadGroup in JDWP spec is broken Reviewed-by: sspitsyn, chegar, alanb --- make/data/jdwp/jdwp.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/make/data/jdwp/jdwp.spec b/make/data/jdwp/jdwp.spec index 38f998d38d9..bea43605e0c 100644 --- a/make/data/jdwp/jdwp.spec +++ b/make/data/jdwp/jdwp.spec @@ -2185,7 +2185,7 @@ JDWP "Java(tm) Debug Wire Protocol" "in this thread group. Threads and thread groups in child " "thread groups are not included. " "A thread is alive if it has been started and has not yet been stopped. " - "See java.lang.ThreadGroup + "See java.lang.ThreadGroup "for information about active ThreadGroups. (Out (threadGroupObject group "The thread group object ID. ") From d3458328a28704288daccc1ed036bae3df6a37e6 Mon Sep 17 00:00:00 2001 From: Erik Joelsson Date: Tue, 9 Oct 2018 14:57:23 -0700 Subject: [PATCH 055/124] 8211724: Change mkdir -p to MakeDir macro where possible Reviewed-by: ihse, asemenyuk --- make/BuildStatic.gmk | 2 +- make/Bundles.gmk | 2 +- make/CopyInterimCLDRConverter.gmk | 4 ++-- make/CreateBuildJdkCopy.gmk | 2 +- make/GenerateModuleSummary.gmk | 6 +++--- make/GensrcModuleInfo.gmk | 2 +- make/MacBundles.gmk | 4 ++-- make/autoconf/basics.m4 | 3 ++- make/common/JarArchive.gmk | 2 +- make/common/JavaCompilation.gmk | 2 +- make/common/Modules.gmk | 2 +- make/common/ZipArchive.gmk | 4 ++-- make/copy/Copy-java.base.gmk | 4 ++-- make/gendata/GendataFontConfig.gmk | 2 +- make/gendata/GendataHtml32dtd.gmk | 2 +- make/gendata/GendataTZDB.gmk | 2 +- make/gensrc/GensrcCLDR.gmk | 4 ++-- make/gensrc/GensrcCharsetCoder.gmk | 8 ++++---- make/gensrc/GensrcCommonLangtools.gmk | 6 +++--- make/gensrc/GensrcLocaleData.gmk | 4 ++-- make/gensrc/GensrcModuleLoaderMap.gmk | 2 +- make/gensrc/GensrcProperties.gmk | 6 +++--- make/gensrc/GensrcSwing.gmk | 2 +- make/launcher/Launcher-java.base.gmk | 2 +- make/rmic/Rmic-java.management.rmi.gmk | 2 +- 25 files changed, 41 insertions(+), 40 deletions(-) diff --git a/make/BuildStatic.gmk b/make/BuildStatic.gmk index b8dceebafc7..51d9ba7b26b 100644 --- a/make/BuildStatic.gmk +++ b/make/BuildStatic.gmk @@ -42,7 +42,7 @@ MODULES_SYMBOLS_FILES := $(foreach module, $(EXPORTED_SYMBOLS_MODULES), \ $(GLOBAL_SYMBOLS_FILE): $(MODULES_SYMBOLS_FILES) $(call LogInfo, Generating global exported.symbols file) - $(MKDIR) -p $(@D) + $(call MakeTargetDir) $(CAT) $^ > $@ TARGETS += $(GLOBAL_SYMBOLS_FILE) diff --git a/make/Bundles.gmk b/make/Bundles.gmk index de9508b767c..318b95f87be 100644 --- a/make/Bundles.gmk +++ b/make/Bundles.gmk @@ -70,6 +70,7 @@ define SetupBundleFileBody $$(call SetIfEmpty, $1_UNZIP_DEBUGINFO, false) $(BUNDLES_OUTPUTDIR)/$$($1_BUNDLE_NAME): $$($1_FILES) + $$(call MakeTargetDir) # If any of the files contain a space in the file name, CacheFind # will have replaced it with ?. Tar does not accept that so need to # switch it back. @@ -79,7 +80,6 @@ define SetupBundleFileBody $$(CAT) $$($1_$$d_LIST_FILE) | $$(TR) '?' ' ' > $$($1_$$d_LIST_FILE).tmp \ && $(MV) $$($1_$$d_LIST_FILE).tmp $$($1_$$d_LIST_FILE) $$(NEWLINE) \ ) - $$(call MakeDir, $$(@D)) ifneq ($$($1_SPECIAL_INCLUDES), ) $$(foreach i, $$($1_SPECIAL_INCLUDES), \ $$(foreach d, $$($1_BASE_DIRS), \ diff --git a/make/CopyInterimCLDRConverter.gmk b/make/CopyInterimCLDRConverter.gmk index eabd8326fa0..9650fc0d5df 100644 --- a/make/CopyInterimCLDRConverter.gmk +++ b/make/CopyInterimCLDRConverter.gmk @@ -33,7 +33,7 @@ include MakeBase.gmk ### CLDRConverter needs the JRE time zone names from the java.base source. define cldrconverter_copytznames - $(MKDIR) -p '$(@D)' + $(call MakeTargetDir) $(RM) '$@' $(SED) -e "s/package sun.util.resources/package build.tools.cldrconverter/" \ -e "s/extends TimeZoneNamesBundle//" \ @@ -46,7 +46,7 @@ $(eval $(call SetupCopyFiles,COPY_INTERIM_CLDRCONVERTER, \ DEST := $(BUILDTOOLS_OUTPUTDIR)/interim_cldrconverter_classes/build/tools/cldrconverter, \ FILES := TimeZoneNames.java, \ MACRO := cldrconverter_copytznames)) - + ########################################################################################## all: $(COPY_INTERIM_CLDRCONVERTER) diff --git a/make/CreateBuildJdkCopy.gmk b/make/CreateBuildJdkCopy.gmk index 2f12d97e009..f77fe4bf7e0 100644 --- a/make/CreateBuildJdkCopy.gmk +++ b/make/CreateBuildJdkCopy.gmk @@ -41,7 +41,7 @@ COPY_CLASSES_TARGET := $(BUILDJDK_OUTPUTDIR)/jdk/modules/java.base/_the.buildjdk $(COPY_CLASSES_TARGET): $(call CacheFind, $(wildcard \ $(addprefix $(JDK_OUTPUTDIR)/modules/, $(MODULES_TO_COPY)))) - $(ECHO) $(LOG_INFO) "Copying java modules to buildjdk: $(MODULES_TO_COPY)" + $(call LogInfo, Copying java modules to buildjdk: $(MODULES_TO_COPY)) $(RM) -r $(BUILDJDK_OUTPUTDIR)/jdk/modules $(MKDIR) -p $(BUILDJDK_OUTPUTDIR)/jdk/modules $(foreach m, $(MODULES_TO_COPY), \ diff --git a/make/GenerateModuleSummary.gmk b/make/GenerateModuleSummary.gmk index 1b48e1d8626..ef4d0933497 100644 --- a/make/GenerateModuleSummary.gmk +++ b/make/GenerateModuleSummary.gmk @@ -35,18 +35,18 @@ SPEC_DOTFILES_DIR := $(GENGRAPHS_DIR)/spec-dotfiles TOOLS_MODULE_SRCDIR := $(TOPDIR)/make/jdk/src/classes/build/tools/jigsaw $(GENGRAPHS_DIR)/jdk.dot: $(BUILD_JIGSAW_TOOLS) - $(MKDIR) -p $(@D) + $(call MakeTargetDir) $(TOOL_GENGRAPHS) --output $(GENGRAPHS_DIR) $(SPEC_DOTFILES_DIR)/java.se.dot: $(BUILD_JIGSAW_TOOLS) - $(MKDIR) -p $(@D) + $(call MakeTargetDir) $(TOOL_GENGRAPHS) --spec --output $(SPEC_DOTFILES_DIR) $(GENGRAPHS_DIR)/technology-summary.html: $(TOOLS_MODULE_SRCDIR)/technology-summary.html $(install-file) $(GENGRAPHS_DIR)/module-summary.html: $(BUILD_JIGSAW_TOOLS) $(GENGRAPHS_DIR)/technology-summary.html - $(MKDIR) -p $(@D) + $(call MakeTargetDir) $(TOOL_MODULESUMMARY) -o $@ --module-path $(IMAGES_OUTPUTDIR)/jmods all: $(GENGRAPHS_DIR)/jdk.dot $(GENGRAPHS_DIR)/module-summary.html $(SPEC_DOTFILES_DIR)/java.se.dot diff --git a/make/GensrcModuleInfo.gmk b/make/GensrcModuleInfo.gmk index 25ade7f131e..21bfbcf5b13 100644 --- a/make/GensrcModuleInfo.gmk +++ b/make/GensrcModuleInfo.gmk @@ -79,7 +79,7 @@ ifneq ($(MOD_FILES), ) $(BUILD_TOOLS_JDK) \ $(MOD_FILES) \ $(call DependOnVariable, ALL_MODULES) - $(MKDIR) -p $(@D) + $(call MakeTargetDir) $(RM) $@ $@.tmp $(TOOL_GENMODULEINFOSOURCE) -o $@.tmp \ --source-file $< \ diff --git a/make/MacBundles.gmk b/make/MacBundles.gmk index 998a60faa28..381de56654e 100644 --- a/make/MacBundles.gmk +++ b/make/MacBundles.gmk @@ -63,13 +63,13 @@ ifeq ($(OPENJDK_TARGET_OS), macosx) $(JDK_MACOSX_CONTENTS_DIR)/MacOS/libjli.dylib: $(call LogInfo, Creating link $(patsubst $(OUTPUTDIR)/%,%,$@)) - $(MKDIR) -p $(@D) + $(call MakeTargetDir) $(RM) $@ $(LN) -s ../Home/lib/libjli.dylib $@ $(JRE_MACOSX_CONTENTS_DIR)/MacOS/libjli.dylib: $(call LogInfo, Creating link $(patsubst $(OUTPUTDIR)/%,%,$@)) - $(MKDIR) -p $(@D) + $(call MakeTargetDir) $(RM) $@ $(LN) -s ../Home/lib/libjli.dylib $@ diff --git a/make/autoconf/basics.m4 b/make/autoconf/basics.m4 index 27a3ae1a6ea..02925e9139c 100644 --- a/make/autoconf/basics.m4 +++ b/make/autoconf/basics.m4 @@ -569,7 +569,8 @@ AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS], BASIC_REQUIRE_PROGS(GZIP, pigz gzip) BASIC_REQUIRE_PROGS(LN, ln) BASIC_REQUIRE_PROGS(LS, ls) - BASIC_REQUIRE_PROGS(MKDIR, mkdir) + # gmkdir is known to be safe for concurrent invocations with -p flag. + BASIC_REQUIRE_PROGS(MKDIR, [gmkdir mkdir]) BASIC_REQUIRE_PROGS(MKTEMP, mktemp) BASIC_REQUIRE_PROGS(MV, mv) BASIC_REQUIRE_PROGS(NAWK, [nawk gawk awk]) diff --git a/make/common/JarArchive.gmk b/make/common/JarArchive.gmk index b6487913dd4..daa1bb4b249 100644 --- a/make/common/JarArchive.gmk +++ b/make/common/JarArchive.gmk @@ -235,7 +235,7 @@ define SetupJarArchiveBody # Here is the rule that creates/updates the jar file. $$($1_JAR) : $$($1_DEPENDENCIES) $$($1_MANIFEST) $$($1_VARDEPS_FILE) - $(MKDIR) -p $$($1_BIN) + $$(call MakeTargetDir) $$($1_GREP_INCLUDE_OUTPUT) $$($1_GREP_EXCLUDE_OUTPUT) # If the vardeps file is part of the newer prereq list, it means that diff --git a/make/common/JavaCompilation.gmk b/make/common/JavaCompilation.gmk index 2d85ba0bf61..d679f7ef289 100644 --- a/make/common/JavaCompilation.gmk +++ b/make/common/JavaCompilation.gmk @@ -423,7 +423,7 @@ define SetupJavaCompilationBody $1_HEADERS_ARG := -h $$($1_HEADERS).$1.tmp $$($1_HEADERS)/_the.$1_headers: $$($1_COMPILE_TARGET) - $(MKDIR) -p $$(@D) + $$(call MakeTargetDir) if [ -d "$$($1_HEADERS).$1.tmp" ]; then \ for f in `$(CD) $$($1_HEADERS).$1.tmp && $(FIND) . -type f`; do \ if [ ! -f "$$($1_HEADERS)/$$$$f" ] \ diff --git a/make/common/Modules.gmk b/make/common/Modules.gmk index a69a6dec8ee..2327c3b4d8e 100644 --- a/make/common/Modules.gmk +++ b/make/common/Modules.gmk @@ -321,7 +321,7 @@ MODULE_INFOS := $(call FindAllModuleInfos, *) $(MODULE_DEPS_MAKEFILE): $(MODULE_INFOS) \ $(call DependOnVariable, MODULE_INFOS, $(MAKESUPPORT_OUTPUTDIR)/MODULE_INFOS.vardeps) - $(MKDIR) -p $(@D) + $(call MakeTargetDir) $(RM) $@ $(foreach m, $(MODULE_INFOS), \ ( $(PRINTF) "DEPS_$(call GetModuleNameFromModuleInfo, $m) :=" && \ diff --git a/make/common/ZipArchive.gmk b/make/common/ZipArchive.gmk index 4ced471d9aa..bd91d340433 100644 --- a/make/common/ZipArchive.gmk +++ b/make/common/ZipArchive.gmk @@ -124,8 +124,8 @@ define SetupZipArchiveBody # If zip has nothing to do, it returns 12 and would fail the build. Check for 12 # and only fail if it's not. $$($1_ZIP) : $$($1_ALL_SRCS) $$($1_EXTRA_DEPS) - $(MKDIR) -p $$(@D) - $(ECHO) Updating $$($1_NAME) + $$(call LogWarn, Updating $$($1_NAME)) + $$(call MakeTargetDir) $$(foreach s,$$($1_SRC),(cd $$s && $(ZIPEXE) -qru $$($1_ZIP_OPTIONS) $$@ . \ $$($1_ZIP_INCLUDES) $$($1_ZIP_EXCLUDES) -x \*_the.\* \ $$($1_ZIP_EXCLUDES_$$s) \ diff --git a/make/copy/Copy-java.base.gmk b/make/copy/Copy-java.base.gmk index 04885e3469b..800ec0d846f 100644 --- a/make/copy/Copy-java.base.gmk +++ b/make/copy/Copy-java.base.gmk @@ -128,7 +128,7 @@ POLICY_DST := $(CONF_DST_DIR)/security/java.policy POLICY_SRC_LIST := $(POLICY_SRC) $(POLICY_DST): $(POLICY_SRC_LIST) - $(MKDIR) -p $(@D) + $(call MakeTargetDir) $(RM) $@ $@.tmp $(foreach f,$(POLICY_SRC_LIST),$(CAT) $(f) >> $@.tmp;) $(MV) $@.tmp $@ @@ -153,7 +153,7 @@ ifneq ($(IMPORT_MODULES_CONF), ) endif $(DEF_POLICY_DST): $(DEF_POLICY_SRC_LIST) - $(MKDIR) -p $(@D) + $(call MakeTargetDir) $(RM) $@ $@.tmp $(foreach f,$(DEF_POLICY_SRC_LIST),$(CAT) $(f) >> $@.tmp;) $(MV) $@.tmp $@ diff --git a/make/gendata/GendataFontConfig.gmk b/make/gendata/GendataFontConfig.gmk index 50a3bcd49d0..ea7d900826f 100644 --- a/make/gendata/GendataFontConfig.gmk +++ b/make/gendata/GendataFontConfig.gmk @@ -38,7 +38,7 @@ $(GENDATA_FONT_CONFIG_DST)/%.src: \ $(GENDATA_FONT_CONFIG_DST)/%.bfc: \ $(GENDATA_FONT_CONFIG_DATA_DIR)/$(OPENJDK_TARGET_OS).%.properties \ $(BUILD_TOOLS_JDK) - $(MKDIR) -p $(@D) + $(call MakeTargetDir) $(RM) $@ $(TOOL_COMPILEFONTCONFIG) $< $@ $(CHMOD) 444 $@ diff --git a/make/gendata/GendataHtml32dtd.gmk b/make/gendata/GendataHtml32dtd.gmk index 0189a7c081e..0ce9d2b4ebc 100644 --- a/make/gendata/GendataHtml32dtd.gmk +++ b/make/gendata/GendataHtml32dtd.gmk @@ -28,7 +28,7 @@ GENDATA_HTML32DTD := HTML32DTD = $(JDK_OUTPUTDIR)/modules/java.desktop/javax/swing/text/html/parser/html32.bdtd $(HTML32DTD): $(BUILD_TOOLS_JDK) $(call LogInfo, Generating HTML DTD file) - $(MKDIR) -p $(@D) + $(call MakeTargetDir) $(RM) $@ ($(TOOL_DTDBUILDER) html32 > $@) || exit 1 diff --git a/make/gendata/GendataTZDB.gmk b/make/gendata/GendataTZDB.gmk index e9be176d873..0e7b817c60a 100644 --- a/make/gendata/GendataTZDB.gmk +++ b/make/gendata/GendataTZDB.gmk @@ -35,8 +35,8 @@ TZDATA_TZFILES := $(addprefix $(TZDATA_DIR)/,$(TZDATA_TZFILE)) GENDATA_TZDB_DAT := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE)/tzdb.dat $(GENDATA_TZDB_DAT): $(TZDATA_TZFILES) + $(call MakeTargetDir) $(RM) $(GENDATA_TZDB_DAT) - $(MKDIR) -p $(@D) $(TOOL_TZDB) -srcdir $(TZDATA_DIR) -dstfile $(GENDATA_TZDB_DAT) $(TZDATA_TZFILE) TARGETS += $(GENDATA_TZDB_DAT) diff --git a/make/gensrc/GensrcCLDR.gmk b/make/gensrc/GensrcCLDR.gmk index 2f742782637..7206e4f572c 100644 --- a/make/gensrc/GensrcCLDR.gmk +++ b/make/gensrc/GensrcCLDR.gmk @@ -50,7 +50,7 @@ $(CLDR_BASEMETAINFO_FILE): $(wildcard $(CLDRSRCDIR)/dtd/*.dtd) \ $(wildcard $(CLDRSRCDIR)/supplemental/*.xml) \ $(ZONENAME_TEMPLATE) \ $(BUILD_TOOLS_JDK) - $(MKDIR) -p $(GENSRC_BASEDIR) + $(call MakeDir, $(GENSRC_BASEDIR)) $(TOOL_CLDRCONVERTER) -base $(CLDRSRCDIR) \ -baselocales $(CLDR_BASE_LOCALES) \ -o $(GENSRC_BASEDIR) \ @@ -62,7 +62,7 @@ $(CLDR_METAINFO_FILE): $(wildcard $(CLDRSRCDIR)/dtd/*.dtd) \ $(wildcard $(CLDRSRCDIR)/main/*.xml) \ $(wildcard $(CLDRSRCDIR)/supplemental/*.xml) \ $(BUILD_TOOLS_JDK) - $(MKDIR) -p $(GENSRC_DIR) + $(call MakeDir, $(GENSRC_DIR)) $(TOOL_CLDRCONVERTER) -base $(CLDRSRCDIR) \ -baselocales $(CLDR_BASE_LOCALES) \ -o $(GENSRC_DIR) diff --git a/make/gensrc/GensrcCharsetCoder.gmk b/make/gensrc/GensrcCharsetCoder.gmk index 1a8836691d0..c2b850c7974 100644 --- a/make/gensrc/GensrcCharsetCoder.gmk +++ b/make/gensrc/GensrcCharsetCoder.gmk @@ -34,8 +34,8 @@ GENSRC_CHARSETCODER_TEMPLATE := $(GENSRC_CHARSETCODER_SRC)/charset/Charset-X-Cod ################################################################################ $(GENSRC_CHARSETCODER_DST)/CharsetDecoder.java: $(GENSRC_CHARSETCODER_TEMPLATE) - $(MKDIR) -p $(@D) - -$(RM) $@.tmp + $(call MakeTargetDir) + $(RM) $@.tmp $(TOOL_SPP) < $< >$@.tmp \ -Kdecoder \ -DA='A' \ @@ -69,8 +69,8 @@ GENSRC_CHARSETCODER += $(GENSRC_CHARSETCODER_DST)/CharsetDecoder.java ################################################################################ $(GENSRC_CHARSETCODER_DST)/CharsetEncoder.java: $(GENSRC_CHARSETCODER_TEMPLATE) - $(MKDIR) -p $(@D) - -$(RM) $@.tmp + $(call MakeTargetDir) + $(RM) $@.tmp $(TOOL_SPP) < $< >$@.tmp \ -Kencoder \ -DA='An' \ diff --git a/make/gensrc/GensrcCommonLangtools.gmk b/make/gensrc/GensrcCommonLangtools.gmk index 682808c37ab..abdea20c087 100644 --- a/make/gensrc/GensrcCommonLangtools.gmk +++ b/make/gensrc/GensrcCommonLangtools.gmk @@ -49,7 +49,7 @@ TOOL_PARSEPROPS_CMD := $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/langtools_tools # root. define SetupVersionProperties $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/$$(strip $2): - $(MKDIR) -p $$(@D) + $$(call MakeTargetDir) $(PRINTF) "jdk=$(VERSION_NUMBER)\nfull=$(VERSION_STRING)\nrelease=$(VERSION_SHORT)\n" \ > $$@ @@ -92,7 +92,7 @@ define SetupCompileProperties # Now setup the rule for the generation of the resource bundles. $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/_the_props: $$(PROPSOURCES) - $(MKDIR) -p $$(@D) $$(PROPDIRS) + $$(call MakeDir, $$(@D) $$(PROPDIRS)) $(FIND) $$(@D) -name "*.java" -a ! -name "*Properties.java" $(FIND_DELETE) $(ECHO) Compiling $$(words $$(PROPSOURCES)) properties into resource bundles for $(MODULE) $(TOOL_COMPILEPROPS_CMD) $$(PROPCMDLINE) @@ -122,7 +122,7 @@ define SetupParseProperties # Now setup the rule for the generation of the resource bundles. $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/_the_parsed_props: $$(PARSEPROPSOURCES) - $(MKDIR) -p $$(@D) $$(PARSEPROPDIRS) + $$(call MakeDir, $$(@D) $$(PARSEPROPDIRS)) $(FIND) $$(@D) -name "*Properties.java" $(FIND_DELETE) $(ECHO) Parsing $$(words $$(PARSEPROPSOURCES)) properties into enum-like class for $(MODULE) $(TOOL_PARSEPROPS_CMD) $$(PARSEPROPCMDLINE) diff --git a/make/gensrc/GensrcLocaleData.gmk b/make/gensrc/GensrcLocaleData.gmk index 3235136b1eb..7b8378a74f3 100644 --- a/make/gensrc/GensrcLocaleData.gmk +++ b/make/gensrc/GensrcLocaleData.gmk @@ -131,7 +131,7 @@ SED_NONBASEARGS += -e 's/$(HASH)AvailableLocales_Locales$(HASH)/$(sort $(ALL_NON $(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/util/locale/provider/BaseLocaleDataMetaInfo.java: \ $(TOPDIR)/src/java.base/share/classes/sun/util/locale/provider/LocaleDataMetaInfo-XLocales.java.template $(call LogInfo, Creating sun/util/locale/provider/BaseLocaleDataMetaInfo.java from $(words $(LOCALE_RESOURCES)) found resources) - $(MKDIR) -p $(@D) + $(call MakeTargetDir) $(PRINTF) "PREV_LOCALE_RESOURCES:=$(LOCALE_RESOURCES)" \ > $(SUPPORT_OUTPUTDIR)/gensrc/java.base/_the.locale_resources $(SED) $(SED_BASEARGS) $< > $@ @@ -139,7 +139,7 @@ $(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/util/locale/provider/BaseLocaleDataMet $(SUPPORT_OUTPUTDIR)/gensrc/jdk.localedata/sun/util/resources/provider/NonBaseLocaleDataMetaInfo.java: \ $(TOPDIR)/src/java.base/share/classes/sun/util/locale/provider/LocaleDataMetaInfo-XLocales.java.template $(call LogInfo, Creating sun/util/resources/provider/NonBaseLocaleDataMetaInfo.java from $(words $(LOCALE_RESOURCES)) found resources) - $(MKDIR) -p $(@D) + $(call MakeTargetDir) $(PRINTF) "PREV_LOCALE_RESOURCES:=$(LOCALE_RESOURCES)" \ > $(SUPPORT_OUTPUTDIR)/gensrc/jdk.localedata/_the.locale_resources $(SED) $(SED_NONBASEARGS) $< > $@ diff --git a/make/gensrc/GensrcModuleLoaderMap.gmk b/make/gensrc/GensrcModuleLoaderMap.gmk index 86d4446496a..29a4efe4ad7 100644 --- a/make/gensrc/GensrcModuleLoaderMap.gmk +++ b/make/gensrc/GensrcModuleLoaderMap.gmk @@ -46,7 +46,7 @@ VARDEPS_FILE := $(call DependOnVariable, VARDEPS_VALUE) $(SUPPORT_OUTPUTDIR)/gensrc/java.base/jdk/internal/module/ModuleLoaderMap.java: \ $(TOPDIR)/src/java.base/share/classes/jdk/internal/module/ModuleLoaderMap.java \ $(VARDEPS_FILE) $(BUILD_TOOLS_JDK) - $(MKDIR) -p $(@D) + $(call MakeTargetDir) $(RM) $@ $@.tmp $(TOOL_GENCLASSLOADERMAP) -boot $(BOOT_MODULES_LIST) \ -platform $(PLATFORM_MODULES_LIST) -o $@.tmp $< diff --git a/make/gensrc/GensrcProperties.gmk b/make/gensrc/GensrcProperties.gmk index c8d17a35539..bf7384dc751 100644 --- a/make/gensrc/GensrcProperties.gmk +++ b/make/gensrc/GensrcProperties.gmk @@ -34,7 +34,7 @@ define SetupOneCopy-zh_HK $$(subst _zh_TW,_zh_HK, $2)) $$($1_$2_TARGET): $2 - $(MKDIR) -p $$(@D) + $$(call MakeTargetDir) $(CAT) $$< | $(SED) -e '/class/s/_zh_TW/_zh_HK/' > $$@ $1 += $$($1_$2_TARGET) @@ -105,8 +105,8 @@ define SetupCompilePropertiesBody # Now setup the rule for the generation of the resource bundles. $$($1_TARGET): $$($1_SRC_FILES) $$($1_JAVAS) $(BUILD_TOOLS_JDK) - $(MKDIR) -p $$(@D) $$($1_DIRS) - $(ECHO) Compiling $$(words $$($1_SRC_FILES)) properties into resource bundles for $(MODULE) + $$(call LogWarn, Compiling $$(words $$($1_SRC_FILES)) properties into resource bundles for $(MODULE)) + $$(call MakeDir, $$(@D) $$($1_DIRS)) $$(eval $$(call ListPathsSafely, $1_CMDLINE, $$($1_CMDLINE_FILE))) $(TOOL_COMPILEPROPERTIES) -quiet @$$($1_CMDLINE_FILE) $(TOUCH) $$@ diff --git a/make/gensrc/GensrcSwing.gmk b/make/gensrc/GensrcSwing.gmk index 713f1d3425d..a1485881df1 100644 --- a/make/gensrc/GensrcSwing.gmk +++ b/make/gensrc/GensrcSwing.gmk @@ -32,7 +32,7 @@ NIMBUS_SKIN_FILE = $(TOPDIR)/src/java.desktop/share/classes/javax/swing/plaf/nim $(SUPPORT_OUTPUTDIR)/gensrc/java.desktop/_the.generated_nimbus: $(NIMBUS_SKIN_FILE) $(BUILD_TOOLS_JDK) $(call LogInfo, Generating Nimbus source files) - $(MKDIR) -p $(@D) + $(call MakeTargetDir) $(TOOL_GENERATENIMBUS) $(LOG_DEBUG) \ -skinFile $(NIMBUS_SKIN_FILE) -buildDir $(SUPPORT_OUTPUTDIR)/gensrc/java.desktop \ -packagePrefix $(NIMBUS_PACKAGE).nimbus -lafName Nimbus diff --git a/make/launcher/Launcher-java.base.gmk b/make/launcher/Launcher-java.base.gmk index 0ce0287d2be..44263adc5a1 100644 --- a/make/launcher/Launcher-java.base.gmk +++ b/make/launcher/Launcher-java.base.gmk @@ -45,7 +45,7 @@ $(eval $(call SetupBuildLauncher, java, \ )) $(SUPPORT_OUTPUTDIR)/modules_cmds/java.base/java$(EXE_SUFFIX): $(BUILD_LAUNCHER_java) - $(MKDIR) -p $(@D) + $(call MakeTargetDir) $(RM) $@ $(CP) $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/java_objs/java$(EXE_SUFFIX) $@ diff --git a/make/rmic/Rmic-java.management.rmi.gmk b/make/rmic/Rmic-java.management.rmi.gmk index 50c090c1deb..b6665566123 100644 --- a/make/rmic/Rmic-java.management.rmi.gmk +++ b/make/rmic/Rmic-java.management.rmi.gmk @@ -51,7 +51,7 @@ $(RMIC_GENSRC_DIR)/_classes.moved: $(RMI_GEN) $(foreach src, $(classfiles), \ $(eval target := $(patsubst $(RMIC_GENSRC_DIR)/%, \ $(STUB_CLASSES_DIR)/%, $(src))) \ - $(MKDIR) -p $(dir $(target)) ; \ + $(call MakeDir, $(dir $(target))) \ $(MV) $(src) $(target) $(NEWLINE)) $(TOUCH) $@ From 8351e4db3e8528789faf400028a4e0d8a83cff11 Mon Sep 17 00:00:00 2001 From: David Holmes Date: Tue, 9 Oct 2018 20:19:22 -0400 Subject: [PATCH 056/124] 8211065: Private method check in linkResolver is incorrect Reviewed-by: acorn, lfoltan --- .../share/interpreter/linkResolver.cpp | 18 -- .../privateMethods/TestInvokeErrors.java | 16 +- .../linkResolver/TestDeletedMethod.java | 65 +++++++ .../linkResolver/TestDeletedMethod_Sub.jcod | 172 ++++++++++++++++++ .../linkResolver/TestDeletedMethod_Super.jcod | 143 +++++++++++++++ 5 files changed, 386 insertions(+), 28 deletions(-) create mode 100644 test/hotspot/jtreg/runtime/linkResolver/TestDeletedMethod.java create mode 100644 test/hotspot/jtreg/runtime/linkResolver/TestDeletedMethod_Sub.jcod create mode 100644 test/hotspot/jtreg/runtime/linkResolver/TestDeletedMethod_Super.jcod diff --git a/src/hotspot/share/interpreter/linkResolver.cpp b/src/hotspot/share/interpreter/linkResolver.cpp index ab17cb4e560..e48479ba80a 100644 --- a/src/hotspot/share/interpreter/linkResolver.cpp +++ b/src/hotspot/share/interpreter/linkResolver.cpp @@ -793,24 +793,6 @@ methodHandle LinkResolver::resolve_method(const LinkInfo& link_info, check_method_loader_constraints(link_info, resolved_method, "method", CHECK_NULL); } - // For private method invocation we should only find the method in the resolved class. - // If that is not the case then we have a found a supertype method that we have nestmate - // access to. - if (resolved_method->is_private() && resolved_method->method_holder() != resolved_klass) { - ResourceMark rm(THREAD); - DEBUG_ONLY(bool is_nestmate = InstanceKlass::cast(link_info.current_klass())->has_nestmate_access_to(InstanceKlass::cast(resolved_klass), THREAD);) - assert(is_nestmate, "was only expecting nestmates to get here!"); - Exceptions::fthrow( - THREAD_AND_LOCATION, - vmSymbols::java_lang_NoSuchMethodError(), - "%s: method %s%s not found", - resolved_klass->external_name(), - resolved_method->name()->as_C_string(), - resolved_method->signature()->as_C_string() - ); - return NULL; - } - return resolved_method; } diff --git a/test/hotspot/jtreg/runtime/Nestmates/privateMethods/TestInvokeErrors.java b/test/hotspot/jtreg/runtime/Nestmates/privateMethods/TestInvokeErrors.java index a73a377b647..43cc0b635b0 100644 --- a/test/hotspot/jtreg/runtime/Nestmates/privateMethods/TestInvokeErrors.java +++ b/test/hotspot/jtreg/runtime/Nestmates/privateMethods/TestInvokeErrors.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2018, 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 @@ -23,7 +23,7 @@ /* * @test - * @bug 8046171 + * @bug 8046171 8211065 * @summary Setup nestmate calls to private methods then use * modified jcod classes to introduce errors. Test with * and without verification enabled @@ -96,14 +96,10 @@ public class TestInvokeErrors { System.out.println("Got expected exception:" + nsme); } - try { - MissingMethodWithSuper m = new MissingMethodWithSuper(); - m.priv_invoke(); - throw new Error("Unexpected success invoking MissingMethodWithSuper.priv_invoke"); - } - catch (NoSuchMethodError nsme) { - System.out.println("Got expected exception:" + nsme); - } + // This test was revised to expect successful invocation of the + // super class method - see JDK-8211065 + MissingMethodWithSuper m = new MissingMethodWithSuper(); + m.priv_invoke(); // Verification of Helper will trigger the nestmate access check failure try { diff --git a/test/hotspot/jtreg/runtime/linkResolver/TestDeletedMethod.java b/test/hotspot/jtreg/runtime/linkResolver/TestDeletedMethod.java new file mode 100644 index 00000000000..c51a55ad1ef --- /dev/null +++ b/test/hotspot/jtreg/runtime/linkResolver/TestDeletedMethod.java @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2018, 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. + * + * 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 8211065 + * @summary Test that deleting a subclass method implementation results in + * execution of a superclass implementation - if it is accessible. + * @compile TestDeletedMethod.java + * @compile TestDeletedMethod_Sub.jcod TestDeletedMethod_Super.jcod + * @run main/othervm -XX:+RelaxAccessControlCheck TestDeletedMethod + */ + +// The access control relaxation was originally done to ensure an assertion +// in the nestmate logic would not trigger unintentionally because it +// assumed only nestmates could be involved. The assertion no longer exists +// but we keep the test as a non-nestmate version of the situation. + +/* package */ class TestDeletedMethod_Super { + public static final int ID = 2; + private static int m() { + System.out.println("Super.m"); + return ID; + } +} + +/* package */ class TestDeletedMethod_Sub extends TestDeletedMethod_Super { + public static final int ID = 1; + // At runtime this implementation is not present + private static int m() { + System.out.println("Sub.m"); + return ID; + } + public static int test() { + return TestDeletedMethod_Sub.m(); + } +} + +public class TestDeletedMethod { + public static void main(String[] args) { + int x = TestDeletedMethod_Sub.test(); + if (x != TestDeletedMethod_Super.ID) + throw new RuntimeException("Wrong method invoked: " + x); + } +} diff --git a/test/hotspot/jtreg/runtime/linkResolver/TestDeletedMethod_Sub.jcod b/test/hotspot/jtreg/runtime/linkResolver/TestDeletedMethod_Sub.jcod new file mode 100644 index 00000000000..20c2e76f3db --- /dev/null +++ b/test/hotspot/jtreg/runtime/linkResolver/TestDeletedMethod_Sub.jcod @@ -0,0 +1,172 @@ +/* + * Copyright (c) 2018, 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. + * + * 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. + */ + +// We have deleted the local method m() by renaming it +// We have set the class file version to 49 to allow relaxed access checks + +class TestDeletedMethod_Sub { + 0xCAFEBABE; + 0; // minor version + 49; // version + [] { // Constant Pool + ; // first element is empty + Method #7 #21; // #1 + Field #22 #23; // #2 + String #24; // #3 + Method #25 #26; // #4 + class #27; // #5 + Method #5 #28; // #6 + class #29; // #7 + Utf8 "ID"; // #8 + Utf8 "I"; // #9 + Utf8 "ConstantValue"; // #10 + int 0x00000001; // #11 + Utf8 ""; // #12 + Utf8 "()V"; // #13 + Utf8 "Code"; // #14 + Utf8 "LineNumberTable"; // #15 + Utf8 "m"; // #16 + Utf8 "()I"; // #17 + Utf8 "test"; // #18 + Utf8 "SourceFile"; // #19 + Utf8 "TestDeletedMethod.java"; // #20 + NameAndType #12 #13; // #21 + class #30; // #22 + NameAndType #31 #32; // #23 + Utf8 "Sub.m"; // #24 + class #33; // #25 + NameAndType #34 #35; // #26 + Utf8 "TestDeletedMethod_Sub"; // #27 + NameAndType #16 #17; // #28 + Utf8 "TestDeletedMethod_Super"; // #29 + Utf8 "java/lang/System"; // #30 + Utf8 "out"; // #31 + Utf8 "Ljava/io/PrintStream;"; // #32 + Utf8 "java/io/PrintStream"; // #33 + Utf8 "println"; // #34 + Utf8 "(Ljava/lang/String;)V"; // #35 + Utf8 "m_renamed"; // #36 added + } // Constant Pool + + 0x0020; // access + #5;// this_cpx + #7;// super_cpx + + [] { // Interfaces + } // Interfaces + + [] { // fields + { // Member + 0x0019; // access + #8; // name_cpx + #9; // sig_cpx + [] { // Attributes + Attr(#10) { // ConstantValue + #11; + } // end ConstantValue + } // Attributes + } // Member + } // fields + + [] { // methods + { // Member + 0x0000; // access + #12; // name_cpx + #13; // sig_cpx + [] { // Attributes + Attr(#14) { // Code + 1; // max_stack + 1; // max_locals + Bytes[]{ + 0x2AB70001B1; + }; + [] { // Traps + } // end Traps + [] { // Attributes + Attr(#15) { // LineNumberTable + [] { // LineNumberTable + 0 43; + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member + 0x000A; // access + #36; // name_cpx UPDATED to rename method + #17; // sig_cpx + [] { // Attributes + Attr(#14) { // Code + 2; // max_stack + 0; // max_locals + Bytes[]{ + 0xB200021203B60004; + 0x04AC; + }; + [] { // Traps + } // end Traps + [] { // Attributes + Attr(#15) { // LineNumberTable + [] { // LineNumberTable + 0 47; + 8 48; + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member + 0x0009; // access + #18; // name_cpx + #17; // sig_cpx + [] { // Attributes + Attr(#14) { // Code + 1; // max_stack + 0; // max_locals + Bytes[]{ + 0xB80006AC; + }; + [] { // Traps + } // end Traps + [] { // Attributes + Attr(#15) { // LineNumberTable + [] { // LineNumberTable + 0 51; + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + } // methods + + [] { // Attributes + Attr(#19) { // SourceFile + #20; + } // end SourceFile + } // Attributes +} // end class TestDeletedMethod_Sub diff --git a/test/hotspot/jtreg/runtime/linkResolver/TestDeletedMethod_Super.jcod b/test/hotspot/jtreg/runtime/linkResolver/TestDeletedMethod_Super.jcod new file mode 100644 index 00000000000..c8cce05d19c --- /dev/null +++ b/test/hotspot/jtreg/runtime/linkResolver/TestDeletedMethod_Super.jcod @@ -0,0 +1,143 @@ +/* + * Copyright (c) 2018, 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. + * + * 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. + */ + +// We have set the class file version to 49 to allow relaxed access checks + +class TestDeletedMethod_Super { + 0xCAFEBABE; + 0; // minor version + 49; // version + [] { // Constant Pool + ; // first element is empty + Method #6 #19; // #1 + Field #20 #21; // #2 + String #22; // #3 + Method #23 #24; // #4 + class #25; // #5 + class #26; // #6 + Utf8 "ID"; // #7 + Utf8 "I"; // #8 + Utf8 "ConstantValue"; // #9 + int 0x00000002; // #10 + Utf8 ""; // #11 + Utf8 "()V"; // #12 + Utf8 "Code"; // #13 + Utf8 "LineNumberTable"; // #14 + Utf8 "m"; // #15 + Utf8 "()I"; // #16 + Utf8 "SourceFile"; // #17 + Utf8 "TestDeletedMethod.java"; // #18 + NameAndType #11 #12; // #19 + class #27; // #20 + NameAndType #28 #29; // #21 + Utf8 "Super.m"; // #22 + class #30; // #23 + NameAndType #31 #32; // #24 + Utf8 "TestDeletedMethod_Super"; // #25 + Utf8 "java/lang/Object"; // #26 + Utf8 "java/lang/System"; // #27 + Utf8 "out"; // #28 + Utf8 "Ljava/io/PrintStream;"; // #29 + Utf8 "java/io/PrintStream"; // #30 + Utf8 "println"; // #31 + Utf8 "(Ljava/lang/String;)V"; // #32 + } // Constant Pool + + 0x0020; // access + #5;// this_cpx + #6;// super_cpx + + [] { // Interfaces + } // Interfaces + + [] { // fields + { // Member + 0x0019; // access + #7; // name_cpx + #8; // sig_cpx + [] { // Attributes + Attr(#9) { // ConstantValue + #10; + } // end ConstantValue + } // Attributes + } // Member + } // fields + + [] { // methods + { // Member + 0x0000; // access + #11; // name_cpx + #12; // sig_cpx + [] { // Attributes + Attr(#13) { // Code + 1; // max_stack + 1; // max_locals + Bytes[]{ + 0x2AB70001B1; + }; + [] { // Traps + } // end Traps + [] { // Attributes + Attr(#14) { // LineNumberTable + [] { // LineNumberTable + 0 35; + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member + 0x000A; // access + #15; // name_cpx + #16; // sig_cpx + [] { // Attributes + Attr(#13) { // Code + 2; // max_stack + 0; // max_locals + Bytes[]{ + 0xB200021203B60004; + 0x05AC; + }; + [] { // Traps + } // end Traps + [] { // Attributes + Attr(#14) { // LineNumberTable + [] { // LineNumberTable + 0 38; + 8 39; + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + } // methods + + [] { // Attributes + Attr(#17) { // SourceFile + #18; + } // end SourceFile + } // Attributes +} // end class TestDeletedMethod_Super From 468b69240e0e3068827855e3f487c7ff317a917e Mon Sep 17 00:00:00 2001 From: David Holmes Date: Tue, 9 Oct 2018 20:38:13 -0400 Subject: [PATCH 057/124] 8211394: CHECK_ must be used in the rhs of an assignment statement within a block Replace "return foo(CHECK_X);" with "return foo(THREAD);" Reviewed-by: iklam, phh, stuefe, lfoltan --- src/hotspot/share/classfile/verificationType.cpp | 2 +- src/hotspot/share/classfile/verificationType.hpp | 2 +- src/hotspot/share/jvmci/jvmciEnv.cpp | 2 +- src/hotspot/share/oops/constantPool.cpp | 2 +- src/hotspot/share/oops/instanceMirrorKlass.cpp | 2 +- src/hotspot/share/runtime/javaCalls.cpp | 7 ++++--- src/hotspot/share/services/management.cpp | 4 ++-- src/hotspot/share/utilities/exceptions.hpp | 4 ++-- 8 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/hotspot/share/classfile/verificationType.cpp b/src/hotspot/share/classfile/verificationType.cpp index aadaa7edfd2..cb3c5a1775f 100644 --- a/src/hotspot/share/classfile/verificationType.cpp +++ b/src/hotspot/share/classfile/verificationType.cpp @@ -111,7 +111,7 @@ bool VerificationType::is_reference_assignable_from( VerificationType comp_from = from.get_component(context, CHECK_false); if (!comp_this.is_bogus() && !comp_from.is_bogus()) { return comp_this.is_component_assignable_from(comp_from, context, - from_field_is_protected, CHECK_false); + from_field_is_protected, THREAD); } } return false; diff --git a/src/hotspot/share/classfile/verificationType.hpp b/src/hotspot/share/classfile/verificationType.hpp index 8fa024147ac..fba473980fe 100644 --- a/src/hotspot/share/classfile/verificationType.hpp +++ b/src/hotspot/share/classfile/verificationType.hpp @@ -312,7 +312,7 @@ class VerificationType { case Short: return false; default: - return is_assignable_from(from, context, from_field_is_protected, CHECK_false); + return is_assignable_from(from, context, from_field_is_protected, THREAD); } } } diff --git a/src/hotspot/share/jvmci/jvmciEnv.cpp b/src/hotspot/share/jvmci/jvmciEnv.cpp index ed8308ed67a..825aacad25e 100644 --- a/src/hotspot/share/jvmci/jvmciEnv.cpp +++ b/src/hotspot/share/jvmci/jvmciEnv.cpp @@ -148,7 +148,7 @@ Klass* JVMCIEnv::get_klass_by_name_impl(Klass* accessing_klass, require_local); if (elem_klass != NULL) { // Now make an array for it - return elem_klass->array_klass(CHECK_NULL); + return elem_klass->array_klass(THREAD); } } diff --git a/src/hotspot/share/oops/constantPool.cpp b/src/hotspot/share/oops/constantPool.cpp index 5e2846a0317..ef2184f5af6 100644 --- a/src/hotspot/share/oops/constantPool.cpp +++ b/src/hotspot/share/oops/constantPool.cpp @@ -472,7 +472,7 @@ Klass* ConstantPool::klass_at_impl(const constantPoolHandle& this_cp, int which, // or any internal exception fields such as cause or stacktrace. But since the // detail message is often a class name or other literal string, we will repeat it // if we can find it in the symbol table. - throw_resolution_error(this_cp, which, CHECK_0); + throw_resolution_error(this_cp, which, CHECK_NULL); ShouldNotReachHere(); } diff --git a/src/hotspot/share/oops/instanceMirrorKlass.cpp b/src/hotspot/share/oops/instanceMirrorKlass.cpp index 266436a382d..8073eb30620 100644 --- a/src/hotspot/share/oops/instanceMirrorKlass.cpp +++ b/src/hotspot/share/oops/instanceMirrorKlass.cpp @@ -52,7 +52,7 @@ instanceOop InstanceMirrorKlass::allocate_instance(Klass* k, TRAPS) { // Since mirrors can be variable sized because of the static fields, store // the size in the mirror itself. - return (instanceOop)Universe::heap()->class_allocate(this, size, CHECK_NULL); + return (instanceOop)Universe::heap()->class_allocate(this, size, THREAD); } int InstanceMirrorKlass::oop_size(oop obj) const { diff --git a/src/hotspot/share/runtime/javaCalls.cpp b/src/hotspot/share/runtime/javaCalls.cpp index 32040586b36..295fca9357d 100644 --- a/src/hotspot/share/runtime/javaCalls.cpp +++ b/src/hotspot/share/runtime/javaCalls.cpp @@ -307,25 +307,26 @@ Handle JavaCalls::construct_new_instance(InstanceKlass* klass, Symbol* construct JavaCalls::call_special(&void_result, klass, vmSymbols::object_initializer_name(), constructor_signature, args, CHECK_NH); + // Already returned a Null Handle if any exception is pending. return obj; } Handle JavaCalls::construct_new_instance(InstanceKlass* klass, Symbol* constructor_signature, TRAPS) { JavaCallArguments args; - return JavaCalls::construct_new_instance(klass, constructor_signature, &args, CHECK_NH); + return JavaCalls::construct_new_instance(klass, constructor_signature, &args, THREAD); } Handle JavaCalls::construct_new_instance(InstanceKlass* klass, Symbol* constructor_signature, Handle arg1, TRAPS) { JavaCallArguments args; args.push_oop(arg1); - return JavaCalls::construct_new_instance(klass, constructor_signature, &args, CHECK_NH); + return JavaCalls::construct_new_instance(klass, constructor_signature, &args, THREAD); } Handle JavaCalls::construct_new_instance(InstanceKlass* klass, Symbol* constructor_signature, Handle arg1, Handle arg2, TRAPS) { JavaCallArguments args; args.push_oop(arg1); args.push_oop(arg2); - return JavaCalls::construct_new_instance(klass, constructor_signature, &args, CHECK_NH); + return JavaCalls::construct_new_instance(klass, constructor_signature, &args, THREAD); } // ------------------------------------------------- diff --git a/src/hotspot/share/services/management.cpp b/src/hotspot/share/services/management.cpp index bd58e08e17a..db2cc37cff7 100644 --- a/src/hotspot/share/services/management.cpp +++ b/src/hotspot/share/services/management.cpp @@ -178,7 +178,7 @@ void Management::get_optional_support(jmmOptionalSupport* support) { InstanceKlass* Management::load_and_initialize_klass(Symbol* sh, TRAPS) { Klass* k = SystemDictionary::resolve_or_fail(sh, true, CHECK_NULL); - return initialize_klass(k, CHECK_NULL); + return initialize_klass(k, THREAD); } InstanceKlass* Management::load_and_initialize_klass_or_null(Symbol* sh, TRAPS) { @@ -186,7 +186,7 @@ InstanceKlass* Management::load_and_initialize_klass_or_null(Symbol* sh, TRAPS) if (k == NULL) { return NULL; } - return initialize_klass(k, CHECK_NULL); + return initialize_klass(k, THREAD); } InstanceKlass* Management::initialize_klass(Klass* k, TRAPS) { diff --git a/src/hotspot/share/utilities/exceptions.hpp b/src/hotspot/share/utilities/exceptions.hpp index 18c40b51780..7b2328b051d 100644 --- a/src/hotspot/share/utilities/exceptions.hpp +++ b/src/hotspot/share/utilities/exceptions.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2018, 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 @@ -211,7 +211,7 @@ class Exceptions { // // CAUTION: make sure that the function call using a CHECK macro is not the only statement of a // conditional branch w/o enclosing {} braces, since the CHECK macros expand into several state- -// ments! +// ments! Also make sure it is not used on a function call that is part of a return statement! #define PENDING_EXCEPTION (((ThreadShadow*)THREAD)->pending_exception()) #define HAS_PENDING_EXCEPTION (((ThreadShadow*)THREAD)->has_pending_exception()) From f2d02897e135bfd88760286888137ca24fdaaf36 Mon Sep 17 00:00:00 2001 From: Daniil Titov Date: Tue, 9 Oct 2018 19:11:09 -0700 Subject: [PATCH 058/124] 8193879: Java debugger hangs on method invocation Reviewed-by: sspitsyn, amenkov, gadams --- .../com/sun/tools/jdi/InvokableTypeImpl.java | 10 +- .../classes/com/sun/tools/jdi/VMState.java | 23 +-- .../sun/jdi/MethodInvokeWithTraceOnTest.java | 169 ++++++++++++++++++ test/jdk/com/sun/jdi/TestScaffold.java | 17 +- test/jdk/com/sun/jdi/lib/jdb/JdbTest.java | 2 +- 5 files changed, 194 insertions(+), 27 deletions(-) create mode 100644 test/jdk/com/sun/jdi/MethodInvokeWithTraceOnTest.java diff --git a/src/jdk.jdi/share/classes/com/sun/tools/jdi/InvokableTypeImpl.java b/src/jdk.jdi/share/classes/com/sun/tools/jdi/InvokableTypeImpl.java index 23fa649cff6..5d6393d489d 100644 --- a/src/jdk.jdi/share/classes/com/sun/tools/jdi/InvokableTypeImpl.java +++ b/src/jdk.jdi/share/classes/com/sun/tools/jdi/InvokableTypeImpl.java @@ -236,15 +236,7 @@ abstract class InvokableTypeImpl extends ReferenceTypeImpl { final MethodImpl method, final ValueImpl[] args, final int options) { - /* - * Cache the values of args when TRACE_SENDS is enabled, for later printing. - * If not cached, printing causes a remote call while synchronized, and deadlock. - */ - if ((vm.traceFlags & VirtualMachine.TRACE_SENDS) != 0) { - for (ValueImpl arg: args) { - arg.toString(); - } - } + CommandSender sender = getInvokeMethodSender(thread, method, args, options); PacketStream stream; if ((options & ClassType.INVOKE_SINGLE_THREADED) != 0) { diff --git a/src/jdk.jdi/share/classes/com/sun/tools/jdi/VMState.java b/src/jdk.jdi/share/classes/com/sun/tools/jdi/VMState.java index 61a3b5467f7..f448531091c 100644 --- a/src/jdk.jdi/share/classes/com/sun/tools/jdi/VMState.java +++ b/src/jdk.jdi/share/classes/com/sun/tools/jdi/VMState.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2018, 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 @@ -26,10 +26,7 @@ package com.sun.tools.jdi; import java.lang.ref.WeakReference; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Iterator; -import java.util.List; +import java.util.*; import com.sun.jdi.ThreadGroupReference; import com.sun.jdi.ThreadReference; @@ -44,12 +41,10 @@ class VMState { /* * Certain information can be cached only when the entire VM is - * suspended and there are no pending resumes. The fields below - * are used to track whether there are pending resumes. (There - * is an assumption that JDWP command ids are increasing over time.) + * suspended and there are no pending resumes. The field below + * is used to track whether there are pending resumes. */ - private int lastCompletedCommandId = 0; // synchronized (this) - private int lastResumeCommandId = 0; // synchronized (this) + private final Set pendingResumeCommands = Collections.synchronizedSet(new HashSet<>()); // This is cached only while the VM is suspended private static class Cache { @@ -97,12 +92,12 @@ class VMState { * A JDWP command has been completed (reply has been received). * Update data that tracks pending resume commands. */ - synchronized void notifyCommandComplete(int id) { - lastCompletedCommandId = id; + void notifyCommandComplete(int id) { + pendingResumeCommands.remove(id); } synchronized void freeze() { - if (cache == null && (lastCompletedCommandId >= lastResumeCommandId)) { + if (cache == null && (pendingResumeCommands.isEmpty())) { /* * No pending resumes to worry about. The VM is suspended * and additional state can be cached. Notify all @@ -115,7 +110,7 @@ class VMState { synchronized PacketStream thawCommand(CommandSender sender) { PacketStream stream = sender.send(); - lastResumeCommandId = stream.id(); + pendingResumeCommands.add(stream.id()); thaw(); return stream; } diff --git a/test/jdk/com/sun/jdi/MethodInvokeWithTraceOnTest.java b/test/jdk/com/sun/jdi/MethodInvokeWithTraceOnTest.java new file mode 100644 index 00000000000..dd5fe30d603 --- /dev/null +++ b/test/jdk/com/sun/jdi/MethodInvokeWithTraceOnTest.java @@ -0,0 +1,169 @@ +/* + * Copyright (c) 2018, 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. + * + * 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 8193879 8193801 8129348 + * @summary Invokes static and instance methods when debugger trace + * mode is on. + * @library /test/lib + * @run build TestScaffold VMConnection TargetListener TargetAdapter + * @run compile -g MethodInvokeWithTraceOnTest.java + * @run driver MethodInvokeWithTraceOnTest + */ + +import com.sun.jdi.*; +import com.sun.jdi.event.*; +import com.sun.jdi.request.*; + +import java.util.*; + +import static lib.jdb.JdbTest.*; + +/********** target program **********/ + +class MethodInvokeWithTraceOnTestTarg { + public static void main(String[] args) { + new MethodInvokeWithTraceOnTestTarg().test(); + } + + private void test() { + Thread thread = Thread.currentThread(); + print(thread); // @1 breakpoint + String str = "test"; + printStatic(str); // @2 breakpoint + + } + + public void print(Object obj) { + System.out.println(obj); + } + + public static void printStatic(Object obj) { + System.out.println(obj); + } + +} + + +/********** test program **********/ + +public class MethodInvokeWithTraceOnTest extends TestScaffold { + + MethodInvokeWithTraceOnTest(String args[]) { + super(args); + } + + public static void main(String[] args) + throws Exception { + new MethodInvokeWithTraceOnTest(args).startTests(); + } + + /********** test core **********/ + + protected void runTests() throws Exception { + init(); + + // Test with suspend policy set to SUSPEND_EVENT_THREAD + BreakpointEvent be = resumeToBreakpoint(true, 1); + System.out.println("Breakpoint 1 is hit, suspendPolicy:" + be.request().suspendPolicy()); + testMethods(be); + + // Test with suspend policy set to SUSPEND_ALL + be = resumeToBreakpoint(false, 2); + System.out.println("Breakpoint 2 is hit, suspendPolicy:" + be.request().suspendPolicy()); + testMethods(be); + + listenUntilVMDisconnect(); + } + + private void init() throws Exception { + startToMain("MethodInvokeWithTraceOnTestTarg"); + vm().setDebugTraceMode(VirtualMachine.TRACE_ALL); + } + + private BreakpointEvent resumeToBreakpoint(boolean suspendThread, int breakpointId) throws Exception { + int bkpLine = parseBreakpoints(getTestSourcePath("MethodInvokeWithTraceOnTest.java"), breakpointId).get(0); + System.out.println("Running to line: " + bkpLine); + return resumeTo("MethodInvokeWithTraceOnTestTarg", bkpLine, suspendThread); + } + + private void testMethods(BreakpointEvent be) throws Exception { + System.out.println("Testing methods..."); + ThreadReference thread = be.thread(); + StackFrame frame = thread.frame(0); + ObjectReference thisObj = frame.thisObject(); + LocalVariable threadVar = frame.visibleVariableByName("thread"); + ThreadReference threadObj = (ThreadReference) frame.getValue(threadVar); + StringReference stringObj = vm().mirrorOf("test string"); + int invokeOptions = getMethodInvokeOptions(be); + + testInstanceMethod1(thread, thisObj, stringObj, threadObj, invokeOptions); + testStaticMethod1(thread, thisObj, stringObj, threadObj, invokeOptions); + testStaticMethod2(thread, invokeOptions); + } + + private void testInstanceMethod1(ThreadReference thread, ObjectReference thisObj, StringReference stringObj, + ThreadReference threadObj, int invokeOptions) throws Exception { + ClassType classType = (ClassType) thisObj.referenceType(); + Method printMethod = classType.methodsByName("print", + "(Ljava/lang/Object;)V").get(0); + + System.out.println("Passing StringReference to instance method..."); + thisObj.invokeMethod(thread, printMethod, Collections.singletonList(stringObj), invokeOptions); + + System.out.println("Passing ThreadReference to instance method..."); + thisObj.invokeMethod(thread, printMethod, Collections.singletonList(threadObj), invokeOptions); + } + + private void testStaticMethod1(ThreadReference thread, ObjectReference thisObj, StringReference stringObj, + ThreadReference threadObj, int invokeOptions) throws Exception { + ClassType classType = (ClassType) thisObj.referenceType(); + Method printMethod = classType.methodsByName("printStatic", + "(Ljava/lang/Object;)V").get(0); + + System.out.println("Passing StringReference to static method..."); + classType.invokeMethod(thread, printMethod, Collections.singletonList(stringObj), invokeOptions); + + System.out.println("Passing ThreadReference to static method..."); + classType.invokeMethod(thread, printMethod, Collections.singletonList(threadObj), invokeOptions); + } + + private void testStaticMethod2(ThreadReference thread, int invokeOptions) throws Exception { + ClassType classType = getClassType("java.lang.Class"); + Method forNameMethod = classType.methodsByName("forName", + "(Ljava/lang/String;)Ljava/lang/Class;").get(0); + StringReference classNameParam = vm().mirrorOf("java.lang.String"); + classType.invokeMethod(thread, forNameMethod, Collections.singletonList(classNameParam), invokeOptions); + } + + private ClassType getClassType(String className) { + List classes = vm().classesByName(className); + return (ClassType) classes.get(0); + } + + private int getMethodInvokeOptions(BreakpointEvent be) { + return be.request().suspendPolicy() == EventRequest.SUSPEND_EVENT_THREAD ? + ObjectReference.INVOKE_SINGLE_THREADED : 0; + } +} diff --git a/test/jdk/com/sun/jdi/TestScaffold.java b/test/jdk/com/sun/jdi/TestScaffold.java index 4e80d408901..2561c5b5ba6 100644 --- a/test/jdk/com/sun/jdi/TestScaffold.java +++ b/test/jdk/com/sun/jdi/TestScaffold.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2018, 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 @@ -784,9 +784,16 @@ abstract public class TestScaffold extends TargetAdapter { } public BreakpointEvent resumeTo(Location loc) { + return resumeTo(loc, false); + } + + public BreakpointEvent resumeTo(Location loc, boolean suspendThread) { final BreakpointRequest request = - requestManager.createBreakpointRequest(loc); + requestManager.createBreakpointRequest(loc); request.addCountFilter(1); + if (suspendThread) { + request.setSuspendPolicy(EventRequest.SUSPEND_EVENT_THREAD); + } request.enable(); return (BreakpointEvent)waitForRequestedEvent(request); } @@ -845,12 +852,16 @@ abstract public class TestScaffold extends TargetAdapter { } public BreakpointEvent resumeTo(String clsName, int lineNumber) throws AbsentInformationException { + return resumeTo(clsName, lineNumber, false); + } + + public BreakpointEvent resumeTo(String clsName, int lineNumber, boolean suspendThread) throws AbsentInformationException { ReferenceType rt = findReferenceType(clsName); if (rt == null) { rt = resumeToPrepareOf(clsName).referenceType(); } - return resumeTo(findLocation(rt, lineNumber)); + return resumeTo(findLocation(rt, lineNumber), suspendThread); } public ClassPrepareEvent resumeToPrepareOf(String className) { diff --git a/test/jdk/com/sun/jdi/lib/jdb/JdbTest.java b/test/jdk/com/sun/jdi/lib/jdb/JdbTest.java index 716a918dbf0..3d407adb319 100644 --- a/test/jdk/com/sun/jdi/lib/jdb/JdbTest.java +++ b/test/jdk/com/sun/jdi/lib/jdb/JdbTest.java @@ -238,7 +238,7 @@ public abstract class JdbTest { } // gets full test source path for the given test filename - protected static String getTestSourcePath(String fileName) { + public static String getTestSourcePath(String fileName) { return Paths.get(System.getProperty("test.src")).resolve(fileName).toString(); } From a9f9385cedf095915dc7502d93b92425ede7db22 Mon Sep 17 00:00:00 2001 From: Ralf Schmelter Date: Wed, 10 Oct 2018 08:36:31 +0200 Subject: [PATCH 059/124] 8211332: Space for stub routines (code_size2) is too small on new Skylake CPUs Increase code_size2 for new Skylake CPUs. Reviewed-by: kvn, stuefe, thartmann --- src/hotspot/cpu/x86/stubRoutines_x86.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hotspot/cpu/x86/stubRoutines_x86.hpp b/src/hotspot/cpu/x86/stubRoutines_x86.hpp index 1fa697a624c..8648c10928a 100644 --- a/src/hotspot/cpu/x86/stubRoutines_x86.hpp +++ b/src/hotspot/cpu/x86/stubRoutines_x86.hpp @@ -33,7 +33,7 @@ static bool returns_to_call_stub(address return_pc) { return return_pc == _call_ enum platform_dependent_constants { code_size1 = 20000 LP64_ONLY(+10000), // simply increase if too small (assembler will crash if too small) - code_size2 = 33800 LP64_ONLY(+10000) // simply increase if too small (assembler will crash if too small) + code_size2 = 35300 LP64_ONLY(+10000) // simply increase if too small (assembler will crash if too small) }; class x86 { From 3085a89f134df553c2204892f6484e97cf2604e4 Mon Sep 17 00:00:00 2001 From: Roman Kennke Date: Wed, 3 Oct 2018 15:22:16 +0200 Subject: [PATCH 060/124] 8211279: Verify missing object equals barriers Reviewed-by: pliden, shade, zgu --- src/hotspot/share/code/nmethod.cpp | 2 +- src/hotspot/share/code/relocInfo.cpp | 2 +- src/hotspot/share/compiler/oopMap.cpp | 6 +++--- src/hotspot/share/gc/shared/barrierSet.hpp | 4 ++++ src/hotspot/share/gc/shared/referenceProcessor.cpp | 6 +++--- src/hotspot/share/gc/shared/referenceProcessor.hpp | 4 ++-- .../share/gc/shared/stringdedup/stringDedupTable.cpp | 2 +- src/hotspot/share/oops/access.hpp | 2 +- src/hotspot/share/oops/accessBackend.hpp | 2 +- src/hotspot/share/oops/oop.hpp | 2 ++ src/hotspot/share/oops/oopsHierarchy.cpp | 12 ++++++++++++ src/hotspot/share/oops/oopsHierarchy.hpp | 4 ++-- 12 files changed, 33 insertions(+), 15 deletions(-) diff --git a/src/hotspot/share/code/nmethod.cpp b/src/hotspot/share/code/nmethod.cpp index b3d5d2f0408..8368f074dfe 100644 --- a/src/hotspot/share/code/nmethod.cpp +++ b/src/hotspot/share/code/nmethod.cpp @@ -2340,7 +2340,7 @@ void nmethod::print_recorded_oops() { for (int i = 0; i < oops_count(); i++) { oop o = oop_at(i); tty->print("#%3d: " INTPTR_FORMAT " ", i, p2i(o)); - if (o == (oop)Universe::non_oop_word()) { + if (o == Universe::non_oop_word()) { tty->print("non-oop word"); } else { if (o != NULL) { diff --git a/src/hotspot/share/code/relocInfo.cpp b/src/hotspot/share/code/relocInfo.cpp index 94fb1886b68..0654df90b2f 100644 --- a/src/hotspot/share/code/relocInfo.cpp +++ b/src/hotspot/share/code/relocInfo.cpp @@ -574,7 +574,7 @@ oop* oop_Relocation::oop_addr() { oop oop_Relocation::oop_value() { oop v = *oop_addr(); // clean inline caches store a special pseudo-null - if (v == (oop)Universe::non_oop_word()) v = NULL; + if (v == Universe::non_oop_word()) v = NULL; return v; } diff --git a/src/hotspot/share/compiler/oopMap.cpp b/src/hotspot/share/compiler/oopMap.cpp index 262a2a9826f..a791fa24c50 100644 --- a/src/hotspot/share/compiler/oopMap.cpp +++ b/src/hotspot/share/compiler/oopMap.cpp @@ -350,7 +350,7 @@ void OopMapSet::all_do(const frame *fr, const RegisterMap *reg_map, // implicit null check is used in compiled code. // The narrow_oop_base could be NULL or be the address // of the page below heap depending on compressed oops mode. - if (base_loc != NULL && *base_loc != (oop)NULL && !Universe::is_narrow_oop_base(*base_loc)) { + if (base_loc != NULL && *base_loc != NULL && !Universe::is_narrow_oop_base(*base_loc)) { derived_oop_fn(base_loc, derived_loc); } oms.next(); @@ -371,7 +371,7 @@ void OopMapSet::all_do(const frame *fr, const RegisterMap *reg_map, guarantee(loc != NULL, "missing saved register"); if ( omv.type() == OopMapValue::oop_value ) { oop val = *loc; - if (val == (oop)NULL || Universe::is_narrow_oop_base(val)) { + if (val == NULL || Universe::is_narrow_oop_base(val)) { // Ignore NULL oops and decoded NULL narrow oops which // equal to Universe::narrow_oop_base when a narrow oop // implicit null check is used in compiled code. @@ -769,7 +769,7 @@ void DerivedPointerTable::add(oop *derived_loc, oop *base_loc) { assert(Universe::heap()->is_in_or_null(*base_loc), "not an oop"); assert(derived_loc != base_loc, "Base and derived in same location"); if (_active) { - assert(*derived_loc != (oop)base_loc, "location already added"); + assert(*derived_loc != (void*)base_loc, "location already added"); assert(_list != NULL, "list must exist"); intptr_t offset = value_of_loc(derived_loc) - value_of_loc(base_loc); // This assert is invalid because derived pointers can be diff --git a/src/hotspot/share/gc/shared/barrierSet.hpp b/src/hotspot/share/gc/shared/barrierSet.hpp index 7996b721778..9780dceb2d7 100644 --- a/src/hotspot/share/gc/shared/barrierSet.hpp +++ b/src/hotspot/share/gc/shared/barrierSet.hpp @@ -130,6 +130,10 @@ public: virtual void on_thread_detach(JavaThread* thread) {} virtual void make_parsable(JavaThread* thread) {} +#ifdef CHECK_UNHANDLED_OOPS + virtual bool oop_equals_operator_allowed() { return true; } +#endif + public: // Print a description of the memory for the barrier set virtual void print_on(outputStream* st) const = 0; diff --git a/src/hotspot/share/gc/shared/referenceProcessor.cpp b/src/hotspot/share/gc/shared/referenceProcessor.cpp index 214ee00a9df..868aac5062c 100644 --- a/src/hotspot/share/gc/shared/referenceProcessor.cpp +++ b/src/hotspot/share/gc/shared/referenceProcessor.cpp @@ -284,7 +284,7 @@ void DiscoveredListIterator::remove() { // First _prev_next ref actually points into DiscoveredList (gross). oop new_next; - if (_next_discovered == _current_discovered) { + if (oopDesc::equals_raw(_next_discovered, _current_discovered)) { // At the end of the list, we should make _prev point to itself. // If _ref is the first ref, then _prev_next will be in the DiscoveredList, // and _prev will be NULL. @@ -474,7 +474,7 @@ void ReferenceProcessor::clear_discovered_references(DiscoveredList& refs_list) { oop obj = NULL; oop next = refs_list.head(); - while (next != obj) { + while (!oopDesc::equals_raw(next, obj)) { obj = next; next = java_lang_ref_Reference::discovered(obj); java_lang_ref_Reference::set_discovered_raw(obj, NULL); @@ -746,7 +746,7 @@ void ReferenceProcessor::balance_queues(DiscoveredList ref_lists[]) ref_lists[to_idx].inc_length(refs_to_move); // Remove the chain from the from list. - if (move_tail == new_head) { + if (oopDesc::equals_raw(move_tail, new_head)) { // We found the end of the from list. ref_lists[from_idx].set_head(NULL); } else { diff --git a/src/hotspot/share/gc/shared/referenceProcessor.hpp b/src/hotspot/share/gc/shared/referenceProcessor.hpp index daa7f009336..305cbd233dd 100644 --- a/src/hotspot/share/gc/shared/referenceProcessor.hpp +++ b/src/hotspot/share/gc/shared/referenceProcessor.hpp @@ -143,13 +143,13 @@ public: inline size_t removed() const { return _removed; } inline void move_to_next() { - if (_current_discovered == _next_discovered) { + if (oopDesc::equals_raw(_current_discovered, _next_discovered)) { // End of the list. _current_discovered = NULL; } else { _current_discovered = _next_discovered; } - assert(_current_discovered != _first_seen, "cyclic ref_list found"); + assert(!oopDesc::equals_raw(_current_discovered, _first_seen), "cyclic ref_list found"); _processed++; } }; diff --git a/src/hotspot/share/gc/shared/stringdedup/stringDedupTable.cpp b/src/hotspot/share/gc/shared/stringdedup/stringDedupTable.cpp index 489423d96ff..42247d20865 100644 --- a/src/hotspot/share/gc/shared/stringdedup/stringDedupTable.cpp +++ b/src/hotspot/share/gc/shared/stringdedup/stringDedupTable.cpp @@ -375,7 +375,7 @@ void StringDedupTable::deduplicate(oop java_string, StringDedupStat* stat) { } typeArrayOop existing_value = lookup_or_add(value, latin1, hash); - if (existing_value == value) { + if (oopDesc::equals_raw(existing_value, value)) { // Same value, already known stat->inc_known(); return; diff --git a/src/hotspot/share/oops/access.hpp b/src/hotspot/share/oops/access.hpp index 2020b133f3c..149392bc9e5 100644 --- a/src/hotspot/share/oops/access.hpp +++ b/src/hotspot/share/oops/access.hpp @@ -277,7 +277,7 @@ public: } static bool equals(oop o1, oop o2) { - verify_decorators(); + verify_decorators(); return AccessInternal::equals(o1, o2); } }; diff --git a/src/hotspot/share/oops/accessBackend.hpp b/src/hotspot/share/oops/accessBackend.hpp index 05ef31b65b6..5a170ec3d9f 100644 --- a/src/hotspot/share/oops/accessBackend.hpp +++ b/src/hotspot/share/oops/accessBackend.hpp @@ -410,7 +410,7 @@ public: static oop resolve(oop obj) { return obj; } - static bool equals(oop o1, oop o2) { return o1 == o2; } + static bool equals(oop o1, oop o2) { return (void*)o1 == (void*)o2; } }; // Below is the implementation of the first 4 steps of the template pipeline: diff --git a/src/hotspot/share/oops/oop.hpp b/src/hotspot/share/oops/oop.hpp index e6665b65172..fb3cd7ae63f 100644 --- a/src/hotspot/share/oops/oop.hpp +++ b/src/hotspot/share/oops/oop.hpp @@ -153,6 +153,8 @@ class oopDesc { inline static bool equals(oop o1, oop o2) { return Access<>::equals(o1, o2); } + inline static bool equals_raw(oop o1, oop o2) { return RawAccess<>::equals(o1, o2); } + // Access to fields in a instanceOop through these methods. template oop obj_field_access(int offset) const; diff --git a/src/hotspot/share/oops/oopsHierarchy.cpp b/src/hotspot/share/oops/oopsHierarchy.cpp index 7a0bf50d6e0..afb86676fb9 100644 --- a/src/hotspot/share/oops/oopsHierarchy.cpp +++ b/src/hotspot/share/oops/oopsHierarchy.cpp @@ -23,6 +23,7 @@ */ #include "precompiled.hpp" +#include "gc/shared/barrierSet.hpp" #include "gc/shared/collectedHeap.hpp" #include "gc/shared/collectedHeap.inline.hpp" #include "oops/oopsHierarchy.hpp" @@ -53,4 +54,15 @@ void oop::unregister_oop() { t->unhandled_oops()->unregister_unhandled_oop(this); } } + +bool oop::operator==(const oop o) const { + assert(BarrierSet::barrier_set()->oop_equals_operator_allowed(), "Not allowed"); + return obj() == o.obj(); +} + +bool oop::operator!=(const volatile oop o) const { + assert(BarrierSet::barrier_set()->oop_equals_operator_allowed(), "Not allowed"); + return obj() != o.obj(); +} + #endif // CHECK_UNHANDLED_OOPS diff --git a/src/hotspot/share/oops/oopsHierarchy.hpp b/src/hotspot/share/oops/oopsHierarchy.hpp index d419aa156c0..a9bb63800ea 100644 --- a/src/hotspot/share/oops/oopsHierarchy.hpp +++ b/src/hotspot/share/oops/oopsHierarchy.hpp @@ -101,9 +101,9 @@ public: // General access oopDesc* operator->() const { return obj(); } - bool operator==(const oop o) const { return obj() == o.obj(); } + bool operator==(const oop o) const; bool operator==(void *p) const { return obj() == p; } - bool operator!=(const volatile oop o) const { return obj() != o.obj(); } + bool operator!=(const volatile oop o) const; bool operator!=(void *p) const { return obj() != p; } // Assignment From 5de31861b205bef3bd03dcb9e5cf1e9e376083b3 Mon Sep 17 00:00:00 2001 From: Roman Kennke Date: Wed, 10 Oct 2018 10:58:48 +0200 Subject: [PATCH 061/124] 8211270: GC abstraction to get real object and headers size Reviewed-by: shade, zgu, eosterlund --- src/hotspot/share/gc/shared/collectedHeap.cpp | 4 ++++ src/hotspot/share/gc/shared/collectedHeap.hpp | 2 ++ src/hotspot/share/prims/jvmtiEnv.cpp | 2 +- src/hotspot/share/prims/whitebox.cpp | 2 +- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/hotspot/share/gc/shared/collectedHeap.cpp b/src/hotspot/share/gc/shared/collectedHeap.cpp index 6d3462d34f0..21ae92c7d79 100644 --- a/src/hotspot/share/gc/shared/collectedHeap.cpp +++ b/src/hotspot/share/gc/shared/collectedHeap.cpp @@ -586,3 +586,7 @@ void CollectedHeap::unpin_object(JavaThread* thread, oop obj) { void CollectedHeap::deduplicate_string(oop str) { // Do nothing, unless overridden in subclass. } + +size_t CollectedHeap::obj_size(oop obj) const { + return obj->size(); +} diff --git a/src/hotspot/share/gc/shared/collectedHeap.hpp b/src/hotspot/share/gc/shared/collectedHeap.hpp index c3454e2f924..458d3b3ace7 100644 --- a/src/hotspot/share/gc/shared/collectedHeap.hpp +++ b/src/hotspot/share/gc/shared/collectedHeap.hpp @@ -576,6 +576,8 @@ class CollectedHeap : public CHeapObj { virtual bool is_oop(oop object) const; + virtual size_t obj_size(oop obj) const; + // Non product verification and debugging. #ifndef PRODUCT // Support for PromotionFailureALot. Return true if it's time to cause a diff --git a/src/hotspot/share/prims/jvmtiEnv.cpp b/src/hotspot/share/prims/jvmtiEnv.cpp index 289de3c9ec2..5a4c02c0367 100644 --- a/src/hotspot/share/prims/jvmtiEnv.cpp +++ b/src/hotspot/share/prims/jvmtiEnv.cpp @@ -470,7 +470,7 @@ jvmtiError JvmtiEnv::GetObjectSize(jobject object, jlong* size_ptr) { oop mirror = JNIHandles::resolve_external_guard(object); NULL_CHECK(mirror, JVMTI_ERROR_INVALID_OBJECT); - *size_ptr = (jlong)mirror->size() * wordSize; + *size_ptr = (jlong)Universe::heap()->obj_size(mirror) * wordSize; return JVMTI_ERROR_NONE; } /* end GetObjectSize */ diff --git a/src/hotspot/share/prims/whitebox.cpp b/src/hotspot/share/prims/whitebox.cpp index a407d8c6e20..fea2bc89fc1 100644 --- a/src/hotspot/share/prims/whitebox.cpp +++ b/src/hotspot/share/prims/whitebox.cpp @@ -372,7 +372,7 @@ WB_END WB_ENTRY(jlong, WB_GetObjectSize(JNIEnv* env, jobject o, jobject obj)) oop p = JNIHandles::resolve(obj); - return p->size() * HeapWordSize; + return Universe::heap()->obj_size(p) * HeapWordSize; WB_END WB_ENTRY(jlong, WB_GetHeapSpaceAlignment(JNIEnv* env, jobject o)) From df92fc0954e309acec355b9071a06da984a1abe7 Mon Sep 17 00:00:00 2001 From: Michihiro Horie Date: Wed, 10 Oct 2018 14:28:35 +0200 Subject: [PATCH 062/124] 8211908: PPC64: Enable SuperWordLoopUnrollAnalysis by default Reviewed-by: mdoerr, goetz --- src/hotspot/cpu/ppc/c2_globals_ppc.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hotspot/cpu/ppc/c2_globals_ppc.hpp b/src/hotspot/cpu/ppc/c2_globals_ppc.hpp index a947e45febf..96a2a5f9235 100644 --- a/src/hotspot/cpu/ppc/c2_globals_ppc.hpp +++ b/src/hotspot/cpu/ppc/c2_globals_ppc.hpp @@ -62,7 +62,7 @@ define_pd_global(bool, OptoPeephole, false); define_pd_global(bool, UseCISCSpill, false); define_pd_global(bool, OptoBundling, false); define_pd_global(bool, OptoRegScheduling, false); -define_pd_global(bool, SuperWordLoopUnrollAnalysis, false); +define_pd_global(bool, SuperWordLoopUnrollAnalysis, true); // GL: // Detected a problem with unscaled compressed oops and // narrow_oop_use_complex_address() == false. From a9efcea77884f6f36219fd665073b5906ddb212d Mon Sep 17 00:00:00 2001 From: Pavel Rappo Date: Wed, 10 Oct 2018 14:13:32 +0100 Subject: [PATCH 063/124] 8212000: Verify exported symbols in java.base (libnet, libnio/ch) Reviewed-by: alanb, chegar --- src/java.base/share/native/libnet/net_util.h | 5 +---- src/java.base/unix/native/libnet/net_util_md.c | 2 +- src/java.base/unix/native/libnio/ch/Net.c | 3 +-- src/java.base/unix/native/libnio/ch/nio_util.h | 3 +-- src/java.base/windows/native/libnet/net_util_md.c | 2 +- 5 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/java.base/share/native/libnet/net_util.h b/src/java.base/share/native/libnet/net_util.h index 1caefd23001..08360d71148 100644 --- a/src/java.base/share/native/libnet/net_util.h +++ b/src/java.base/share/native/libnet/net_util.h @@ -122,8 +122,6 @@ JNIEXPORT void JNICALL Java_java_net_NetworkInterface_init(JNIEnv *env, jclass c JNIEXPORT void JNICALL NET_ThrowNew(JNIEnv *env, int errorNum, char *msg); -int NET_GetError(); - void NET_ThrowCurrent(JNIEnv *env, char *msg); jfieldID NET_GetFileDescriptorID(JNIEnv *env); @@ -202,7 +200,6 @@ NET_EnableFastTcpLoopback(int fd); unsigned short in_cksum(unsigned short *addr, int len); -JNIEXPORT jint JNICALL -NET_Wait(JNIEnv *env, jint fd, jint flags, jint timeout); +jint NET_Wait(JNIEnv *env, jint fd, jint flags, jint timeout); #endif /* NET_UTILS_H */ diff --git a/src/java.base/unix/native/libnet/net_util_md.c b/src/java.base/unix/native/libnet/net_util_md.c index 2a740d10b92..50ca625d08d 100644 --- a/src/java.base/unix/native/libnet/net_util_md.c +++ b/src/java.base/unix/native/libnet/net_util_md.c @@ -1546,7 +1546,7 @@ NET_Bind(int fd, SOCKETADDRESS *sa, int len) * It returns the time left from the timeout (possibly 0), or -1 if it expired. */ -JNIEXPORT jint JNICALL +jint NET_Wait(JNIEnv *env, jint fd, jint flags, jint timeout) { jlong prevNanoTime = JVM_NanoTime(env, 0); diff --git a/src/java.base/unix/native/libnio/ch/Net.c b/src/java.base/unix/native/libnio/ch/Net.c index e1320599102..6e5ef2ab934 100644 --- a/src/java.base/unix/native/libnio/ch/Net.c +++ b/src/java.base/unix/native/libnio/ch/Net.c @@ -747,8 +747,7 @@ Java_sun_nio_ch_Net_pollconnValue(JNIEnv *env, jclass this) /* Declared in nio_util.h */ -JNIEXPORT jint JNICALL -handleSocketError(JNIEnv *env, jint errorValue) +jint handleSocketError(JNIEnv *env, jint errorValue) { char *xn; switch (errorValue) { diff --git a/src/java.base/unix/native/libnio/ch/nio_util.h b/src/java.base/unix/native/libnio/ch/nio_util.h index 9d77f0580ca..912f78e2ba1 100644 --- a/src/java.base/unix/native/libnio/ch/nio_util.h +++ b/src/java.base/unix/native/libnio/ch/nio_util.h @@ -62,5 +62,4 @@ jlong convertLongReturnVal(JNIEnv *env, jlong n, jboolean reading); /* Defined in Net.c */ -JNIEXPORT jint JNICALL -handleSocketError(JNIEnv *env, jint errorValue); +jint handleSocketError(JNIEnv *env, jint errorValue); diff --git a/src/java.base/windows/native/libnet/net_util_md.c b/src/java.base/windows/native/libnet/net_util_md.c index c09786f9f9b..2a3e1985131 100644 --- a/src/java.base/windows/native/libnet/net_util_md.c +++ b/src/java.base/windows/native/libnet/net_util_md.c @@ -903,7 +903,7 @@ NET_IsEqual(jbyte* caddr1, jbyte* caddr2) { * It returns the time left from the timeout, or -1 if it expired. */ -JNIEXPORT jint JNICALL +jint NET_Wait(JNIEnv *env, jint fd, jint flags, jint timeout) { jlong prevTime = JVM_CurrentTimeMillis(env, 0); From a2d1b6b720a52866aded62040ab93abac9bf0090 Mon Sep 17 00:00:00 2001 From: Roland Westrelin Date: Fri, 28 Sep 2018 14:24:22 +0200 Subject: [PATCH 064/124] 8211232: GraphKit::make_runtime_call() sometimes attaches wrong memory state to call Reviewed-by: kvn --- src/hotspot/share/opto/graphKit.cpp | 9 ++++----- src/hotspot/share/opto/graphKit.hpp | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/hotspot/share/opto/graphKit.cpp b/src/hotspot/share/opto/graphKit.cpp index 9f51d248c13..b30689c957d 100644 --- a/src/hotspot/share/opto/graphKit.cpp +++ b/src/hotspot/share/opto/graphKit.cpp @@ -1804,12 +1804,13 @@ Node* GraphKit::set_results_for_java_call(CallJavaNode* call, bool separate_io_p // A better answer would be to separate out card marks from other memory. // For now, return the input memory state, so that it can be reused // after the call, if this call has restricted memory effects. -Node* GraphKit::set_predefined_input_for_runtime_call(SafePointNode* call) { +Node* GraphKit::set_predefined_input_for_runtime_call(SafePointNode* call, Node* narrow_mem) { // Set fixed predefined input arguments Node* memory = reset_memory(); + Node* m = narrow_mem == NULL ? memory : narrow_mem; call->init_req( TypeFunc::Control, control() ); call->init_req( TypeFunc::I_O, top() ); // does no i/o - call->init_req( TypeFunc::Memory, memory ); // may gc ptrs + call->init_req( TypeFunc::Memory, m ); // may gc ptrs call->init_req( TypeFunc::FramePtr, frameptr() ); call->init_req( TypeFunc::ReturnAdr, top() ); return memory; @@ -2465,9 +2466,7 @@ Node* GraphKit::make_runtime_call(int flags, } else { assert(!wide_out, "narrow in => narrow out"); Node* narrow_mem = memory(adr_type); - prev_mem = reset_memory(); - map()->set_memory(narrow_mem); - set_predefined_input_for_runtime_call(call); + prev_mem = set_predefined_input_for_runtime_call(call, narrow_mem); } // Hook each parm in order. Stop looking at the first NULL. diff --git a/src/hotspot/share/opto/graphKit.hpp b/src/hotspot/share/opto/graphKit.hpp index d061fb6b556..bac4e45e64a 100644 --- a/src/hotspot/share/opto/graphKit.hpp +++ b/src/hotspot/share/opto/graphKit.hpp @@ -699,7 +699,7 @@ class GraphKit : public Phase { void set_predefined_output_for_runtime_call(Node* call, Node* keep_mem, const TypePtr* hook_mem); - Node* set_predefined_input_for_runtime_call(SafePointNode* call); + Node* set_predefined_input_for_runtime_call(SafePointNode* call, Node* narrow_mem = NULL); // Replace the call with the current state of the kit. Requires // that the call was generated with separate io_projs so that From 1e887a901e19515a1ea16b903ad2be41620cfefd Mon Sep 17 00:00:00 2001 From: Weijun Wang Date: Wed, 10 Oct 2018 22:13:30 +0800 Subject: [PATCH 065/124] 8211969: test/jdk/lib/security/CheckBlacklistedCerts.java searching for wrong paths Reviewed-by: mullan --- .../lib/security/CheckBlacklistedCerts.java | 44 ++++++------------- 1 file changed, 13 insertions(+), 31 deletions(-) diff --git a/test/jdk/lib/security/CheckBlacklistedCerts.java b/test/jdk/lib/security/CheckBlacklistedCerts.java index 5c18de62111..ef3cfb4d6ce 100644 --- a/test/jdk/lib/security/CheckBlacklistedCerts.java +++ b/test/jdk/lib/security/CheckBlacklistedCerts.java @@ -23,7 +23,7 @@ /* * @test - * @bug 8011402 + * @bug 8011402 8211969 * @summary Move blacklisting certificate logic from hard code to data * @modules java.base/sun.security.util */ @@ -60,38 +60,20 @@ public class CheckBlacklistedCerts { Set blacklisted = new HashSet<>(); // Assumes the full src is available - File[] blacklists = { - new File(System.getProperty("test.src"), - "../../../make/data/blacklistedcertsconverter/blacklisted.certs.pem"), - new File(System.getProperty("test.src"), - "../../../make/closed/data/blacklistedcertsconverter/blacklisted.certs.pem") - }; - - // Is this an OPENJDK build? - String prop = System.getProperty("java.runtime.name"); - if (prop != null && prop.startsWith("OpenJDK")) { - System.out.println("This is a OpenJDK build."); - blacklists = Arrays.copyOf(blacklists, 1); - } + File blacklist = new File(System.getProperty("test.src"), + "../../../../make/data/blacklistedcertsconverter/blacklisted.certs.pem"); CertificateFactory cf = CertificateFactory.getInstance("X.509"); - for (File blacklist: blacklists) { - System.out.print("Check for " + blacklist + ": "); - if (!blacklist.exists()) { - System.out.println("does not exist"); - } else { - try (FileInputStream fis = new FileInputStream(blacklist)) { - Collection certs - = cf.generateCertificates(fis); - System.out.println(certs.size()); - for (Certificate c: certs) { - blacklisted.add(c); - X509Certificate cert = ((X509Certificate)c); - if (!UntrustedCertificates.isUntrusted(cert)) { - System.out.println(cert.getSubjectDN() + " is trusted"); - failed = true; - } - } + try (FileInputStream fis = new FileInputStream(blacklist)) { + Collection certs + = cf.generateCertificates(fis); + System.out.println(certs.size()); + for (Certificate c: certs) { + blacklisted.add(c); + X509Certificate cert = ((X509Certificate)c); + if (!UntrustedCertificates.isUntrusted(cert)) { + System.out.println(cert.getSubjectDN() + " is trusted"); + failed = true; } } } From 8c62c2e33a4ff54f68a1fb4febac5e00e0c86980 Mon Sep 17 00:00:00 2001 From: Harold Seigel Date: Wed, 10 Oct 2018 10:18:52 -0400 Subject: [PATCH 066/124] 8207689: Remove perfCounter _load_instance_class_failCounter used by deleted flag UnsyncloadClass Delete the perfCounter Reviewed-by: lfoltan, acorn, dholmes --- src/hotspot/share/classfile/classLoader.cpp | 4 ---- src/hotspot/share/classfile/classLoader.hpp | 7 ------- 2 files changed, 11 deletions(-) diff --git a/src/hotspot/share/classfile/classLoader.cpp b/src/hotspot/share/classfile/classLoader.cpp index e37f2c5cc98..5656b952031 100644 --- a/src/hotspot/share/classfile/classLoader.cpp +++ b/src/hotspot/share/classfile/classLoader.cpp @@ -135,7 +135,6 @@ PerfCounter* ClassLoader::_sync_JVMFindLoadedClassLockFreeCounter = NULL; PerfCounter* ClassLoader::_sync_JVMDefineClassLockFreeCounter = NULL; PerfCounter* ClassLoader::_sync_JNIDefineClassLockFreeCounter = NULL; PerfCounter* ClassLoader::_unsafe_defineClassCallCounter = NULL; -PerfCounter* ClassLoader::_load_instance_class_failCounter = NULL; GrowableArray* ClassLoader::_patch_mod_entries = NULL; GrowableArray* ClassLoader::_exploded_entries = NULL; @@ -1604,9 +1603,6 @@ void ClassLoader::initialize() { NEWPERFEVENTCOUNTER(_unsafe_defineClassCallCounter, SUN_CLS, "unsafeDefineClassCalls"); - - NEWPERFEVENTCOUNTER(_load_instance_class_failCounter, SUN_CLS, - "loadInstanceClassFailRate"); } // lookup zip library entry points diff --git a/src/hotspot/share/classfile/classLoader.hpp b/src/hotspot/share/classfile/classLoader.hpp index a103da870e7..4c765be5c92 100644 --- a/src/hotspot/share/classfile/classLoader.hpp +++ b/src/hotspot/share/classfile/classLoader.hpp @@ -192,7 +192,6 @@ class ClassLoader: AllStatic { static PerfCounter* _sync_JNIDefineClassLockFreeCounter; static PerfCounter* _unsafe_defineClassCallCounter; - static PerfCounter* _load_instance_class_failCounter; // The boot class path consists of 3 ordered pieces: // 1. the module/path pairs specified to --patch-module @@ -340,12 +339,6 @@ class ClassLoader: AllStatic { return _unsafe_defineClassCallCounter; } - // Record how many times SystemDictionary::load_instance_class call - // fails with linkageError when Unsyncloadclass flag is set. - static PerfCounter* load_instance_class_failCounter() { - return _load_instance_class_failCounter; - } - // Modular java runtime image is present vs. a build with exploded modules static bool has_jrt_entry() { return (_jrt_entry != NULL); } static ClassPathEntry* get_jrt_entry() { return _jrt_entry; } From 6ca3b398235134dd8cfbe776237dbab2d55bfe45 Mon Sep 17 00:00:00 2001 From: Jean Christophe Beyler Date: Wed, 10 Oct 2018 08:26:49 -0700 Subject: [PATCH 067/124] 8211950: Deprecate the check if a JVMTI collector is present assertion Deprecate assertion that a collector is there; it is now a nop Reviewed-by: eosterlund, phh, pliden --- src/hotspot/share/gc/shared/memAllocator.cpp | 11 ----------- src/hotspot/share/runtime/threadHeapSampler.cpp | 17 ----------------- src/hotspot/share/runtime/threadHeapSampler.hpp | 4 ---- 3 files changed, 32 deletions(-) diff --git a/src/hotspot/share/gc/shared/memAllocator.cpp b/src/hotspot/share/gc/shared/memAllocator.cpp index 5012e6b8ee1..08ab85a6119 100644 --- a/src/hotspot/share/gc/shared/memAllocator.cpp +++ b/src/hotspot/share/gc/shared/memAllocator.cpp @@ -198,15 +198,6 @@ void MemAllocator::Allocation::notify_allocation_jvmti_sampler() { return; } - assert(JavaThread::current()->heap_sampler().add_sampling_collector(), - "Should never return false."); - - // Only check if the sampler could actually sample something in this path. - assert(!JvmtiExport::should_post_sampled_object_alloc() || - !JvmtiSampledObjectAllocEventCollector::object_alloc_is_safe_to_sample() || - _thread->heap_sampler().sampling_collector_present(), - "Sampling collector not present."); - if (JvmtiExport::should_post_sampled_object_alloc()) { // If we want to be sampling, protect the allocated object with a Handle // before doing the callback. The callback is done in the destructor of @@ -219,8 +210,6 @@ void MemAllocator::Allocation::notify_allocation_jvmti_sampler() { _thread->heap_sampler().check_for_sampling(obj_h(), size_in_bytes, bytes_since_last); } - assert(JavaThread::current()->heap_sampler().remove_sampling_collector(), "Should never return false."); - if (_tlab_end_reset_for_sample || _allocated_tlab_size != 0) { _thread->tlab().set_sample_end(); } diff --git a/src/hotspot/share/runtime/threadHeapSampler.cpp b/src/hotspot/share/runtime/threadHeapSampler.cpp index 5b63d7ef0f3..ac398fecaec 100644 --- a/src/hotspot/share/runtime/threadHeapSampler.cpp +++ b/src/hotspot/share/runtime/threadHeapSampler.cpp @@ -171,20 +171,3 @@ int ThreadHeapSampler::get_sampling_interval() { void ThreadHeapSampler::set_sampling_interval(int sampling_interval) { OrderAccess::release_store(&_sampling_interval, sampling_interval); } - -// Methods used in assertion mode to check if a collector is present or not at -// the moment of TLAB sampling, ie a slow allocation path. -bool ThreadHeapSampler::sampling_collector_present() const { - return _collectors_present > 0; -} - -bool ThreadHeapSampler::remove_sampling_collector() { - assert(_collectors_present > 0, "Problem with collector counter."); - _collectors_present--; - return true; -} - -bool ThreadHeapSampler::add_sampling_collector() { - _collectors_present++; - return true; -} diff --git a/src/hotspot/share/runtime/threadHeapSampler.hpp b/src/hotspot/share/runtime/threadHeapSampler.hpp index cb370c11608..06bfbc8635e 100644 --- a/src/hotspot/share/runtime/threadHeapSampler.hpp +++ b/src/hotspot/share/runtime/threadHeapSampler.hpp @@ -66,10 +66,6 @@ class ThreadHeapSampler { static void set_sampling_interval(int sampling_interval); static int get_sampling_interval(); - - bool sampling_collector_present() const; - bool remove_sampling_collector(); - bool add_sampling_collector(); }; #endif // SHARE_RUNTIME_THREADHEAPSAMPLER_HPP From 706a5b9558f2003745f1bfa9a5b14e127b7f9c0b Mon Sep 17 00:00:00 2001 From: Jonathan Gibbons Date: Wed, 10 Oct 2018 10:00:25 -0700 Subject: [PATCH 068/124] 8211952: Broken links in java.time API Reviewed-by: lancea --- .../share/classes/java/time/Duration.java | 2 +- .../share/classes/java/time/Instant.java | 2 +- .../share/classes/java/time/LocalDate.java | 2 +- .../classes/java/time/LocalDateTime.java | 6 +- .../share/classes/java/time/LocalTime.java | 2 +- .../share/classes/java/time/MonthDay.java | 2 +- .../classes/java/time/OffsetDateTime.java | 6 +- .../share/classes/java/time/OffsetTime.java | 6 +- .../share/classes/java/time/Period.java | 2 +- .../share/classes/java/time/Ser.java | 58 +++++++++---------- .../share/classes/java/time/Year.java | 2 +- .../share/classes/java/time/YearMonth.java | 2 +- .../share/classes/java/time/ZoneId.java | 2 +- .../share/classes/java/time/ZoneOffset.java | 2 +- .../share/classes/java/time/ZoneRegion.java | 4 +- .../classes/java/time/ZonedDateTime.java | 8 +-- .../java/time/chrono/AbstractChronology.java | 4 +- .../time/chrono/ChronoLocalDateTimeImpl.java | 4 +- .../java/time/chrono/ChronoPeriodImpl.java | 4 +- .../time/chrono/ChronoZonedDateTimeImpl.java | 4 +- .../java/time/chrono/HijrahChronology.java | 4 +- .../classes/java/time/chrono/HijrahDate.java | 2 +- .../java/time/chrono/IsoChronology.java | 4 +- .../java/time/chrono/JapaneseChronology.java | 4 +- .../java/time/chrono/JapaneseDate.java | 2 +- .../classes/java/time/chrono/JapaneseEra.java | 2 +- .../java/time/chrono/MinguoChronology.java | 4 +- .../classes/java/time/chrono/MinguoDate.java | 2 +- .../share/classes/java/time/chrono/Ser.java | 50 ++++++++-------- .../time/chrono/ThaiBuddhistChronology.java | 4 +- .../java/time/chrono/ThaiBuddhistDate.java | 2 +- .../share/classes/java/time/zone/Ser.java | 14 ++--- .../java/time/zone/ZoneOffsetTransition.java | 6 +- .../time/zone/ZoneOffsetTransitionRule.java | 6 +- .../classes/java/time/zone/ZoneRules.java | 4 +- 35 files changed, 117 insertions(+), 117 deletions(-) diff --git a/src/java.base/share/classes/java/time/Duration.java b/src/java.base/share/classes/java/time/Duration.java index c446bf338ac..6fda63cc25d 100644 --- a/src/java.base/share/classes/java/time/Duration.java +++ b/src/java.base/share/classes/java/time/Duration.java @@ -1519,7 +1519,7 @@ public final class Duration //----------------------------------------------------------------------- /** * Writes the object using a - * dedicated serialized form. + * dedicated serialized form. * @serialData *
          *  out.writeByte(1);  // identifies a Duration
    diff --git a/src/java.base/share/classes/java/time/Instant.java b/src/java.base/share/classes/java/time/Instant.java
    index 0aafa49fd40..8f38c76c20f 100644
    --- a/src/java.base/share/classes/java/time/Instant.java
    +++ b/src/java.base/share/classes/java/time/Instant.java
    @@ -1332,7 +1332,7 @@ public final class Instant
         // -----------------------------------------------------------------------
         /**
          * Writes the object using a
    -     * dedicated serialized form.
    +     * dedicated serialized form.
          * @serialData
          * 
          *  out.writeByte(2);  // identifies an Instant
    diff --git a/src/java.base/share/classes/java/time/LocalDate.java b/src/java.base/share/classes/java/time/LocalDate.java
    index 0a89ec070c4..834a9e3e7df 100644
    --- a/src/java.base/share/classes/java/time/LocalDate.java
    +++ b/src/java.base/share/classes/java/time/LocalDate.java
    @@ -2189,7 +2189,7 @@ public final class LocalDate
         //-----------------------------------------------------------------------
         /**
          * Writes the object using a
    -     * dedicated serialized form.
    +     * dedicated serialized form.
          * @serialData
          * 
          *  out.writeByte(3);  // identifies a LocalDate
    diff --git a/src/java.base/share/classes/java/time/LocalDateTime.java b/src/java.base/share/classes/java/time/LocalDateTime.java
    index 9a9ca87ddc3..8d3773a36eb 100644
    --- a/src/java.base/share/classes/java/time/LocalDateTime.java
    +++ b/src/java.base/share/classes/java/time/LocalDateTime.java
    @@ -1975,12 +1975,12 @@ public final class LocalDateTime
         //-----------------------------------------------------------------------
         /**
          * Writes the object using a
    -     * dedicated serialized form.
    +     * dedicated serialized form.
          * @serialData
          * 
          *  out.writeByte(5);  // identifies a LocalDateTime
    -     *  // the date excluding the one byte header
    -     *  // the time excluding the one byte header
    +     *  // the date excluding the one byte header
    +     *  // the time excluding the one byte header
          * 
    * * @return the instance of {@code Ser}, not null diff --git a/src/java.base/share/classes/java/time/LocalTime.java b/src/java.base/share/classes/java/time/LocalTime.java index 80241339c35..6f427f04d54 100644 --- a/src/java.base/share/classes/java/time/LocalTime.java +++ b/src/java.base/share/classes/java/time/LocalTime.java @@ -1645,7 +1645,7 @@ public final class LocalTime //----------------------------------------------------------------------- /** * Writes the object using a - * dedicated serialized form. + * dedicated serialized form. * @serialData * A twos-complement value indicates the remaining values are not in the stream * and should be set to zero. diff --git a/src/java.base/share/classes/java/time/MonthDay.java b/src/java.base/share/classes/java/time/MonthDay.java index c34a4f9c978..c8b5ca86921 100644 --- a/src/java.base/share/classes/java/time/MonthDay.java +++ b/src/java.base/share/classes/java/time/MonthDay.java @@ -754,7 +754,7 @@ public final class MonthDay //----------------------------------------------------------------------- /** * Writes the object using a - * dedicated serialized form. + * dedicated serialized form. * @serialData *
          *  out.writeByte(13);  // identifies a MonthDay
    diff --git a/src/java.base/share/classes/java/time/OffsetDateTime.java b/src/java.base/share/classes/java/time/OffsetDateTime.java
    index 39b80bc1fc6..19ae55285f0 100644
    --- a/src/java.base/share/classes/java/time/OffsetDateTime.java
    +++ b/src/java.base/share/classes/java/time/OffsetDateTime.java
    @@ -1915,12 +1915,12 @@ public final class OffsetDateTime
         //-----------------------------------------------------------------------
         /**
          * Writes the object using a
    -     * dedicated serialized form.
    +     * dedicated serialized form.
          * @serialData
          * 
          *  out.writeByte(10);  // identifies an OffsetDateTime
    -     *  // the datetime excluding the one byte header
    -     *  // the offset excluding the one byte header
    +     *  // the datetime excluding the one byte header
    +     *  // the offset excluding the one byte header
          * 
    * * @return the instance of {@code Ser}, not null diff --git a/src/java.base/share/classes/java/time/OffsetTime.java b/src/java.base/share/classes/java/time/OffsetTime.java index b4e52743ba5..6301da8946a 100644 --- a/src/java.base/share/classes/java/time/OffsetTime.java +++ b/src/java.base/share/classes/java/time/OffsetTime.java @@ -1400,12 +1400,12 @@ public final class OffsetTime //----------------------------------------------------------------------- /** * Writes the object using a - * dedicated serialized form. + * dedicated serialized form. * @serialData *
          *  out.writeByte(9);  // identifies an OffsetTime
    -     *  // the time excluding the one byte header
    -     *  // the offset excluding the one byte header
    +     *  // the time excluding the one byte header
    +     *  // the offset excluding the one byte header
          * 
    * * @return the instance of {@code Ser}, not null diff --git a/src/java.base/share/classes/java/time/Period.java b/src/java.base/share/classes/java/time/Period.java index 726c52b742b..c0eef02ca1c 100644 --- a/src/java.base/share/classes/java/time/Period.java +++ b/src/java.base/share/classes/java/time/Period.java @@ -1041,7 +1041,7 @@ public final class Period //----------------------------------------------------------------------- /** * Writes the object using a - * dedicated serialized form. + * dedicated serialized form. * @serialData *
          *  out.writeByte(14);  // identifies a Period
    diff --git a/src/java.base/share/classes/java/time/Ser.java b/src/java.base/share/classes/java/time/Ser.java
    index 885b43abd83..26cfc0b8ffc 100644
    --- a/src/java.base/share/classes/java/time/Ser.java
    +++ b/src/java.base/share/classes/java/time/Ser.java
    @@ -1,5 +1,5 @@
     /*
    - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
    + * Copyright (c) 2012, 2018, 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
    @@ -139,20 +139,20 @@ final class Ser implements Externalizable {
          * in the stream.  Refer to each class {@code writeReplace}
          * serialized form for the value of the type and sequence of values for the type.
          * 
          *
          * @param out  the data stream to write to, not null
    @@ -223,20 +223,20 @@ final class Ser implements Externalizable {
          * {@code Ser} object.
          *
          * 
      - *
    • Duration - {@code Duration.ofSeconds(seconds, nanos);} - *
    • Instant - {@code Instant.ofEpochSecond(seconds, nanos);} - *
    • LocalDate - {@code LocalDate.of(year, month, day);} - *
    • LocalDateTime - {@code LocalDateTime.of(date, time);} - *
    • LocalTime - {@code LocalTime.of(hour, minute, second, nano);} - *
    • MonthDay - {@code MonthDay.of(month, day);} - *
    • OffsetTime - {@code OffsetTime.of(time, offset);} - *
    • OffsetDateTime - {@code OffsetDateTime.of(dateTime, offset);} - *
    • Period - {@code Period.of(years, months, days);} - *
    • Year - {@code Year.of(year);} - *
    • YearMonth - {@code YearMonth.of(year, month);} - *
    • ZonedDateTime - {@code ZonedDateTime.ofLenient(dateTime, offset, zone);} - *
    • ZoneId - {@code ZoneId.of(id);} - *
    • ZoneOffset - {@code (offsetByte == 127 ? ZoneOffset.ofTotalSeconds(in.readInt()) : ZoneOffset.ofTotalSeconds(offsetByte * 900));} + *
    • Duration - {@code Duration.ofSeconds(seconds, nanos);} + *
    • Instant - {@code Instant.ofEpochSecond(seconds, nanos);} + *
    • LocalDate - {@code LocalDate.of(year, month, day);} + *
    • LocalDateTime - {@code LocalDateTime.of(date, time);} + *
    • LocalTime - {@code LocalTime.of(hour, minute, second, nano);} + *
    • MonthDay - {@code MonthDay.of(month, day);} + *
    • OffsetTime - {@code OffsetTime.of(time, offset);} + *
    • OffsetDateTime - {@code OffsetDateTime.of(dateTime, offset);} + *
    • Period - {@code Period.of(years, months, days);} + *
    • Year - {@code Year.of(year);} + *
    • YearMonth - {@code YearMonth.of(year, month);} + *
    • ZonedDateTime - {@code ZonedDateTime.ofLenient(dateTime, offset, zone);} + *
    • ZoneId - {@code ZoneId.of(id);} + *
    • ZoneOffset - {@code (offsetByte == 127 ? ZoneOffset.ofTotalSeconds(in.readInt()) : ZoneOffset.ofTotalSeconds(offsetByte * 900));} *
    * * @param in the data to read, not null diff --git a/src/java.base/share/classes/java/time/Year.java b/src/java.base/share/classes/java/time/Year.java index 27dc53dae6e..624e2a0e7a5 100644 --- a/src/java.base/share/classes/java/time/Year.java +++ b/src/java.base/share/classes/java/time/Year.java @@ -1088,7 +1088,7 @@ public final class Year //----------------------------------------------------------------------- /** * Writes the object using a - * dedicated serialized form. + * dedicated serialized form. * @serialData *
          *  out.writeByte(11);  // identifies a Year
    diff --git a/src/java.base/share/classes/java/time/YearMonth.java b/src/java.base/share/classes/java/time/YearMonth.java
    index d1fa05b6243..40c88e4f6c5 100644
    --- a/src/java.base/share/classes/java/time/YearMonth.java
    +++ b/src/java.base/share/classes/java/time/YearMonth.java
    @@ -1212,7 +1212,7 @@ public final class YearMonth
         //-----------------------------------------------------------------------
         /**
          * Writes the object using a
    -     * dedicated serialized form.
    +     * dedicated serialized form.
          * @serialData
          * 
          *  out.writeByte(12);  // identifies a YearMonth
    diff --git a/src/java.base/share/classes/java/time/ZoneId.java b/src/java.base/share/classes/java/time/ZoneId.java
    index 8bd135ab611..7f4ddbd4c8b 100644
    --- a/src/java.base/share/classes/java/time/ZoneId.java
    +++ b/src/java.base/share/classes/java/time/ZoneId.java
    @@ -641,7 +641,7 @@ public abstract class ZoneId implements Serializable {
         //-----------------------------------------------------------------------
         /**
          * Writes the object using a
    -     * dedicated serialized form.
    +     * dedicated serialized form.
          * @serialData
          * 
          *  out.writeByte(7);  // identifies a ZoneId (not ZoneOffset)
    diff --git a/src/java.base/share/classes/java/time/ZoneOffset.java b/src/java.base/share/classes/java/time/ZoneOffset.java
    index 29b5909a57d..cc7186e8c0c 100644
    --- a/src/java.base/share/classes/java/time/ZoneOffset.java
    +++ b/src/java.base/share/classes/java/time/ZoneOffset.java
    @@ -750,7 +750,7 @@ public final class ZoneOffset
         // -----------------------------------------------------------------------
         /**
          * Writes the object using a
    -     * dedicated serialized form.
    +     * dedicated serialized form.
          * @serialData
          * 
          *  out.writeByte(8);                  // identifies a ZoneOffset
    diff --git a/src/java.base/share/classes/java/time/ZoneRegion.java b/src/java.base/share/classes/java/time/ZoneRegion.java
    index 83f0b43d775..cf92d7459b3 100644
    --- a/src/java.base/share/classes/java/time/ZoneRegion.java
    +++ b/src/java.base/share/classes/java/time/ZoneRegion.java
    @@ -1,5 +1,5 @@
     /*
    - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
    + * Copyright (c) 2012, 2018, 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
    @@ -180,7 +180,7 @@ final class ZoneRegion extends ZoneId implements Serializable {
         //-----------------------------------------------------------------------
         /**
          * Writes the object using a
    -     * dedicated serialized form.
    +     * dedicated serialized form.
          * @serialData
          * 
          *  out.writeByte(7);  // identifies a ZoneId (not ZoneOffset)
    diff --git a/src/java.base/share/classes/java/time/ZonedDateTime.java b/src/java.base/share/classes/java/time/ZonedDateTime.java
    index 7d50644a3f7..7c89759ed18 100644
    --- a/src/java.base/share/classes/java/time/ZonedDateTime.java
    +++ b/src/java.base/share/classes/java/time/ZonedDateTime.java
    @@ -2224,13 +2224,13 @@ public final class ZonedDateTime
         //-----------------------------------------------------------------------
         /**
          * Writes the object using a
    -     * dedicated serialized form.
    +     * dedicated serialized form.
          * @serialData
          * 
          *  out.writeByte(6);  // identifies a ZonedDateTime
    -     *  // the dateTime excluding the one byte header
    -     *  // the offset excluding the one byte header
    -     *  // the zone ID excluding the one byte header
    +     *  // the dateTime excluding the one byte header
    +     *  // the offset excluding the one byte header
    +     *  // the zone ID excluding the one byte header
          * 
    * * @return the instance of {@code Ser}, not null diff --git a/src/java.base/share/classes/java/time/chrono/AbstractChronology.java b/src/java.base/share/classes/java/time/chrono/AbstractChronology.java index a32ecb78da1..e886975fb6d 100644 --- a/src/java.base/share/classes/java/time/chrono/AbstractChronology.java +++ b/src/java.base/share/classes/java/time/chrono/AbstractChronology.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2018, 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 @@ -721,7 +721,7 @@ public abstract class AbstractChronology implements Chronology { //----------------------------------------------------------------------- /** * Writes the Chronology using a - * dedicated serialized form. + * dedicated serialized form. *
          *  out.writeByte(1);  // identifies this as a Chronology
          *  out.writeUTF(getId());
    diff --git a/src/java.base/share/classes/java/time/chrono/ChronoLocalDateTimeImpl.java b/src/java.base/share/classes/java/time/chrono/ChronoLocalDateTimeImpl.java
    index ac5f7b4bfe3..4460a7a8aa4 100644
    --- a/src/java.base/share/classes/java/time/chrono/ChronoLocalDateTimeImpl.java
    +++ b/src/java.base/share/classes/java/time/chrono/ChronoLocalDateTimeImpl.java
    @@ -1,5 +1,5 @@
     /*
    - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
    + * Copyright (c) 2012, 2018, 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
    @@ -399,7 +399,7 @@ final class ChronoLocalDateTimeImpl
         //-----------------------------------------------------------------------
         /**
          * Writes the ChronoLocalDateTime using a
    -     * dedicated serialized form.
    +     * dedicated serialized form.
          * @serialData
          * 
          *  out.writeByte(2);              // identifies a ChronoLocalDateTime
    diff --git a/src/java.base/share/classes/java/time/chrono/ChronoPeriodImpl.java b/src/java.base/share/classes/java/time/chrono/ChronoPeriodImpl.java
    index 646af14d05a..b2b9ddb610f 100644
    --- a/src/java.base/share/classes/java/time/chrono/ChronoPeriodImpl.java
    +++ b/src/java.base/share/classes/java/time/chrono/ChronoPeriodImpl.java
    @@ -1,5 +1,5 @@
     /*
    - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
    + * Copyright (c) 2013, 2018, 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
    @@ -355,7 +355,7 @@ final class ChronoPeriodImpl
         //-----------------------------------------------------------------------
         /**
          * Writes the Chronology using a
    -     * dedicated serialized form.
    +     * dedicated serialized form.
          * 
          *  out.writeByte(12);  // identifies this as a ChronoPeriodImpl
          *  out.writeUTF(getId());  // the chronology
    diff --git a/src/java.base/share/classes/java/time/chrono/ChronoZonedDateTimeImpl.java b/src/java.base/share/classes/java/time/chrono/ChronoZonedDateTimeImpl.java
    index abd21eecaf0..aa5f0ab11ff 100644
    --- a/src/java.base/share/classes/java/time/chrono/ChronoZonedDateTimeImpl.java
    +++ b/src/java.base/share/classes/java/time/chrono/ChronoZonedDateTimeImpl.java
    @@ -1,5 +1,5 @@
     /*
    - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
    + * Copyright (c) 2012, 2018, 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
    @@ -322,7 +322,7 @@ final class ChronoZonedDateTimeImpl
         //-----------------------------------------------------------------------
         /**
          * Writes the ChronoZonedDateTime using a
    -     * dedicated serialized form.
    +     * dedicated serialized form.
          * @serialData
          * 
          *  out.writeByte(3);                  // identifies a ChronoZonedDateTime
    diff --git a/src/java.base/share/classes/java/time/chrono/HijrahChronology.java b/src/java.base/share/classes/java/time/chrono/HijrahChronology.java
    index bc702a44d07..864cfa941c7 100644
    --- a/src/java.base/share/classes/java/time/chrono/HijrahChronology.java
    +++ b/src/java.base/share/classes/java/time/chrono/HijrahChronology.java
    @@ -1,5 +1,5 @@
     /*
    - * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.
    + * Copyright (c) 2012, 2018, 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
    @@ -1011,7 +1011,7 @@ public final class HijrahChronology extends AbstractChronology implements Serial
         //-----------------------------------------------------------------------
         /**
          * Writes the Chronology using a
    -     * dedicated serialized form.
    +     * dedicated serialized form.
          * @serialData
          * 
          *  out.writeByte(1);     // identifies a Chronology
    diff --git a/src/java.base/share/classes/java/time/chrono/HijrahDate.java b/src/java.base/share/classes/java/time/chrono/HijrahDate.java
    index 48b506044c0..632aca1d73f 100644
    --- a/src/java.base/share/classes/java/time/chrono/HijrahDate.java
    +++ b/src/java.base/share/classes/java/time/chrono/HijrahDate.java
    @@ -663,7 +663,7 @@ public final class HijrahDate
     
         /**
          * Writes the object using a
    -     * dedicated serialized form.
    +     * dedicated serialized form.
          * @serialData
          * 
          *  out.writeByte(6);                 // identifies a HijrahDate
    diff --git a/src/java.base/share/classes/java/time/chrono/IsoChronology.java b/src/java.base/share/classes/java/time/chrono/IsoChronology.java
    index 18d73689569..431aaca214c 100644
    --- a/src/java.base/share/classes/java/time/chrono/IsoChronology.java
    +++ b/src/java.base/share/classes/java/time/chrono/IsoChronology.java
    @@ -1,5 +1,5 @@
     /*
    - * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
    + * Copyright (c) 2012, 2018, 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
    @@ -680,7 +680,7 @@ public final class IsoChronology extends AbstractChronology implements Serializa
         //-----------------------------------------------------------------------
         /**
          * Writes the Chronology using a
    -     * dedicated serialized form.
    +     * dedicated serialized form.
          * @serialData
          * 
          *  out.writeByte(1);     // identifies a Chronology
    diff --git a/src/java.base/share/classes/java/time/chrono/JapaneseChronology.java b/src/java.base/share/classes/java/time/chrono/JapaneseChronology.java
    index 8cd67a05908..ed2d9172a07 100644
    --- a/src/java.base/share/classes/java/time/chrono/JapaneseChronology.java
    +++ b/src/java.base/share/classes/java/time/chrono/JapaneseChronology.java
    @@ -1,5 +1,5 @@
     /*
    - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
    + * Copyright (c) 2012, 2018, 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
    @@ -507,7 +507,7 @@ public final class JapaneseChronology extends AbstractChronology implements Seri
         //-----------------------------------------------------------------------
         /**
          * Writes the Chronology using a
    -     * dedicated serialized form.
    +     * dedicated serialized form.
          * @serialData
          * 
          *  out.writeByte(1);     // identifies a Chronology
    diff --git a/src/java.base/share/classes/java/time/chrono/JapaneseDate.java b/src/java.base/share/classes/java/time/chrono/JapaneseDate.java
    index 92437c3d714..e6d72ded676 100644
    --- a/src/java.base/share/classes/java/time/chrono/JapaneseDate.java
    +++ b/src/java.base/share/classes/java/time/chrono/JapaneseDate.java
    @@ -725,7 +725,7 @@ public final class JapaneseDate
     
         /**
          * Writes the object using a
    -     * dedicated serialized form.
    +     * dedicated serialized form.
          * @serialData
          * 
          *  out.writeByte(4);                 // identifies a JapaneseDate
    diff --git a/src/java.base/share/classes/java/time/chrono/JapaneseEra.java b/src/java.base/share/classes/java/time/chrono/JapaneseEra.java
    index 3d318ea36b0..a9bbc5e276e 100644
    --- a/src/java.base/share/classes/java/time/chrono/JapaneseEra.java
    +++ b/src/java.base/share/classes/java/time/chrono/JapaneseEra.java
    @@ -395,7 +395,7 @@ public final class JapaneseEra
         //-----------------------------------------------------------------------
         /**
          * Writes the object using a
    -     * dedicated serialized form.
    +     * dedicated serialized form.
          * @serialData
          * 
          *  out.writeByte(5);        // identifies a JapaneseEra
    diff --git a/src/java.base/share/classes/java/time/chrono/MinguoChronology.java b/src/java.base/share/classes/java/time/chrono/MinguoChronology.java
    index fd6fdc3e8cd..647292303e2 100644
    --- a/src/java.base/share/classes/java/time/chrono/MinguoChronology.java
    +++ b/src/java.base/share/classes/java/time/chrono/MinguoChronology.java
    @@ -1,5 +1,5 @@
     /*
    - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
    + * Copyright (c) 2012, 2018, 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
    @@ -337,7 +337,7 @@ public final class MinguoChronology extends AbstractChronology implements Serial
         //-----------------------------------------------------------------------
         /**
          * Writes the Chronology using a
    -     * dedicated serialized form.
    +     * dedicated serialized form.
          * @serialData
          * 
          *  out.writeByte(1);     // identifies a Chronology
    diff --git a/src/java.base/share/classes/java/time/chrono/MinguoDate.java b/src/java.base/share/classes/java/time/chrono/MinguoDate.java
    index c827b662871..b7caf9c6410 100644
    --- a/src/java.base/share/classes/java/time/chrono/MinguoDate.java
    +++ b/src/java.base/share/classes/java/time/chrono/MinguoDate.java
    @@ -487,7 +487,7 @@ public final class MinguoDate
     
         /**
          * Writes the object using a
    -     * dedicated serialized form.
    +     * dedicated serialized form.
          * @serialData
          * 
          *  out.writeByte(8);                 // identifies a MinguoDate
    diff --git a/src/java.base/share/classes/java/time/chrono/Ser.java b/src/java.base/share/classes/java/time/chrono/Ser.java
    index 317a7696497..6ecef928d79 100644
    --- a/src/java.base/share/classes/java/time/chrono/Ser.java
    +++ b/src/java.base/share/classes/java/time/chrono/Ser.java
    @@ -1,5 +1,5 @@
     /*
    - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
    + * Copyright (c) 2012, 2018, 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
    @@ -136,18 +136,18 @@ final class Ser implements Externalizable {
          * in the stream.  Refer to each class {@code writeReplace}
          * serialized form for the value of the type and sequence of values for the type.
          * 
          *
          * @param out  the data stream to write to, not null
    @@ -202,18 +202,18 @@ final class Ser implements Externalizable {
          * {@code Ser} object.
          *
          * 
          *
          * @param in  the data stream to read from, not null
    diff --git a/src/java.base/share/classes/java/time/chrono/ThaiBuddhistChronology.java b/src/java.base/share/classes/java/time/chrono/ThaiBuddhistChronology.java
    index c6938b2c530..982aa57017e 100644
    --- a/src/java.base/share/classes/java/time/chrono/ThaiBuddhistChronology.java
    +++ b/src/java.base/share/classes/java/time/chrono/ThaiBuddhistChronology.java
    @@ -1,5 +1,5 @@
     /*
    - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
    + * Copyright (c) 2012, 2018, 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
    @@ -374,7 +374,7 @@ public final class ThaiBuddhistChronology extends AbstractChronology implements
         //-----------------------------------------------------------------------
         /**
          * Writes the Chronology using a
    -     * dedicated serialized form.
    +     * dedicated serialized form.
          * @serialData
          * 
          *  out.writeByte(1);     // identifies a Chronology
    diff --git a/src/java.base/share/classes/java/time/chrono/ThaiBuddhistDate.java b/src/java.base/share/classes/java/time/chrono/ThaiBuddhistDate.java
    index 276905c0f37..6db40aa571d 100644
    --- a/src/java.base/share/classes/java/time/chrono/ThaiBuddhistDate.java
    +++ b/src/java.base/share/classes/java/time/chrono/ThaiBuddhistDate.java
    @@ -487,7 +487,7 @@ public final class ThaiBuddhistDate
     
         /**
          * Writes the object using a
    -     * dedicated serialized form.
    +     * dedicated serialized form.
          * @serialData
          * 
          *  out.writeByte(10);                // identifies a ThaiBuddhistDate
    diff --git a/src/java.base/share/classes/java/time/zone/Ser.java b/src/java.base/share/classes/java/time/zone/Ser.java
    index 31c2f2d2bc1..59196465a88 100644
    --- a/src/java.base/share/classes/java/time/zone/Ser.java
    +++ b/src/java.base/share/classes/java/time/zone/Ser.java
    @@ -1,5 +1,5 @@
     /*
    - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
    + * Copyright (c) 2012, 2018, 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
    @@ -125,9 +125,9 @@ final class Ser implements Externalizable {
          * serialized form for the value of the type and sequence of values for the type.
          *
          * 
          *
          * @param out  the data stream to write to, not null
    @@ -168,11 +168,11 @@ final class Ser implements Externalizable {
          * {@code Ser} object.
          *
          * 
          * @param in  the data to read, not null
    diff --git a/src/java.base/share/classes/java/time/zone/ZoneOffsetTransition.java b/src/java.base/share/classes/java/time/zone/ZoneOffsetTransition.java
    index 94264f32cce..6d108e277a0 100644
    --- a/src/java.base/share/classes/java/time/zone/ZoneOffsetTransition.java
    +++ b/src/java.base/share/classes/java/time/zone/ZoneOffsetTransition.java
    @@ -1,5 +1,5 @@
     /*
    - * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
    + * Copyright (c) 2012, 2018, 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
    @@ -190,10 +190,10 @@ public final class ZoneOffsetTransition
     
         /**
          * Writes the object using a
    -     * dedicated serialized form.
    +     * dedicated serialized form.
          * @serialData
          * Refer to the serialized form of
    -     * ZoneRules.writeReplace
    +     * ZoneRules.writeReplace
          * for the encoding of epoch seconds and offsets.
          * 
    {@code
          *
    diff --git a/src/java.base/share/classes/java/time/zone/ZoneOffsetTransitionRule.java b/src/java.base/share/classes/java/time/zone/ZoneOffsetTransitionRule.java
    index 9c700d5ec70..dc95f3ecde4 100644
    --- a/src/java.base/share/classes/java/time/zone/ZoneOffsetTransitionRule.java
    +++ b/src/java.base/share/classes/java/time/zone/ZoneOffsetTransitionRule.java
    @@ -1,5 +1,5 @@
     /*
    - * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
    + * Copyright (c) 2012, 2018, 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
    @@ -249,10 +249,10 @@ public final class ZoneOffsetTransitionRule implements Serializable {
     
         /**
          * Writes the object using a
    -     * dedicated serialized form.
    +     * dedicated serialized form.
          * @serialData
          * Refer to the serialized form of
    -     * ZoneRules.writeReplace
    +     * ZoneRules.writeReplace
          * for the encoding of epoch seconds and offsets.
          * 
    {@code
          *
    diff --git a/src/java.base/share/classes/java/time/zone/ZoneRules.java b/src/java.base/share/classes/java/time/zone/ZoneRules.java
    index f2dee70fee6..0cb381da05e 100644
    --- a/src/java.base/share/classes/java/time/zone/ZoneRules.java
    +++ b/src/java.base/share/classes/java/time/zone/ZoneRules.java
    @@ -1,5 +1,5 @@
     /*
    - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
    + * Copyright (c) 2012, 2018, 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
    @@ -327,7 +327,7 @@ public final class ZoneRules implements Serializable {
     
         /**
          * Writes the object using a
    -     * dedicated serialized form.
    +     * dedicated serialized form.
          * @serialData
          * 
    {@code
          *
    
    From ab0128ca51de59aaaa674654ca8d4e16b3b79965 Mon Sep 17 00:00:00 2001
    From: Joe Darcy 
    Date: Wed, 10 Oct 2018 10:28:33 -0700
    Subject: [PATCH 069/124] 8058202: AnnotatedType implementations don't override
     toString(), equals(), hashCode()
    
    Reviewed-by: jfranck
    ---
     .../annotation/AnnotatedTypeFactory.java      | 167 +++++++++-
     .../typeAnnotations/TestObjectMethods.java    | 314 ++++++++++++++++++
     2 files changed, 480 insertions(+), 1 deletion(-)
     create mode 100644 test/jdk/java/lang/annotation/typeAnnotations/TestObjectMethods.java
    
    diff --git a/src/java.base/share/classes/sun/reflect/annotation/AnnotatedTypeFactory.java b/src/java.base/share/classes/sun/reflect/annotation/AnnotatedTypeFactory.java
    index 9029ae676ee..b33bf079b8d 100644
    --- a/src/java.base/share/classes/sun/reflect/annotation/AnnotatedTypeFactory.java
    +++ b/src/java.base/share/classes/sun/reflect/annotation/AnnotatedTypeFactory.java
    @@ -1,5 +1,5 @@
     /*
    - * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
    + * Copyright (c) 2013, 2018, 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
    @@ -31,6 +31,8 @@ import java.util.ArrayList;
     import java.util.Arrays;
     import java.util.List;
     import java.util.Map;
    +import java.util.Objects;
    +import java.util.StringJoiner;
     
     import static sun.reflect.annotation.TypeAnnotation.*;
     
    @@ -202,6 +204,68 @@ public final class AnnotatedTypeFactory {
     
             }
     
    +        @Override // java.lang.Object
    +        public String toString() {
    +            // Reusable toString implementation, but needs to be
    +            // specialized for quirks of arrays.
    +            return annotationsToString(getAnnotations(), false) + type.toString();
    +        }
    +
    +        protected String annotationsToString(Annotation[] annotations, boolean leadingSpace) {
    +            if (annotations != null && annotations.length > 0) {
    +                StringJoiner sj = new StringJoiner(" ");
    +                if (leadingSpace) {
    +                    sj.add(""); // Add a space
    +                }
    +
    +                for (Annotation annotation : annotations) {
    +                    sj.add(annotation.toString());
    +                }
    +
    +                if (!leadingSpace) {
    +                    sj.add("");
    +                }
    +                return sj.toString();
    +            } else {
    +                return "";
    +            }
    +        }
    +
    +        protected boolean equalsTypeAndAnnotations(AnnotatedType that) {
    +            return getType().equals(that.getType()) &&
    +                // Treat ordering of annotations as significant
    +                Arrays.equals(getAnnotations(), that.getAnnotations()) &&
    +                Objects.equals(getAnnotatedOwnerType(), that.getAnnotatedOwnerType());
    +        }
    +
    +        int baseHashCode() {
    +            return type.hashCode() ^
    +                // Acceptable to use Objects.hash rather than
    +                // Arrays.deepHashCode since the elements of the array
    +                // are not themselves arrays.
    +                Objects.hash((Object[])getAnnotations()) ^
    +                Objects.hash(getAnnotatedOwnerType());
    +        }
    +
    +        @Override
    +        public boolean equals(Object o) {
    +            if (o instanceof AnnotatedType &&
    +                !(o instanceof AnnotatedArrayType) &&
    +                !(o instanceof AnnotatedTypeVariable) &&
    +                !(o instanceof AnnotatedParameterizedType) &&
    +                !(o instanceof AnnotatedWildcardType)) {
    +                AnnotatedType that = (AnnotatedType) o;
    +                return equalsTypeAndAnnotations(that);
    +            } else {
    +                return false;
    +            }
    +        }
    +
    +        @Override
    +        public int hashCode() {
    +            return baseHashCode();
    +        }
    +
             // Implementation details
             final LocationInfo getLocation() {
                 return location;
    @@ -244,6 +308,52 @@ public final class AnnotatedTypeFactory {
                 }
                 return ((GenericArrayType)t).getGenericComponentType();
             }
    +
    +        @Override
    +        public String toString() {
    +            // To annotate the full type of an array, the annotations
    +            // are placed between the type and the brackets. For
    +            // example, to annotate an array of Strings, the syntax used is
    +            //
    +            // String @TypeAnnotation []
    +            //
    +            // and *not*
    +            //
    +            // @TypeAnnotation String[].
    +            //
    +            // The toString output should strive to be reusable in
    +            // source code. Therefore, the general logic of putting
    +            // the annotations before a textual representation of the
    +            // type need to be overridden for arrays.
    +            StringBuilder sb = new StringBuilder();
    +
    +            AnnotatedType componentType = this;
    +            while (componentType instanceof AnnotatedArrayType) {
    +                AnnotatedArrayType annotatedArrayType = (AnnotatedArrayType) componentType;
    +                sb.append(annotationsToString(annotatedArrayType.getAnnotations(), true) + "[]");
    +                componentType = annotatedArrayType.getAnnotatedGenericComponentType();
    +            }
    +
    +            sb.insert(0, componentType.toString());
    +            return sb.toString();
    +        }
    +
    +        @Override
    +        public boolean equals(Object o) {
    +            if (o instanceof AnnotatedArrayType) {
    +                AnnotatedArrayType that = (AnnotatedArrayType) o;
    +                return equalsTypeAndAnnotations(that) &&
    +                    Objects.equals(getAnnotatedGenericComponentType(),
    +                                   that.getAnnotatedGenericComponentType());
    +            } else {
    +                return false;
    +            }
    +        }
    +
    +        @Override
    +        public int hashCode() {
    +            return baseHashCode() ^ getAnnotatedGenericComponentType().hashCode();
    +        }
         }
     
         private static final class AnnotatedTypeVariableImpl extends AnnotatedTypeBaseImpl implements AnnotatedTypeVariable {
    @@ -266,6 +376,23 @@ public final class AnnotatedTypeFactory {
             private TypeVariable getTypeVariable() {
                 return (TypeVariable)getType();
             }
    +
    +        @Override
    +        public boolean equals(Object o) {
    +            if (o instanceof AnnotatedTypeVariable) {
    +                AnnotatedTypeVariable that = (AnnotatedTypeVariable) o;
    +                return equalsTypeAndAnnotations(that) &&
    +                    Arrays.equals(getAnnotatedBounds(), that.getAnnotatedBounds());
    +            } else {
    +                return false;
    +            }
    +        }
    +
    +        @Override
    +        public int hashCode() {
    +            return baseHashCode() ^
    +                Objects.hash((Object[])getAnnotatedBounds());
    +        }
         }
     
         private static final class AnnotatedParameterizedTypeImpl extends AnnotatedTypeBaseImpl
    @@ -316,6 +443,23 @@ public final class AnnotatedTypeFactory {
             private ParameterizedType getParameterizedType() {
                 return (ParameterizedType)getType();
             }
    +
    +        @Override
    +        public boolean equals(Object o) {
    +            if (o instanceof AnnotatedParameterizedType) {
    +                AnnotatedParameterizedType that = (AnnotatedParameterizedType) o;
    +                return equalsTypeAndAnnotations(that) &&
    +                    Arrays.equals(getAnnotatedActualTypeArguments(), that.getAnnotatedActualTypeArguments());
    +            } else {
    +                return false;
    +            }
    +        }
    +
    +        @Override
    +        public int hashCode() {
    +            return baseHashCode() ^
    +                Objects.hash((Object[])getAnnotatedActualTypeArguments());
    +        }
         }
     
         private static final class AnnotatedWildcardTypeImpl extends AnnotatedTypeBaseImpl implements AnnotatedWildcardType {
    @@ -378,5 +522,26 @@ public final class AnnotatedTypeFactory {
             private boolean hasUpperBounds() {
                 return hasUpperBounds;
             }
    +
    +        @Override
    +        public boolean equals(Object o) {
    +            if (o instanceof AnnotatedWildcardType) {
    +                AnnotatedWildcardType that = (AnnotatedWildcardType) o;
    +                return equalsTypeAndAnnotations(that) &&
    +                    // Treats ordering as significant
    +                    Arrays.equals(getAnnotatedLowerBounds(), that.getAnnotatedLowerBounds()) &&
    +                    // Treats ordering as significant
    +                    Arrays.equals(getAnnotatedUpperBounds(), that.getAnnotatedUpperBounds());
    +            } else {
    +                return false;
    +            }
    +        }
    +
    +        @Override
    +        public int hashCode() {
    +            return baseHashCode() ^
    +                Objects.hash((Object[])getAnnotatedLowerBounds()) ^
    +                Objects.hash((Object[])getAnnotatedUpperBounds());
    +        }
         }
     }
    diff --git a/test/jdk/java/lang/annotation/typeAnnotations/TestObjectMethods.java b/test/jdk/java/lang/annotation/typeAnnotations/TestObjectMethods.java
    new file mode 100644
    index 00000000000..fc818bb36e1
    --- /dev/null
    +++ b/test/jdk/java/lang/annotation/typeAnnotations/TestObjectMethods.java
    @@ -0,0 +1,314 @@
    +/*
    + * Copyright (c) 2018, 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.
    + *
    + * 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 8058202
    + * @summary Test java.lang.Object methods on AnnotatedType objects.
    + */
    +
    +import java.lang.annotation.*;
    +import java.lang.reflect.*;
    +import java.util.*;
    +
    +/**
    + * Test toString, equals, and hashCode on various AnnotatedType objects.
    + */
    +public class TestObjectMethods {
    +    private static int errors = 0;
    +
    +    /*
    +     * There are various subtypes of AnnotatedType implementations:
    +     *
    +     * AnnotatedType
    +     * AnnotatedArrayType
    +     * AnnotatedParameterizedType
    +     * AnnotatedTypeVariable
    +     * AnnotatedWildcardType
    +     *
    +     * The implementations of each these implementations are
    +     * examined. Wildcards don't appear as top-level types and need to
    +     * be extracted from bounds.
    +     *
    +     * AnnotatedTypes with and without annotations are examined as
    +     * well.
    +     */
    +    public static void main(String... args) {
    +        Class[] testClasses = {TypeHost.class, AnnotatedTypeHost.class};
    +
    +        for (Class clazz : testClasses) {
    +            testEqualsReflexivity(clazz);
    +            testEquals(clazz);
    +        }
    +
    +        testToString(TypeHost.class, false);
    +        testToString(AnnotatedTypeHost.class, true);
    +
    +        testAnnotationsMatterForEquals(TypeHost.class, AnnotatedTypeHost.class);
    +
    +        testGetAnnotations(TypeHost.class, false);
    +        testGetAnnotations(AnnotatedTypeHost.class, true);
    +
    +        testWildcards();
    +
    +        if (errors > 0) {
    +            throw new RuntimeException(errors + " errors");
    +        }
    +    }
    +
    +    /*
    +     * For non-array types, verify toString version of the annotated
    +     * type ends with the same string as the generic type.
    +     */
    +    static void testToString(Class clazz, boolean leadingAnnotations) {
    +        System.err.println("Testing toString on methods of class " + clazz.getName());
    +        Method[] methods = clazz.getDeclaredMethods();
    +        for (Method m : methods) {
    +            AnnotatedType annotType = m.getAnnotatedReturnType();
    +            String annotTypeString = annotType.toString();
    +
    +            Type type = m.getGenericReturnType();
    +            String typeString = type.toString();
    +
    +            boolean isArray = annotType instanceof AnnotatedArrayType;
    +            boolean isVoid = "void".equals(typeString);
    +
    +            boolean valid;
    +            if (!isArray) {
    +                if (leadingAnnotations && !isVoid) {
    +                    valid =
    +                        annotTypeString.endsWith(typeString) &&
    +                        !annotTypeString.startsWith(typeString);
    +                } else {
    +                    valid = annotTypeString.equals(typeString);
    +                }
    +            } else {
    +                // Find final non-array component type and gets its name.
    +                typeString = null;
    +
    +                AnnotatedType componentType = annotType;
    +                while (componentType instanceof AnnotatedArrayType) {
    +                    AnnotatedArrayType annotatedArrayType = (AnnotatedArrayType) componentType;
    +                    componentType = annotatedArrayType.getAnnotatedGenericComponentType();
    +                }
    +
    +                String componentName = componentType.getType().getTypeName();
    +                valid = annotTypeString.contains(componentName);
    +            }
    +
    +            if (!valid) {
    +                errors++;
    +                System.err.println(typeString + "\n" + annotTypeString +
    +                                   "\n " + valid  +
    +                                   "\n\n");
    +            }
    +        }
    +    }
    +
    +    static void testGetAnnotations(Class clazz, boolean annotationsExpectedOnMethods) {
    +        System.err.println("Testing getAnnotations on methods of class " + clazz.getName());
    +        Method[] methods = clazz.getDeclaredMethods();
    +        for (Method m : methods) {
    +            Type type = m.getGenericReturnType();
    +            AnnotatedType annotType = m.getAnnotatedReturnType();
    +            Annotation[] annotations = annotType.getAnnotations();
    +
    +            boolean isVoid = "void".equals(type.toString());
    +
    +            if (annotationsExpectedOnMethods && !isVoid) {
    +                if (annotations.length == 0 ) {
    +                    errors++;
    +                    System.err.println("Expected annotations missing on " + annotType);
    +                }
    +            } else {
    +                if (annotations.length > 0 ) {
    +                    errors++;
    +                    System.err.println("Unexpected annotations present on " + annotType);
    +                }
    +            }
    +        }
    +    }
    +
    +    static void testEqualsReflexivity(Class clazz) {
    +        System.err.println("Testing reflexivity of equals on methods of class " + clazz.getName());
    +        Method[] methods = clazz.getDeclaredMethods();
    +        for (Method m : methods) {
    +            checkTypesForEquality(m.getAnnotatedReturnType(),
    +                                  m.getAnnotatedReturnType(),
    +                                  true);
    +        }
    +    }
    +
    +    private static void checkTypesForEquality(AnnotatedType annotType1,
    +                                              AnnotatedType annotType2,
    +                                              boolean expected) {
    +        boolean comparison = annotType1.equals(annotType2);
    +
    +        if (comparison) {
    +            int hash1 = annotType1.hashCode();
    +            int hash2 = annotType2.hashCode();
    +            if (hash1 != hash2) {
    +                errors++;
    +                System.err.format("Equal AnnotatedTypes with unequal hash codes: %n%s%n%s%n",
    +                                  annotType1.toString(), annotType2.toString());
    +            }
    +        }
    +
    +        if (comparison != expected) {
    +            errors++;
    +            System.err.println(annotType1);
    +            System.err.println(expected ? " is not equal to " : " is equal to ");
    +            System.err.println(annotType2);
    +            System.err.println();
    +        }
    +    }
    +
    +    /*
    +     * For each of the type host classes, the return type of a method
    +     * should only equal the return type of that method.
    +     */
    +    static void testEquals(Class clazz) {
    +        Method[] methods = clazz.getDeclaredMethods();
    +
    +        for (int i = 0; i < methods.length; i++) {
    +            for (int j = 0; j < methods.length; j++) {
    +                if (i == j)
    +                    continue;
    +                else {
    +                    checkTypesForEquality(methods[i].getAnnotatedReturnType(),
    +                                          methods[j].getAnnotatedReturnType(),
    +                                          false);
    +                }
    +            }
    +        }
    +    }
    +
    +    /**
    +     * Roughly, compare the return types of corresponding methods on
    +     * TypeHost and AnnotatedtypeHost and verify the AnnotatedType
    +     * objects are *not* equal even if their underlying generic types
    +     * are.
    +     */
    +    static void testAnnotationsMatterForEquals(Class clazz1, Class clazz2) {
    +        System.err.println("Testing that presence/absence of annotations matters for equals comparison.");
    +
    +        String methodName = null;
    +        for (Method method :  clazz1.getDeclaredMethods()) {
    +            if ("void".equals(method.getReturnType().toString())) {
    +                continue;
    +            }
    +
    +            methodName = method.getName();
    +            try {
    +                checkTypesForEquality(method.getAnnotatedReturnType(),
    +                                      clazz2.getDeclaredMethod(methodName).getAnnotatedReturnType(),
    +                                      false);
    +            } catch (Exception e) {
    +                errors++;
    +                System.err.println("Method " + methodName + " not found.");
    +            }
    +        }
    +    }
    +
    +
    +    static void testWildcards() {
    +        System.err.println("Testing wildcards");
    +        // public @AnnotType(10) Set fooNumberSet() {return null;}
    +        // public @AnnotType(11) Set<@AnnotType(13) ? extends Number> fooNumberSet2() {return null;}
    +        AnnotatedWildcardType awt1 = extractWildcard("fooNumberSet");
    +        AnnotatedWildcardType awt2 = extractWildcard("fooNumberSet2");
    +
    +        if (!awt1.equals(extractWildcard("fooNumberSet")) ||
    +            !awt2.equals(extractWildcard("fooNumberSet2"))) {
    +            errors++;
    +            System.err.println("Bad equality comparison on wildcards.");
    +        }
    +
    +        checkTypesForEquality(awt1, awt2, false);
    +
    +        if (awt2.getAnnotations().length == 0) {
    +            errors++;
    +            System.err.println("Expected annotations not found.");
    +        }
    +    }
    +
    +    private static AnnotatedWildcardType extractWildcard(String methodName) {
    +        try {
    +            return (AnnotatedWildcardType)
    +                (((AnnotatedParameterizedType)(AnnotatedTypeHost.class.getMethod(methodName).
    +                                               getAnnotatedReturnType())).
    +                 getAnnotatedActualTypeArguments()[0] );
    +        } catch (Exception e) {
    +            throw new RuntimeException(e);
    +        }
    +    }
    +
    +    // The TypeHost and AnnotatedTypeHost classes declare methods with
    +    // the same name and signatures but with the AnnotatedTypeHost
    +    // methods having annotations on their return type, where
    +    // possible.
    +
    +    static class TypeHost {
    +        public void fooVoid() {return;}
    +
    +        public int foo() {return 0;}
    +        public String fooString() {return null;}
    +
    +        public int[] fooIntArray() {return null;}
    +        public String[] fooStringArray() {return null;}
    +        public String [][] fooStringArrayArray() {return null;}
    +
    +        public Set fooSetString() {return null;}
    +        public E fooE() {return null;}
    +        public F fooF() {return null;}
    +        public  G fooG() {return null;}
    +
    +        public  Set fooNumberSet() {return null;}
    +        public  Set fooNumberSet2() {return null;}
    +    }
    +
    +    @Retention(RetentionPolicy.RUNTIME)
    +    @Target(ElementType.TYPE_USE)
    +    static @interface AnnotType {
    +        int value() default 0;
    +    }
    +
    +    static class AnnotatedTypeHost {
    +        public /*@AnnotType(0)*/ void fooVoid() {return;} // Illegal to annotate void
    +
    +        public @AnnotType(1) int foo() {return 0;}
    +        public @AnnotType(2) String fooString() {return null;}
    +
    +        public  int @AnnotType(3) [] fooIntArray() {return null;}
    +        public  String @AnnotType(4) [] fooStringArray() {return null;}
    +        public  @AnnotType(5) String  @AnnotType(0) [] @AnnotType(1) [] fooStringArrayArray() {return null;}
    +
    +        public @AnnotType(6) Set fooSetString() {return null;}
    +        public @AnnotType(7) E fooE() {return null;}
    +        public @AnnotType(8) F fooF() {return null;}
    +        public @AnnotType(9)  G fooG() {return null;}
    +
    +        public @AnnotType(10) Set fooNumberSet() {return null;}
    +        public @AnnotType(11) Set<@AnnotType(13) ? extends Number> fooNumberSet2() {return null;}
    +    }
    +}
    
    From 3cc36e427d23f583b62f4280f90eac0b9f024af9 Mon Sep 17 00:00:00 2001
    From: Ivan Gerasimov 
    Date: Wed, 10 Oct 2018 10:56:24 -0700
    Subject: [PATCH 070/124] 8211396: Broken link in javadoc for private
     java.util.regex.Pattern#normalize()
    
    Reviewed-by: jjg, sherman
    ---
     src/java.base/share/classes/java/util/regex/Pattern.java | 6 +++---
     1 file changed, 3 insertions(+), 3 deletions(-)
    
    diff --git a/src/java.base/share/classes/java/util/regex/Pattern.java b/src/java.base/share/classes/java/util/regex/Pattern.java
    index cd7cd39f55d..50e9be8415c 100644
    --- a/src/java.base/share/classes/java/util/regex/Pattern.java
    +++ b/src/java.base/share/classes/java/util/regex/Pattern.java
    @@ -1433,10 +1433,10 @@ public final class Pattern
     
         /**
          * The pattern is converted to normalized form ({@link
    -     * java.text.Normalizer.Form.NFC NFC}, canonical decomposition,
    +     * java.text.Normalizer.Form#NFC NFC}, canonical decomposition,
          * followed by canonical composition for the character class
    -     * part, and {@link java.text.Normalizer.Form.NFD NFD},
    -     * canonical decomposition) for the rest), and then a pure
    +     * part, and {@link java.text.Normalizer.Form#NFD NFD},
    +     * canonical decomposition for the rest), and then a pure
          * group is constructed to match canonical equivalences of the
          * characters.
          */
    
    From efa175f20e11a722f8f8a3f62ef395c863da44ac Mon Sep 17 00:00:00 2001
    From: Jean Christophe Beyler 
    Date: Wed, 10 Oct 2018 11:20:21 -0700
    Subject: [PATCH 071/124] 8211801: Remove the NSK_CPP_STUB macros from
     vmTestbase for jvmti/scenarios/[A-E]
    
    Remove the NSK_CPP_STUB macros
    
    Reviewed-by: amenkov, sspitsyn
    ---
     .../allocation/AP06/ap06t001/ap06t001.cpp     |  30 +-
     .../allocation/AP07/ap07t001/ap07t001.cpp     |  31 +-
     .../allocation/AP07/ap07t002/ap07t002.cpp     |  18 +-
     .../allocation/AP09/ap09t001/ap09t001.cpp     |  22 +-
     .../allocation/AP10/ap10t001/ap10t001.cpp     |  49 ++--
     .../allocation/AP11/ap11t001/ap11t001.cpp     |  45 ++-
     .../allocation/AP12/ap12t001/ap12t001.cpp     |  22 +-
     .../bcinstr/BI01/bi01t001/bi01t001.cpp        |  39 ++-
     .../bcinstr/BI01/bi01t002/bi01t002.cpp        |  40 ++-
     .../bcinstr/BI02/bi02t001/bi02t001.cpp        |  37 ++-
     .../bcinstr/BI02/bi02t002/bi02t002.cpp        |  35 +--
     .../bcinstr/BI03/bi03t001/bi03t001.cpp        |  37 ++-
     .../bcinstr/BI03/bi03t002/bi03t002.cpp        |  35 +--
     .../bcinstr/BI04/bi04t002/bi04t002.cpp        |  16 +-
     .../capability/CM01/cm01t001/cm01t001.cpp     | 139 ++++-----
     .../capability/CM01/cm01t002/cm01t002.cpp     | 142 +++++----
     .../capability/CM01/cm01t003/cm01t003.cpp     | 141 ++++-----
     .../capability/CM01/cm01t004/cm01t004.cpp     | 140 ++++-----
     .../capability/CM01/cm01t005/cm01t005.cpp     | 140 ++++-----
     .../capability/CM01/cm01t006/cm01t006.cpp     | 140 ++++-----
     .../capability/CM01/cm01t007/cm01t007.cpp     | 148 +++++-----
     .../capability/CM01/cm01t008/cm01t008.cpp     | 156 +++++-----
     .../capability/CM01/cm01t009/cm01t009.cpp     | 138 ++++-----
     .../capability/CM01/cm01t010/cm01t010.cpp     | 140 ++++-----
     .../capability/CM01/cm01t011/cm01t011.cpp     | 171 +++++------
     .../capability/CM01/cm01t012/cm01t012.cpp     | 139 ++++-----
     .../capability/CM01/cm01t013/cm01t013.cpp     | 140 ++++-----
     .../capability/CM01/cm01t014/cm01t014.cpp     | 138 ++++-----
     .../capability/CM01/cm01t015/cm01t015.cpp     | 139 ++++-----
     .../capability/CM01/cm01t016/cm01t016.cpp     | 137 ++++-----
     .../capability/CM01/cm01t017/cm01t017.cpp     | 137 ++++-----
     .../capability/CM01/cm01t018/cm01t018.cpp     | 141 +++++----
     .../capability/CM01/cm01t019/cm01t019.cpp     | 139 ++++-----
     .../capability/CM01/cm01t020/cm01t020.cpp     | 141 ++++-----
     .../capability/CM01/cm01t021/cm01t021.cpp     | 141 ++++-----
     .../capability/CM02/cm02t001/cm02t001.cpp     | 160 +++++------
     .../capability/CM03/cm03t001/cm03t001.cpp     | 272 ++++++++----------
     .../contention/TC01/tc01t001/tc01t001.cpp     |  59 ++--
     .../contention/TC02/tc02t001/tc02t001.cpp     |  62 ++--
     .../contention/TC03/tc03t001/tc03t001.cpp     |  58 ++--
     .../contention/TC03/tc03t002/tc03t002.cpp     |  58 ++--
     .../contention/TC04/tc04t001/tc04t001.cpp     |  63 ++--
     .../contention/TC05/tc05t001/tc05t001.cpp     |  64 ++---
     .../events/EM01/em01t001/em01t001.cpp         |  52 ++--
     .../events/EM01/em01t002/em01t002.cpp         |  75 ++---
     .../events/EM02/em02t001/em02t001.cpp         |  80 ++----
     .../events/EM02/em02t002/em02t002.cpp         |  24 +-
     .../events/EM02/em02t003/em02t003.cpp         |  50 ++--
     .../events/EM02/em02t004/em02t004.cpp         |  54 ++--
     .../events/EM02/em02t005/em02t005.cpp         |  48 ++--
     50 files changed, 1986 insertions(+), 2636 deletions(-)
    
    diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP06/ap06t001/ap06t001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP06/ap06t001/ap06t001.cpp
    index c7dfcbd0134..4511679bb57 100644
    --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP06/ap06t001/ap06t001.cpp
    +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP06/ap06t001/ap06t001.cpp
    @@ -124,7 +124,7 @@ objectReferenceCallback( jvmtiObjectReferenceKind reference_kind,
     JNIEXPORT void JNICALL
     Java_nsk_jvmti_scenarios_allocation_AP06_ap06t001Thread_setTag( JNIEnv* jni, jobject obj) {
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetTag, jvmti, obj, threadTag))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti->SetTag(obj, threadTag))) {
             nsk_jvmti_setFailStatus();
         } else {
             NSK_DISPLAY0("setTag: the tag was set for checked thread.");
    @@ -153,34 +153,26 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) {
             }
     
             if (!NSK_JNI_VERIFY(jni, (fid =
    -                NSK_CPP_STUB4(GetStaticFieldID, jni,
    -                                                debugeeClass,
    -                                                "thread",
    -                                                THREAD_CLS_SIGNATURE)) != NULL )) {
    +                jni->GetStaticFieldID(debugeeClass, "thread", THREAD_CLS_SIGNATURE)) != NULL)) {
                 nsk_jvmti_setFailStatus();
                 break;
             }
     
             if (!NSK_JNI_VERIFY(jni, (localRefThread =
    -                NSK_CPP_STUB3(GetStaticObjectField, jni,
    -                                                    debugeeClass,
    -                                                    fid )) != NULL )) {
    +                jni->GetStaticObjectField(debugeeClass, fid)) != NULL)) {
                 NSK_COMPLAIN0("GetStaticObjectField returned NULL for 'thread' field value\n\n");
                 nsk_jvmti_setFailStatus();
                 break;
             }
     
    -        if (!NSK_JNI_VERIFY(jni, (globalRefThread =
    -                 NSK_CPP_STUB2(NewGlobalRef, jni, localRefThread)) != NULL))
    +        if (!NSK_JNI_VERIFY(jni, (globalRefThread = jni->NewGlobalRef(localRefThread)) != NULL))
                 return;
     
             NSK_DISPLAY0("Calling IterateOverReachableObjects\n");
    -        if (!NSK_JVMTI_VERIFY(
    -                NSK_CPP_STUB5(IterateOverReachableObjects, jvmti,
    -                                                           heapRootCallback,
    -                                                           stackReferenceCallback,
    -                                                           objectReferenceCallback,
    -                                                           NULL /*user_data*/))) {
    +        if (!NSK_JVMTI_VERIFY(jvmti->IterateOverReachableObjects(heapRootCallback,
    +                                                                 stackReferenceCallback,
    +                                                                 objectReferenceCallback,
    +                                                                 NULL /*user_data*/))) {
                 nsk_jvmti_setFailStatus();
                 break;
             }
    @@ -234,12 +226,10 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         memset(&caps, 0, sizeof(jvmtiCapabilities));
         caps.can_tag_objects = 1;
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities,
    -            jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
             return JNI_ERR;
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities,
    -            jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
             return JNI_ERR;
     
         if (!caps.can_tag_objects)
    diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP07/ap07t001/ap07t001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP07/ap07t001/ap07t001.cpp
    index d312e8bc48c..f7a99a4f5d1 100644
    --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP07/ap07t001/ap07t001.cpp
    +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP07/ap07t001/ap07t001.cpp
    @@ -111,15 +111,14 @@ Java_nsk_jvmti_scenarios_allocation_AP07_ap07t001_setTag( JNIEnv* jni,
                                                               jobject target,
                                                               jlong   tag ) {
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetTag, jvmti, target, tag))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti->SetTag(target, tag))) {
             nsk_jvmti_setFailStatus();
         }
     }
     
     JNIEXPORT void JNICALL
     Java_nsk_jvmti_scenarios_allocation_AP07_ap07t001_setRoot( JNIEnv* jni, jobject obj) {
    -    if (!NSK_JNI_VERIFY(jni, (root =
    -            NSK_CPP_STUB2(NewGlobalRef, jni, obj)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (root = jni->NewGlobalRef(obj)) != NULL))
             nsk_jvmti_setFailStatus();
     }
     
    @@ -135,30 +134,24 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) {
         do {
     
             NSK_DISPLAY0("Calling IterateOverReachableObjects\n");
    -        if (!NSK_JVMTI_VERIFY(
    -                NSK_CPP_STUB5(IterateOverReachableObjects, jvmti,
    -                                                           heapRootCallback,
    -                                                           stackReferenceCallback,
    -                                                           objectReferenceCallback,
    -                                                           NULL /*user_data*/))) {
    +        if (!NSK_JVMTI_VERIFY(jvmti->IterateOverReachableObjects(heapRootCallback,
    +                                                                 stackReferenceCallback,
    +                                                                 objectReferenceCallback,
    +                                                                 NULL /*user_data*/))) {
                 nsk_jvmti_setFailStatus();
                 break;
             }
     
             NSK_DISPLAY0("Calling IterateOverObjectsReachableFromObject\n");
             {
    -            if (!NSK_JVMTI_VERIFY(
    -                    NSK_CPP_STUB4(IterateOverObjectsReachableFromObject,
    -                        jvmti,
    -                        root,
    -                        objectReferenceCallback,
    -                        NULL /*user_data*/))) {
    +            if (!NSK_JVMTI_VERIFY(jvmti->IterateOverObjectsReachableFromObject(
    +                    root, objectReferenceCallback, NULL /*user_data*/))) {
                     nsk_jvmti_setFailStatus();
                     break;
                 }
             }
     
    -        NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, root));
    +        NSK_TRACE(jni->DeleteGlobalRef(root));
     
         } while (0);
     
    @@ -191,12 +184,10 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         memset(&caps, 0, sizeof(jvmtiCapabilities));
         caps.can_tag_objects = 1;
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities,
    -            jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
             return JNI_ERR;
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities,
    -            jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
             return JNI_ERR;
     
         if (!caps.can_tag_objects)
    diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP07/ap07t002/ap07t002.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP07/ap07t002/ap07t002.cpp
    index 7918278e5ec..e503a3e5def 100644
    --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP07/ap07t002/ap07t002.cpp
    +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP07/ap07t002/ap07t002.cpp
    @@ -111,7 +111,7 @@ Java_nsk_jvmti_scenarios_allocation_AP07_ap07t002_setTag( JNIEnv* jni,
                                                               jobject target,
                                                               jlong   tag ) {
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetTag, jvmti, target, tag))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti->SetTag(target, tag))) {
             nsk_jvmti_setFailStatus();
         }
     }
    @@ -128,12 +128,10 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) {
         do {
     
             NSK_DISPLAY0("Calling IterateOverReachableObjects\n");
    -        if (!NSK_JVMTI_VERIFY(
    -                NSK_CPP_STUB5(IterateOverReachableObjects, jvmti,
    -                                                           heapRootCallback,
    -                                                           stackReferenceCallback,
    -                                                           objectReferenceCallback,
    -                                                           NULL /*user_data*/))) {
    +        if (!NSK_JVMTI_VERIFY(jvmti->IterateOverReachableObjects(heapRootCallback,
    +                                                                 stackReferenceCallback,
    +                                                                 objectReferenceCallback,
    +                                                                 NULL /*user_data*/))) {
                 nsk_jvmti_setFailStatus();
                 break;
             }
    @@ -169,12 +167,10 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         memset(&caps, 0, sizeof(jvmtiCapabilities));
         caps.can_tag_objects = 1;
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities,
    -            jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
             return JNI_ERR;
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities,
    -            jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
             return JNI_ERR;
     
         if (!caps.can_tag_objects)
    diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP09/ap09t001/ap09t001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP09/ap09t001/ap09t001.cpp
    index 997fef490ea..67ef31f446b 100644
    --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP09/ap09t001/ap09t001.cpp
    +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP09/ap09t001/ap09t001.cpp
    @@ -132,15 +132,14 @@ Java_nsk_jvmti_scenarios_allocation_AP09_ap09t001_setTag( JNIEnv* jni,
                                                               jobject target,
                                                               jlong   tag ) {
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetTag, jvmti, target, tag))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti->SetTag(target, tag))) {
             nsk_jvmti_setFailStatus();
         }
     }
     
     JNIEXPORT void JNICALL
     Java_nsk_jvmti_scenarios_allocation_AP09_ap09t001_setReferrer( JNIEnv* jni, jclass klass, jobject ref) {
    -    if (!NSK_JNI_VERIFY(jni, (referrer =
    -            NSK_CPP_STUB2(NewGlobalRef, jni, ref)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (referrer = jni->NewGlobalRef(ref)) != NULL))
             nsk_jvmti_setFailStatus();
     }
     
    @@ -155,12 +154,9 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) {
     
         do {
             NSK_DISPLAY0("\nCalling IterateOverObjectsReachableFromObject\n");
    -        if (!NSK_JVMTI_VERIFY(
    -                NSK_CPP_STUB4(IterateOverObjectsReachableFromObject,
    -                    jvmti,
    -                    referrer,
    -                    objectReferenceCallback,
    -                    NULL /*user_data*/))) {
    +        if (!NSK_JVMTI_VERIFY(jvmti->IterateOverObjectsReachableFromObject(referrer,
    +                                                                           objectReferenceCallback,
    +                                                                           NULL /*user_data*/))) {
                 nsk_jvmti_setFailStatus();
             }
             if (!classFound) {
    @@ -192,7 +188,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) {
                 nsk_jvmti_setFailStatus();
             }
     
    -        NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, referrer));
    +        NSK_TRACE(jni->DeleteGlobalRef(referrer));
         } while (0);
     
         NSK_DISPLAY0("Let debugee to finish\n");
    @@ -224,12 +220,10 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         memset(&caps, 0, sizeof(jvmtiCapabilities));
         caps.can_tag_objects = 1;
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities,
    -            jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
             return JNI_ERR;
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities,
    -            jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
             return JNI_ERR;
     
         if (!caps.can_tag_objects) {
    diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP10/ap10t001/ap10t001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP10/ap10t001/ap10t001.cpp
    index 201077cd0dc..d4977a45a26 100644
    --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP10/ap10t001/ap10t001.cpp
    +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP10/ap10t001/ap10t001.cpp
    @@ -61,8 +61,7 @@ static void envStorageFunc(jvmtiEnv *jvmti_env, const char *msg) {
     
         NSK_DISPLAY2("%s: setting an environment local storage 0x%p ...\n",
             msg, (void*) &stor);
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(SetEnvironmentLocalStorage,
    -            jvmti_env, (const void*) &stor))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti_env->SetEnvironmentLocalStorage((const void*) &stor))) {
             nsk_jvmti_setFailStatus();
             NSK_COMPLAIN1("%s: unable to set an environment local storage\n\n",
                 msg);
    @@ -71,8 +70,7 @@ static void envStorageFunc(jvmtiEnv *jvmti_env, const char *msg) {
     
         NSK_DISPLAY1("%s: getting an environment local storage ...\n",
             msg);
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetEnvironmentLocalStorage,
    -            jvmti_env, (void**) &obtainedData))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti_env->GetEnvironmentLocalStorage((void**) &obtainedData))) {
             nsk_jvmti_setFailStatus();
             NSK_COMPLAIN1("%s: unable to get an environment local storage\n\n",
                 msg);
    @@ -90,8 +88,7 @@ static void envStorageFunc(jvmtiEnv *jvmti_env, const char *msg) {
     }
     
     static void timerFunc(jvmtiEnv *jvmti_env, const char *msg) {
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB2(GetCurrentThreadCpuTimerInfo, jvmti_env, &timer_info1 ))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti_env->GetCurrentThreadCpuTimerInfo(&timer_info1))) {
             nsk_jvmti_setFailStatus();
             NSK_COMPLAIN1("%s: GetCurrentThreadCpuTimerInfo returned unexpected error code\n\n",
                 msg);
    @@ -114,8 +111,7 @@ static void timerFunc(jvmtiEnv *jvmti_env, const char *msg) {
         }
         /* ---------------------------------------------------------------------- */
     
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB2(GetCurrentThreadCpuTime, jvmti_env, &nanos ))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti_env->GetCurrentThreadCpuTime(&nanos))) {
             nsk_jvmti_setFailStatus();
             NSK_COMPLAIN1("%s: GetCurrentThreadCpuTime returned unexpected error code\n\n",
                 msg);
    @@ -123,8 +119,7 @@ static void timerFunc(jvmtiEnv *jvmti_env, const char *msg) {
         /* ---------------------------------------------------------------------- */
     
     
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB2(GetTimerInfo, jvmti_env, &timer_info2 ))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti_env->GetTimerInfo(&timer_info2))) {
             nsk_jvmti_setFailStatus();
             NSK_COMPLAIN1("%s: GetTimerInfo returned unexpected error code\n\n",
                 msg);
    @@ -148,8 +143,7 @@ static void timerFunc(jvmtiEnv *jvmti_env, const char *msg) {
         /* ---------------------------------------------------------------------- */
     
         nanos = 0;
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB2(GetTime, jvmti_env, &nanos ))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti_env->GetTime(&nanos))) {
             nsk_jvmti_setFailStatus();
             NSK_COMPLAIN1("%s: GetTime returned unexpected error code\n\n",
                 msg);
    @@ -223,10 +217,9 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) {
     
         NSK_DISPLAY0("Call IterateOverHeap to tag random objects for ObjectFree evnts\n\n");
         {
    -        if (!NSK_JVMTI_VERIFY(
    -                NSK_CPP_STUB4(IterateOverHeap, jvmti,
    -                    JVMTI_HEAP_OBJECT_UNTAGGED, heapObjectCallback,
    -                    &user_data))) {
    +        if (!NSK_JVMTI_VERIFY(jvmti->IterateOverHeap(JVMTI_HEAP_OBJECT_UNTAGGED,
    +                                                     heapObjectCallback,
    +                                                     &user_data))) {
                 nsk_jvmti_setFailStatus();
             }
         }
    @@ -276,12 +269,10 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         caps.can_get_thread_cpu_time = 1;
         caps.can_generate_object_free_events = 1;
         caps.can_generate_garbage_collection_events = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities,
    -            jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
             return JNI_ERR;
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities,
    -            jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
             return JNI_ERR;
     
         if (!caps.can_generate_garbage_collection_events)
    @@ -299,19 +290,21 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         callbacks.GarbageCollectionFinish = &GarbageCollectionFinish;
         callbacks.ObjectFree = &ObjectFree;
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetEventCallbacks,
    -            jvmti, &callbacks, sizeof(callbacks))))
    +    if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, sizeof(callbacks))))
             return JNI_ERR;
     
         NSK_DISPLAY0("setting event callbacks done\nenabling JVMTI events ...\n");
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode,
    -            jvmti, JVMTI_ENABLE, JVMTI_EVENT_GARBAGE_COLLECTION_START, NULL)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE,
    +                                                          JVMTI_EVENT_GARBAGE_COLLECTION_START,
    +                                                          NULL)))
             return JNI_ERR;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode,
    -            jvmti, JVMTI_ENABLE, JVMTI_EVENT_GARBAGE_COLLECTION_FINISH, NULL)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE,
    +                                                          JVMTI_EVENT_GARBAGE_COLLECTION_FINISH,
    +                                                          NULL)))
             return JNI_ERR;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode,
    -            jvmti, JVMTI_ENABLE, JVMTI_EVENT_OBJECT_FREE, NULL)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE,
    +                                                          JVMTI_EVENT_OBJECT_FREE,
    +                                                          NULL)))
             return JNI_ERR;
         NSK_DISPLAY0("enabling the events done\n\n");
     
    diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP11/ap11t001/ap11t001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP11/ap11t001/ap11t001.cpp
    index 9163045e4fc..9b5046158b4 100644
    --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP11/ap11t001/ap11t001.cpp
    +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP11/ap11t001/ap11t001.cpp
    @@ -43,8 +43,7 @@ static int lookup(jvmtiEnv* jvmti,
         jint i;
     
         for (i = 0; i < classCount && !found; i++) {
    -        if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(GetClassSignature, jvmti,
    -                classes[i], &signature, &generic)))
    +        if (!NSK_JVMTI_VERIFY(jvmti->GetClassSignature(classes[i], &signature, &generic)))
                 break;
     
             if (signature != NULL && strcmp(signature, exp_sig) == 0) {
    @@ -52,10 +51,10 @@ static int lookup(jvmtiEnv* jvmti,
             }
     
             if (signature != NULL)
    -            NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)signature);
    +            jvmti->Deallocate((unsigned char*)signature);
     
             if (generic != NULL)
    -            NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)generic);
    +            jvmti->Deallocate((unsigned char*)generic);
         }
     
         return found;
    @@ -74,7 +73,7 @@ VMObjectAlloc(jvmtiEnv *jvmti, JNIEnv* jni, jthread thread, jobject object,
         */
         {
             jvmtiPhase phase;
    -        if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPhase, jvmti, &phase ))) {
    +        if (!NSK_JVMTI_VERIFY(jvmti->GetPhase(&phase))) {
                 nsk_jvmti_setFailStatus();
                 return;
             }
    @@ -85,14 +84,12 @@ VMObjectAlloc(jvmtiEnv *jvmti, JNIEnv* jni, jthread thread, jobject object,
         }
     
         do {
    -        if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(GetClassSignature, jvmti,
    -                object_klass, &signature, &generic))) {
    +        if (!NSK_JVMTI_VERIFY(jvmti->GetClassSignature(object_klass, &signature, &generic))) {
                 nsk_jvmti_setFailStatus();
                 break;
             }
     
    -        if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(GetThreadInfo, jvmti,
    -                thread, &threadInfo))) {
    +        if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(thread, &threadInfo))) {
                 nsk_jvmti_setFailStatus();
                 break;
             }
    @@ -108,14 +105,13 @@ VMObjectAlloc(jvmtiEnv *jvmti, JNIEnv* jni, jthread thread, jobject object,
             jint i;
             jboolean found = JNI_FALSE;
     
    -        if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(GetAllThreads, jvmti,
    -                 &threadCount, &threads))) {
    +        if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threadCount, &threads))) {
                 nsk_jvmti_setFailStatus();
                 break;
             }
     
             for (i = 0; i < threadCount && !found; i++) {
    -            found = NSK_CPP_STUB3(IsSameObject, jni, threads[i], thread);
    +            found = jni->IsSameObject(threads[i], thread);
                 if (found == JNI_TRUE) {
                     break;
                 }
    @@ -134,8 +130,7 @@ VMObjectAlloc(jvmtiEnv *jvmti, JNIEnv* jni, jthread thread, jobject object,
             jint classCount;
             jclass *classes;
     
    -        if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(GetLoadedClasses, jvmti,
    -                 &classCount, &classes))) {
    +        if (!NSK_JVMTI_VERIFY(jvmti->GetLoadedClasses(&classCount, &classes))) {
                 nsk_jvmti_setFailStatus();
                 break;
             }
    @@ -147,7 +142,7 @@ VMObjectAlloc(jvmtiEnv *jvmti, JNIEnv* jni, jthread thread, jobject object,
             }
     
             if (classes != NULL)
    -            NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)classes);
    +            jvmti->Deallocate((unsigned char*)classes);
         } while(0);
     
     
    @@ -155,8 +150,8 @@ VMObjectAlloc(jvmtiEnv *jvmti, JNIEnv* jni, jthread thread, jobject object,
         */
         {
             jclass klass;
    -        klass = NSK_CPP_STUB2(GetObjectClass, jni, object);
    -        if (!(NSK_CPP_STUB3(IsSameObject, jni, object_klass, klass))) {
    +        klass = jni->GetObjectClass(object);
    +        if (!(jni->IsSameObject(object_klass, klass))) {
                 nsk_jvmti_setFailStatus();
                 NSK_COMPLAIN1("VMObjectAlloc: unexpected object_klass : \"%s\"\n\n", signature);
             }
    @@ -167,8 +162,7 @@ VMObjectAlloc(jvmtiEnv *jvmti, JNIEnv* jni, jthread thread, jobject object,
     
         do {
             jlong objSize;
    -        if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(GetObjectSize, jvmti,
    -                 object, &objSize))) {
    +        if (!NSK_JVMTI_VERIFY(jvmti->GetObjectSize(object, &objSize))) {
                 nsk_jvmti_setFailStatus();
                 break;
             }
    @@ -181,10 +175,10 @@ VMObjectAlloc(jvmtiEnv *jvmti, JNIEnv* jni, jthread thread, jobject object,
         } while(0);
     
         if (signature != NULL)
    -        NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)signature);
    +        jvmti->Deallocate((unsigned char*)signature);
     
         if (generic != NULL)
    -        NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)generic);
    +        jvmti->Deallocate((unsigned char*)generic);
     }
     
     /* ========================================================================== */
    @@ -234,21 +228,18 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
     
         memset(&caps, 0, sizeof(caps));
         caps.can_generate_vm_object_alloc_events = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) {
             return JNI_ERR;
         }
     
         memset(&callbacks, 0, sizeof(callbacks));
         callbacks.VMObjectAlloc= &VMObjectAlloc;
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB3(SetEventCallbacks, jvmti,
    -                &callbacks, sizeof(callbacks))))
    +    if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, sizeof(callbacks))))
             return JNI_ERR;
     
         /* enable VMObjectAlloc event */
         if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB4(SetEventNotificationMode, jvmti, JVMTI_ENABLE,
    -                JVMTI_EVENT_VM_OBJECT_ALLOC, NULL)))
    +            jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_VM_OBJECT_ALLOC, NULL)))
             return JNI_ERR;
     
         /* register agent proc and arg */
    diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP12/ap12t001/ap12t001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP12/ap12t001/ap12t001.cpp
    index ad488069b73..3076676e791 100644
    --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP12/ap12t001/ap12t001.cpp
    +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/allocation/AP12/ap12t001/ap12t001.cpp
    @@ -79,8 +79,7 @@ VMDeath(jvmtiEnv *jvmti_env, JNIEnv *env) {
     JNIEXPORT void JNICALL
     Java_nsk_jvmti_scenarios_allocation_AP12_ap12t001_setTag( JNIEnv* jni, jobject obj, jlong tag) {
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetTag,
    -         jvmti, obj, tag))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti->SetTag(obj, tag))) {
              nsk_jvmti_setFailStatus();
         }
     }
    @@ -129,12 +128,10 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         memset(&caps, 0, sizeof(jvmtiCapabilities));
         caps.can_generate_object_free_events = 1;
         caps.can_tag_objects = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities,
    -            jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
             return JNI_ERR;
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities,
    -            jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
             return JNI_ERR;
     
         if (!caps.can_generate_object_free_events)
    @@ -149,16 +146,17 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         callbacks.ObjectFree = &ObjectFree;
         callbacks.VMDeath = &VMDeath;
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetEventCallbacks,
    -            jvmti, &callbacks, sizeof(callbacks))))
    +    if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, sizeof(callbacks))))
             return JNI_ERR;
     
         NSK_DISPLAY0("setting event callbacks done\nenabling JVMTI events ...\n");
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode,
    -            jvmti, JVMTI_ENABLE, JVMTI_EVENT_OBJECT_FREE, NULL)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE,
    +                                                          JVMTI_EVENT_OBJECT_FREE,
    +                                                          NULL)))
             return JNI_ERR;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode,
    -            jvmti, JVMTI_ENABLE, JVMTI_EVENT_VM_DEATH, NULL)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE,
    +                                                          JVMTI_EVENT_VM_DEATH,
    +                                                          NULL)))
             return JNI_ERR;
         NSK_DISPLAY0("enabling the events done\n\n");
     
    diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI01/bi01t001/bi01t001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI01/bi01t001/bi01t001.cpp
    index be1955de105..0da3cf8f1d8 100644
    --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI01/bi01t001/bi01t001.cpp
    +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI01/bi01t001/bi01t001.cpp
    @@ -52,23 +52,20 @@ Java_nsk_jvmti_scenarios_bcinstr_BI01_bi01t001_setNewByteCode(JNIEnv *jni_env,
         jbyte* elements;
         jboolean isCopy;
     
    -    if (!NSK_JNI_VERIFY(jni_env, (newClassSize =
    -            NSK_CPP_STUB2(GetArrayLength, jni_env, byteCode)) > 0)) {
    +    if (!NSK_JNI_VERIFY(jni_env, (newClassSize = jni_env->GetArrayLength(byteCode)) > 0)) {
             nsk_jvmti_setFailStatus();
             return NSK_FALSE;
         }
         NSK_DISPLAY1("\t... got array size: %d\n", newClassSize);
     
         if (!NSK_JNI_VERIFY(jni_env, (elements =
    -            NSK_CPP_STUB3(GetByteArrayElements, jni_env, byteCode,
    -                                                        &isCopy)) != NULL)) {
    +            jni_env->GetByteArrayElements(byteCode, &isCopy)) != NULL)) {
             nsk_jvmti_setFailStatus();
             return NSK_FALSE;
         }
         NSK_DISPLAY1("\t... got elements list: 0x%p\n", (void*)elements);
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(Allocate, jvmti,
    -                                newClassSize, &newClassBytes))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti->Allocate(newClassSize, &newClassBytes))) {
             nsk_jvmti_setFailStatus();
             return NSK_FALSE;
         }
    @@ -82,7 +79,7 @@ Java_nsk_jvmti_scenarios_bcinstr_BI01_bi01t001_setNewByteCode(JNIEnv *jni_env,
         NSK_DISPLAY1("\t... copied bytecode: %d bytes\n", (int)newClassSize);
     
         NSK_DISPLAY1("\t... release elements list: 0x%p\n", (void*)elements);
    -    NSK_TRACE(NSK_CPP_STUB4(ReleaseByteArrayElements, jni_env, byteCode, elements, JNI_ABORT));
    +    NSK_TRACE(jni_env->ReleaseByteArrayElements(byteCode, elements, JNI_ABORT));
         NSK_DISPLAY0("\t... released\n");
         return NSK_TRUE;
     }
    @@ -98,7 +95,7 @@ Java_nsk_jvmti_scenarios_bcinstr_BI01_bi01t001_setClass(JNIEnv *jni_env,
                             jobject o, jclass cls) {
     
         if (!NSK_JNI_VERIFY(jni_env, (oldClassDef.klass = (jclass)
    -             NSK_CPP_STUB2(NewGlobalRef, jni_env, cls)) != NULL)) {
    +             jni_env->NewGlobalRef(cls)) != NULL)) {
             nsk_jvmti_setFailStatus();
         }
     }
    @@ -129,9 +126,7 @@ cbClassFileLoadHook(jvmtiEnv *jvmti_env, JNIEnv* jni_env,
             unsigned char *arr;
     
             oldClassDef.class_byte_count = class_data_len;
    -        if (!NSK_JVMTI_VERIFY(
    -                NSK_CPP_STUB3(Allocate, jvmti_env, class_data_len,
    -                                &arr))) {
    +        if (!NSK_JVMTI_VERIFY(jvmti_env->Allocate(class_data_len, &arr))) {
                 nsk_jvmti_setFailStatus();
                 return;
             }
    @@ -181,9 +176,9 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* agentJNI, void* arg) {
             return;
     
         NSK_DISPLAY0("Notification disabled for CLASS_FILE_LOAD_HOOK event\n");
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB4(SetEventNotificationMode, jvmti, JVMTI_DISABLE,
    -                                JVMTI_EVENT_CLASS_FILE_LOAD_HOOK, NULL))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_DISABLE,
    +                                                          JVMTI_EVENT_CLASS_FILE_LOAD_HOOK,
    +                                                          NULL))) {
             nsk_jvmti_setFailStatus();
             return;
         }
    @@ -205,8 +200,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* agentJNI, void* arg) {
             nsk_printHexBytes("   ", 16, oldClassDef.class_byte_count,
                                     oldClassDef.class_bytes);
         }
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB3(RedefineClasses, jvmti, 1, &oldClassDef))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti->RedefineClasses(1, &oldClassDef))) {
             nsk_jvmti_setFailStatus();
             return;
         }
    @@ -219,7 +213,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* agentJNI, void* arg) {
         if (!nsk_jvmti_waitForSync(timeout))
             return;
     
    -    NSK_CPP_STUB2(DeleteGlobalRef, agentJNI, oldClassDef.klass);
    +    agentJNI->DeleteGlobalRef(oldClassDef.klass);
     
         NSK_DISPLAY0("Let debuggee to finish\n");
         if (!nsk_jvmti_resumeSync())
    @@ -256,7 +250,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
             memset(&caps, 0, sizeof(caps));
     
             caps.can_redefine_classes = 1;
    -        if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
    +        if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
                 return JNI_ERR;
         }
     
    @@ -267,16 +261,15 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
     
             memset(&callbacks, 0, size);
             callbacks.ClassFileLoadHook = cbClassFileLoadHook;
    -        if (!NSK_JVMTI_VERIFY(
    -                NSK_CPP_STUB3(SetEventCallbacks, jvmti, &callbacks, size))) {
    +        if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, size))) {
                 return JNI_ERR;
             }
         }
     
         NSK_DISPLAY0("Set notification enabled for CLASS_FILE_LOAD_HOOK event\n");
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB4(SetEventNotificationMode, jvmti, JVMTI_ENABLE,
    -                                JVMTI_EVENT_CLASS_FILE_LOAD_HOOK, NULL))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE,
    +                                                          JVMTI_EVENT_CLASS_FILE_LOAD_HOOK,
    +                                                          NULL))) {
             nsk_jvmti_setFailStatus();
             return NSK_FALSE;
         }
    diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI01/bi01t002/bi01t002.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI01/bi01t002/bi01t002.cpp
    index c42d7a224ff..4d6869b9777 100644
    --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI01/bi01t002/bi01t002.cpp
    +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI01/bi01t002/bi01t002.cpp
    @@ -54,23 +54,20 @@ Java_nsk_jvmti_scenarios_bcinstr_BI01_bi01t002_setNewByteCode(JNIEnv *jni_env,
         jbyte* elements;
         jboolean isCopy;
     
    -    if (!NSK_JNI_VERIFY(jni_env, (newClassSize[ind] =
    -            NSK_CPP_STUB2(GetArrayLength, jni_env, byteCode)) > 0)) {
    +    if (!NSK_JNI_VERIFY(jni_env, (newClassSize[ind] = jni_env->GetArrayLength(byteCode)) > 0)) {
             nsk_jvmti_setFailStatus();
             return NSK_FALSE;
         }
         NSK_DISPLAY1("\t... got array size: %d\n", newClassSize[ind]);
     
         if (!NSK_JNI_VERIFY(jni_env, (elements =
    -            NSK_CPP_STUB3(GetByteArrayElements, jni_env, byteCode,
    -                                                        &isCopy)) != NULL)) {
    +            jni_env->GetByteArrayElements(byteCode, &isCopy)) != NULL)) {
             nsk_jvmti_setFailStatus();
             return NSK_FALSE;
         }
         NSK_DISPLAY1("\t... got elements list: 0x%p\n", (void*)elements);
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(Allocate, jvmti,
    -                                newClassSize[ind], &newClassBytes[ind]))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti->Allocate(newClassSize[ind], &newClassBytes[ind]))) {
             nsk_jvmti_setFailStatus();
             return NSK_FALSE;
         }
    @@ -84,7 +81,7 @@ Java_nsk_jvmti_scenarios_bcinstr_BI01_bi01t002_setNewByteCode(JNIEnv *jni_env,
         NSK_DISPLAY1("\t... copied bytecode: %d bytes\n", (int)newClassSize[ind]);
     
         NSK_DISPLAY1("\t... release elements list: 0x%p\n", (void*)elements);
    -    NSK_TRACE(NSK_CPP_STUB4(ReleaseByteArrayElements, jni_env, byteCode, elements, JNI_ABORT));
    +    NSK_TRACE(jni_env->ReleaseByteArrayElements(byteCode, elements, JNI_ABORT));
         NSK_DISPLAY0("\t... released\n");
         return NSK_TRUE;
     }
    @@ -100,7 +97,7 @@ Java_nsk_jvmti_scenarios_bcinstr_BI01_bi01t002_setClass(JNIEnv *jni_env,
                             jobject o, jint ind, jclass cls) {
     
         if (!NSK_JNI_VERIFY(jni_env, (oldClassDef[ind].klass = (jclass)
    -             NSK_CPP_STUB2(NewGlobalRef, jni_env, cls)) != NULL)) {
    +             jni_env->NewGlobalRef(cls)) != NULL)) {
             nsk_jvmti_setFailStatus();
         }
     }
    @@ -131,9 +128,7 @@ cbClassFileLoadHook(jvmtiEnv *jvmti_env, JNIEnv* jni_env,
             unsigned char *arr;
     
             oldClassDef[clsLoadedIdx].class_byte_count = class_data_len;
    -        if (!NSK_JVMTI_VERIFY(
    -                NSK_CPP_STUB3(Allocate, jvmti_env, class_data_len,
    -                                &arr))) {
    +        if (!NSK_JVMTI_VERIFY(jvmti_env->Allocate(class_data_len, &arr))) {
                 nsk_jvmti_setFailStatus();
                 return;
             }
    @@ -189,9 +184,9 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* agentJNI, void* arg) {
             return;
     
         NSK_DISPLAY0("Notification disabled for CLASS_FILE_LOAD_HOOK event\n");
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB4(SetEventNotificationMode, jvmti, JVMTI_DISABLE,
    -                                JVMTI_EVENT_CLASS_FILE_LOAD_HOOK, NULL))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_DISABLE,
    +                                                          JVMTI_EVENT_CLASS_FILE_LOAD_HOOK,
    +                                                          NULL))) {
             nsk_jvmti_setFailStatus();
             return;
         }
    @@ -216,9 +211,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* agentJNI, void* arg) {
                                         oldClassDef[i].class_bytes);
             }
         }
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB3(RedefineClasses, jvmti, TOTAL_INSTRUMENTED_CLASSES,
    -                            oldClassDef))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti->RedefineClasses(TOTAL_INSTRUMENTED_CLASSES, oldClassDef))) {
             nsk_jvmti_setFailStatus();
             return;
         }
    @@ -232,7 +225,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* agentJNI, void* arg) {
             return;
     
         for (i = 0; i < TOTAL_INSTRUMENTED_CLASSES; i++) {
    -        NSK_CPP_STUB2(DeleteGlobalRef, agentJNI, oldClassDef[i].klass);
    +        agentJNI->DeleteGlobalRef(oldClassDef[i].klass);
         }
     
         NSK_DISPLAY0("Let debuggee to finish\n");
    @@ -270,7 +263,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
             memset(&caps, 0, sizeof(caps));
     
             caps.can_redefine_classes = 1;
    -        if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
    +        if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
                 return JNI_ERR;
         }
     
    @@ -281,16 +274,15 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
     
             memset(&callbacks, 0, size);
             callbacks.ClassFileLoadHook = cbClassFileLoadHook;
    -        if (!NSK_JVMTI_VERIFY(
    -                NSK_CPP_STUB3(SetEventCallbacks, jvmti, &callbacks, size))) {
    +        if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, size))) {
                 return JNI_ERR;
             }
         }
     
         NSK_DISPLAY0("Set notification enabled for CLASS_FILE_LOAD_HOOK event\n");
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB4(SetEventNotificationMode, jvmti, JVMTI_ENABLE,
    -                                JVMTI_EVENT_CLASS_FILE_LOAD_HOOK, NULL))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE,
    +                                                          JVMTI_EVENT_CLASS_FILE_LOAD_HOOK,
    +                                                          NULL))) {
             nsk_jvmti_setFailStatus();
             return NSK_FALSE;
         }
    diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI02/bi02t001/bi02t001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI02/bi02t001/bi02t001.cpp
    index 0728b72ede5..569ceadc4d5 100644
    --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI02/bi02t001/bi02t001.cpp
    +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI02/bi02t001/bi02t001.cpp
    @@ -63,13 +63,13 @@ ClassFileLoadHook(jvmtiEnv *jvmti_env, JNIEnv *jni_env,
                 /* sent by class load */
     
                 if (!NSK_JNI_VERIFY(jni_env, (*new_class_data_len =
    -                    NSK_CPP_STUB2(GetArrayLength, jni_env, classBytes)) > 0)) {
    +                    jni_env->GetArrayLength(classBytes)) > 0)) {
                     nsk_jvmti_setFailStatus();
                     return;
                 }
     
                 if (!NSK_JNI_VERIFY(jni_env, (*new_class_data = (unsigned char*)
    -                    NSK_CPP_STUB3(GetByteArrayElements, jni_env, classBytes, NULL))
    +                    jni_env->GetByteArrayElements(classBytes, NULL))
                             != NULL)) {
                     nsk_jvmti_setFailStatus();
                     return;
    @@ -86,30 +86,27 @@ static int prepare(jvmtiEnv* jvmti, JNIEnv* jni) {
         jfieldID field = NULL;
     
         NSK_DISPLAY1("Find class: %s\n", DEBUGEE_CLASS_NAME);
    -    if (!NSK_JNI_VERIFY(jni, (debugeeClass =
    -            NSK_CPP_STUB2(FindClass, jni, DEBUGEE_CLASS_NAME)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (debugeeClass = jni->FindClass(DEBUGEE_CLASS_NAME)) != NULL))
             return NSK_FALSE;
     
    -    if (!NSK_JNI_VERIFY(jni, (debugeeClass = (jclass)
    -            NSK_CPP_STUB2(NewGlobalRef, jni, debugeeClass)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (debugeeClass = (jclass)jni->NewGlobalRef(debugeeClass)) != NULL))
             return NSK_FALSE;
     
         if (!NSK_JNI_VERIFY(jni, (field =
    -            NSK_CPP_STUB4(GetStaticFieldID, jni, debugeeClass,
    -                "newClassBytes", "[B")) != NULL))
    +            jni->GetStaticFieldID(debugeeClass, "newClassBytes", "[B")) != NULL))
             return NSK_FALSE;
     
         if (!NSK_JNI_VERIFY(jni, (classBytes = (jbyteArray)
    -            NSK_CPP_STUB3(GetStaticObjectField, jni, debugeeClass, field))
    +            jni->GetStaticObjectField(debugeeClass, field))
                     != NULL))
             return NSK_FALSE;
     
    -    if (!NSK_JNI_VERIFY(jni, (classBytes = (jbyteArray)
    -            NSK_CPP_STUB2(NewGlobalRef, jni, classBytes)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (classBytes = (jbyteArray)jni->NewGlobalRef(classBytes)) != NULL))
             return NSK_FALSE;
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode,
    -            jvmti, JVMTI_ENABLE, JVMTI_EVENT_CLASS_FILE_LOAD_HOOK, NULL)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE,
    +                                                          JVMTI_EVENT_CLASS_FILE_LOAD_HOOK,
    +                                                          NULL)))
             return JNI_ERR;
     
         return NSK_TRUE;
    @@ -140,12 +137,13 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) {
             nsk_jvmti_setFailStatus();
         }
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode,
    -            jvmti, JVMTI_DISABLE, JVMTI_EVENT_CLASS_FILE_LOAD_HOOK, NULL)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_DISABLE,
    +                                                          JVMTI_EVENT_CLASS_FILE_LOAD_HOOK,
    +                                                          NULL)))
             nsk_jvmti_setFailStatus();
     
    -    NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, debugeeClass));
    -    NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, classBytes));
    +    NSK_TRACE(jni->DeleteGlobalRef(debugeeClass));
    +    NSK_TRACE(jni->DeleteGlobalRef(classBytes));
     
         if (!nsk_jvmti_resumeSync())
             return;
    @@ -183,7 +181,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
     
         memset(&caps, 0, sizeof(caps));
         caps.can_generate_all_class_hook_events = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
             return JNI_ERR;
     
         if (!NSK_VERIFY(nsk_jvmti_setAgentProc(agentProc, NULL)))
    @@ -191,8 +189,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
     
         memset(&callbacks, 0, sizeof(callbacks));
         callbacks.ClassFileLoadHook = &ClassFileLoadHook;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetEventCallbacks,
    -            jvmti, &callbacks, sizeof(callbacks))))
    +    if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, sizeof(callbacks))))
             return JNI_ERR;
     
         return JNI_OK;
    diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI02/bi02t002/bi02t002.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI02/bi02t002/bi02t002.cpp
    index d6f6be129fd..3ec2bff1ab2 100644
    --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI02/bi02t002/bi02t002.cpp
    +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI02/bi02t002/bi02t002.cpp
    @@ -52,35 +52,29 @@ static int prepare(jvmtiEnv* jvmti, JNIEnv* jni) {
         jfieldID field = NULL;
     
         NSK_DISPLAY1("Find class: %s\n", DEBUGEE_CLASS_NAME);
    -    if (!NSK_JNI_VERIFY(jni, (debugeeClass =
    -            NSK_CPP_STUB2(FindClass, jni, DEBUGEE_CLASS_NAME)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (debugeeClass = jni->FindClass(DEBUGEE_CLASS_NAME)) != NULL))
             return NSK_FALSE;
     
    -    if (!NSK_JNI_VERIFY(jni, (debugeeClass = (jclass)
    -            NSK_CPP_STUB2(NewGlobalRef, jni, debugeeClass)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (debugeeClass = (jclass)jni->NewGlobalRef(debugeeClass)) != NULL))
             return NSK_FALSE;
     
         if (!NSK_JNI_VERIFY(jni, (field =
    -            NSK_CPP_STUB4(GetStaticFieldID, jni, debugeeClass,
    -                "newClassBytes", "[B")) != NULL))
    +            jni->GetStaticFieldID(debugeeClass, "newClassBytes", "[B")) != NULL))
             return NSK_FALSE;
     
         if (!NSK_JNI_VERIFY(jni, (classBytes = (jbyteArray)
    -            NSK_CPP_STUB3(GetStaticObjectField, jni, debugeeClass, field))
    +            jni->GetStaticObjectField(debugeeClass, field))
                     != NULL))
             return NSK_FALSE;
     
    -    if (!NSK_JNI_VERIFY(jni, (classBytes = (jbyteArray)
    -            NSK_CPP_STUB2(NewGlobalRef, jni, classBytes)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (classBytes = (jbyteArray)jni->NewGlobalRef(classBytes)) != NULL))
             return NSK_FALSE;
     
         NSK_DISPLAY1("Find class: %s\n", CLASS_NAME);
    -    if (!NSK_JNI_VERIFY(jni, (testedClass =
    -            NSK_CPP_STUB2(FindClass, jni, CLASS_NAME)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (testedClass = jni->FindClass(CLASS_NAME)) != NULL))
             return NSK_FALSE;
     
    -    if (!NSK_JNI_VERIFY(jni, (testedClass = (jclass)
    -            NSK_CPP_STUB2(NewGlobalRef, jni, testedClass)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (testedClass = (jclass)jni->NewGlobalRef(testedClass)) != NULL))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -93,17 +87,16 @@ static int redefine(jvmtiEnv* jvmti, JNIEnv* jni) {
     
         NSK_DISPLAY0("Redefining ...\n");
     
    -    if (!NSK_JNI_VERIFY(jni, (class_def.class_byte_count =
    -            NSK_CPP_STUB2(GetArrayLength, jni, classBytes)) > 0))
    +    if (!NSK_JNI_VERIFY(jni, (class_def.class_byte_count = jni->GetArrayLength(classBytes)) > 0))
             return NSK_TRUE;
     
         if (!NSK_JNI_VERIFY(jni, (class_def.class_bytes = (unsigned char*)
    -            NSK_CPP_STUB3(GetByteArrayElements, jni, classBytes, NULL))
    +            jni->GetByteArrayElements(classBytes, NULL))
                     != NULL))
             return NSK_TRUE;
     
         class_def.klass = testedClass;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(RedefineClasses, jvmti, 1, &class_def)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->RedefineClasses(1, &class_def)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -132,9 +125,9 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) {
         if (!nsk_jvmti_waitForSync(timeout))
             return;
     
    -    NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, debugeeClass));
    -    NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, classBytes));
    -    NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, testedClass));
    +    NSK_TRACE(jni->DeleteGlobalRef(debugeeClass));
    +    NSK_TRACE(jni->DeleteGlobalRef(classBytes));
    +    NSK_TRACE(jni->DeleteGlobalRef(testedClass));
     
         if (!nsk_jvmti_resumeSync())
             return;
    @@ -171,7 +164,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
     
         memset(&caps, 0, sizeof(caps));
         caps.can_redefine_classes = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
             return JNI_ERR;
     
         if (!NSK_VERIFY(nsk_jvmti_setAgentProc(agentProc, NULL)))
    diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI03/bi03t001/bi03t001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI03/bi03t001/bi03t001.cpp
    index 7e54ac51eeb..2f0ce597dd8 100644
    --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI03/bi03t001/bi03t001.cpp
    +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI03/bi03t001/bi03t001.cpp
    @@ -63,13 +63,13 @@ ClassFileLoadHook(jvmtiEnv *jvmti_env, JNIEnv *jni_env,
                 /* sent by class load */
     
                 if (!NSK_JNI_VERIFY(jni_env, (*new_class_data_len =
    -                    NSK_CPP_STUB2(GetArrayLength, jni_env, classBytes)) > 0)) {
    +                    jni_env->GetArrayLength(classBytes)) > 0)) {
                     nsk_jvmti_setFailStatus();
                     return;
                 }
     
                 if (!NSK_JNI_VERIFY(jni_env, (*new_class_data = (unsigned char*)
    -                    NSK_CPP_STUB3(GetByteArrayElements, jni_env, classBytes, NULL))
    +                    jni_env->GetByteArrayElements(classBytes, NULL))
                             != NULL)) {
                     nsk_jvmti_setFailStatus();
                     return;
    @@ -86,30 +86,27 @@ static int prepare(jvmtiEnv* jvmti, JNIEnv* jni) {
         jfieldID field = NULL;
     
         NSK_DISPLAY1("Find class: %s\n", DEBUGEE_CLASS_NAME);
    -    if (!NSK_JNI_VERIFY(jni, (debugeeClass =
    -            NSK_CPP_STUB2(FindClass, jni, DEBUGEE_CLASS_NAME)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (debugeeClass = jni->FindClass(DEBUGEE_CLASS_NAME)) != NULL))
             return NSK_FALSE;
     
    -    if (!NSK_JNI_VERIFY(jni, (debugeeClass = (jclass)
    -            NSK_CPP_STUB2(NewGlobalRef, jni, debugeeClass)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (debugeeClass = (jclass)jni->NewGlobalRef(debugeeClass)) != NULL))
             return NSK_FALSE;
     
         if (!NSK_JNI_VERIFY(jni, (field =
    -            NSK_CPP_STUB4(GetStaticFieldID, jni, debugeeClass,
    -                "newClassBytes", "[B")) != NULL))
    +            jni->GetStaticFieldID(debugeeClass, "newClassBytes", "[B")) != NULL))
             return NSK_FALSE;
     
         if (!NSK_JNI_VERIFY(jni, (classBytes = (jbyteArray)
    -            NSK_CPP_STUB3(GetStaticObjectField, jni, debugeeClass, field))
    +            jni->GetStaticObjectField(debugeeClass, field))
                     != NULL))
             return NSK_FALSE;
     
    -    if (!NSK_JNI_VERIFY(jni, (classBytes = (jbyteArray)
    -            NSK_CPP_STUB2(NewGlobalRef, jni, classBytes)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (classBytes = (jbyteArray)jni->NewGlobalRef(classBytes)) != NULL))
             return NSK_FALSE;
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode,
    -            jvmti, JVMTI_ENABLE, JVMTI_EVENT_CLASS_FILE_LOAD_HOOK, NULL)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE,
    +                                                          JVMTI_EVENT_CLASS_FILE_LOAD_HOOK,
    +                                                          NULL)))
             return JNI_ERR;
     
         return NSK_TRUE;
    @@ -140,12 +137,13 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) {
             nsk_jvmti_setFailStatus();
         }
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode,
    -            jvmti, JVMTI_DISABLE, JVMTI_EVENT_CLASS_FILE_LOAD_HOOK, NULL)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_DISABLE,
    +                                                          JVMTI_EVENT_CLASS_FILE_LOAD_HOOK,
    +                                                          NULL)))
             nsk_jvmti_setFailStatus();
     
    -    NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, debugeeClass));
    -    NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, classBytes));
    +    NSK_TRACE(jni->DeleteGlobalRef(debugeeClass));
    +    NSK_TRACE(jni->DeleteGlobalRef(classBytes));
     
         if (!nsk_jvmti_resumeSync())
             return;
    @@ -183,7 +181,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
     
         memset(&caps, 0, sizeof(caps));
         caps.can_generate_all_class_hook_events = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
             return JNI_ERR;
     
         if (!NSK_VERIFY(nsk_jvmti_setAgentProc(agentProc, NULL)))
    @@ -191,8 +189,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
     
         memset(&callbacks, 0, sizeof(callbacks));
         callbacks.ClassFileLoadHook = &ClassFileLoadHook;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetEventCallbacks,
    -            jvmti, &callbacks, sizeof(callbacks))))
    +    if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, sizeof(callbacks))))
             return JNI_ERR;
     
         return JNI_OK;
    diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI03/bi03t002/bi03t002.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI03/bi03t002/bi03t002.cpp
    index 4cc97d3e57b..da2c9233dbe 100644
    --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI03/bi03t002/bi03t002.cpp
    +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI03/bi03t002/bi03t002.cpp
    @@ -52,35 +52,29 @@ static int prepare(jvmtiEnv* jvmti, JNIEnv* jni) {
         jfieldID field = NULL;
     
         NSK_DISPLAY1("Find class: %s\n", DEBUGEE_CLASS_NAME);
    -    if (!NSK_JNI_VERIFY(jni, (debugeeClass =
    -            NSK_CPP_STUB2(FindClass, jni, DEBUGEE_CLASS_NAME)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (debugeeClass = jni->FindClass(DEBUGEE_CLASS_NAME)) != NULL))
             return NSK_FALSE;
     
    -    if (!NSK_JNI_VERIFY(jni, (debugeeClass = (jclass)
    -            NSK_CPP_STUB2(NewGlobalRef, jni, debugeeClass)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (debugeeClass = (jclass)jni->NewGlobalRef(debugeeClass)) != NULL))
             return NSK_FALSE;
     
         if (!NSK_JNI_VERIFY(jni, (field =
    -            NSK_CPP_STUB4(GetStaticFieldID, jni, debugeeClass,
    -                "newClassBytes", "[B")) != NULL))
    +            jni->GetStaticFieldID(debugeeClass, "newClassBytes", "[B")) != NULL))
             return NSK_FALSE;
     
         if (!NSK_JNI_VERIFY(jni, (classBytes = (jbyteArray)
    -            NSK_CPP_STUB3(GetStaticObjectField, jni, debugeeClass, field))
    +            jni->GetStaticObjectField(debugeeClass, field))
                     != NULL))
             return NSK_FALSE;
     
    -    if (!NSK_JNI_VERIFY(jni, (classBytes = (jbyteArray)
    -            NSK_CPP_STUB2(NewGlobalRef, jni, classBytes)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (classBytes = (jbyteArray)jni->NewGlobalRef(classBytes)) != NULL))
             return NSK_FALSE;
     
         NSK_DISPLAY1("Find class: %s\n", CLASS_NAME);
    -    if (!NSK_JNI_VERIFY(jni, (testedClass =
    -            NSK_CPP_STUB2(FindClass, jni, CLASS_NAME)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (testedClass = jni->FindClass(CLASS_NAME)) != NULL))
             return NSK_FALSE;
     
    -    if (!NSK_JNI_VERIFY(jni, (testedClass = (jclass)
    -            NSK_CPP_STUB2(NewGlobalRef, jni, testedClass)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (testedClass = (jclass)jni->NewGlobalRef(testedClass)) != NULL))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -93,17 +87,16 @@ static int redefine(jvmtiEnv* jvmti, JNIEnv* jni) {
     
         NSK_DISPLAY0("Redefining ...\n");
     
    -    if (!NSK_JNI_VERIFY(jni, (class_def.class_byte_count =
    -            NSK_CPP_STUB2(GetArrayLength, jni, classBytes)) > 0))
    +    if (!NSK_JNI_VERIFY(jni, (class_def.class_byte_count = jni->GetArrayLength(classBytes)) > 0))
             return NSK_TRUE;
     
         if (!NSK_JNI_VERIFY(jni, (class_def.class_bytes = (unsigned char*)
    -            NSK_CPP_STUB3(GetByteArrayElements, jni, classBytes, NULL))
    +            jni->GetByteArrayElements(classBytes, NULL))
                     != NULL))
             return NSK_TRUE;
     
         class_def.klass = testedClass;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(RedefineClasses, jvmti, 1, &class_def)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->RedefineClasses(1, &class_def)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -132,9 +125,9 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) {
         if (!nsk_jvmti_waitForSync(timeout))
             return;
     
    -    NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, debugeeClass));
    -    NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, classBytes));
    -    NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, testedClass));
    +    NSK_TRACE(jni->DeleteGlobalRef(debugeeClass));
    +    NSK_TRACE(jni->DeleteGlobalRef(classBytes));
    +    NSK_TRACE(jni->DeleteGlobalRef(testedClass));
     
         if (!nsk_jvmti_resumeSync())
             return;
    @@ -171,7 +164,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
     
         memset(&caps, 0, sizeof(caps));
         caps.can_redefine_classes = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
             return JNI_ERR;
     
         if (!NSK_VERIFY(nsk_jvmti_setAgentProc(agentProc, NULL)))
    diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI04/bi04t002/bi04t002.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI04/bi04t002/bi04t002.cpp
    index 9a00f3ed8c1..497486c7c1e 100644
    --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI04/bi04t002/bi04t002.cpp
    +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/bcinstr/BI04/bi04t002/bi04t002.cpp
    @@ -69,9 +69,7 @@ int readNewBytecode(jvmtiEnv* jvmti) {
         classDef.class_byte_count = ftell(bytecode);
         rewind(bytecode);
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(Allocate, jvmti,
    -                                classDef.class_byte_count,
    -                                &newClassBytes))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti->Allocate(classDef.class_byte_count, &newClassBytes))) {
             NSK_COMPLAIN0("buffer couldn't be allocated\n");
             return NSK_FALSE;
         }
    @@ -99,14 +97,13 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) {
             return;
     
         NSK_DISPLAY1("Find class: %s\n", TESTED_CLASS_NAME);
    -    if (!NSK_JNI_VERIFY(jni, (classDef.klass =
    -            NSK_CPP_STUB2(FindClass, jni, TESTED_CLASS_NAME)) != NULL)) {
    +    if (!NSK_JNI_VERIFY(jni, (classDef.klass = jni->FindClass(TESTED_CLASS_NAME)) != NULL)) {
             nsk_jvmti_setFailStatus();
             return;
         }
     
         if (!NSK_JNI_VERIFY(jni, (classDef.klass = (jclass)
    -            NSK_CPP_STUB2(NewGlobalRef, jni, classDef.klass)) != NULL)) {
    +            jni->NewGlobalRef(classDef.klass)) != NULL)) {
             nsk_jvmti_setFailStatus();
             return;
         }
    @@ -120,13 +117,12 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) {
             nsk_printHexBytes("   ", 16, classDef.class_byte_count,
                                     classDef.class_bytes);
         }
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB3(RedefineClasses, jvmti, 1, &classDef))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti->RedefineClasses(1, &classDef))) {
             nsk_jvmti_setFailStatus();
             return;
         }
     
    -    NSK_CPP_STUB2(DeleteGlobalRef, jni, classDef.klass);
    +    jni->DeleteGlobalRef(classDef.klass);
     
         if (!nsk_jvmti_resumeSync())
             return;
    @@ -163,7 +159,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
     
             caps.can_redefine_classes = 1;
             caps.can_redefine_any_class = 1;
    -        if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
    +        if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
                 return JNI_ERR;
         }
     
    diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t001/cm01t001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t001/cm01t001.cpp
    index 6a388983359..a59b82a5c5c 100644
    --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t001/cm01t001.cpp
    +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t001/cm01t001.cpp
    @@ -79,8 +79,7 @@ static int prepare() {
         NSK_DISPLAY0("Prepare: find tested thread\n");
     
         /* get all live threads */
    -    if (!NSK_JVMTI_VERIFY(
    -           NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads)))
             return NSK_FALSE;
     
         if (!NSK_VERIFY(threads_count > 0 && threads != NULL))
    @@ -92,8 +91,7 @@ static int prepare() {
                 return NSK_FALSE;
     
             /* get thread information */
    -        if (!NSK_JVMTI_VERIFY(
    -                NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info)))
    +        if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info)))
                 return NSK_FALSE;
     
             NSK_DISPLAY3("    thread #%d (%s): %p\n", i, info.name, threads[i]);
    @@ -105,24 +103,20 @@ static int prepare() {
         }
     
         /* deallocate threads list */
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads)))
             return NSK_FALSE;
     
         /* get tested thread class */
    -    if (!NSK_JNI_VERIFY(jni, (klass =
    -            NSK_CPP_STUB2(GetObjectClass, jni, thread)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (klass = jni->GetObjectClass(thread)) != NULL))
             return NSK_FALSE;
     
         /* get tested thread method 'run' */
    -    if (!NSK_JNI_VERIFY(jni, (method =
    -            NSK_CPP_STUB4(GetMethodID, jni, klass, "run", "()V")) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (method = jni->GetMethodID(klass, "run", "()V")) != NULL))
             return NSK_FALSE;
     
         /* get tested thread field 'waitingMonitor' */
         if (!NSK_JNI_VERIFY(jni, (field =
    -            NSK_CPP_STUB4(GetFieldID, jni, klass,
    -                "waitingMonitor", "Ljava/lang/Object;")) != NULL))
    +            jni->GetFieldID(klass, "waitingMonitor", "Ljava/lang/Object;")) != NULL))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -136,23 +130,21 @@ static int checkSuspend() {
         jvmtiError err;
     
         NSK_DISPLAY0("Checking negative: SuspendThread\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(SuspendThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->SuspendThread(thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: ResumeThread\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(ResumeThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->ResumeThread(thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SuspendThreadList\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(SuspendThreadList, jvmti, 1, &thread, &err)))
    +            jvmti->SuspendThreadList(1, &thread, &err)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: ResumeThreadList\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(ResumeThreadList, jvmti, 1, &thread, &err)))
    +            jvmti->ResumeThreadList(1, &thread, &err)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -168,27 +160,23 @@ static int checkSignalThread() {
         jmethodID ctor = NULL;
         jobject exception = NULL;
     
    -    if (!NSK_JNI_VERIFY(jni, (cls =
    -            NSK_CPP_STUB2(FindClass, jni, THREAD_DEATH_CLASS_NAME)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (cls = jni->FindClass(THREAD_DEATH_CLASS_NAME)) != NULL))
             return NSK_FALSE;
     
         if (!NSK_JNI_VERIFY(jni, (ctor =
    -            NSK_CPP_STUB4(GetMethodID, jni, cls,
    -                THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
    +            jni->GetMethodID(cls, THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
             return NSK_FALSE;
     
    -    if (!NSK_JNI_VERIFY(jni, (exception =
    -            NSK_CPP_STUB3(NewObject, jni, cls, ctor)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (exception = jni->NewObject(cls, ctor)) != NULL))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: StopThread\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(StopThread, jvmti, thread, exception)))
    +            jvmti->StopThread(thread, exception)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: InterruptThread\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(InterruptThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->InterruptThread(thread)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -202,7 +190,7 @@ static int checkGetOwnedMonitorInfo() {
     
         NSK_DISPLAY0("Checking negative: GetOwnedMonitorInfo\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetOwnedMonitorInfo, jvmti, thread, &count, &monitors)))
    +            jvmti->GetOwnedMonitorInfo(thread, &count, &monitors)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -215,7 +203,7 @@ static int checkGetCurrentContendedMonitor() {
     
         NSK_DISPLAY0("Checking negative: GetCurrentContendedMonitor\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetCurrentContendedMonitor, jvmti, thread, &monitor)))
    +            jvmti->GetCurrentContendedMonitor(thread, &monitor)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -225,8 +213,7 @@ static int checkGetCurrentContendedMonitor() {
      */
     static int checkPopFrame() {
         NSK_DISPLAY0("Checking negative: PopFrame\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(PopFrame, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->PopFrame(thread)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -269,44 +256,36 @@ static int checkHeapFunctions() {
         jint dummy_user_data = 0;
     
         NSK_DISPLAY0("Checking positive: SetTag\n");
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB3(SetTag, jvmti, thread, TAG_VALUE)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->SetTag(thread, TAG_VALUE)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking positive: GetTag\n");
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB3(GetTag, jvmti, thread, &tag)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetTag(thread, &tag)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking positive: GetObjectsWithTags\n");
         tag = TAG_VALUE;
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB6(GetObjectsWithTags, jvmti, 1, &tag,
    -                &count, &res_objects, &res_tags)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetObjectsWithTags(1, &tag, &count, &res_objects, &res_tags)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking positive: IterateOverHeap\n");
         if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB4(IterateOverHeap, jvmti, JVMTI_HEAP_OBJECT_TAGGED,
    -                HeapObject, &dummy_user_data)))
    +            jvmti->IterateOverHeap(JVMTI_HEAP_OBJECT_TAGGED, HeapObject, &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking positive: IterateOverInstancesOfClass\n");
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB5(IterateOverInstancesOfClass, jvmti, klass,
    -                JVMTI_HEAP_OBJECT_UNTAGGED, HeapObject, &dummy_user_data)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->IterateOverInstancesOfClass(
    +            klass, JVMTI_HEAP_OBJECT_UNTAGGED, HeapObject, &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking positive: IterateOverObjectsReachableFromObject\n");
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB4(IterateOverObjectsReachableFromObject, jvmti, thread,
    -                ObjectReference, &dummy_user_data)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->IterateOverObjectsReachableFromObject(
    +            thread, ObjectReference, &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking positive: IterateOverReachableObjects\n");
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB5(IterateOverReachableObjects, jvmti,
    -                HeapRoot, StackReference, ObjectReference, &dummy_user_data)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->IterateOverReachableObjects(
    +            HeapRoot, StackReference, ObjectReference, &dummy_user_data)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -325,58 +304,57 @@ static int checkLocalVariableFunctions() {
     
         NSK_DISPLAY0("Checking negative: GetLocalVariableTable\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetLocalVariableTable, jvmti, method, &count,
    -                &local_variable_table)))
    +            jvmti->GetLocalVariableTable(method, &count, &local_variable_table)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalObject\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalObject, jvmti, thread, 0, 0, &object_value)))
    +            jvmti->GetLocalObject(thread, 0, 0, &object_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalInt\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalInt, jvmti, thread, 0, 0, &int_value)))
    +            jvmti->GetLocalInt(thread, 0, 0, &int_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalLong\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalLong, jvmti, thread, 0, 0, &long_value)))
    +            jvmti->GetLocalLong(thread, 0, 0, &long_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalFloat\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalFloat, jvmti, thread, 0, 0, &float_value)))
    +            jvmti->GetLocalFloat(thread, 0, 0, &float_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalDouble\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalDouble, jvmti, thread, 0, 0, &double_value)))
    +            jvmti->GetLocalDouble(thread, 0, 0, &double_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalObject\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalObject, jvmti, thread, 0, 0, thread)))
    +            jvmti->SetLocalObject(thread, 0, 0, thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalInt\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalInt, jvmti, thread, 0, 0, (jint)0)))
    +            jvmti->SetLocalInt(thread, 0, 0, (jint)0)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalLong\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalLong, jvmti, thread, 0, 0, (jlong)0)))
    +            jvmti->SetLocalLong(thread, 0, 0, (jlong)0)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalFloat\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalFloat, jvmti, thread, 0, 0, (jfloat)0.0)))
    +            jvmti->SetLocalFloat(thread, 0, 0, (jfloat)0.0)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalDouble\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalDouble, jvmti, thread, 0, 0, (jdouble)0.0)))
    +            jvmti->SetLocalDouble(thread, 0, 0, (jdouble)0.0)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -391,18 +369,17 @@ static int checkSourceInfoFunctions() {
     
         NSK_DISPLAY0("Checking negative: GetSourceFileName\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetSourceFileName, jvmti, klass, &name)))
    +            jvmti->GetSourceFileName(klass, &name)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetSourceDebugExtension\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetSourceDebugExtension, jvmti, klass, &name)))
    +            jvmti->GetSourceDebugExtension(klass, &name)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLineNumberTable\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetLineNumberTable, jvmti, method, &count,
    -                &line_number_table)))
    +            jvmti->GetLineNumberTable(method, &count, &line_number_table)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -418,7 +395,7 @@ static int checkRedefineClasses() {
         class_def.class_byte_count = 0;
         class_def.class_bytes = NULL;
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(RedefineClasses, jvmti, 1, &class_def)))
    +            jvmti->RedefineClasses(1, &class_def)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -431,7 +408,7 @@ static int checkGetObjectMonitorUsage() {
     
         NSK_DISPLAY0("Checking negative: GetObjectMonitorUsage\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetObjectMonitorUsage, jvmti, thread, &monitor_info)))
    +            jvmti->GetObjectMonitorUsage(thread, &monitor_info)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -444,12 +421,12 @@ static int checkIsSyntheticFunctions() {
     
         NSK_DISPLAY0("Checking negative: IsFieldSynthetic\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(IsFieldSynthetic, jvmti, klass, field, &is_synthetic)))
    +            jvmti->IsFieldSynthetic(klass, field, &is_synthetic)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IsMethodSynthetic\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(IsMethodSynthetic, jvmti, method, &is_synthetic)))
    +            jvmti->IsMethodSynthetic(method, &is_synthetic)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -463,7 +440,7 @@ static int checkGetBytecodes() {
     
         NSK_DISPLAY0("Checking negative: GetBytecodes\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetBytecodes, jvmti, method, &count, &bytecodes)))
    +            jvmti->GetBytecodes(method, &count, &bytecodes)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -477,12 +454,12 @@ static int checkGetCurrentThreadCpuTime() {
     
         NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTimerInfo\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(GetCurrentThreadCpuTimerInfo, jvmti, &info)))
    +            jvmti->GetCurrentThreadCpuTimerInfo(&info)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTime\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(GetCurrentThreadCpuTime, jvmti, &nanos)))
    +            jvmti->GetCurrentThreadCpuTime(&nanos)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -496,12 +473,12 @@ static int checkGetThreadCpuTime() {
     
         NSK_DISPLAY0("Checking negative: GetThreadCpuTimerInfo\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(GetThreadCpuTimerInfo, jvmti, &info)))
    +            jvmti->GetThreadCpuTimerInfo(&info)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetThreadCpuTime\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetThreadCpuTime, jvmti, thread, &nanos)))
    +            jvmti->GetThreadCpuTime(thread, &nanos)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -597,7 +574,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
     
         /* testcase #1: check GetPotentialCapabilities */
         NSK_DISPLAY0("Testcase #1: check if GetPotentialCapabilities returns the capability\n");
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPotentialCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetPotentialCapabilities(&caps)))
             return JNI_ERR;
         if (!caps.CAPABILITY) {
             NSK_COMPLAIN1("GetPotentialCapabilities does not return \"%s\" capability\n",
    @@ -609,13 +586,13 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         NSK_DISPLAY0("Testcase #2: add the capability during Onload phase\n");
         memset(&caps, 0, sizeof(caps));
         caps.CAPABILITY = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
             return JNI_ERR;
     
         /* testcase #3: check if GetCapabilities returns the capability */
         NSK_DISPLAY0("Testcase #3: check if GetCapabilities returns the capability\n");
         memset(&caps, 0, sizeof(caps));
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
             return JNI_ERR;
         if (!caps.CAPABILITY) {
             NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
    @@ -627,13 +604,13 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         NSK_DISPLAY0("Testcase #4: relinquish the capability during Onload phase\n");
         memset(&caps, 0, sizeof(caps));
         caps.CAPABILITY = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RelinquishCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->RelinquishCapabilities(&caps)))
             return JNI_ERR;
     
         /* testcase #5: check if GetCapabilities does not return the capability */
         NSK_DISPLAY0("Testcase #5: check if GetCapabilities does not return the capability\n");
         memset(&caps, 0, sizeof(caps));
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
             return JNI_ERR;
         if (caps.CAPABILITY) {
             NSK_COMPLAIN1("GetCapabilities returns relinquished \"%s\" capability\n",
    @@ -645,10 +622,10 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         NSK_DISPLAY0("Testcase #6: add back the capability and check with GetCapabilities\n");
         memset(&caps, 0, sizeof(caps));
         caps.CAPABILITY = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
             return JNI_ERR;
         memset(&caps, 0, sizeof(caps));
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
             return JNI_ERR;
         if (!caps.CAPABILITY) {
             NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
    diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t002/cm01t002.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t002/cm01t002.cpp
    index 1e1f4120779..cb44c78abd4 100644
    --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t002/cm01t002.cpp
    +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t002/cm01t002.cpp
    @@ -72,8 +72,7 @@ static int prepare() {
         NSK_DISPLAY0("Prepare: find tested thread\n");
     
         /* get all live threads */
    -    if (!NSK_JVMTI_VERIFY(
    -           NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads)))
             return NSK_FALSE;
     
         if (!NSK_VERIFY(threads_count > 0 && threads != NULL))
    @@ -85,8 +84,7 @@ static int prepare() {
                 return NSK_FALSE;
     
             /* get thread information */
    -        if (!NSK_JVMTI_VERIFY(
    -                NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info)))
    +        if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info)))
                 return NSK_FALSE;
     
             NSK_DISPLAY3("    thread #%d (%s): %p\n", i, info.name, threads[i]);
    @@ -98,24 +96,20 @@ static int prepare() {
         }
     
         /* deallocate threads list */
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads)))
             return NSK_FALSE;
     
         /* get tested thread class */
    -    if (!NSK_JNI_VERIFY(jni, (klass =
    -            NSK_CPP_STUB2(GetObjectClass, jni, thread)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (klass = jni->GetObjectClass(thread)) != NULL))
             return NSK_FALSE;
     
         /* get tested thread method 'run' */
    -    if (!NSK_JNI_VERIFY(jni, (method =
    -            NSK_CPP_STUB4(GetMethodID, jni, klass, "run", "()V")) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (method = jni->GetMethodID(klass, "run", "()V")) != NULL))
             return NSK_FALSE;
     
         /* get tested thread field 'waitingMonitor' */
         if (!NSK_JNI_VERIFY(jni, (field =
    -            NSK_CPP_STUB4(GetFieldID, jni, klass,
    -                "waitingMonitor", "Ljava/lang/Object;")) != NULL))
    +            jni->GetFieldID(klass, "waitingMonitor", "Ljava/lang/Object;")) != NULL))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -129,23 +123,21 @@ static int checkSuspend() {
         jvmtiError err;
     
         NSK_DISPLAY0("Checking negative: SuspendThread\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(SuspendThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->SuspendThread(thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: ResumeThread\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(ResumeThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->ResumeThread(thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SuspendThreadList\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(SuspendThreadList, jvmti, 1, &thread, &err)))
    +            jvmti->SuspendThreadList(1, &thread, &err)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: ResumeThreadList\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(ResumeThreadList, jvmti, 1, &thread, &err)))
    +            jvmti->ResumeThreadList(1, &thread, &err)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -161,27 +153,23 @@ static int checkSignalThread() {
         jmethodID ctor = NULL;
         jobject exception = NULL;
     
    -    if (!NSK_JNI_VERIFY(jni, (cls =
    -            NSK_CPP_STUB2(FindClass, jni, THREAD_DEATH_CLASS_NAME)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (cls = jni->FindClass(THREAD_DEATH_CLASS_NAME)) != NULL))
             return NSK_FALSE;
     
         if (!NSK_JNI_VERIFY(jni, (ctor =
    -            NSK_CPP_STUB4(GetMethodID, jni, cls,
    -                THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
    +            jni->GetMethodID(cls, THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
             return NSK_FALSE;
     
    -    if (!NSK_JNI_VERIFY(jni, (exception =
    -            NSK_CPP_STUB3(NewObject, jni, cls, ctor)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (exception = jni->NewObject(cls, ctor)) != NULL))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: StopThread\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(StopThread, jvmti, thread, exception)))
    +            jvmti->StopThread(thread, exception)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: InterruptThread\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(InterruptThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->InterruptThread(thread)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -195,7 +183,7 @@ static int checkGetOwnedMonitorInfo() {
     
         NSK_DISPLAY0("Checking negative: GetOwnedMonitorInfo\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetOwnedMonitorInfo, jvmti, thread, &count, &monitors)))
    +            jvmti->GetOwnedMonitorInfo(thread, &count, &monitors)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -208,7 +196,7 @@ static int checkGetCurrentContendedMonitor() {
     
         NSK_DISPLAY0("Checking negative: GetCurrentContendedMonitor\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetCurrentContendedMonitor, jvmti, thread, &monitor)))
    +            jvmti->GetCurrentContendedMonitor(thread, &monitor)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -218,8 +206,7 @@ static int checkGetCurrentContendedMonitor() {
      */
     static int checkPopFrame() {
         NSK_DISPLAY0("Checking negative: PopFrame\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(PopFrame, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->PopFrame(thread)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -263,43 +250,45 @@ static int checkHeapFunctions() {
     
         NSK_DISPLAY0("Checking negative: SetTag\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(SetTag, jvmti, thread, TAG_VALUE)))
    +            jvmti->SetTag(thread, TAG_VALUE)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetTag\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetTag, jvmti, thread, &tag)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->GetTag(thread, &tag)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetObjectsWithTags\n");
         tag = TAG_VALUE;
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB6(GetObjectsWithTags, jvmti, 1, &tag,
    -                &count, &res_objects, &res_tags)))
    +            jvmti->GetObjectsWithTags(1, &tag, &count, &res_objects, &res_tags)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverHeap\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(IterateOverHeap, jvmti, JVMTI_HEAP_OBJECT_TAGGED,
    -                HeapObject, &dummy_user_data)))
    +            jvmti->IterateOverHeap(JVMTI_HEAP_OBJECT_TAGGED, HeapObject, &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverInstancesOfClass\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(IterateOverInstancesOfClass, jvmti, klass,
    -                JVMTI_HEAP_OBJECT_UNTAGGED, HeapObject, &dummy_user_data)))
    +            jvmti->IterateOverInstancesOfClass(klass,
    +                                               JVMTI_HEAP_OBJECT_UNTAGGED,
    +                                               HeapObject,
    +                                               &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverObjectsReachableFromObject\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(IterateOverObjectsReachableFromObject, jvmti, thread,
    -                ObjectReference, &dummy_user_data)))
    +            jvmti->IterateOverObjectsReachableFromObject(thread,
    +                                                         ObjectReference,
    +                                                         &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverReachableObjects\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(IterateOverReachableObjects, jvmti,
    -                HeapRoot, StackReference, ObjectReference, &dummy_user_data)))
    +            jvmti->IterateOverReachableObjects(HeapRoot,
    +                                               StackReference,
    +                                               ObjectReference,
    +                                               &dummy_user_data)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -318,58 +307,57 @@ static int checkLocalVariableFunctions() {
     
         NSK_DISPLAY0("Checking negative: GetLocalVariableTable\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetLocalVariableTable, jvmti, method, &count,
    -                &local_variable_table)))
    +            jvmti->GetLocalVariableTable(method, &count, &local_variable_table)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalObject\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalObject, jvmti, thread, 0, 0, &object_value)))
    +            jvmti->GetLocalObject(thread, 0, 0, &object_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalInt\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalInt, jvmti, thread, 0, 0, &int_value)))
    +            jvmti->GetLocalInt(thread, 0, 0, &int_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalLong\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalLong, jvmti, thread, 0, 0, &long_value)))
    +            jvmti->GetLocalLong(thread, 0, 0, &long_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalFloat\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalFloat, jvmti, thread, 0, 0, &float_value)))
    +            jvmti->GetLocalFloat(thread, 0, 0, &float_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalDouble\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalDouble, jvmti, thread, 0, 0, &double_value)))
    +            jvmti->GetLocalDouble(thread, 0, 0, &double_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalObject\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalObject, jvmti, thread, 0, 0, thread)))
    +            jvmti->SetLocalObject(thread, 0, 0, thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalInt\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalInt, jvmti, thread, 0, 0, (jint)0)))
    +            jvmti->SetLocalInt(thread, 0, 0, (jint)0)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalLong\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalLong, jvmti, thread, 0, 0, (jlong)0)))
    +            jvmti->SetLocalLong(thread, 0, 0, (jlong)0)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalFloat\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalFloat, jvmti, thread, 0, 0, (jfloat)0.0)))
    +            jvmti->SetLocalFloat(thread, 0, 0, (jfloat)0.0)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalDouble\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalDouble, jvmti, thread, 0, 0, (jdouble)0.0)))
    +            jvmti->SetLocalDouble(thread, 0, 0, (jdouble)0.0)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -384,18 +372,17 @@ static int checkSourceInfoFunctions() {
     
         NSK_DISPLAY0("Checking negative: GetSourceFileName\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetSourceFileName, jvmti, klass, &name)))
    +            jvmti->GetSourceFileName(klass, &name)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetSourceDebugExtension\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetSourceDebugExtension, jvmti, klass, &name)))
    +            jvmti->GetSourceDebugExtension(klass, &name)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLineNumberTable\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetLineNumberTable, jvmti, method, &count,
    -                &line_number_table)))
    +            jvmti->GetLineNumberTable(method, &count, &line_number_table)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -411,7 +398,7 @@ static int checkRedefineClasses() {
         class_def.class_byte_count = 0;
         class_def.class_bytes = NULL;
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(RedefineClasses, jvmti, 1, &class_def)))
    +            jvmti->RedefineClasses(1, &class_def)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -424,7 +411,7 @@ static int checkGetObjectMonitorUsage() {
     
         NSK_DISPLAY0("Checking negative: GetObjectMonitorUsage\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetObjectMonitorUsage, jvmti, thread, &monitor_info)))
    +            jvmti->GetObjectMonitorUsage(thread, &monitor_info)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -437,12 +424,12 @@ static int checkIsSyntheticFunctions() {
     
         NSK_DISPLAY0("Checking negative: IsFieldSynthetic\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(IsFieldSynthetic, jvmti, klass, field, &is_synthetic)))
    +            jvmti->IsFieldSynthetic(klass, field, &is_synthetic)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IsMethodSynthetic\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(IsMethodSynthetic, jvmti, method, &is_synthetic)))
    +            jvmti->IsMethodSynthetic(method, &is_synthetic)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -455,10 +442,9 @@ static int checkGetBytecodes() {
         unsigned char *bytecodes;
     
         NSK_DISPLAY0("Checking positive: GetBytecodes\n");
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB4(GetBytecodes, jvmti, method, &count, &bytecodes)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetBytecodes(method, &count, &bytecodes)))
             return NSK_FALSE;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(Deallocate, jvmti, bytecodes)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->Deallocate(bytecodes)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -472,12 +458,12 @@ static int checkGetCurrentThreadCpuTime() {
     
         NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTimerInfo\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(GetCurrentThreadCpuTimerInfo, jvmti, &info)))
    +            jvmti->GetCurrentThreadCpuTimerInfo(&info)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTime\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(GetCurrentThreadCpuTime, jvmti, &nanos)))
    +            jvmti->GetCurrentThreadCpuTime(&nanos)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -491,12 +477,12 @@ static int checkGetThreadCpuTime() {
     
         NSK_DISPLAY0("Checking negative: GetThreadCpuTimerInfo\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(GetThreadCpuTimerInfo, jvmti, &info)))
    +            jvmti->GetThreadCpuTimerInfo(&info)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetThreadCpuTime\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetThreadCpuTime, jvmti, thread, &nanos)))
    +            jvmti->GetThreadCpuTime(thread, &nanos)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -592,7 +578,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
     
         /* testcase #1: check GetPotentialCapabilities */
         NSK_DISPLAY0("Testcase #1: check if GetPotentialCapabilities returns the capability\n");
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPotentialCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetPotentialCapabilities(&caps)))
             return JNI_ERR;
         if (!caps.CAPABILITY) {
             NSK_COMPLAIN1("GetPotentialCapabilities does not return \"%s\" capability\n",
    @@ -604,13 +590,13 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         NSK_DISPLAY0("Testcase #2: add the capability during Onload phase\n");
         memset(&caps, 0, sizeof(caps));
         caps.CAPABILITY = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
             return JNI_ERR;
     
         /* testcase #3: check if GetCapabilities returns the capability */
         NSK_DISPLAY0("Testcase #3: check if GetCapabilities returns the capability\n");
         memset(&caps, 0, sizeof(caps));
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
             return JNI_ERR;
         if (!caps.CAPABILITY) {
             NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
    @@ -622,13 +608,13 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         NSK_DISPLAY0("Testcase #4: relinquish the capability during Onload phase\n");
         memset(&caps, 0, sizeof(caps));
         caps.CAPABILITY = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RelinquishCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->RelinquishCapabilities(&caps)))
             return JNI_ERR;
     
         /* testcase #5: check if GetCapabilities does not return the capability */
         NSK_DISPLAY0("Testcase #5: check if GetCapabilities does not return the capability\n");
         memset(&caps, 0, sizeof(caps));
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
             return JNI_ERR;
         if (caps.CAPABILITY) {
             NSK_COMPLAIN1("GetCapabilities returns relinquished \"%s\" capability\n",
    @@ -640,10 +626,10 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         NSK_DISPLAY0("Testcase #6: add back the capability and check with GetCapabilities\n");
         memset(&caps, 0, sizeof(caps));
         caps.CAPABILITY = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
             return JNI_ERR;
         memset(&caps, 0, sizeof(caps));
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
             return JNI_ERR;
         if (!caps.CAPABILITY) {
             NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
    diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t003/cm01t003.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t003/cm01t003.cpp
    index bdfc69e073f..f92d0d29805 100644
    --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t003/cm01t003.cpp
    +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t003/cm01t003.cpp
    @@ -74,8 +74,7 @@ static int prepare() {
         NSK_DISPLAY0("Prepare: find tested thread\n");
     
         /* get all live threads */
    -    if (!NSK_JVMTI_VERIFY(
    -           NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads)))
             return NSK_FALSE;
     
         if (!NSK_VERIFY(threads_count > 0 && threads != NULL))
    @@ -87,8 +86,7 @@ static int prepare() {
                 return NSK_FALSE;
     
             /* get thread information */
    -        if (!NSK_JVMTI_VERIFY(
    -                NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info)))
    +        if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info)))
                 return NSK_FALSE;
     
             NSK_DISPLAY3("    thread #%d (%s): %p\n", i, info.name, threads[i]);
    @@ -100,24 +98,20 @@ static int prepare() {
         }
     
         /* deallocate threads list */
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads)))
             return NSK_FALSE;
     
         /* get tested thread class */
    -    if (!NSK_JNI_VERIFY(jni, (klass =
    -            NSK_CPP_STUB2(GetObjectClass, jni, thread)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (klass = jni->GetObjectClass(thread)) != NULL))
             return NSK_FALSE;
     
         /* get tested thread method 'run' */
    -    if (!NSK_JNI_VERIFY(jni, (method =
    -            NSK_CPP_STUB4(GetMethodID, jni, klass, "run", "()V")) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (method = jni->GetMethodID(klass, "run", "()V")) != NULL))
             return NSK_FALSE;
     
         /* get tested thread field 'waitingMonitor' */
         if (!NSK_JNI_VERIFY(jni, (field =
    -            NSK_CPP_STUB4(GetFieldID, jni, klass,
    -                "waitingMonitor", "Ljava/lang/Object;")) != NULL))
    +            jni->GetFieldID(klass, "waitingMonitor", "Ljava/lang/Object;")) != NULL))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -131,23 +125,21 @@ static int checkSuspend() {
         jvmtiError err;
     
         NSK_DISPLAY0("Checking negative: SuspendThread\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(SuspendThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->SuspendThread(thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: ResumeThread\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(ResumeThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->ResumeThread(thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SuspendThreadList\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(SuspendThreadList, jvmti, 1, &thread, &err)))
    +            jvmti->SuspendThreadList(1, &thread, &err)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: ResumeThreadList\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(ResumeThreadList, jvmti, 1, &thread, &err)))
    +            jvmti->ResumeThreadList(1, &thread, &err)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -163,27 +155,23 @@ static int checkSignalThread() {
         jmethodID ctor = NULL;
         jobject exception = NULL;
     
    -    if (!NSK_JNI_VERIFY(jni, (cls =
    -            NSK_CPP_STUB2(FindClass, jni, THREAD_DEATH_CLASS_NAME)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (cls = jni->FindClass(THREAD_DEATH_CLASS_NAME)) != NULL))
             return NSK_FALSE;
     
         if (!NSK_JNI_VERIFY(jni, (ctor =
    -            NSK_CPP_STUB4(GetMethodID, jni, cls,
    -                THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
    +            jni->GetMethodID(cls, THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
             return NSK_FALSE;
     
    -    if (!NSK_JNI_VERIFY(jni, (exception =
    -            NSK_CPP_STUB3(NewObject, jni, cls, ctor)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (exception = jni->NewObject(cls, ctor)) != NULL))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: StopThread\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(StopThread, jvmti, thread, exception)))
    +            jvmti->StopThread(thread, exception)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: InterruptThread\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(InterruptThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->InterruptThread(thread)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -197,7 +185,7 @@ static int checkGetOwnedMonitorInfo() {
     
         NSK_DISPLAY0("Checking negative: GetOwnedMonitorInfo\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetOwnedMonitorInfo, jvmti, thread, &count, &monitors)))
    +            jvmti->GetOwnedMonitorInfo(thread, &count, &monitors)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -210,7 +198,7 @@ static int checkGetCurrentContendedMonitor() {
     
         NSK_DISPLAY0("Checking negative: GetCurrentContendedMonitor\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetCurrentContendedMonitor, jvmti, thread, &monitor)))
    +            jvmti->GetCurrentContendedMonitor(thread, &monitor)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -220,8 +208,7 @@ static int checkGetCurrentContendedMonitor() {
      */
     static int checkPopFrame() {
         NSK_DISPLAY0("Checking negative: PopFrame\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(PopFrame, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->PopFrame(thread)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -265,43 +252,45 @@ static int checkHeapFunctions() {
     
         NSK_DISPLAY0("Checking negative: SetTag\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(SetTag, jvmti, thread, TAG_VALUE)))
    +            jvmti->SetTag(thread, TAG_VALUE)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetTag\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetTag, jvmti, thread, &tag)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->GetTag(thread, &tag)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetObjectsWithTags\n");
         tag = TAG_VALUE;
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB6(GetObjectsWithTags, jvmti, 1, &tag,
    -                &count, &res_objects, &res_tags)))
    +            jvmti->GetObjectsWithTags(1, &tag, &count, &res_objects, &res_tags)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverHeap\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(IterateOverHeap, jvmti, JVMTI_HEAP_OBJECT_TAGGED,
    -                HeapObject, &dummy_user_data)))
    +            jvmti->IterateOverHeap(JVMTI_HEAP_OBJECT_TAGGED, HeapObject, &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverInstancesOfClass\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(IterateOverInstancesOfClass, jvmti, klass,
    -                JVMTI_HEAP_OBJECT_UNTAGGED, HeapObject, &dummy_user_data)))
    +            jvmti->IterateOverInstancesOfClass(klass,
    +                                               JVMTI_HEAP_OBJECT_UNTAGGED,
    +                                               HeapObject,
    +                                               &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverObjectsReachableFromObject\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(IterateOverObjectsReachableFromObject, jvmti, thread,
    -                ObjectReference, &dummy_user_data)))
    +            jvmti->IterateOverObjectsReachableFromObject(thread,
    +                                                         ObjectReference,
    +                                                         &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverReachableObjects\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(IterateOverReachableObjects, jvmti,
    -                HeapRoot, StackReference, ObjectReference, &dummy_user_data)))
    +            jvmti->IterateOverReachableObjects(HeapRoot,
    +                                               StackReference,
    +                                               ObjectReference,
    +                                               &dummy_user_data)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -320,58 +309,57 @@ static int checkLocalVariableFunctions() {
     
         NSK_DISPLAY0("Checking negative: GetLocalVariableTable\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetLocalVariableTable, jvmti, method, &count,
    -                &local_variable_table)))
    +            jvmti->GetLocalVariableTable(method, &count, &local_variable_table)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalObject\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalObject, jvmti, thread, 0, 0, &object_value)))
    +            jvmti->GetLocalObject(thread, 0, 0, &object_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalInt\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalInt, jvmti, thread, 0, 0, &int_value)))
    +            jvmti->GetLocalInt(thread, 0, 0, &int_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalLong\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalLong, jvmti, thread, 0, 0, &long_value)))
    +            jvmti->GetLocalLong(thread, 0, 0, &long_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalFloat\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalFloat, jvmti, thread, 0, 0, &float_value)))
    +            jvmti->GetLocalFloat(thread, 0, 0, &float_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalDouble\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalDouble, jvmti, thread, 0, 0, &double_value)))
    +            jvmti->GetLocalDouble(thread, 0, 0, &double_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalObject\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalObject, jvmti, thread, 0, 0, thread)))
    +            jvmti->SetLocalObject(thread, 0, 0, thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalInt\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalInt, jvmti, thread, 0, 0, (jint)0)))
    +            jvmti->SetLocalInt(thread, 0, 0, (jint)0)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalLong\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalLong, jvmti, thread, 0, 0, (jlong)0)))
    +            jvmti->SetLocalLong(thread, 0, 0, (jlong)0)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalFloat\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalFloat, jvmti, thread, 0, 0, (jfloat)0.0)))
    +            jvmti->SetLocalFloat(thread, 0, 0, (jfloat)0.0)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalDouble\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalDouble, jvmti, thread, 0, 0, (jdouble)0.0)))
    +            jvmti->SetLocalDouble(thread, 0, 0, (jdouble)0.0)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -386,18 +374,17 @@ static int checkSourceInfoFunctions() {
     
         NSK_DISPLAY0("Checking negative: GetSourceFileName\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetSourceFileName, jvmti, klass, &name)))
    +            jvmti->GetSourceFileName(klass, &name)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetSourceDebugExtension\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetSourceDebugExtension, jvmti, klass, &name)))
    +            jvmti->GetSourceDebugExtension(klass, &name)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLineNumberTable\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetLineNumberTable, jvmti, method, &count,
    -                &line_number_table)))
    +            jvmti->GetLineNumberTable(method, &count, &line_number_table)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -413,7 +400,7 @@ static int checkRedefineClasses() {
         class_def.class_byte_count = 0;
         class_def.class_bytes = NULL;
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(RedefineClasses, jvmti, 1, &class_def)))
    +            jvmti->RedefineClasses(1, &class_def)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -426,7 +413,7 @@ static int checkGetObjectMonitorUsage() {
     
         NSK_DISPLAY0("Checking negative: GetObjectMonitorUsage\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetObjectMonitorUsage, jvmti, thread, &monitor_info)))
    +            jvmti->GetObjectMonitorUsage(thread, &monitor_info)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -438,13 +425,11 @@ static int checkIsSyntheticFunctions() {
         jboolean is_synthetic;
     
         NSK_DISPLAY0("Checking positive: IsFieldSynthetic\n");
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB4(IsFieldSynthetic, jvmti, klass, field, &is_synthetic)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->IsFieldSynthetic(klass, field, &is_synthetic)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking positive: IsMethodSynthetic\n");
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB3(IsMethodSynthetic, jvmti, method, &is_synthetic)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->IsMethodSynthetic(method, &is_synthetic)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -458,7 +443,7 @@ static int checkGetBytecodes() {
     
         NSK_DISPLAY0("Checking negative: GetBytecodes\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetBytecodes, jvmti, method, &count, &bytecodes)))
    +            jvmti->GetBytecodes(method, &count, &bytecodes)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -472,12 +457,12 @@ static int checkGetCurrentThreadCpuTime() {
     
         NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTimerInfo\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(GetCurrentThreadCpuTimerInfo, jvmti, &info)))
    +            jvmti->GetCurrentThreadCpuTimerInfo(&info)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTime\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(GetCurrentThreadCpuTime, jvmti, &nanos)))
    +            jvmti->GetCurrentThreadCpuTime(&nanos)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -491,12 +476,12 @@ static int checkGetThreadCpuTime() {
     
         NSK_DISPLAY0("Checking negative: GetThreadCpuTimerInfo\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(GetThreadCpuTimerInfo, jvmti, &info)))
    +            jvmti->GetThreadCpuTimerInfo(&info)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetThreadCpuTime\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetThreadCpuTime, jvmti, thread, &nanos)))
    +            jvmti->GetThreadCpuTime(thread, &nanos)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -592,7 +577,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
     
         /* testcase #1: check GetPotentialCapabilities */
         NSK_DISPLAY0("Testcase #1: check if GetPotentialCapabilities returns the capability\n");
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPotentialCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetPotentialCapabilities(&caps)))
             return JNI_ERR;
         if (!caps.CAPABILITY) {
             NSK_COMPLAIN1("GetPotentialCapabilities does not return \"%s\" capability\n",
    @@ -604,13 +589,13 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         NSK_DISPLAY0("Testcase #2: add the capability during Onload phase\n");
         memset(&caps, 0, sizeof(caps));
         caps.CAPABILITY = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
             return JNI_ERR;
     
         /* testcase #3: check if GetCapabilities returns the capability */
         NSK_DISPLAY0("Testcase #3: check if GetCapabilities returns the capability\n");
         memset(&caps, 0, sizeof(caps));
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
             return JNI_ERR;
         if (!caps.CAPABILITY) {
             NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
    @@ -622,13 +607,13 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         NSK_DISPLAY0("Testcase #4: relinquish the capability during Onload phase\n");
         memset(&caps, 0, sizeof(caps));
         caps.CAPABILITY = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RelinquishCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->RelinquishCapabilities(&caps)))
             return JNI_ERR;
     
         /* testcase #5: check if GetCapabilities does not return the capability */
         NSK_DISPLAY0("Testcase #5: check if GetCapabilities does not return the capability\n");
         memset(&caps, 0, sizeof(caps));
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
             return JNI_ERR;
         if (caps.CAPABILITY) {
             NSK_COMPLAIN1("GetCapabilities returns relinquished \"%s\" capability\n",
    @@ -640,10 +625,10 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         NSK_DISPLAY0("Testcase #6: add back the capability and check with GetCapabilities\n");
         memset(&caps, 0, sizeof(caps));
         caps.CAPABILITY = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
             return JNI_ERR;
         memset(&caps, 0, sizeof(caps));
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
             return JNI_ERR;
         if (!caps.CAPABILITY) {
             NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
    diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t004/cm01t004.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t004/cm01t004.cpp
    index 1547e87bad3..6b52f4c9695 100644
    --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t004/cm01t004.cpp
    +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t004/cm01t004.cpp
    @@ -72,8 +72,7 @@ static int prepare() {
         NSK_DISPLAY0("Prepare: find tested thread\n");
     
         /* get all live threads */
    -    if (!NSK_JVMTI_VERIFY(
    -           NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads)))
             return NSK_FALSE;
     
         if (!NSK_VERIFY(threads_count > 0 && threads != NULL))
    @@ -85,8 +84,7 @@ static int prepare() {
                 return NSK_FALSE;
     
             /* get thread information */
    -        if (!NSK_JVMTI_VERIFY(
    -                NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info)))
    +        if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info)))
                 return NSK_FALSE;
     
             NSK_DISPLAY3("    thread #%d (%s): %p\n", i, info.name, threads[i]);
    @@ -98,24 +96,20 @@ static int prepare() {
         }
     
         /* deallocate threads list */
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads)))
             return NSK_FALSE;
     
         /* get tested thread class */
    -    if (!NSK_JNI_VERIFY(jni, (klass =
    -            NSK_CPP_STUB2(GetObjectClass, jni, thread)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (klass = jni->GetObjectClass(thread)) != NULL))
             return NSK_FALSE;
     
         /* get tested thread method 'run' */
    -    if (!NSK_JNI_VERIFY(jni, (method =
    -            NSK_CPP_STUB4(GetMethodID, jni, klass, "run", "()V")) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (method = jni->GetMethodID(klass, "run", "()V")) != NULL))
             return NSK_FALSE;
     
         /* get tested thread field 'waitingMonitor' */
         if (!NSK_JNI_VERIFY(jni, (field =
    -            NSK_CPP_STUB4(GetFieldID, jni, klass,
    -                "waitingMonitor", "Ljava/lang/Object;")) != NULL))
    +            jni->GetFieldID(klass, "waitingMonitor", "Ljava/lang/Object;")) != NULL))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -129,23 +123,21 @@ static int checkSuspend() {
         jvmtiError err;
     
         NSK_DISPLAY0("Checking negative: SuspendThread\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(SuspendThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->SuspendThread(thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: ResumeThread\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(ResumeThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->ResumeThread(thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SuspendThreadList\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(SuspendThreadList, jvmti, 1, &thread, &err)))
    +            jvmti->SuspendThreadList(1, &thread, &err)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: ResumeThreadList\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(ResumeThreadList, jvmti, 1, &thread, &err)))
    +            jvmti->ResumeThreadList(1, &thread, &err)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -161,27 +153,23 @@ static int checkSignalThread() {
         jmethodID ctor = NULL;
         jobject exception = NULL;
     
    -    if (!NSK_JNI_VERIFY(jni, (cls =
    -            NSK_CPP_STUB2(FindClass, jni, THREAD_DEATH_CLASS_NAME)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (cls = jni->FindClass(THREAD_DEATH_CLASS_NAME)) != NULL))
             return NSK_FALSE;
     
         if (!NSK_JNI_VERIFY(jni, (ctor =
    -            NSK_CPP_STUB4(GetMethodID, jni, cls,
    -                THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
    +            jni->GetMethodID(cls, THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
             return NSK_FALSE;
     
    -    if (!NSK_JNI_VERIFY(jni, (exception =
    -            NSK_CPP_STUB3(NewObject, jni, cls, ctor)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (exception = jni->NewObject(cls, ctor)) != NULL))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: StopThread\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(StopThread, jvmti, thread, exception)))
    +            jvmti->StopThread(thread, exception)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: InterruptThread\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(InterruptThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->InterruptThread(thread)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -194,8 +182,7 @@ static int checkGetOwnedMonitorInfo() {
         jobject *monitors = NULL;
     
         NSK_DISPLAY0("Checking positive: GetOwnedMonitorInfo\n");
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB4(GetOwnedMonitorInfo, jvmti, thread, &count, &monitors)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetOwnedMonitorInfo(thread, &count, &monitors)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -208,7 +195,7 @@ static int checkGetCurrentContendedMonitor() {
     
         NSK_DISPLAY0("Checking negative: GetCurrentContendedMonitor\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetCurrentContendedMonitor, jvmti, thread, &monitor)))
    +            jvmti->GetCurrentContendedMonitor(thread, &monitor)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -218,8 +205,7 @@ static int checkGetCurrentContendedMonitor() {
      */
     static int checkPopFrame() {
         NSK_DISPLAY0("Checking negative: PopFrame\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(PopFrame, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->PopFrame(thread)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -263,43 +249,45 @@ static int checkHeapFunctions() {
     
         NSK_DISPLAY0("Checking negative: SetTag\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(SetTag, jvmti, thread, TAG_VALUE)))
    +            jvmti->SetTag(thread, TAG_VALUE)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetTag\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetTag, jvmti, thread, &tag)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->GetTag(thread, &tag)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetObjectsWithTags\n");
         tag = TAG_VALUE;
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB6(GetObjectsWithTags, jvmti, 1, &tag,
    -                &count, &res_objects, &res_tags)))
    +            jvmti->GetObjectsWithTags(1, &tag, &count, &res_objects, &res_tags)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverHeap\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(IterateOverHeap, jvmti, JVMTI_HEAP_OBJECT_TAGGED,
    -                HeapObject, &dummy_user_data)))
    +            jvmti->IterateOverHeap(JVMTI_HEAP_OBJECT_TAGGED, HeapObject, &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverInstancesOfClass\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(IterateOverInstancesOfClass, jvmti, klass,
    -                JVMTI_HEAP_OBJECT_UNTAGGED, HeapObject, &dummy_user_data)))
    +            jvmti->IterateOverInstancesOfClass(klass,
    +                                               JVMTI_HEAP_OBJECT_UNTAGGED,
    +                                               HeapObject,
    +                                               &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverObjectsReachableFromObject\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(IterateOverObjectsReachableFromObject, jvmti, thread,
    -                ObjectReference, &dummy_user_data)))
    +            jvmti->IterateOverObjectsReachableFromObject(thread,
    +                                                         ObjectReference,
    +                                                         &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverReachableObjects\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(IterateOverReachableObjects, jvmti,
    -                HeapRoot, StackReference, ObjectReference, &dummy_user_data)))
    +            jvmti->IterateOverReachableObjects(HeapRoot,
    +                                               StackReference,
    +                                               ObjectReference,
    +                                               &dummy_user_data)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -318,58 +306,57 @@ static int checkLocalVariableFunctions() {
     
         NSK_DISPLAY0("Checking negative: GetLocalVariableTable\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetLocalVariableTable, jvmti, method, &count,
    -                &local_variable_table)))
    +            jvmti->GetLocalVariableTable(method, &count, &local_variable_table)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalObject\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalObject, jvmti, thread, 0, 0, &object_value)))
    +            jvmti->GetLocalObject(thread, 0, 0, &object_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalInt\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalInt, jvmti, thread, 0, 0, &int_value)))
    +            jvmti->GetLocalInt(thread, 0, 0, &int_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalLong\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalLong, jvmti, thread, 0, 0, &long_value)))
    +            jvmti->GetLocalLong(thread, 0, 0, &long_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalFloat\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalFloat, jvmti, thread, 0, 0, &float_value)))
    +            jvmti->GetLocalFloat(thread, 0, 0, &float_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalDouble\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalDouble, jvmti, thread, 0, 0, &double_value)))
    +            jvmti->GetLocalDouble(thread, 0, 0, &double_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalObject\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalObject, jvmti, thread, 0, 0, thread)))
    +            jvmti->SetLocalObject(thread, 0, 0, thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalInt\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalInt, jvmti, thread, 0, 0, (jint)0)))
    +            jvmti->SetLocalInt(thread, 0, 0, (jint)0)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalLong\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalLong, jvmti, thread, 0, 0, (jlong)0)))
    +            jvmti->SetLocalLong(thread, 0, 0, (jlong)0)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalFloat\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalFloat, jvmti, thread, 0, 0, (jfloat)0.0)))
    +            jvmti->SetLocalFloat(thread, 0, 0, (jfloat)0.0)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalDouble\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalDouble, jvmti, thread, 0, 0, (jdouble)0.0)))
    +            jvmti->SetLocalDouble(thread, 0, 0, (jdouble)0.0)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -384,18 +371,17 @@ static int checkSourceInfoFunctions() {
     
         NSK_DISPLAY0("Checking negative: GetSourceFileName\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetSourceFileName, jvmti, klass, &name)))
    +            jvmti->GetSourceFileName(klass, &name)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetSourceDebugExtension\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetSourceDebugExtension, jvmti, klass, &name)))
    +            jvmti->GetSourceDebugExtension(klass, &name)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLineNumberTable\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetLineNumberTable, jvmti, method, &count,
    -                &line_number_table)))
    +            jvmti->GetLineNumberTable(method, &count, &line_number_table)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -411,7 +397,7 @@ static int checkRedefineClasses() {
         class_def.class_byte_count = 0;
         class_def.class_bytes = NULL;
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(RedefineClasses, jvmti, 1, &class_def)))
    +            jvmti->RedefineClasses(1, &class_def)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -424,7 +410,7 @@ static int checkGetObjectMonitorUsage() {
     
         NSK_DISPLAY0("Checking negative: GetObjectMonitorUsage\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetObjectMonitorUsage, jvmti, thread, &monitor_info)))
    +            jvmti->GetObjectMonitorUsage(thread, &monitor_info)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -437,12 +423,12 @@ static int checkIsSyntheticFunctions() {
     
         NSK_DISPLAY0("Checking negative: IsFieldSynthetic\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(IsFieldSynthetic, jvmti, klass, field, &is_synthetic)))
    +            jvmti->IsFieldSynthetic(klass, field, &is_synthetic)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IsMethodSynthetic\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(IsMethodSynthetic, jvmti, method, &is_synthetic)))
    +            jvmti->IsMethodSynthetic(method, &is_synthetic)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -456,7 +442,7 @@ static int checkGetBytecodes() {
     
         NSK_DISPLAY0("Checking negative: GetBytecodes\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetBytecodes, jvmti, method, &count, &bytecodes)))
    +            jvmti->GetBytecodes(method, &count, &bytecodes)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -470,12 +456,12 @@ static int checkGetCurrentThreadCpuTime() {
     
         NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTimerInfo\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(GetCurrentThreadCpuTimerInfo, jvmti, &info)))
    +            jvmti->GetCurrentThreadCpuTimerInfo(&info)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTime\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(GetCurrentThreadCpuTime, jvmti, &nanos)))
    +            jvmti->GetCurrentThreadCpuTime(&nanos)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -489,12 +475,12 @@ static int checkGetThreadCpuTime() {
     
         NSK_DISPLAY0("Checking negative: GetThreadCpuTimerInfo\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(GetThreadCpuTimerInfo, jvmti, &info)))
    +            jvmti->GetThreadCpuTimerInfo(&info)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: checkGetThreadCpuTime\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetThreadCpuTime, jvmti, thread, &nanos)))
    +            jvmti->GetThreadCpuTime(thread, &nanos)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -590,7 +576,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
     
         /* testcase #1: check GetPotentialCapabilities */
         NSK_DISPLAY0("Testcase #1: check if GetPotentialCapabilities returns the capability\n");
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPotentialCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetPotentialCapabilities(&caps)))
             return JNI_ERR;
         if (!caps.CAPABILITY) {
             NSK_COMPLAIN1("GetPotentialCapabilities does not return \"%s\" capability\n",
    @@ -602,13 +588,13 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         NSK_DISPLAY0("Testcase #2: add the capability during Onload phase\n");
         memset(&caps, 0, sizeof(caps));
         caps.CAPABILITY = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
             return JNI_ERR;
     
         /* testcase #3: check if GetCapabilities returns the capability */
         NSK_DISPLAY0("Testcase #3: check if GetCapabilities returns the capability\n");
         memset(&caps, 0, sizeof(caps));
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
             return JNI_ERR;
         if (!caps.CAPABILITY) {
             NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
    @@ -620,13 +606,13 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         NSK_DISPLAY0("Testcase #4: relinquish the capability during Onload phase\n");
         memset(&caps, 0, sizeof(caps));
         caps.CAPABILITY = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RelinquishCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->RelinquishCapabilities(&caps)))
             return JNI_ERR;
     
         /* testcase #5: check if GetCapabilities does not return the capability */
         NSK_DISPLAY0("Testcase #5: check if GetCapabilities does not return the capability\n");
         memset(&caps, 0, sizeof(caps));
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
             return JNI_ERR;
         if (caps.CAPABILITY) {
             NSK_COMPLAIN1("GetCapabilities returns relinquished \"%s\" capability\n",
    @@ -638,10 +624,10 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         NSK_DISPLAY0("Testcase #6: add back the capability and check with GetCapabilities\n");
         memset(&caps, 0, sizeof(caps));
         caps.CAPABILITY = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
             return JNI_ERR;
         memset(&caps, 0, sizeof(caps));
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
             return JNI_ERR;
         if (!caps.CAPABILITY) {
             NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
    diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t005/cm01t005.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t005/cm01t005.cpp
    index e547a0e6d33..adbb0d83cba 100644
    --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t005/cm01t005.cpp
    +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t005/cm01t005.cpp
    @@ -72,8 +72,7 @@ static int prepare() {
         NSK_DISPLAY0("Prepare: find tested thread\n");
     
         /* get all live threads */
    -    if (!NSK_JVMTI_VERIFY(
    -           NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads)))
             return NSK_FALSE;
     
         if (!NSK_VERIFY(threads_count > 0 && threads != NULL))
    @@ -85,8 +84,7 @@ static int prepare() {
                 return NSK_FALSE;
     
             /* get thread information */
    -        if (!NSK_JVMTI_VERIFY(
    -                NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info)))
    +        if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info)))
                 return NSK_FALSE;
     
             NSK_DISPLAY3("    thread #%d (%s): %p\n", i, info.name, threads[i]);
    @@ -98,24 +96,20 @@ static int prepare() {
         }
     
         /* deallocate threads list */
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads)))
             return NSK_FALSE;
     
         /* get tested thread class */
    -    if (!NSK_JNI_VERIFY(jni, (klass =
    -            NSK_CPP_STUB2(GetObjectClass, jni, thread)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (klass = jni->GetObjectClass(thread)) != NULL))
             return NSK_FALSE;
     
         /* get tested thread method 'run' */
    -    if (!NSK_JNI_VERIFY(jni, (method =
    -            NSK_CPP_STUB4(GetMethodID, jni, klass, "run", "()V")) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (method = jni->GetMethodID(klass, "run", "()V")) != NULL))
             return NSK_FALSE;
     
         /* get tested thread field 'waitingMonitor' */
         if (!NSK_JNI_VERIFY(jni, (field =
    -            NSK_CPP_STUB4(GetFieldID, jni, klass,
    -                "waitingMonitor", "Ljava/lang/Object;")) != NULL))
    +            jni->GetFieldID(klass, "waitingMonitor", "Ljava/lang/Object;")) != NULL))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -129,23 +123,21 @@ static int checkSuspend() {
         jvmtiError err;
     
         NSK_DISPLAY0("Checking negative: SuspendThread\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(SuspendThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->SuspendThread(thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: ResumeThread\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(ResumeThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->ResumeThread(thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SuspendThreadList\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(SuspendThreadList, jvmti, 1, &thread, &err)))
    +            jvmti->SuspendThreadList(1, &thread, &err)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: ResumeThreadList\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(ResumeThreadList, jvmti, 1, &thread, &err)))
    +            jvmti->ResumeThreadList(1, &thread, &err)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -161,27 +153,23 @@ static int checkSignalThread() {
         jmethodID ctor = NULL;
         jobject exception = NULL;
     
    -    if (!NSK_JNI_VERIFY(jni, (cls =
    -            NSK_CPP_STUB2(FindClass, jni, THREAD_DEATH_CLASS_NAME)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (cls = jni->FindClass(THREAD_DEATH_CLASS_NAME)) != NULL))
             return NSK_FALSE;
     
         if (!NSK_JNI_VERIFY(jni, (ctor =
    -            NSK_CPP_STUB4(GetMethodID, jni, cls,
    -                THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
    +            jni->GetMethodID(cls, THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
             return NSK_FALSE;
     
    -    if (!NSK_JNI_VERIFY(jni, (exception =
    -            NSK_CPP_STUB3(NewObject, jni, cls, ctor)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (exception = jni->NewObject(cls, ctor)) != NULL))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: StopThread\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(StopThread, jvmti, thread, exception)))
    +            jvmti->StopThread(thread, exception)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: InterruptThread\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(InterruptThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->InterruptThread(thread)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -195,7 +183,7 @@ static int checkGetOwnedMonitorInfo() {
     
         NSK_DISPLAY0("Checking negative: GetOwnedMonitorInfo\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetOwnedMonitorInfo, jvmti, thread, &count, &monitors)))
    +            jvmti->GetOwnedMonitorInfo(thread, &count, &monitors)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -207,8 +195,7 @@ static int checkGetCurrentContendedMonitor() {
         jobject monitor = NULL;
     
         NSK_DISPLAY0("Checking positive: GetCurrentContendedMonitor\n");
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB3(GetCurrentContendedMonitor, jvmti, thread, &monitor)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCurrentContendedMonitor(thread, &monitor)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -218,8 +205,7 @@ static int checkGetCurrentContendedMonitor() {
      */
     static int checkPopFrame() {
         NSK_DISPLAY0("Checking negative: PopFrame\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(PopFrame, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->PopFrame(thread)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -263,43 +249,45 @@ static int checkHeapFunctions() {
     
         NSK_DISPLAY0("Checking negative: SetTag\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(SetTag, jvmti, thread, TAG_VALUE)))
    +            jvmti->SetTag(thread, TAG_VALUE)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetTag\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetTag, jvmti, thread, &tag)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->GetTag(thread, &tag)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetObjectsWithTags\n");
         tag = TAG_VALUE;
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB6(GetObjectsWithTags, jvmti, 1, &tag,
    -                &count, &res_objects, &res_tags)))
    +            jvmti->GetObjectsWithTags(1, &tag, &count, &res_objects, &res_tags)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverHeap\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(IterateOverHeap, jvmti, JVMTI_HEAP_OBJECT_TAGGED,
    -                HeapObject, &dummy_user_data)))
    +            jvmti->IterateOverHeap(JVMTI_HEAP_OBJECT_TAGGED, HeapObject, &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverInstancesOfClass\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(IterateOverInstancesOfClass, jvmti, klass,
    -                JVMTI_HEAP_OBJECT_UNTAGGED, HeapObject, &dummy_user_data)))
    +            jvmti->IterateOverInstancesOfClass(klass,
    +                                               JVMTI_HEAP_OBJECT_UNTAGGED,
    +                                               HeapObject,
    +                                               &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverObjectsReachableFromObject\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(IterateOverObjectsReachableFromObject, jvmti, thread,
    -                ObjectReference, &dummy_user_data)))
    +            jvmti->IterateOverObjectsReachableFromObject(thread,
    +                                                         ObjectReference,
    +                                                         &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverReachableObjects\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(IterateOverReachableObjects, jvmti,
    -                HeapRoot, StackReference, ObjectReference, &dummy_user_data)))
    +            jvmti->IterateOverReachableObjects(HeapRoot,
    +                                               StackReference,
    +                                               ObjectReference,
    +                                               &dummy_user_data)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -318,58 +306,57 @@ static int checkLocalVariableFunctions() {
     
         NSK_DISPLAY0("Checking negative: GetLocalVariableTable\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetLocalVariableTable, jvmti, method, &count,
    -                &local_variable_table)))
    +            jvmti->GetLocalVariableTable(method, &count, &local_variable_table)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalObject\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalObject, jvmti, thread, 0, 0, &object_value)))
    +            jvmti->GetLocalObject(thread, 0, 0, &object_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalInt\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalInt, jvmti, thread, 0, 0, &int_value)))
    +            jvmti->GetLocalInt(thread, 0, 0, &int_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalLong\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalLong, jvmti, thread, 0, 0, &long_value)))
    +            jvmti->GetLocalLong(thread, 0, 0, &long_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalFloat\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalFloat, jvmti, thread, 0, 0, &float_value)))
    +            jvmti->GetLocalFloat(thread, 0, 0, &float_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalDouble\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalDouble, jvmti, thread, 0, 0, &double_value)))
    +            jvmti->GetLocalDouble(thread, 0, 0, &double_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalObject\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalObject, jvmti, thread, 0, 0, thread)))
    +            jvmti->SetLocalObject(thread, 0, 0, thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalInt\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalInt, jvmti, thread, 0, 0, (jint)0)))
    +            jvmti->SetLocalInt(thread, 0, 0, (jint)0)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalLong\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalLong, jvmti, thread, 0, 0, (jlong)0)))
    +            jvmti->SetLocalLong(thread, 0, 0, (jlong)0)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalFloat\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalFloat, jvmti, thread, 0, 0, (jfloat)0.0)))
    +            jvmti->SetLocalFloat(thread, 0, 0, (jfloat)0.0)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalDouble\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalDouble, jvmti, thread, 0, 0, (jdouble)0.0)))
    +            jvmti->SetLocalDouble(thread, 0, 0, (jdouble)0.0)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -384,18 +371,17 @@ static int checkSourceInfoFunctions() {
     
         NSK_DISPLAY0("Checking negative: GetSourceFileName\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetSourceFileName, jvmti, klass, &name)))
    +            jvmti->GetSourceFileName(klass, &name)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetSourceDebugExtension\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetSourceDebugExtension, jvmti, klass, &name)))
    +            jvmti->GetSourceDebugExtension(klass, &name)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLineNumberTable\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetLineNumberTable, jvmti, method, &count,
    -                &line_number_table)))
    +            jvmti->GetLineNumberTable(method, &count, &line_number_table)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -411,7 +397,7 @@ static int checkRedefineClasses() {
         class_def.class_byte_count = 0;
         class_def.class_bytes = NULL;
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(RedefineClasses, jvmti, 1, &class_def)))
    +            jvmti->RedefineClasses(1, &class_def)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -424,7 +410,7 @@ static int checkGetObjectMonitorUsage() {
     
         NSK_DISPLAY0("Checking negative: GetObjectMonitorUsage\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetObjectMonitorUsage, jvmti, thread, &monitor_info)))
    +            jvmti->GetObjectMonitorUsage(thread, &monitor_info)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -437,12 +423,12 @@ static int checkIsSyntheticFunctions() {
     
         NSK_DISPLAY0("Checking negative: IsFieldSynthetic\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(IsFieldSynthetic, jvmti, klass, field, &is_synthetic)))
    +            jvmti->IsFieldSynthetic(klass, field, &is_synthetic)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IsMethodSynthetic\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(IsMethodSynthetic, jvmti, method, &is_synthetic)))
    +            jvmti->IsMethodSynthetic(method, &is_synthetic)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -456,7 +442,7 @@ static int checkGetBytecodes() {
     
         NSK_DISPLAY0("Checking negative: GetBytecodes\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetBytecodes, jvmti, method, &count, &bytecodes)))
    +            jvmti->GetBytecodes(method, &count, &bytecodes)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -470,12 +456,12 @@ static int checkGetCurrentThreadCpuTime() {
     
         NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTimerInfo\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(GetCurrentThreadCpuTimerInfo, jvmti, &info)))
    +            jvmti->GetCurrentThreadCpuTimerInfo(&info)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTime\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(GetCurrentThreadCpuTime, jvmti, &nanos)))
    +            jvmti->GetCurrentThreadCpuTime(&nanos)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -489,12 +475,12 @@ static int checkGetThreadCpuTime() {
     
         NSK_DISPLAY0("Checking negative: GetThreadCpuTimerInfo\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(GetThreadCpuTimerInfo, jvmti, &info)))
    +            jvmti->GetThreadCpuTimerInfo(&info)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetThreadCpuTime\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetThreadCpuTime, jvmti, thread, &nanos)))
    +            jvmti->GetThreadCpuTime(thread, &nanos)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -590,7 +576,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
     
         /* testcase #1: check GetPotentialCapabilities */
         NSK_DISPLAY0("Testcase #1: check if GetPotentialCapabilities returns the capability\n");
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPotentialCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetPotentialCapabilities(&caps)))
             return JNI_ERR;
         if (!caps.CAPABILITY) {
             NSK_COMPLAIN1("GetPotentialCapabilities does not return \"%s\" capability\n",
    @@ -602,13 +588,13 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         NSK_DISPLAY0("Testcase #2: add the capability during Onload phase\n");
         memset(&caps, 0, sizeof(caps));
         caps.CAPABILITY = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
             return JNI_ERR;
     
         /* testcase #3: check if GetCapabilities returns the capability */
         NSK_DISPLAY0("Testcase #3: check if GetCapabilities returns the capability\n");
         memset(&caps, 0, sizeof(caps));
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
             return JNI_ERR;
         if (!caps.CAPABILITY) {
             NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
    @@ -620,13 +606,13 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         NSK_DISPLAY0("Testcase #4: relinquish the capability during Onload phase\n");
         memset(&caps, 0, sizeof(caps));
         caps.CAPABILITY = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RelinquishCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->RelinquishCapabilities(&caps)))
             return JNI_ERR;
     
         /* testcase #5: check if GetCapabilities does not return the capability */
         NSK_DISPLAY0("Testcase #5: check if GetCapabilities does not return the capability\n");
         memset(&caps, 0, sizeof(caps));
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
             return JNI_ERR;
         if (caps.CAPABILITY) {
             NSK_COMPLAIN1("GetCapabilities returns relinquished \"%s\" capability\n",
    @@ -638,10 +624,10 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         NSK_DISPLAY0("Testcase #6: add back the capability and check with GetCapabilities\n");
         memset(&caps, 0, sizeof(caps));
         caps.CAPABILITY = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
             return JNI_ERR;
         memset(&caps, 0, sizeof(caps));
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
             return JNI_ERR;
         if (!caps.CAPABILITY) {
             NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
    diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t006/cm01t006.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t006/cm01t006.cpp
    index 77a82d3309d..011c53aa0c9 100644
    --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t006/cm01t006.cpp
    +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t006/cm01t006.cpp
    @@ -72,8 +72,7 @@ static int prepare() {
         NSK_DISPLAY0("Prepare: find tested thread\n");
     
         /* get all live threads */
    -    if (!NSK_JVMTI_VERIFY(
    -           NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads)))
             return NSK_FALSE;
     
         if (!NSK_VERIFY(threads_count > 0 && threads != NULL))
    @@ -85,8 +84,7 @@ static int prepare() {
                 return NSK_FALSE;
     
             /* get thread information */
    -        if (!NSK_JVMTI_VERIFY(
    -                NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info)))
    +        if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info)))
                 return NSK_FALSE;
     
             NSK_DISPLAY3("    thread #%d (%s): %p\n", i, info.name, threads[i]);
    @@ -98,24 +96,20 @@ static int prepare() {
         }
     
         /* deallocate threads list */
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads)))
             return NSK_FALSE;
     
         /* get tested thread class */
    -    if (!NSK_JNI_VERIFY(jni, (klass =
    -            NSK_CPP_STUB2(GetObjectClass, jni, thread)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (klass = jni->GetObjectClass(thread)) != NULL))
             return NSK_FALSE;
     
         /* get tested thread method 'run' */
    -    if (!NSK_JNI_VERIFY(jni, (method =
    -            NSK_CPP_STUB4(GetMethodID, jni, klass, "run", "()V")) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (method = jni->GetMethodID(klass, "run", "()V")) != NULL))
             return NSK_FALSE;
     
         /* get tested thread field 'waitingMonitor' */
         if (!NSK_JNI_VERIFY(jni, (field =
    -            NSK_CPP_STUB4(GetFieldID, jni, klass,
    -                "waitingMonitor", "Ljava/lang/Object;")) != NULL))
    +            jni->GetFieldID(klass, "waitingMonitor", "Ljava/lang/Object;")) != NULL))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -129,23 +123,21 @@ static int checkSuspend() {
         jvmtiError err;
     
         NSK_DISPLAY0("Checking negative: SuspendThread\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(SuspendThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->SuspendThread(thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: ResumeThread\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(ResumeThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->ResumeThread(thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SuspendThreadList\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(SuspendThreadList, jvmti, 1, &thread, &err)))
    +            jvmti->SuspendThreadList(1, &thread, &err)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: ResumeThreadList\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(ResumeThreadList, jvmti, 1, &thread, &err)))
    +            jvmti->ResumeThreadList(1, &thread, &err)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -161,27 +153,23 @@ static int checkSignalThread() {
         jmethodID ctor = NULL;
         jobject exception = NULL;
     
    -    if (!NSK_JNI_VERIFY(jni, (cls =
    -            NSK_CPP_STUB2(FindClass, jni, THREAD_DEATH_CLASS_NAME)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (cls = jni->FindClass(THREAD_DEATH_CLASS_NAME)) != NULL))
             return NSK_FALSE;
     
         if (!NSK_JNI_VERIFY(jni, (ctor =
    -            NSK_CPP_STUB4(GetMethodID, jni, cls,
    -                THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
    +            jni->GetMethodID(cls, THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
             return NSK_FALSE;
     
    -    if (!NSK_JNI_VERIFY(jni, (exception =
    -            NSK_CPP_STUB3(NewObject, jni, cls, ctor)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (exception = jni->NewObject(cls, ctor)) != NULL))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: StopThread\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(StopThread, jvmti, thread, exception)))
    +            jvmti->StopThread(thread, exception)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: InterruptThread\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(InterruptThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->InterruptThread(thread)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -195,7 +183,7 @@ static int checkGetOwnedMonitorInfo() {
     
         NSK_DISPLAY0("Checking negative: GetOwnedMonitorInfo\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetOwnedMonitorInfo, jvmti, thread, &count, &monitors)))
    +            jvmti->GetOwnedMonitorInfo(thread, &count, &monitors)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -208,7 +196,7 @@ static int checkGetCurrentContendedMonitor() {
     
         NSK_DISPLAY0("Checking negative: GetCurrentContendedMonitor\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetCurrentContendedMonitor, jvmti, thread, &monitor)))
    +            jvmti->GetCurrentContendedMonitor(thread, &monitor)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -218,8 +206,7 @@ static int checkGetCurrentContendedMonitor() {
      */
     static int checkPopFrame() {
         NSK_DISPLAY0("Checking negative: PopFrame\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(PopFrame, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->PopFrame(thread)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -263,43 +250,45 @@ static int checkHeapFunctions() {
     
         NSK_DISPLAY0("Checking negative: SetTag\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(SetTag, jvmti, thread, TAG_VALUE)))
    +            jvmti->SetTag(thread, TAG_VALUE)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetTag\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetTag, jvmti, thread, &tag)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->GetTag(thread, &tag)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetObjectsWithTags\n");
         tag = TAG_VALUE;
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB6(GetObjectsWithTags, jvmti, 1, &tag,
    -                &count, &res_objects, &res_tags)))
    +            jvmti->GetObjectsWithTags(1, &tag, &count, &res_objects, &res_tags)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverHeap\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(IterateOverHeap, jvmti, JVMTI_HEAP_OBJECT_TAGGED,
    -                HeapObject, &dummy_user_data)))
    +            jvmti->IterateOverHeap(JVMTI_HEAP_OBJECT_TAGGED, HeapObject, &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverInstancesOfClass\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(IterateOverInstancesOfClass, jvmti, klass,
    -                JVMTI_HEAP_OBJECT_UNTAGGED, HeapObject, &dummy_user_data)))
    +            jvmti->IterateOverInstancesOfClass(klass,
    +                                               JVMTI_HEAP_OBJECT_UNTAGGED,
    +                                               HeapObject,
    +                                               &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverObjectsReachableFromObject\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(IterateOverObjectsReachableFromObject, jvmti, thread,
    -                ObjectReference, &dummy_user_data)))
    +            jvmti->IterateOverObjectsReachableFromObject(thread,
    +                                                         ObjectReference,
    +                                                         &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverReachableObjects\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(IterateOverReachableObjects, jvmti,
    -                HeapRoot, StackReference, ObjectReference, &dummy_user_data)))
    +            jvmti->IterateOverReachableObjects(HeapRoot,
    +                                               StackReference,
    +                                               ObjectReference,
    +                                               &dummy_user_data)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -318,58 +307,57 @@ static int checkLocalVariableFunctions() {
     
         NSK_DISPLAY0("Checking negative: GetLocalVariableTable\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetLocalVariableTable, jvmti, method, &count,
    -                &local_variable_table)))
    +            jvmti->GetLocalVariableTable(method, &count, &local_variable_table)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalObject\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalObject, jvmti, thread, 0, 0, &object_value)))
    +            jvmti->GetLocalObject(thread, 0, 0, &object_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalInt\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalInt, jvmti, thread, 0, 0, &int_value)))
    +            jvmti->GetLocalInt(thread, 0, 0, &int_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalLong\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalLong, jvmti, thread, 0, 0, &long_value)))
    +            jvmti->GetLocalLong(thread, 0, 0, &long_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalFloat\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalFloat, jvmti, thread, 0, 0, &float_value)))
    +            jvmti->GetLocalFloat(thread, 0, 0, &float_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalDouble\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalDouble, jvmti, thread, 0, 0, &double_value)))
    +            jvmti->GetLocalDouble(thread, 0, 0, &double_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalObject\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalObject, jvmti, thread, 0, 0, thread)))
    +            jvmti->SetLocalObject(thread, 0, 0, thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalInt\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalInt, jvmti, thread, 0, 0, (jint)0)))
    +            jvmti->SetLocalInt(thread, 0, 0, (jint)0)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalLong\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalLong, jvmti, thread, 0, 0, (jlong)0)))
    +            jvmti->SetLocalLong(thread, 0, 0, (jlong)0)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalFloat\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalFloat, jvmti, thread, 0, 0, (jfloat)0.0)))
    +            jvmti->SetLocalFloat(thread, 0, 0, (jfloat)0.0)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalDouble\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalDouble, jvmti, thread, 0, 0, (jdouble)0.0)))
    +            jvmti->SetLocalDouble(thread, 0, 0, (jdouble)0.0)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -384,18 +372,17 @@ static int checkSourceInfoFunctions() {
     
         NSK_DISPLAY0("Checking negative: GetSourceFileName\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetSourceFileName, jvmti, klass, &name)))
    +            jvmti->GetSourceFileName(klass, &name)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetSourceDebugExtension\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetSourceDebugExtension, jvmti, klass, &name)))
    +            jvmti->GetSourceDebugExtension(klass, &name)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLineNumberTable\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetLineNumberTable, jvmti, method, &count,
    -                &line_number_table)))
    +            jvmti->GetLineNumberTable(method, &count, &line_number_table)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -411,7 +398,7 @@ static int checkRedefineClasses() {
         class_def.class_byte_count = 0;
         class_def.class_bytes = NULL;
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(RedefineClasses, jvmti, 1, &class_def)))
    +            jvmti->RedefineClasses(1, &class_def)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -423,8 +410,7 @@ static int checkGetObjectMonitorUsage() {
         jvmtiMonitorUsage monitor_info;
     
         NSK_DISPLAY0("Checking positive: GetObjectMonitorUsage\n");
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB3(GetObjectMonitorUsage, jvmti, thread, &monitor_info)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetObjectMonitorUsage(thread, &monitor_info)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -437,12 +423,12 @@ static int checkIsSyntheticFunctions() {
     
         NSK_DISPLAY0("Checking negative: IsFieldSynthetic\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(IsFieldSynthetic, jvmti, klass, field, &is_synthetic)))
    +            jvmti->IsFieldSynthetic(klass, field, &is_synthetic)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IsMethodSynthetic\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(IsMethodSynthetic, jvmti, method, &is_synthetic)))
    +            jvmti->IsMethodSynthetic(method, &is_synthetic)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -456,7 +442,7 @@ static int checkGetBytecodes() {
     
         NSK_DISPLAY0("Checking negative: GetBytecodes\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetBytecodes, jvmti, method, &count, &bytecodes)))
    +            jvmti->GetBytecodes(method, &count, &bytecodes)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -470,12 +456,12 @@ static int checkGetCurrentThreadCpuTime() {
     
         NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTimerInfo\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(GetCurrentThreadCpuTimerInfo, jvmti, &info)))
    +            jvmti->GetCurrentThreadCpuTimerInfo(&info)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTime\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(GetCurrentThreadCpuTime, jvmti, &nanos)))
    +            jvmti->GetCurrentThreadCpuTime(&nanos)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -489,12 +475,12 @@ static int checkGetThreadCpuTime() {
     
         NSK_DISPLAY0("Checking negative: GetThreadCpuTimerInfo\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(GetThreadCpuTimerInfo, jvmti, &info)))
    +            jvmti->GetThreadCpuTimerInfo(&info)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetThreadCpuTime\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetThreadCpuTime, jvmti, thread, &nanos)))
    +            jvmti->GetThreadCpuTime(thread, &nanos)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -590,7 +576,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
     
         /* testcase #1: check GetPotentialCapabilities */
         NSK_DISPLAY0("Testcase #1: check if GetPotentialCapabilities returns the capability\n");
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPotentialCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetPotentialCapabilities(&caps)))
             return JNI_ERR;
         if (!caps.CAPABILITY) {
             NSK_COMPLAIN1("GetPotentialCapabilities does not return \"%s\" capability\n",
    @@ -602,13 +588,13 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         NSK_DISPLAY0("Testcase #2: add the capability during Onload phase\n");
         memset(&caps, 0, sizeof(caps));
         caps.CAPABILITY = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
             return JNI_ERR;
     
         /* testcase #3: check if GetCapabilities returns the capability */
         NSK_DISPLAY0("Testcase #3: check if GetCapabilities returns the capability\n");
         memset(&caps, 0, sizeof(caps));
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
             return JNI_ERR;
         if (!caps.CAPABILITY) {
             NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
    @@ -620,13 +606,13 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         NSK_DISPLAY0("Testcase #4: relinquish the capability during Onload phase\n");
         memset(&caps, 0, sizeof(caps));
         caps.CAPABILITY = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RelinquishCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->RelinquishCapabilities(&caps)))
             return JNI_ERR;
     
         /* testcase #5: check if GetCapabilities does not return the capability */
         NSK_DISPLAY0("Testcase #5: check if GetCapabilities does not return the capability\n");
         memset(&caps, 0, sizeof(caps));
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
             return JNI_ERR;
         if (caps.CAPABILITY) {
             NSK_COMPLAIN1("GetCapabilities returns relinquished \"%s\" capability\n",
    @@ -638,10 +624,10 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         NSK_DISPLAY0("Testcase #6: add back the capability and check with GetCapabilities\n");
         memset(&caps, 0, sizeof(caps));
         caps.CAPABILITY = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
             return JNI_ERR;
         memset(&caps, 0, sizeof(caps));
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
             return JNI_ERR;
         if (!caps.CAPABILITY) {
             NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
    diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t007/cm01t007.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t007/cm01t007.cpp
    index dfefa6fb78d..b9519d59054 100644
    --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t007/cm01t007.cpp
    +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t007/cm01t007.cpp
    @@ -72,8 +72,7 @@ static int prepare() {
         NSK_DISPLAY0("Prepare: find tested thread\n");
     
         /* get all live threads */
    -    if (!NSK_JVMTI_VERIFY(
    -           NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads)))
             return NSK_FALSE;
     
         if (!NSK_VERIFY(threads_count > 0 && threads != NULL))
    @@ -85,8 +84,7 @@ static int prepare() {
                 return NSK_FALSE;
     
             /* get thread information */
    -        if (!NSK_JVMTI_VERIFY(
    -                NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info)))
    +        if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info)))
                 return NSK_FALSE;
     
             NSK_DISPLAY3("    thread #%d (%s): %p\n", i, info.name, threads[i]);
    @@ -98,23 +96,19 @@ static int prepare() {
         }
     
         /* deallocate threads list */
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads)))
             return NSK_FALSE;
     
         /* get tested thread class */
    -    if (!NSK_JNI_VERIFY(jni, (klass =
    -            NSK_CPP_STUB2(GetObjectClass, jni, thread)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (klass = jni->GetObjectClass(thread)) != NULL))
             return NSK_FALSE;
     
         /* get tested thread method 'run' */
    -    if (!NSK_JNI_VERIFY(jni, (method =
    -            NSK_CPP_STUB4(GetMethodID, jni, klass, "run", "()V")) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (method = jni->GetMethodID(klass, "run", "()V")) != NULL))
             return NSK_FALSE;
     
         /* get tested thread field 'waitingFlag' */
    -    if (!NSK_JNI_VERIFY(jni, (field =
    -            NSK_CPP_STUB4(GetFieldID, jni, klass, "waitingFlag", "Z")) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (field = jni->GetFieldID(klass, "waitingFlag", "Z")) != NULL))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -128,23 +122,21 @@ static int checkSuspend() {
         jvmtiError err;
     
         NSK_DISPLAY0("Checking negative: SuspendThread\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(SuspendThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->SuspendThread(thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: ResumeThread\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(ResumeThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->ResumeThread(thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SuspendThreadList\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(SuspendThreadList, jvmti, 1, &thread, &err)))
    +            jvmti->SuspendThreadList(1, &thread, &err)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: ResumeThreadList\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(ResumeThreadList, jvmti, 1, &thread, &err)))
    +            jvmti->ResumeThreadList(1, &thread, &err)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -160,27 +152,23 @@ static int checkSignalThread() {
         jmethodID ctor = NULL;
         jobject exception = NULL;
     
    -    if (!NSK_JNI_VERIFY(jni, (cls =
    -            NSK_CPP_STUB2(FindClass, jni, THREAD_DEATH_CLASS_NAME)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (cls = jni->FindClass(THREAD_DEATH_CLASS_NAME)) != NULL))
             return NSK_FALSE;
     
         if (!NSK_JNI_VERIFY(jni, (ctor =
    -            NSK_CPP_STUB4(GetMethodID, jni, cls,
    -                THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
    +            jni->GetMethodID(cls, THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
             return NSK_FALSE;
     
    -    if (!NSK_JNI_VERIFY(jni, (exception =
    -            NSK_CPP_STUB3(NewObject, jni, cls, ctor)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (exception = jni->NewObject(cls, ctor)) != NULL))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: StopThread\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(StopThread, jvmti, thread, exception)))
    +            jvmti->StopThread(thread, exception)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: InterruptThread\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(InterruptThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->InterruptThread(thread)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -194,7 +182,7 @@ static int checkGetOwnedMonitorInfo() {
     
         NSK_DISPLAY0("Checking negative: GetOwnedMonitorInfo\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetOwnedMonitorInfo, jvmti, thread, &count, &monitors)))
    +            jvmti->GetOwnedMonitorInfo(thread, &count, &monitors)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -207,7 +195,7 @@ static int checkGetCurrentContendedMonitor() {
     
         NSK_DISPLAY0("Checking negative: GetCurrentContendedMonitor\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetCurrentContendedMonitor, jvmti, thread, &monitor)))
    +            jvmti->GetCurrentContendedMonitor(thread, &monitor)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -223,23 +211,23 @@ static int checkPopFrame() {
     
         memset(&caps, 0, sizeof(caps));
         caps.can_suspend = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
             return JNI_ERR;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(SuspendThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->SuspendThread(thread)))
             return NSK_FALSE;
     
         // PopFrame is allowed to fail with JVMTI_ERROR_OPAQUE_FRAME.
         // That will happen if we are in a native function, for example while waiting for a Condition.
         // See JCK-5020108.
    -    err = NSK_CPP_STUB2(PopFrame, jvmti, thread);
    +    err = jvmti->PopFrame(thread);
         if (err != JVMTI_ERROR_NONE && err != JVMTI_ERROR_OPAQUE_FRAME) {
           NSK_DISPLAY1("jvmti error from PopFrame: %d\n", err);
           return NSK_FALSE;
         }
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(ResumeThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->ResumeThread(thread)))
             return NSK_FALSE;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RelinquishCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->RelinquishCapabilities(&caps)))
             return JNI_ERR;
     
         return NSK_TRUE;
    @@ -283,43 +271,47 @@ static int checkHeapFunctions() {
     
         NSK_DISPLAY0("Checking negative: SetTag\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(SetTag, jvmti, thread, TAG_VALUE)))
    +            jvmti->SetTag(thread, TAG_VALUE)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetTag\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetTag, jvmti, thread, &tag)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->GetTag(thread, &tag)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetObjectsWithTags\n");
         tag = TAG_VALUE;
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB6(GetObjectsWithTags, jvmti, 1, &tag,
    -                &count, &res_objects, &res_tags)))
    +            jvmti->GetObjectsWithTags(1, &tag, &count, &res_objects, &res_tags)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverHeap\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(IterateOverHeap, jvmti, JVMTI_HEAP_OBJECT_TAGGED,
    -                HeapObject, &dummy_user_data)))
    +            jvmti->IterateOverHeap(JVMTI_HEAP_OBJECT_TAGGED,
    +                                   HeapObject,
    +                                   &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverInstancesOfClass\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(IterateOverInstancesOfClass, jvmti, klass,
    -                JVMTI_HEAP_OBJECT_UNTAGGED, HeapObject, &dummy_user_data)))
    +            jvmti->IterateOverInstancesOfClass(klass,
    +                                               JVMTI_HEAP_OBJECT_UNTAGGED,
    +                                               HeapObject,
    +                                               &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverObjectsReachableFromObject\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(IterateOverObjectsReachableFromObject, jvmti, thread,
    -                ObjectReference, &dummy_user_data)))
    +            jvmti->IterateOverObjectsReachableFromObject(thread,
    +                                                         ObjectReference,
    +                                                         &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverReachableObjects\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(IterateOverReachableObjects, jvmti,
    -                HeapRoot, StackReference, ObjectReference, &dummy_user_data)))
    +            jvmti->IterateOverReachableObjects(HeapRoot,
    +                                               StackReference,
    +                                               ObjectReference,
    +                                               &dummy_user_data)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -338,58 +330,57 @@ static int checkLocalVariableFunctions() {
     
         NSK_DISPLAY0("Checking negative: GetLocalVariableTable\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetLocalVariableTable, jvmti, method, &count,
    -                &local_variable_table)))
    +            jvmti->GetLocalVariableTable(method, &count, &local_variable_table)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalObject\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalObject, jvmti, thread, 0, 0, &object_value)))
    +            jvmti->GetLocalObject(thread, 0, 0, &object_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalInt\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalInt, jvmti, thread, 0, 0, &int_value)))
    +            jvmti->GetLocalInt(thread, 0, 0, &int_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalLong\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalLong, jvmti, thread, 0, 0, &long_value)))
    +            jvmti->GetLocalLong(thread, 0, 0, &long_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalFloat\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalFloat, jvmti, thread, 0, 0, &float_value)))
    +            jvmti->GetLocalFloat(thread, 0, 0, &float_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalDouble\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalDouble, jvmti, thread, 0, 0, &double_value)))
    +            jvmti->GetLocalDouble(thread, 0, 0, &double_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalObject\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalObject, jvmti, thread, 0, 0, thread)))
    +            jvmti->SetLocalObject(thread, 0, 0, thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalInt\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalInt, jvmti, thread, 0, 0, (jint)0)))
    +            jvmti->SetLocalInt(thread, 0, 0, (jint)0)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalLong\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalLong, jvmti, thread, 0, 0, (jlong)0)))
    +            jvmti->SetLocalLong(thread, 0, 0, (jlong)0)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalFloat\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalFloat, jvmti, thread, 0, 0, (jfloat)0.0)))
    +            jvmti->SetLocalFloat(thread, 0, 0, (jfloat)0.0)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalDouble\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalDouble, jvmti, thread, 0, 0, (jdouble)0.0)))
    +            jvmti->SetLocalDouble(thread, 0, 0, (jdouble)0.0)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -404,18 +395,17 @@ static int checkSourceInfoFunctions() {
     
         NSK_DISPLAY0("Checking negative: GetSourceFileName\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetSourceFileName, jvmti, klass, &name)))
    +            jvmti->GetSourceFileName(klass, &name)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetSourceDebugExtension\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetSourceDebugExtension, jvmti, klass, &name)))
    +            jvmti->GetSourceDebugExtension(klass, &name)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLineNumberTable\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetLineNumberTable, jvmti, method, &count,
    -                &line_number_table)))
    +            jvmti->GetLineNumberTable(method, &count, &line_number_table)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -431,7 +421,7 @@ static int checkRedefineClasses() {
         class_def.class_byte_count = 0;
         class_def.class_bytes = NULL;
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(RedefineClasses, jvmti, 1, &class_def)))
    +            jvmti->RedefineClasses(1, &class_def)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -444,7 +434,7 @@ static int checkGetObjectMonitorUsage() {
     
         NSK_DISPLAY0("Checking negative: GetObjectMonitorUsage\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetObjectMonitorUsage, jvmti, thread, &monitor_info)))
    +            jvmti->GetObjectMonitorUsage(thread, &monitor_info)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -457,12 +447,12 @@ static int checkIsSyntheticFunctions() {
     
         NSK_DISPLAY0("Checking negative: IsFieldSynthetic\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(IsFieldSynthetic, jvmti, klass, field, &is_synthetic)))
    +            jvmti->IsFieldSynthetic(klass, field, &is_synthetic)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IsMethodSynthetic\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(IsMethodSynthetic, jvmti, method, &is_synthetic)))
    +            jvmti->IsMethodSynthetic(method, &is_synthetic)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -476,7 +466,7 @@ static int checkGetBytecodes() {
     
         NSK_DISPLAY0("Checking negative: GetBytecodes\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetBytecodes, jvmti, method, &count, &bytecodes)))
    +            jvmti->GetBytecodes(method, &count, &bytecodes)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -490,12 +480,12 @@ static int checkGetCurrentThreadCpuTime() {
     
         NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTimerInfo\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(GetCurrentThreadCpuTimerInfo, jvmti, &info)))
    +            jvmti->GetCurrentThreadCpuTimerInfo(&info)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTime\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(GetCurrentThreadCpuTime, jvmti, &nanos)))
    +            jvmti->GetCurrentThreadCpuTime(&nanos)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -509,12 +499,12 @@ static int checkGetThreadCpuTime() {
     
         NSK_DISPLAY0("Checking negative: GetThreadCpuTimerInfo\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(GetThreadCpuTimerInfo, jvmti, &info)))
    +            jvmti->GetThreadCpuTimerInfo(&info)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetThreadCpuTime\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetThreadCpuTime, jvmti, thread, &nanos)))
    +            jvmti->GetThreadCpuTime(thread, &nanos)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -610,7 +600,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
     
         /* testcase #1: check GetPotentialCapabilities */
         NSK_DISPLAY0("Testcase #1: check if GetPotentialCapabilities returns the capability\n");
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPotentialCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetPotentialCapabilities(&caps)))
             return JNI_ERR;
         if (!caps.CAPABILITY) {
             NSK_COMPLAIN1("GetPotentialCapabilities does not return \"%s\" capability\n",
    @@ -622,13 +612,13 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         NSK_DISPLAY0("Testcase #2: add the capability during Onload phase\n");
         memset(&caps, 0, sizeof(caps));
         caps.CAPABILITY = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
             return JNI_ERR;
     
         /* testcase #3: check if GetCapabilities returns the capability */
         NSK_DISPLAY0("Testcase #3: check if GetCapabilities returns the capability\n");
         memset(&caps, 0, sizeof(caps));
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
             return JNI_ERR;
         if (!caps.CAPABILITY) {
             NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
    @@ -640,13 +630,13 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         NSK_DISPLAY0("Testcase #4: relinquish the capability during Onload phase\n");
         memset(&caps, 0, sizeof(caps));
         caps.CAPABILITY = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RelinquishCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->RelinquishCapabilities(&caps)))
             return JNI_ERR;
     
         /* testcase #5: check if GetCapabilities does not return the capability */
         NSK_DISPLAY0("Testcase #5: check if GetCapabilities does not return the capability\n");
         memset(&caps, 0, sizeof(caps));
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
             return JNI_ERR;
         if (caps.CAPABILITY) {
             NSK_COMPLAIN1("GetCapabilities returns relinquished \"%s\" capability\n",
    @@ -658,10 +648,10 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         NSK_DISPLAY0("Testcase #6: add back the capability and check with GetCapabilities\n");
         memset(&caps, 0, sizeof(caps));
         caps.CAPABILITY = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
             return JNI_ERR;
         memset(&caps, 0, sizeof(caps));
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
             return JNI_ERR;
         if (!caps.CAPABILITY) {
             NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
    diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t008/cm01t008.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t008/cm01t008.cpp
    index aeb2ebe6506..8f35fd2bf20 100644
    --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t008/cm01t008.cpp
    +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t008/cm01t008.cpp
    @@ -76,8 +76,7 @@ static int prepare() {
         NSK_DISPLAY0("Prepare: find tested thread\n");
     
         /* get all live threads */
    -    if (!NSK_JVMTI_VERIFY(
    -           NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads)))
             return NSK_FALSE;
     
         if (!NSK_VERIFY(threads_count > 0 && threads != NULL))
    @@ -89,8 +88,7 @@ static int prepare() {
                 return NSK_FALSE;
     
             /* get thread information */
    -        if (!NSK_JVMTI_VERIFY(
    -                NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info)))
    +        if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info)))
                 return NSK_FALSE;
     
             NSK_DISPLAY3("    thread #%d (%s): %p\n", i, info.name, threads[i]);
    @@ -102,24 +100,20 @@ static int prepare() {
         }
     
         /* deallocate threads list */
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads)))
             return NSK_FALSE;
     
         /* get tested thread class */
    -    if (!NSK_JNI_VERIFY(jni, (klass =
    -            NSK_CPP_STUB2(GetObjectClass, jni, thread)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (klass = jni->GetObjectClass(thread)) != NULL))
             return NSK_FALSE;
     
         /* get tested thread method 'run' */
    -    if (!NSK_JNI_VERIFY(jni, (method =
    -            NSK_CPP_STUB4(GetMethodID, jni, klass, "run", "()V")) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (method = jni->GetMethodID(klass, "run", "()V")) != NULL))
             return NSK_FALSE;
     
         /* get tested thread field 'waitingMonitor' */
         if (!NSK_JNI_VERIFY(jni, (field =
    -            NSK_CPP_STUB4(GetFieldID, jni, klass,
    -                "waitingMonitor", "Ljava/lang/Object;")) != NULL))
    +            jni->GetFieldID(klass, "waitingMonitor", "Ljava/lang/Object;")) != NULL))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -133,23 +127,21 @@ static int checkSuspend() {
         jvmtiError err;
     
         NSK_DISPLAY0("Checking negative: SuspendThread\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(SuspendThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->SuspendThread(thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: ResumeThread\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(ResumeThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->ResumeThread(thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SuspendThreadList\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(SuspendThreadList, jvmti, 1, &thread, &err)))
    +            jvmti->SuspendThreadList(1, &thread, &err)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: ResumeThreadList\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(ResumeThreadList, jvmti, 1, &thread, &err)))
    +            jvmti->ResumeThreadList(1, &thread, &err)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -165,27 +157,23 @@ static int checkSignalThread() {
         jmethodID ctor = NULL;
         jobject exception = NULL;
     
    -    if (!NSK_JNI_VERIFY(jni, (cls =
    -            NSK_CPP_STUB2(FindClass, jni, THREAD_DEATH_CLASS_NAME)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (cls = jni->FindClass(THREAD_DEATH_CLASS_NAME)) != NULL))
             return NSK_FALSE;
     
         if (!NSK_JNI_VERIFY(jni, (ctor =
    -            NSK_CPP_STUB4(GetMethodID, jni, cls,
    -                THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
    +            jni->GetMethodID(cls, THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
             return NSK_FALSE;
     
    -    if (!NSK_JNI_VERIFY(jni, (exception =
    -            NSK_CPP_STUB3(NewObject, jni, cls, ctor)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (exception = jni->NewObject(cls, ctor)) != NULL))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: StopThread\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(StopThread, jvmti, thread, exception)))
    +            jvmti->StopThread(thread, exception)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: InterruptThread\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(InterruptThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->InterruptThread(thread)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -199,7 +187,7 @@ static int checkGetOwnedMonitorInfo() {
     
         NSK_DISPLAY0("Checking negative: GetOwnedMonitorInfo\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetOwnedMonitorInfo, jvmti, thread, &count, &monitors)))
    +            jvmti->GetOwnedMonitorInfo(thread, &count, &monitors)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -212,7 +200,7 @@ static int checkGetCurrentContendedMonitor() {
     
         NSK_DISPLAY0("Checking negative: GetCurrentContendedMonitor\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetCurrentContendedMonitor, jvmti, thread, &monitor)))
    +            jvmti->GetCurrentContendedMonitor(thread, &monitor)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -222,8 +210,7 @@ static int checkGetCurrentContendedMonitor() {
      */
     static int checkPopFrame() {
         NSK_DISPLAY0("Checking negative: PopFrame\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(PopFrame, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->PopFrame(thread)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -267,43 +254,45 @@ static int checkHeapFunctions() {
     
         NSK_DISPLAY0("Checking negative: SetTag\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(SetTag, jvmti, thread, TAG_VALUE)))
    +            jvmti->SetTag(thread, TAG_VALUE)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetTag\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetTag, jvmti, thread, &tag)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->GetTag(thread, &tag)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetObjectsWithTags\n");
         tag = TAG_VALUE;
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB6(GetObjectsWithTags, jvmti, 1, &tag,
    -                &count, &res_objects, &res_tags)))
    +            jvmti->GetObjectsWithTags(1, &tag, &count, &res_objects, &res_tags)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverHeap\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(IterateOverHeap, jvmti, JVMTI_HEAP_OBJECT_TAGGED,
    -                HeapObject, &dummy_user_data)))
    +            jvmti->IterateOverHeap(JVMTI_HEAP_OBJECT_TAGGED, HeapObject, &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverInstancesOfClass\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(IterateOverInstancesOfClass, jvmti, klass,
    -                JVMTI_HEAP_OBJECT_UNTAGGED, HeapObject, &dummy_user_data)))
    +            jvmti->IterateOverInstancesOfClass(klass,
    +                                               JVMTI_HEAP_OBJECT_UNTAGGED,
    +                                               HeapObject,
    +                                               &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverObjectsReachableFromObject\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(IterateOverObjectsReachableFromObject, jvmti, thread,
    -                ObjectReference, &dummy_user_data)))
    +            jvmti->IterateOverObjectsReachableFromObject(thread,
    +                                                         ObjectReference,
    +                                                         &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverReachableObjects\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(IterateOverReachableObjects, jvmti,
    -                HeapRoot, StackReference, ObjectReference, &dummy_user_data)))
    +            jvmti->IterateOverReachableObjects(HeapRoot,
    +                                               StackReference,
    +                                               ObjectReference,
    +                                               &dummy_user_data)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -322,58 +311,57 @@ static int checkLocalVariableFunctions() {
     
         NSK_DISPLAY0("Checking negative: GetLocalVariableTable\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetLocalVariableTable, jvmti, method, &count,
    -                &local_variable_table)))
    +            jvmti->GetLocalVariableTable(method, &count, &local_variable_table)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalObject\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalObject, jvmti, thread, 0, 0, &object_value)))
    +            jvmti->GetLocalObject(thread, 0, 0, &object_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalInt\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalInt, jvmti, thread, 0, 0, &int_value)))
    +            jvmti->GetLocalInt(thread, 0, 0, &int_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalLong\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalLong, jvmti, thread, 0, 0, &long_value)))
    +            jvmti->GetLocalLong(thread, 0, 0, &long_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalFloat\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalFloat, jvmti, thread, 0, 0, &float_value)))
    +            jvmti->GetLocalFloat(thread, 0, 0, &float_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalDouble\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalDouble, jvmti, thread, 0, 0, &double_value)))
    +            jvmti->GetLocalDouble(thread, 0, 0, &double_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalObject\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalObject, jvmti, thread, 0, 0, thread)))
    +            jvmti->SetLocalObject(thread, 0, 0, thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalInt\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalInt, jvmti, thread, 0, 0, (jint)0)))
    +            jvmti->SetLocalInt(thread, 0, 0, (jint)0)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalLong\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalLong, jvmti, thread, 0, 0, (jlong)0)))
    +            jvmti->SetLocalLong(thread, 0, 0, (jlong)0)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalFloat\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalFloat, jvmti, thread, 0, 0, (jfloat)0.0)))
    +            jvmti->SetLocalFloat(thread, 0, 0, (jfloat)0.0)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalDouble\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalDouble, jvmti, thread, 0, 0, (jdouble)0.0)))
    +            jvmti->SetLocalDouble(thread, 0, 0, (jdouble)0.0)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -388,18 +376,17 @@ static int checkSourceInfoFunctions() {
     
         NSK_DISPLAY0("Checking negative: GetSourceFileName\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetSourceFileName, jvmti, klass, &name)))
    +            jvmti->GetSourceFileName(klass, &name)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetSourceDebugExtension\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetSourceDebugExtension, jvmti, klass, &name)))
    +            jvmti->GetSourceDebugExtension(klass, &name)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLineNumberTable\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetLineNumberTable, jvmti, method, &count,
    -                &line_number_table)))
    +            jvmti->GetLineNumberTable(method, &count, &line_number_table)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -415,12 +402,11 @@ static int checkRedefineClasses() {
         class_def.klass = klass;
         class_def.class_byte_count = klass_byte_count;
         class_def.class_bytes = klass_bytes;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(RedefineClasses, jvmti, 1, &class_def)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->RedefineClasses(1, &class_def)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking positive: IsMethodObsolete\n");
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB3(IsMethodObsolete, jvmti, method, &is_obsolete)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->IsMethodObsolete(method, &is_obsolete)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -433,7 +419,7 @@ static int checkGetObjectMonitorUsage() {
     
         NSK_DISPLAY0("Checking negative: GetObjectMonitorUsage\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetObjectMonitorUsage, jvmti, thread, &monitor_info)))
    +            jvmti->GetObjectMonitorUsage(thread, &monitor_info)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -446,12 +432,12 @@ static int checkIsSyntheticFunctions() {
     
         NSK_DISPLAY0("Checking negative: IsFieldSynthetic\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(IsFieldSynthetic, jvmti, klass, field, &is_synthetic)))
    +            jvmti->IsFieldSynthetic(klass, field, &is_synthetic)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IsMethodSynthetic\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(IsMethodSynthetic, jvmti, method, &is_synthetic)))
    +            jvmti->IsMethodSynthetic(method, &is_synthetic)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -465,7 +451,7 @@ static int checkGetBytecodes() {
     
         NSK_DISPLAY0("Checking negative: GetBytecodes\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetBytecodes, jvmti, method, &count, &bytecodes)))
    +            jvmti->GetBytecodes(method, &count, &bytecodes)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -479,12 +465,12 @@ static int checkGetCurrentThreadCpuTime() {
     
         NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTimerInfo\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(GetCurrentThreadCpuTimerInfo, jvmti, &info)))
    +            jvmti->GetCurrentThreadCpuTimerInfo(&info)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTime\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(GetCurrentThreadCpuTime, jvmti, &nanos)))
    +            jvmti->GetCurrentThreadCpuTime(&nanos)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -498,12 +484,12 @@ static int checkGetThreadCpuTime() {
     
         NSK_DISPLAY0("Checking negative: GetThreadCpuTimerInfo\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(GetThreadCpuTimerInfo, jvmti, &info)))
    +            jvmti->GetThreadCpuTimerInfo(&info)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetThreadCpuTime\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetThreadCpuTime, jvmti, thread, &nanos)))
    +            jvmti->GetThreadCpuTime(thread, &nanos)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -521,15 +507,14 @@ ClassFileLoadHook(jvmtiEnv *jvmti_env, JNIEnv *env, jclass class_beeing_redefine
     
         if (name != NULL && (strcmp(name, CLASS_NAME) == 0)) {
             NSK_DISPLAY1("ClassFileLoadHook: %s\n", name);
    -        if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(Allocate,
    -            jvmti, class_data_len, &klass_bytes)))
    +        if (!NSK_JVMTI_VERIFY(jvmti->Allocate(class_data_len, &klass_bytes)))
                 nsk_jvmti_setFailStatus();
             else {
                 memcpy(klass_bytes, class_data, class_data_len);
                 klass_byte_count = class_data_len;
             }
    -        NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode,
    -            jvmti, JVMTI_DISABLE, JVMTI_EVENT_CLASS_FILE_LOAD_HOOK, NULL));
    +        NSK_JVMTI_VERIFY(
    +            jvmti->SetEventNotificationMode(JVMTI_DISABLE, JVMTI_EVENT_CLASS_FILE_LOAD_HOOK, NULL));
         }
     }
     
    @@ -624,7 +609,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
     
         /* testcase #1: check GetPotentialCapabilities */
         NSK_DISPLAY0("Testcase #1: check if GetPotentialCapabilities returns the capability\n");
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPotentialCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetPotentialCapabilities(&caps)))
             return JNI_ERR;
         if (!caps.CAPABILITY) {
             NSK_COMPLAIN1("GetPotentialCapabilities does not return \"%s\" capability\n",
    @@ -636,13 +621,13 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         NSK_DISPLAY0("Testcase #2: add the capability during Onload phase\n");
         memset(&caps, 0, sizeof(caps));
         caps.CAPABILITY = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
             return JNI_ERR;
     
         /* testcase #3: check if GetCapabilities returns the capability */
         NSK_DISPLAY0("Testcase #3: check if GetCapabilities returns the capability\n");
         memset(&caps, 0, sizeof(caps));
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
             return JNI_ERR;
         if (!caps.CAPABILITY) {
             NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
    @@ -654,13 +639,13 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         NSK_DISPLAY0("Testcase #4: relinquish the capability during Onload phase\n");
         memset(&caps, 0, sizeof(caps));
         caps.CAPABILITY = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RelinquishCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->RelinquishCapabilities(&caps)))
             return JNI_ERR;
     
         /* testcase #5: check if GetCapabilities does not return the capability */
         NSK_DISPLAY0("Testcase #5: check if GetCapabilities does not return the capability\n");
         memset(&caps, 0, sizeof(caps));
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
             return JNI_ERR;
         if (caps.CAPABILITY) {
             NSK_COMPLAIN1("GetCapabilities returns relinquished \"%s\" capability\n",
    @@ -672,10 +657,10 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         NSK_DISPLAY0("Testcase #6: add back the capability and check with GetCapabilities\n");
         memset(&caps, 0, sizeof(caps));
         caps.CAPABILITY = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
             return JNI_ERR;
         memset(&caps, 0, sizeof(caps));
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
             return JNI_ERR;
         if (!caps.CAPABILITY) {
             NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
    @@ -686,11 +671,10 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         /* activate ClassFileLoadHook to get class file data */
         memset(&callbacks, 0, sizeof(callbacks));
         callbacks.ClassFileLoadHook = &ClassFileLoadHook;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetEventCallbacks,
    -            jvmti, &callbacks, sizeof(callbacks))))
    +    if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, sizeof(callbacks))))
             return JNI_ERR;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode,
    -            jvmti, JVMTI_ENABLE, JVMTI_EVENT_CLASS_FILE_LOAD_HOOK, NULL)))
    +    if (!NSK_JVMTI_VERIFY(
    +        jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_CLASS_FILE_LOAD_HOOK, NULL)))
             return JNI_ERR;
     
         return JNI_OK;
    diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t009/cm01t009.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t009/cm01t009.cpp
    index d49903a0084..535398b2a96 100644
    --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t009/cm01t009.cpp
    +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t009/cm01t009.cpp
    @@ -74,8 +74,7 @@ static int prepare() {
         NSK_DISPLAY0("Prepare: find tested thread\n");
     
         /* get all live threads */
    -    if (!NSK_JVMTI_VERIFY(
    -           NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads)))
             return NSK_FALSE;
     
         if (!NSK_VERIFY(threads_count > 0 && threads != NULL))
    @@ -87,8 +86,7 @@ static int prepare() {
                 return NSK_FALSE;
     
             /* get thread information */
    -        if (!NSK_JVMTI_VERIFY(
    -                NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info)))
    +        if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info)))
                 return NSK_FALSE;
     
             NSK_DISPLAY3("    thread #%d (%s): %p\n", i, info.name, threads[i]);
    @@ -100,24 +98,20 @@ static int prepare() {
         }
     
         /* deallocate threads list */
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads)))
             return NSK_FALSE;
     
         /* get tested thread class */
    -    if (!NSK_JNI_VERIFY(jni, (klass =
    -            NSK_CPP_STUB2(GetObjectClass, jni, thread)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (klass = jni->GetObjectClass(thread)) != NULL))
             return NSK_FALSE;
     
         /* get tested thread method 'run' */
    -    if (!NSK_JNI_VERIFY(jni, (method =
    -            NSK_CPP_STUB4(GetMethodID, jni, klass, "run", "()V")) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (method = jni->GetMethodID(klass, "run", "()V")) != NULL))
             return NSK_FALSE;
     
         /* get tested thread field 'waitingMonitor' */
         if (!NSK_JNI_VERIFY(jni, (field =
    -            NSK_CPP_STUB4(GetFieldID, jni, klass,
    -                "waitingMonitor", "Ljava/lang/Object;")) != NULL))
    +            jni->GetFieldID(klass, "waitingMonitor", "Ljava/lang/Object;")) != NULL))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -131,23 +125,21 @@ static int checkSuspend() {
         jvmtiError err;
     
         NSK_DISPLAY0("Checking negative: SuspendThread\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(SuspendThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->SuspendThread(thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: ResumeThread\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(ResumeThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->ResumeThread(thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SuspendThreadList\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(SuspendThreadList, jvmti, 1, &thread, &err)))
    +            jvmti->SuspendThreadList(1, &thread, &err)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: ResumeThreadList\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(ResumeThreadList, jvmti, 1, &thread, &err)))
    +            jvmti->ResumeThreadList(1, &thread, &err)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -163,25 +155,22 @@ static int checkSignalThread() {
         jmethodID ctor = NULL;
         jobject exception = NULL;
     
    -    if (!NSK_JNI_VERIFY(jni, (cls =
    -            NSK_CPP_STUB2(FindClass, jni, THREAD_DEATH_CLASS_NAME)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (cls = jni->FindClass(THREAD_DEATH_CLASS_NAME)) != NULL))
             return NSK_FALSE;
     
         if (!NSK_JNI_VERIFY(jni, (ctor =
    -            NSK_CPP_STUB4(GetMethodID, jni, cls,
    -                THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
    +            jni->GetMethodID(cls, THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
             return NSK_FALSE;
     
    -    if (!NSK_JNI_VERIFY(jni, (exception =
    -            NSK_CPP_STUB3(NewObject, jni, cls, ctor)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (exception = jni->NewObject(cls, ctor)) != NULL))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking positive: InterruptThread\n");
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(InterruptThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->InterruptThread(thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking positive: StopThread\n");
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(StopThread, jvmti, thread, exception)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->StopThread(thread, exception)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -195,7 +184,7 @@ static int checkGetOwnedMonitorInfo() {
     
         NSK_DISPLAY0("Checking negative: GetOwnedMonitorInfo\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetOwnedMonitorInfo, jvmti, thread, &count, &monitors)))
    +            jvmti->GetOwnedMonitorInfo(thread, &count, &monitors)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -208,7 +197,7 @@ static int checkGetCurrentContendedMonitor() {
     
         NSK_DISPLAY0("Checking negative: GetCurrentContendedMonitor\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetCurrentContendedMonitor, jvmti, thread, &monitor)))
    +            jvmti->GetCurrentContendedMonitor(thread, &monitor)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -218,8 +207,7 @@ static int checkGetCurrentContendedMonitor() {
      */
     static int checkPopFrame() {
         NSK_DISPLAY0("Checking negative: PopFrame\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(PopFrame, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->PopFrame(thread)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -263,43 +251,45 @@ static int checkHeapFunctions() {
     
         NSK_DISPLAY0("Checking negative: SetTag\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(SetTag, jvmti, thread, TAG_VALUE)))
    +            jvmti->SetTag(thread, TAG_VALUE)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetTag\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetTag, jvmti, thread, &tag)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->GetTag(thread, &tag)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetObjectsWithTags\n");
         tag = TAG_VALUE;
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB6(GetObjectsWithTags, jvmti, 1, &tag,
    -                &count, &res_objects, &res_tags)))
    +            jvmti->GetObjectsWithTags(1, &tag, &count, &res_objects, &res_tags)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverHeap\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(IterateOverHeap, jvmti, JVMTI_HEAP_OBJECT_TAGGED,
    -                HeapObject, &dummy_user_data)))
    +            jvmti->IterateOverHeap(JVMTI_HEAP_OBJECT_TAGGED, HeapObject, &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverInstancesOfClass\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(IterateOverInstancesOfClass, jvmti, klass,
    -                JVMTI_HEAP_OBJECT_UNTAGGED, HeapObject, &dummy_user_data)))
    +            jvmti->IterateOverInstancesOfClass(klass,
    +                                               JVMTI_HEAP_OBJECT_UNTAGGED,
    +                                               HeapObject,
    +                                               &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverObjectsReachableFromObject\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(IterateOverObjectsReachableFromObject, jvmti, thread,
    -                ObjectReference, &dummy_user_data)))
    +            jvmti->IterateOverObjectsReachableFromObject(thread,
    +                                                         ObjectReference,
    +                                                         &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverReachableObjects\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(IterateOverReachableObjects, jvmti,
    -                HeapRoot, StackReference, ObjectReference, &dummy_user_data)))
    +            jvmti->IterateOverReachableObjects(HeapRoot,
    +                                               StackReference,
    +                                               ObjectReference,
    +                                               &dummy_user_data)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -318,58 +308,57 @@ static int checkLocalVariableFunctions() {
     
         NSK_DISPLAY0("Checking negative: GetLocalVariableTable\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetLocalVariableTable, jvmti, method, &count,
    -                &local_variable_table)))
    +            jvmti->GetLocalVariableTable(method, &count, &local_variable_table)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalObject\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalObject, jvmti, thread, 0, 0, &object_value)))
    +            jvmti->GetLocalObject(thread, 0, 0, &object_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalInt\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalInt, jvmti, thread, 0, 0, &int_value)))
    +            jvmti->GetLocalInt(thread, 0, 0, &int_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalLong\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalLong, jvmti, thread, 0, 0, &long_value)))
    +            jvmti->GetLocalLong(thread, 0, 0, &long_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalFloat\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalFloat, jvmti, thread, 0, 0, &float_value)))
    +            jvmti->GetLocalFloat(thread, 0, 0, &float_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalDouble\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalDouble, jvmti, thread, 0, 0, &double_value)))
    +            jvmti->GetLocalDouble(thread, 0, 0, &double_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalObject\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalObject, jvmti, thread, 0, 0, thread)))
    +            jvmti->SetLocalObject(thread, 0, 0, thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalInt\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalInt, jvmti, thread, 0, 0, (jint)0)))
    +            jvmti->SetLocalInt(thread, 0, 0, (jint)0)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalLong\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalLong, jvmti, thread, 0, 0, (jlong)0)))
    +            jvmti->SetLocalLong(thread, 0, 0, (jlong)0)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalFloat\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalFloat, jvmti, thread, 0, 0, (jfloat)0.0)))
    +            jvmti->SetLocalFloat(thread, 0, 0, (jfloat)0.0)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalDouble\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalDouble, jvmti, thread, 0, 0, (jdouble)0.0)))
    +            jvmti->SetLocalDouble(thread, 0, 0, (jdouble)0.0)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -384,18 +373,17 @@ static int checkSourceInfoFunctions() {
     
         NSK_DISPLAY0("Checking negative: GetSourceFileName\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetSourceFileName, jvmti, klass, &name)))
    +            jvmti->GetSourceFileName(klass, &name)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetSourceDebugExtension\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetSourceDebugExtension, jvmti, klass, &name)))
    +            jvmti->GetSourceDebugExtension(klass, &name)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLineNumberTable\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetLineNumberTable, jvmti, method, &count,
    -                &line_number_table)))
    +            jvmti->GetLineNumberTable(method, &count, &line_number_table)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -411,7 +399,7 @@ static int checkRedefineClasses() {
         class_def.class_byte_count = 0;
         class_def.class_bytes = NULL;
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(RedefineClasses, jvmti, 1, &class_def)))
    +            jvmti->RedefineClasses(1, &class_def)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -424,7 +412,7 @@ static int checkGetObjectMonitorUsage() {
     
         NSK_DISPLAY0("Checking negative: GetObjectMonitorUsage\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetObjectMonitorUsage, jvmti, thread, &monitor_info)))
    +            jvmti->GetObjectMonitorUsage(thread, &monitor_info)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -437,12 +425,12 @@ static int checkIsSyntheticFunctions() {
     
         NSK_DISPLAY0("Checking negative: IsFieldSynthetic\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(IsFieldSynthetic, jvmti, klass, field, &is_synthetic)))
    +            jvmti->IsFieldSynthetic(klass, field, &is_synthetic)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IsMethodSynthetic\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(IsMethodSynthetic, jvmti, method, &is_synthetic)))
    +            jvmti->IsMethodSynthetic(method, &is_synthetic)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -456,7 +444,7 @@ static int checkGetBytecodes() {
     
         NSK_DISPLAY0("Checking negative: GetBytecodes\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetBytecodes, jvmti, method, &count, &bytecodes)))
    +            jvmti->GetBytecodes(method, &count, &bytecodes)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -470,12 +458,12 @@ static int checkGetCurrentThreadCpuTime() {
     
         NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTimerInfo\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(GetCurrentThreadCpuTimerInfo, jvmti, &info)))
    +            jvmti->GetCurrentThreadCpuTimerInfo(&info)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTime\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(GetCurrentThreadCpuTime, jvmti, &nanos)))
    +            jvmti->GetCurrentThreadCpuTime(&nanos)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -489,12 +477,12 @@ static int checkGetThreadCpuTime() {
     
         NSK_DISPLAY0("Checking negative: GetThreadCpuTimerInfo\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(GetThreadCpuTimerInfo, jvmti, &info)))
    +            jvmti->GetThreadCpuTimerInfo(&info)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetThreadCpuTime\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetThreadCpuTime, jvmti, thread, &nanos)))
    +            jvmti->GetThreadCpuTime(thread, &nanos)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -590,7 +578,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
     
         /* testcase #1: check GetPotentialCapabilities */
         NSK_DISPLAY0("Testcase #1: check if GetPotentialCapabilities returns the capability\n");
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPotentialCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetPotentialCapabilities(&caps)))
             return JNI_ERR;
         if (!caps.CAPABILITY) {
             NSK_COMPLAIN1("GetPotentialCapabilities does not return \"%s\" capability\n",
    @@ -602,13 +590,13 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         NSK_DISPLAY0("Testcase #2: add the capability during Onload phase\n");
         memset(&caps, 0, sizeof(caps));
         caps.CAPABILITY = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
             return JNI_ERR;
     
         /* testcase #3: check if GetCapabilities returns the capability */
         NSK_DISPLAY0("Testcase #3: check if GetCapabilities returns the capability\n");
         memset(&caps, 0, sizeof(caps));
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
             return JNI_ERR;
         if (!caps.CAPABILITY) {
             NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
    @@ -620,13 +608,13 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         NSK_DISPLAY0("Testcase #4: relinquish the capability during Onload phase\n");
         memset(&caps, 0, sizeof(caps));
         caps.CAPABILITY = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RelinquishCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->RelinquishCapabilities(&caps)))
             return JNI_ERR;
     
         /* testcase #5: check if GetCapabilities does not return the capability */
         NSK_DISPLAY0("Testcase #5: check if GetCapabilities does not return the capability\n");
         memset(&caps, 0, sizeof(caps));
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
             return JNI_ERR;
         if (caps.CAPABILITY) {
             NSK_COMPLAIN1("GetCapabilities returns relinquished \"%s\" capability\n",
    @@ -638,10 +626,10 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         NSK_DISPLAY0("Testcase #6: add back the capability and check with GetCapabilities\n");
         memset(&caps, 0, sizeof(caps));
         caps.CAPABILITY = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
             return JNI_ERR;
         memset(&caps, 0, sizeof(caps));
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
             return JNI_ERR;
         if (!caps.CAPABILITY) {
             NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
    diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t010/cm01t010.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t010/cm01t010.cpp
    index 767f2fba303..f7e8c060772 100644
    --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t010/cm01t010.cpp
    +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t010/cm01t010.cpp
    @@ -73,8 +73,7 @@ static int prepare() {
         NSK_DISPLAY0("Prepare: find tested thread\n");
     
         /* get all live threads */
    -    if (!NSK_JVMTI_VERIFY(
    -           NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads)))
             return NSK_FALSE;
     
         if (!NSK_VERIFY(threads_count > 0 && threads != NULL))
    @@ -86,8 +85,7 @@ static int prepare() {
                 return NSK_FALSE;
     
             /* get thread information */
    -        if (!NSK_JVMTI_VERIFY(
    -                NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info)))
    +        if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info)))
                 return NSK_FALSE;
     
             NSK_DISPLAY3("    thread #%d (%s): %p\n", i, info.name, threads[i]);
    @@ -99,24 +97,20 @@ static int prepare() {
         }
     
         /* deallocate threads list */
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads)))
             return NSK_FALSE;
     
         /* get tested thread class */
    -    if (!NSK_JNI_VERIFY(jni, (klass =
    -            NSK_CPP_STUB2(GetObjectClass, jni, thread)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (klass = jni->GetObjectClass(thread)) != NULL))
             return NSK_FALSE;
     
         /* get tested thread method 'run' */
    -    if (!NSK_JNI_VERIFY(jni, (method =
    -            NSK_CPP_STUB4(GetMethodID, jni, klass, "run", "()V")) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (method = jni->GetMethodID(klass, "run", "()V")) != NULL))
             return NSK_FALSE;
     
         /* get tested thread field 'waitingMonitor' */
         if (!NSK_JNI_VERIFY(jni, (field =
    -            NSK_CPP_STUB4(GetFieldID, jni, klass,
    -                "waitingMonitor", "Ljava/lang/Object;")) != NULL))
    +            jni->GetFieldID(klass, "waitingMonitor", "Ljava/lang/Object;")) != NULL))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -130,23 +124,21 @@ static int checkSuspend() {
         jvmtiError err;
     
         NSK_DISPLAY0("Checking negative: SuspendThread\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(SuspendThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->SuspendThread(thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: ResumeThread\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(ResumeThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->ResumeThread(thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SuspendThreadList\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(SuspendThreadList, jvmti, 1, &thread, &err)))
    +            jvmti->SuspendThreadList(1, &thread, &err)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: ResumeThreadList\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(ResumeThreadList, jvmti, 1, &thread, &err)))
    +            jvmti->ResumeThreadList(1, &thread, &err)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -162,27 +154,23 @@ static int checkSignalThread() {
         jmethodID ctor = NULL;
         jobject exception = NULL;
     
    -    if (!NSK_JNI_VERIFY(jni, (cls =
    -            NSK_CPP_STUB2(FindClass, jni, THREAD_DEATH_CLASS_NAME)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (cls = jni->FindClass(THREAD_DEATH_CLASS_NAME)) != NULL))
             return NSK_FALSE;
     
         if (!NSK_JNI_VERIFY(jni, (ctor =
    -            NSK_CPP_STUB4(GetMethodID, jni, cls,
    -                THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
    +            jni->GetMethodID(cls, THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
             return NSK_FALSE;
     
    -    if (!NSK_JNI_VERIFY(jni, (exception =
    -            NSK_CPP_STUB3(NewObject, jni, cls, ctor)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (exception = jni->NewObject(cls, ctor)) != NULL))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: StopThread\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(StopThread, jvmti, thread, exception)))
    +            jvmti->StopThread(thread, exception)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: InterruptThread\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(InterruptThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->InterruptThread(thread)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -196,7 +184,7 @@ static int checkGetOwnedMonitorInfo() {
     
         NSK_DISPLAY0("Checking negative: GetOwnedMonitorInfo\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetOwnedMonitorInfo, jvmti, thread, &count, &monitors)))
    +            jvmti->GetOwnedMonitorInfo(thread, &count, &monitors)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -209,7 +197,7 @@ static int checkGetCurrentContendedMonitor() {
     
         NSK_DISPLAY0("Checking negative: GetCurrentContendedMonitor\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetCurrentContendedMonitor, jvmti, thread, &monitor)))
    +            jvmti->GetCurrentContendedMonitor(thread, &monitor)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -219,8 +207,7 @@ static int checkGetCurrentContendedMonitor() {
      */
     static int checkPopFrame() {
         NSK_DISPLAY0("Checking negative: PopFrame\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(PopFrame, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->PopFrame(thread)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -264,43 +251,45 @@ static int checkHeapFunctions() {
     
         NSK_DISPLAY0("Checking negative: SetTag\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(SetTag, jvmti, thread, TAG_VALUE)))
    +            jvmti->SetTag(thread, TAG_VALUE)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetTag\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetTag, jvmti, thread, &tag)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->GetTag(thread, &tag)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetObjectsWithTags\n");
         tag = TAG_VALUE;
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB6(GetObjectsWithTags, jvmti, 1, &tag,
    -                &count, &res_objects, &res_tags)))
    +            jvmti->GetObjectsWithTags(1, &tag, &count, &res_objects, &res_tags)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverHeap\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(IterateOverHeap, jvmti, JVMTI_HEAP_OBJECT_TAGGED,
    -                HeapObject, &dummy_user_data)))
    +            jvmti->IterateOverHeap(JVMTI_HEAP_OBJECT_TAGGED, HeapObject, &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverInstancesOfClass\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(IterateOverInstancesOfClass, jvmti, klass,
    -                JVMTI_HEAP_OBJECT_UNTAGGED, HeapObject, &dummy_user_data)))
    +            jvmti->IterateOverInstancesOfClass(klass,
    +                                               JVMTI_HEAP_OBJECT_UNTAGGED,
    +                                               HeapObject,
    +                                               &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverObjectsReachableFromObject\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(IterateOverObjectsReachableFromObject, jvmti, thread,
    -                ObjectReference, &dummy_user_data)))
    +            jvmti->IterateOverObjectsReachableFromObject(thread,
    +                                                         ObjectReference,
    +                                                         &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverReachableObjects\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(IterateOverReachableObjects, jvmti,
    -                HeapRoot, StackReference, ObjectReference, &dummy_user_data)))
    +            jvmti->IterateOverReachableObjects(HeapRoot,
    +                                               StackReference,
    +                                               ObjectReference,
    +                                               &dummy_user_data)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -319,58 +308,57 @@ static int checkLocalVariableFunctions() {
     
         NSK_DISPLAY0("Checking negative: GetLocalVariableTable\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetLocalVariableTable, jvmti, method, &count,
    -                &local_variable_table)))
    +            jvmti->GetLocalVariableTable(method, &count, &local_variable_table)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalObject\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalObject, jvmti, thread, 0, 0, &object_value)))
    +            jvmti->GetLocalObject(thread, 0, 0, &object_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalInt\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalInt, jvmti, thread, 0, 0, &int_value)))
    +            jvmti->GetLocalInt(thread, 0, 0, &int_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalLong\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalLong, jvmti, thread, 0, 0, &long_value)))
    +            jvmti->GetLocalLong(thread, 0, 0, &long_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalFloat\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalFloat, jvmti, thread, 0, 0, &float_value)))
    +            jvmti->GetLocalFloat(thread, 0, 0, &float_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalDouble\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalDouble, jvmti, thread, 0, 0, &double_value)))
    +            jvmti->GetLocalDouble(thread, 0, 0, &double_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalObject\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalObject, jvmti, thread, 0, 0, thread)))
    +            jvmti->SetLocalObject(thread, 0, 0, thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalInt\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalInt, jvmti, thread, 0, 0, (jint)0)))
    +            jvmti->SetLocalInt(thread, 0, 0, (jint)0)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalLong\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalLong, jvmti, thread, 0, 0, (jlong)0)))
    +            jvmti->SetLocalLong(thread, 0, 0, (jlong)0)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalFloat\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalFloat, jvmti, thread, 0, 0, (jfloat)0.0)))
    +            jvmti->SetLocalFloat(thread, 0, 0, (jfloat)0.0)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalDouble\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalDouble, jvmti, thread, 0, 0, (jdouble)0.0)))
    +            jvmti->SetLocalDouble(thread, 0, 0, (jdouble)0.0)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -384,19 +372,17 @@ static int checkSourceInfoFunctions() {
         jvmtiLineNumberEntry *line_number_table = NULL;
     
         NSK_DISPLAY0("Checking positive: GetSourceFileName\n");
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB3(GetSourceFileName, jvmti, klass, &name)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetSourceFileName(klass, &name)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetSourceDebugExtension\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetSourceDebugExtension, jvmti, klass, &name)))
    +            jvmti->GetSourceDebugExtension(klass, &name)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLineNumberTable\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetLineNumberTable, jvmti, method, &count,
    -                &line_number_table)))
    +            jvmti->GetLineNumberTable(method, &count, &line_number_table)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -412,7 +398,7 @@ static int checkRedefineClasses() {
         class_def.class_byte_count = 0;
         class_def.class_bytes = NULL;
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(RedefineClasses, jvmti, 1, &class_def)))
    +            jvmti->RedefineClasses(1, &class_def)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -425,7 +411,7 @@ static int checkGetObjectMonitorUsage() {
     
         NSK_DISPLAY0("Checking negative: GetObjectMonitorUsage\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetObjectMonitorUsage, jvmti, thread, &monitor_info)))
    +            jvmti->GetObjectMonitorUsage(thread, &monitor_info)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -438,12 +424,12 @@ static int checkIsSyntheticFunctions() {
     
         NSK_DISPLAY0("Checking negative: IsFieldSynthetic\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(IsFieldSynthetic, jvmti, klass, field, &is_synthetic)))
    +            jvmti->IsFieldSynthetic(klass, field, &is_synthetic)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IsMethodSynthetic\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(IsMethodSynthetic, jvmti, method, &is_synthetic)))
    +            jvmti->IsMethodSynthetic(method, &is_synthetic)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -457,7 +443,7 @@ static int checkGetBytecodes() {
     
         NSK_DISPLAY0("Checking negative: GetBytecodes\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetBytecodes, jvmti, method, &count, &bytecodes)))
    +            jvmti->GetBytecodes(method, &count, &bytecodes)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -471,12 +457,12 @@ static int checkGetCurrentThreadCpuTime() {
     
         NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTimerInfo\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(GetCurrentThreadCpuTimerInfo, jvmti, &info)))
    +            jvmti->GetCurrentThreadCpuTimerInfo(&info)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTime\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(GetCurrentThreadCpuTime, jvmti, &nanos)))
    +            jvmti->GetCurrentThreadCpuTime(&nanos)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -490,12 +476,12 @@ static int checkGetThreadCpuTime() {
     
         NSK_DISPLAY0("Checking negative: GetThreadCpuTimerInfo\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(GetThreadCpuTimerInfo, jvmti, &info)))
    +            jvmti->GetThreadCpuTimerInfo(&info)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetThreadCpuTime\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetThreadCpuTime, jvmti, thread, &nanos)))
    +            jvmti->GetThreadCpuTime(thread, &nanos)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -591,7 +577,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
     
         /* testcase #1: check GetPotentialCapabilities */
         NSK_DISPLAY0("Testcase #1: check if GetPotentialCapabilities returns the capability\n");
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPotentialCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetPotentialCapabilities(&caps)))
             return JNI_ERR;
         if (!caps.CAPABILITY) {
             NSK_COMPLAIN1("GetPotentialCapabilities does not return \"%s\" capability\n",
    @@ -603,13 +589,13 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         NSK_DISPLAY0("Testcase #2: add the capability during Onload phase\n");
         memset(&caps, 0, sizeof(caps));
         caps.CAPABILITY = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
             return JNI_ERR;
     
         /* testcase #3: check if GetCapabilities returns the capability */
         NSK_DISPLAY0("Testcase #3: check if GetCapabilities returns the capability\n");
         memset(&caps, 0, sizeof(caps));
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
             return JNI_ERR;
         if (!caps.CAPABILITY) {
             NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
    @@ -621,13 +607,13 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         NSK_DISPLAY0("Testcase #4: relinquish the capability during Onload phase\n");
         memset(&caps, 0, sizeof(caps));
         caps.CAPABILITY = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RelinquishCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->RelinquishCapabilities(&caps)))
             return JNI_ERR;
     
         /* testcase #5: check if GetCapabilities does not return the capability */
         NSK_DISPLAY0("Testcase #5: check if GetCapabilities does not return the capability\n");
         memset(&caps, 0, sizeof(caps));
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
             return JNI_ERR;
         if (caps.CAPABILITY) {
             NSK_COMPLAIN1("GetCapabilities returns relinquished \"%s\" capability\n",
    @@ -639,10 +625,10 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         NSK_DISPLAY0("Testcase #6: add back the capability and check with GetCapabilities\n");
         memset(&caps, 0, sizeof(caps));
         caps.CAPABILITY = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
             return JNI_ERR;
         memset(&caps, 0, sizeof(caps));
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
             return JNI_ERR;
         if (!caps.CAPABILITY) {
             NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
    diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t011/cm01t011.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t011/cm01t011.cpp
    index 3613f0642be..6e07ea5c7e1 100644
    --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t011/cm01t011.cpp
    +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t011/cm01t011.cpp
    @@ -83,8 +83,7 @@ static int prepare() {
         NSK_DISPLAY0("Prepare: find tested thread\n");
     
         /* get all live threads */
    -    if (!NSK_JVMTI_VERIFY(
    -           NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads)))
             return NSK_FALSE;
     
         if (!NSK_VERIFY(threads_count > 0 && threads != NULL))
    @@ -96,8 +95,7 @@ static int prepare() {
                 return NSK_FALSE;
     
             /* get thread information */
    -        if (!NSK_JVMTI_VERIFY(
    -                NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info)))
    +        if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info)))
                 return NSK_FALSE;
     
             NSK_DISPLAY3("    thread #%d (%s): %p\n", i, info.name, threads[i]);
    @@ -109,24 +107,20 @@ static int prepare() {
         }
     
         /* deallocate threads list */
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads)))
             return NSK_FALSE;
     
         /* get tested thread class */
    -    if (!NSK_JNI_VERIFY(jni, (klass =
    -            NSK_CPP_STUB2(GetObjectClass, jni, thread)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (klass = jni->GetObjectClass(thread)) != NULL))
             return NSK_FALSE;
     
         /* get tested thread method 'run' */
    -    if (!NSK_JNI_VERIFY(jni, (method =
    -            NSK_CPP_STUB4(GetMethodID, jni, klass, "run", "()V")) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (method = jni->GetMethodID(klass, "run", "()V")) != NULL))
             return NSK_FALSE;
     
         /* get tested thread field 'waitingMonitor' */
         if (!NSK_JNI_VERIFY(jni, (field =
    -            NSK_CPP_STUB4(GetFieldID, jni, klass,
    -                "waitingMonitor", "Ljava/lang/Object;")) != NULL))
    +            jni->GetFieldID(klass, "waitingMonitor", "Ljava/lang/Object;")) != NULL))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -140,23 +134,21 @@ static int checkSuspend() {
         jvmtiError err;
     
         NSK_DISPLAY0("Checking negative: SuspendThread\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(SuspendThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->SuspendThread(thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: ResumeThread\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(ResumeThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->ResumeThread(thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SuspendThreadList\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(SuspendThreadList, jvmti, 1, &thread, &err)))
    +            jvmti->SuspendThreadList(1, &thread, &err)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: ResumeThreadList\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(ResumeThreadList, jvmti, 1, &thread, &err)))
    +            jvmti->ResumeThreadList(1, &thread, &err)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -172,27 +164,23 @@ static int checkSignalThread() {
         jmethodID ctor = NULL;
         jobject exception = NULL;
     
    -    if (!NSK_JNI_VERIFY(jni, (cls =
    -            NSK_CPP_STUB2(FindClass, jni, THREAD_DEATH_CLASS_NAME)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (cls = jni->FindClass(THREAD_DEATH_CLASS_NAME)) != NULL))
             return NSK_FALSE;
     
         if (!NSK_JNI_VERIFY(jni, (ctor =
    -            NSK_CPP_STUB4(GetMethodID, jni, cls,
    -                THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
    +            jni->GetMethodID(cls, THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
             return NSK_FALSE;
     
    -    if (!NSK_JNI_VERIFY(jni, (exception =
    -            NSK_CPP_STUB3(NewObject, jni, cls, ctor)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (exception = jni->NewObject(cls, ctor)) != NULL))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: StopThread\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(StopThread, jvmti, thread, exception)))
    +            jvmti->StopThread(thread, exception)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: InterruptThread\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(InterruptThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->InterruptThread(thread)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -206,7 +194,7 @@ static int checkGetOwnedMonitorInfo() {
     
         NSK_DISPLAY0("Checking negative: GetOwnedMonitorInfo\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetOwnedMonitorInfo, jvmti, thread, &count, &monitors)))
    +            jvmti->GetOwnedMonitorInfo(thread, &count, &monitors)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -219,7 +207,7 @@ static int checkGetCurrentContendedMonitor() {
     
         NSK_DISPLAY0("Checking negative: GetCurrentContendedMonitor\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetCurrentContendedMonitor, jvmti, thread, &monitor)))
    +            jvmti->GetCurrentContendedMonitor(thread, &monitor)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -229,8 +217,7 @@ static int checkGetCurrentContendedMonitor() {
      */
     static int checkPopFrame() {
         NSK_DISPLAY0("Checking negative: PopFrame\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(PopFrame, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->PopFrame(thread)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -274,43 +261,45 @@ static int checkHeapFunctions() {
     
         NSK_DISPLAY0("Checking negative: SetTag\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(SetTag, jvmti, thread, TAG_VALUE)))
    +            jvmti->SetTag(thread, TAG_VALUE)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetTag\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetTag, jvmti, thread, &tag)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->GetTag(thread, &tag)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetObjectsWithTags\n");
         tag = TAG_VALUE;
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB6(GetObjectsWithTags, jvmti, 1, &tag,
    -                &count, &res_objects, &res_tags)))
    +            jvmti->GetObjectsWithTags(1, &tag, &count, &res_objects, &res_tags)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverHeap\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(IterateOverHeap, jvmti, JVMTI_HEAP_OBJECT_TAGGED,
    -                HeapObject, &dummy_user_data)))
    +            jvmti->IterateOverHeap(JVMTI_HEAP_OBJECT_TAGGED, HeapObject, &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverInstancesOfClass\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(IterateOverInstancesOfClass, jvmti, klass,
    -                JVMTI_HEAP_OBJECT_UNTAGGED, HeapObject, &dummy_user_data)))
    +            jvmti->IterateOverInstancesOfClass(klass,
    +                                               JVMTI_HEAP_OBJECT_UNTAGGED,
    +                                               HeapObject,
    +                                               &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverObjectsReachableFromObject\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(IterateOverObjectsReachableFromObject, jvmti, thread,
    -                ObjectReference, &dummy_user_data)))
    +            jvmti->IterateOverObjectsReachableFromObject(thread,
    +                                                         ObjectReference,
    +                                                         &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverReachableObjects\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(IterateOverReachableObjects, jvmti,
    -                HeapRoot, StackReference, ObjectReference, &dummy_user_data)))
    +            jvmti->IterateOverReachableObjects(HeapRoot,
    +                                               StackReference,
    +                                               ObjectReference,
    +                                               &dummy_user_data)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -333,83 +322,80 @@ static int checkLocalVariableFunctions() {
     */
     
         NSK_DISPLAY0("Checking positive: GetLocalVariableTable\n");
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB4(GetLocalVariableTable, jvmti, method, &count,
    -                &local_variable_table)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetLocalVariableTable(method, &count, &local_variable_table)))
             return NSK_FALSE;
     
     /* DEBUG -- while thread should be suspended
         memset(&caps, 0, sizeof(caps));
         caps.can_suspend = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
             return JNI_ERR;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(SuspendThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->SuspendThread(thread)))
             return NSK_FALSE;
     */
     
         for (i = 0; i < count; i++) {
             if (strcmp(local_variable_table[i].name, "o") ==0) {
                 NSK_DISPLAY0("Checking positive: GetLocalObject\n");
    -            if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(GetLocalObject, jvmti,
    -                    thread, 1, local_variable_table[i].slot, &object_value)))
    +            if (!NSK_JVMTI_VERIFY(
    +                    jvmti->GetLocalObject(thread, 1, local_variable_table[i].slot, &object_value)))
                     return NSK_FALSE;
     
                 NSK_DISPLAY0("Checking positive: SetLocalObject\n");
    -            if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(SetLocalObject, jvmti,
    -                    thread, 1, local_variable_table[i].slot, object_value)))
    +            if (!NSK_JVMTI_VERIFY(
    +                    jvmti->SetLocalObject(thread, 1, local_variable_table[i].slot, object_value)))
                     return NSK_FALSE;
             } else if (strcmp(local_variable_table[i].name, "i") ==0) {
                 NSK_DISPLAY0("Checking positive: GetLocalInt\n");
    -            if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(GetLocalInt, jvmti,
    -                    thread, 1, local_variable_table[i].slot, &int_value)))
    +            if (!NSK_JVMTI_VERIFY(
    +                    jvmti->GetLocalInt(thread, 1, local_variable_table[i].slot, &int_value)))
                     return NSK_FALSE;
     
                 NSK_DISPLAY0("Checking positive: SetLocalInt\n");
    -            if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(SetLocalInt, jvmti,
    -                    thread, 1, local_variable_table[i].slot, int_value)))
    +            if (!NSK_JVMTI_VERIFY(
    +                    jvmti->SetLocalInt(thread, 1, local_variable_table[i].slot, int_value)))
                     return NSK_FALSE;
             } else if (strcmp(local_variable_table[i].name, "l") ==0) {
                 NSK_DISPLAY0("Checking positive: GetLocalLong\n");
    -            if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(GetLocalLong, jvmti,
    -                    thread, 1, local_variable_table[i].slot, &long_value)))
    +            if (!NSK_JVMTI_VERIFY(
    +                    jvmti->GetLocalLong(thread, 1, local_variable_table[i].slot, &long_value)))
                     return NSK_FALSE;
     
                 NSK_DISPLAY0("Checking positive: SetLocalLong\n");
    -            if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(SetLocalLong, jvmti,
    -                    thread, 1, local_variable_table[i].slot, long_value)))
    +            if (!NSK_JVMTI_VERIFY(
    +                    jvmti->SetLocalLong(thread, 1, local_variable_table[i].slot, long_value)))
                     return NSK_FALSE;
             } else if (strcmp(local_variable_table[i].name, "f") ==0) {
                 NSK_DISPLAY0("Checking positive: GetLocalFloat\n");
    -            if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(GetLocalFloat, jvmti,
    -                    thread, 1, local_variable_table[i].slot, &float_value)))
    +            if (!NSK_JVMTI_VERIFY(
    +                    jvmti->GetLocalFloat(thread, 1, local_variable_table[i].slot, &float_value)))
                     return NSK_FALSE;
     
                 NSK_DISPLAY0("Checking positive: SetLocalFloat\n");
    -            if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(SetLocalFloat, jvmti,
    -                    thread, 1, local_variable_table[i].slot, float_value)))
    +            if (!NSK_JVMTI_VERIFY(
    +                    jvmti->SetLocalFloat(thread, 1, local_variable_table[i].slot, float_value)))
                     return NSK_FALSE;
             } else if (strcmp(local_variable_table[i].name, "d") ==0) {
                 NSK_DISPLAY0("Checking positive: GetLocalDouble\n");
    -            if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(GetLocalDouble, jvmti,
    -                    thread, 1, local_variable_table[i].slot, &double_value)))
    +            if (!NSK_JVMTI_VERIFY(
    +                    jvmti->GetLocalDouble(thread, 1, local_variable_table[i].slot, &double_value)))
                     return NSK_FALSE;
     
                 NSK_DISPLAY0("Checking positive: SetLocalDouble\n");
    -            if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(SetLocalDouble, jvmti,
    -                    thread, 1, local_variable_table[i].slot, double_value)))
    +            if (!NSK_JVMTI_VERIFY(
    +                    jvmti->SetLocalDouble(thread, 1, local_variable_table[i].slot, double_value)))
                     return NSK_FALSE;
             }
         }
     
     /* DEBUG -- while thread should be suspended
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(ResumeThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->ResumeThread(thread)))
             return NSK_FALSE;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RelinquishCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->RelinquishCapabilities(&caps)))
             return JNI_ERR;
     */
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(Deallocate, jvmti,
    -            (unsigned char*)local_variable_table)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)local_variable_table)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -424,18 +410,17 @@ static int checkSourceInfoFunctions() {
     
         NSK_DISPLAY0("Checking negative: GetSourceFileName\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetSourceFileName, jvmti, klass, &name)))
    +            jvmti->GetSourceFileName(klass, &name)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetSourceDebugExtension\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetSourceDebugExtension, jvmti, klass, &name)))
    +            jvmti->GetSourceDebugExtension(klass, &name)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLineNumberTable\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetLineNumberTable, jvmti, method, &count,
    -                &line_number_table)))
    +            jvmti->GetLineNumberTable(method, &count, &line_number_table)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -451,7 +436,7 @@ static int checkRedefineClasses() {
         class_def.class_byte_count = 0;
         class_def.class_bytes = NULL;
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(RedefineClasses, jvmti, 1, &class_def)))
    +            jvmti->RedefineClasses(1, &class_def)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -464,7 +449,7 @@ static int checkGetObjectMonitorUsage() {
     
         NSK_DISPLAY0("Checking negative: GetObjectMonitorUsage\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetObjectMonitorUsage, jvmti, thread, &monitor_info)))
    +            jvmti->GetObjectMonitorUsage(thread, &monitor_info)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -477,12 +462,12 @@ static int checkIsSyntheticFunctions() {
     
         NSK_DISPLAY0("Checking negative: IsFieldSynthetic\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(IsFieldSynthetic, jvmti, klass, field, &is_synthetic)))
    +            jvmti->IsFieldSynthetic(klass, field, &is_synthetic)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IsMethodSynthetic\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(IsMethodSynthetic, jvmti, method, &is_synthetic)))
    +            jvmti->IsMethodSynthetic(method, &is_synthetic)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -496,7 +481,7 @@ static int checkGetBytecodes() {
     
         NSK_DISPLAY0("Checking negative: GetBytecodes\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetBytecodes, jvmti, method, &count, &bytecodes)))
    +            jvmti->GetBytecodes(method, &count, &bytecodes)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -510,12 +495,12 @@ static int checkGetCurrentThreadCpuTime() {
     
         NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTimerInfo\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(GetCurrentThreadCpuTimerInfo, jvmti, &info)))
    +            jvmti->GetCurrentThreadCpuTimerInfo(&info)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTime\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(GetCurrentThreadCpuTime, jvmti, &nanos)))
    +            jvmti->GetCurrentThreadCpuTime(&nanos)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -529,12 +514,12 @@ static int checkGetThreadCpuTime() {
     
         NSK_DISPLAY0("Checking negative: GetThreadCpuTimerInfo\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(GetThreadCpuTimerInfo, jvmti, &info)))
    +            jvmti->GetThreadCpuTimerInfo(&info)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetThreadCpuTime\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetThreadCpuTime, jvmti, thread, &nanos)))
    +            jvmti->GetThreadCpuTime(thread, &nanos)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -630,7 +615,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
     
         /* testcase #1: check GetPotentialCapabilities */
         NSK_DISPLAY0("Testcase #1: check if GetPotentialCapabilities returns the capability\n");
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPotentialCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetPotentialCapabilities(&caps)))
             return JNI_ERR;
         if (!caps.CAPABILITY) {
             NSK_COMPLAIN1("GetPotentialCapabilities does not return \"%s\" capability\n",
    @@ -642,13 +627,13 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         NSK_DISPLAY0("Testcase #2: add the capability during Onload phase\n");
         memset(&caps, 0, sizeof(caps));
         caps.CAPABILITY = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
             return JNI_ERR;
     
         /* testcase #3: check if GetCapabilities returns the capability */
         NSK_DISPLAY0("Testcase #3: check if GetCapabilities returns the capability\n");
         memset(&caps, 0, sizeof(caps));
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
             return JNI_ERR;
         if (!caps.CAPABILITY) {
             NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
    @@ -660,13 +645,13 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         NSK_DISPLAY0("Testcase #4: relinquish the capability during Onload phase\n");
         memset(&caps, 0, sizeof(caps));
         caps.CAPABILITY = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RelinquishCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->RelinquishCapabilities(&caps)))
             return JNI_ERR;
     
         /* testcase #5: check if GetCapabilities does not return the capability */
         NSK_DISPLAY0("Testcase #5: check if GetCapabilities does not return the capability\n");
         memset(&caps, 0, sizeof(caps));
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
             return JNI_ERR;
         if (caps.CAPABILITY) {
             NSK_COMPLAIN1("GetCapabilities returns relinquished \"%s\" capability\n",
    @@ -678,10 +663,10 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         NSK_DISPLAY0("Testcase #6: add back the capability and check with GetCapabilities\n");
         memset(&caps, 0, sizeof(caps));
         caps.CAPABILITY = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
             return JNI_ERR;
         memset(&caps, 0, sizeof(caps));
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
             return JNI_ERR;
         if (!caps.CAPABILITY) {
             NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
    diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t012/cm01t012.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t012/cm01t012.cpp
    index 762d25ce0ab..68b6461161c 100644
    --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t012/cm01t012.cpp
    +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t012/cm01t012.cpp
    @@ -76,8 +76,7 @@ static int prepare() {
         NSK_DISPLAY0("Prepare: find tested thread\n");
     
         /* get all live threads */
    -    if (!NSK_JVMTI_VERIFY(
    -           NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads)))
             return NSK_FALSE;
     
         if (!NSK_VERIFY(threads_count > 0 && threads != NULL))
    @@ -89,8 +88,7 @@ static int prepare() {
                 return NSK_FALSE;
     
             /* get thread information */
    -        if (!NSK_JVMTI_VERIFY(
    -                NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info)))
    +        if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info)))
                 return NSK_FALSE;
     
             NSK_DISPLAY3("    thread #%d (%s): %p\n", i, info.name, threads[i]);
    @@ -102,24 +100,20 @@ static int prepare() {
         }
     
         /* deallocate threads list */
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads)))
             return NSK_FALSE;
     
         /* get tested thread class */
    -    if (!NSK_JNI_VERIFY(jni, (klass =
    -            NSK_CPP_STUB2(GetObjectClass, jni, thread)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (klass = jni->GetObjectClass(thread)) != NULL))
             return NSK_FALSE;
     
         /* get tested thread method 'run' */
    -    if (!NSK_JNI_VERIFY(jni, (method =
    -            NSK_CPP_STUB4(GetMethodID, jni, klass, "run", "()V")) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (method = jni->GetMethodID(klass, "run", "()V")) != NULL))
             return NSK_FALSE;
     
         /* get tested thread field 'waitingMonitor' */
         if (!NSK_JNI_VERIFY(jni, (field =
    -            NSK_CPP_STUB4(GetFieldID, jni, klass,
    -                "waitingMonitor", "Ljava/lang/Object;")) != NULL))
    +            jni->GetFieldID(klass, "waitingMonitor", "Ljava/lang/Object;")) != NULL))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -133,21 +127,19 @@ static int checkSuspend() {
         jvmtiError err;
     
         NSK_DISPLAY0("Checking positive: SuspendThread\n");
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(SuspendThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->SuspendThread(thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking positive: ResumeThread\n");
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(ResumeThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->ResumeThread(thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking positive: SuspendThreadList\n");
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB4(SuspendThreadList, jvmti, 1, &thread, &err)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->SuspendThreadList(1, &thread, &err)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking positive: ResumeThreadList\n");
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB4(ResumeThreadList, jvmti, 1, &thread, &err)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->ResumeThreadList(1, &thread, &err)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -163,27 +155,23 @@ static int checkSignalThread() {
         jmethodID ctor = NULL;
         jobject exception = NULL;
     
    -    if (!NSK_JNI_VERIFY(jni, (cls =
    -            NSK_CPP_STUB2(FindClass, jni, THREAD_DEATH_CLASS_NAME)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (cls = jni->FindClass(THREAD_DEATH_CLASS_NAME)) != NULL))
             return NSK_FALSE;
     
         if (!NSK_JNI_VERIFY(jni, (ctor =
    -            NSK_CPP_STUB4(GetMethodID, jni, cls,
    -                THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
    +            jni->GetMethodID(cls, THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
             return NSK_FALSE;
     
    -    if (!NSK_JNI_VERIFY(jni, (exception =
    -            NSK_CPP_STUB3(NewObject, jni, cls, ctor)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (exception = jni->NewObject(cls, ctor)) != NULL))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: StopThread\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(StopThread, jvmti, thread, exception)))
    +            jvmti->StopThread(thread, exception)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: InterruptThread\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(InterruptThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->InterruptThread(thread)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -197,7 +185,7 @@ static int checkGetOwnedMonitorInfo() {
     
         NSK_DISPLAY0("Checking negative: GetOwnedMonitorInfo\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetOwnedMonitorInfo, jvmti, thread, &count, &monitors)))
    +            jvmti->GetOwnedMonitorInfo(thread, &count, &monitors)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -210,7 +198,7 @@ static int checkGetCurrentContendedMonitor() {
     
         NSK_DISPLAY0("Checking negative: GetCurrentContendedMonitor\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetCurrentContendedMonitor, jvmti, thread, &monitor)))
    +            jvmti->GetCurrentContendedMonitor(thread, &monitor)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -220,8 +208,7 @@ static int checkGetCurrentContendedMonitor() {
      */
     static int checkPopFrame() {
         NSK_DISPLAY0("Checking negative: PopFrame\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(PopFrame, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->PopFrame(thread)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -265,43 +252,45 @@ static int checkHeapFunctions() {
     
         NSK_DISPLAY0("Checking negative: SetTag\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(SetTag, jvmti, thread, TAG_VALUE)))
    +            jvmti->SetTag(thread, TAG_VALUE)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetTag\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetTag, jvmti, thread, &tag)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->GetTag(thread, &tag)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetObjectsWithTags\n");
         tag = TAG_VALUE;
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB6(GetObjectsWithTags, jvmti, 1, &tag,
    -                &count, &res_objects, &res_tags)))
    +            jvmti->GetObjectsWithTags(1, &tag, &count, &res_objects, &res_tags)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverHeap\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(IterateOverHeap, jvmti, JVMTI_HEAP_OBJECT_TAGGED,
    -                HeapObject, &dummy_user_data)))
    +            jvmti->IterateOverHeap(JVMTI_HEAP_OBJECT_TAGGED, HeapObject, &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverInstancesOfClass\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(IterateOverInstancesOfClass, jvmti, klass,
    -                JVMTI_HEAP_OBJECT_UNTAGGED, HeapObject, &dummy_user_data)))
    +            jvmti->IterateOverInstancesOfClass(klass,
    +                                               JVMTI_HEAP_OBJECT_UNTAGGED,
    +                                               HeapObject,
    +                                               &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverObjectsReachableFromObject\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(IterateOverObjectsReachableFromObject, jvmti, thread,
    -                ObjectReference, &dummy_user_data)))
    +            jvmti->IterateOverObjectsReachableFromObject(thread,
    +                                                         ObjectReference,
    +                                                         &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverReachableObjects\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(IterateOverReachableObjects, jvmti,
    -                HeapRoot, StackReference, ObjectReference, &dummy_user_data)))
    +            jvmti->IterateOverReachableObjects(HeapRoot,
    +                                               StackReference,
    +                                               ObjectReference,
    +                                               &dummy_user_data)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -320,58 +309,57 @@ static int checkLocalVariableFunctions() {
     
         NSK_DISPLAY0("Checking negative: GetLocalVariableTable\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetLocalVariableTable, jvmti, method, &count,
    -                &local_variable_table)))
    +            jvmti->GetLocalVariableTable(method, &count, &local_variable_table)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalObject\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalObject, jvmti, thread, 0, 0, &object_value)))
    +            jvmti->GetLocalObject(thread, 0, 0, &object_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalInt\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalInt, jvmti, thread, 0, 0, &int_value)))
    +            jvmti->GetLocalInt(thread, 0, 0, &int_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalLong\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalLong, jvmti, thread, 0, 0, &long_value)))
    +            jvmti->GetLocalLong(thread, 0, 0, &long_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalFloat\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalFloat, jvmti, thread, 0, 0, &float_value)))
    +            jvmti->GetLocalFloat(thread, 0, 0, &float_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalDouble\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalDouble, jvmti, thread, 0, 0, &double_value)))
    +            jvmti->GetLocalDouble(thread, 0, 0, &double_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalObject\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalObject, jvmti, thread, 0, 0, thread)))
    +            jvmti->SetLocalObject(thread, 0, 0, thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalInt\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalInt, jvmti, thread, 0, 0, (jint)0)))
    +            jvmti->SetLocalInt(thread, 0, 0, (jint)0)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalLong\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalLong, jvmti, thread, 0, 0, (jlong)0)))
    +            jvmti->SetLocalLong(thread, 0, 0, (jlong)0)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalFloat\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalFloat, jvmti, thread, 0, 0, (jfloat)0.0)))
    +            jvmti->SetLocalFloat(thread, 0, 0, (jfloat)0.0)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalDouble\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalDouble, jvmti, thread, 0, 0, (jdouble)0.0)))
    +            jvmti->SetLocalDouble(thread, 0, 0, (jdouble)0.0)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -386,18 +374,17 @@ static int checkSourceInfoFunctions() {
     
         NSK_DISPLAY0("Checking negative: GetSourceFileName\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetSourceFileName, jvmti, klass, &name)))
    +            jvmti->GetSourceFileName(klass, &name)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetSourceDebugExtension\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetSourceDebugExtension, jvmti, klass, &name)))
    +            jvmti->GetSourceDebugExtension(klass, &name)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLineNumberTable\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetLineNumberTable, jvmti, method, &count,
    -                &line_number_table)))
    +            jvmti->GetLineNumberTable(method, &count, &line_number_table)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -413,7 +400,7 @@ static int checkRedefineClasses() {
         class_def.class_byte_count = 0;
         class_def.class_bytes = NULL;
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(RedefineClasses, jvmti, 1, &class_def)))
    +            jvmti->RedefineClasses(1, &class_def)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -426,7 +413,7 @@ static int checkGetObjectMonitorUsage() {
     
         NSK_DISPLAY0("Checking negative: GetObjectMonitorUsage\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetObjectMonitorUsage, jvmti, thread, &monitor_info)))
    +            jvmti->GetObjectMonitorUsage(thread, &monitor_info)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -439,12 +426,12 @@ static int checkIsSyntheticFunctions() {
     
         NSK_DISPLAY0("Checking negative: IsFieldSynthetic\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(IsFieldSynthetic, jvmti, klass, field, &is_synthetic)))
    +            jvmti->IsFieldSynthetic(klass, field, &is_synthetic)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IsMethodSynthetic\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(IsMethodSynthetic, jvmti, method, &is_synthetic)))
    +            jvmti->IsMethodSynthetic(method, &is_synthetic)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -458,7 +445,7 @@ static int checkGetBytecodes() {
     
         NSK_DISPLAY0("Checking negative: GetBytecodes\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetBytecodes, jvmti, method, &count, &bytecodes)))
    +            jvmti->GetBytecodes(method, &count, &bytecodes)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -472,12 +459,12 @@ static int checkGetCurrentThreadCpuTime() {
     
         NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTimerInfo\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(GetCurrentThreadCpuTimerInfo, jvmti, &info)))
    +            jvmti->GetCurrentThreadCpuTimerInfo(&info)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTime\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(GetCurrentThreadCpuTime, jvmti, &nanos)))
    +            jvmti->GetCurrentThreadCpuTime(&nanos)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -491,12 +478,12 @@ static int checkGetThreadCpuTime() {
     
         NSK_DISPLAY0("Checking negative: GetThreadCpuTimerInfo\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(GetThreadCpuTimerInfo, jvmti, &info)))
    +            jvmti->GetThreadCpuTimerInfo(&info)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetThreadCpuTime\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetThreadCpuTime, jvmti, thread, &nanos)))
    +            jvmti->GetThreadCpuTime(thread, &nanos)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -592,7 +579,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
     
         /* testcase #1: check GetPotentialCapabilities */
         NSK_DISPLAY0("Testcase #1: check if GetPotentialCapabilities returns the capability\n");
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPotentialCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetPotentialCapabilities(&caps)))
             return JNI_ERR;
         if (!caps.CAPABILITY) {
             NSK_COMPLAIN1("GetPotentialCapabilities does not return \"%s\" capability\n",
    @@ -604,13 +591,13 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         NSK_DISPLAY0("Testcase #2: add the capability during Onload phase\n");
         memset(&caps, 0, sizeof(caps));
         caps.CAPABILITY = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
             return JNI_ERR;
     
         /* testcase #3: check if GetCapabilities returns the capability */
         NSK_DISPLAY0("Testcase #3: check if GetCapabilities returns the capability\n");
         memset(&caps, 0, sizeof(caps));
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
             return JNI_ERR;
         if (!caps.CAPABILITY) {
             NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
    @@ -622,13 +609,13 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         NSK_DISPLAY0("Testcase #4: relinquish the capability during Onload phase\n");
         memset(&caps, 0, sizeof(caps));
         caps.CAPABILITY = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RelinquishCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->RelinquishCapabilities(&caps)))
             return JNI_ERR;
     
         /* testcase #5: check if GetCapabilities does not return the capability */
         NSK_DISPLAY0("Testcase #5: check if GetCapabilities does not return the capability\n");
         memset(&caps, 0, sizeof(caps));
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
             return JNI_ERR;
         if (caps.CAPABILITY) {
             NSK_COMPLAIN1("GetCapabilities returns relinquished \"%s\" capability\n",
    @@ -640,10 +627,10 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         NSK_DISPLAY0("Testcase #6: add back the capability and check with GetCapabilities\n");
         memset(&caps, 0, sizeof(caps));
         caps.CAPABILITY = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
             return JNI_ERR;
         memset(&caps, 0, sizeof(caps));
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
             return JNI_ERR;
         if (!caps.CAPABILITY) {
             NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
    diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t013/cm01t013.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t013/cm01t013.cpp
    index b39c724aed6..b6ce11d590e 100644
    --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t013/cm01t013.cpp
    +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t013/cm01t013.cpp
    @@ -73,8 +73,7 @@ static int prepare() {
         NSK_DISPLAY0("Prepare: find tested thread\n");
     
         /* get all live threads */
    -    if (!NSK_JVMTI_VERIFY(
    -           NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads)))
             return NSK_FALSE;
     
         if (!NSK_VERIFY(threads_count > 0 && threads != NULL))
    @@ -86,8 +85,7 @@ static int prepare() {
                 return NSK_FALSE;
     
             /* get thread information */
    -        if (!NSK_JVMTI_VERIFY(
    -                NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info)))
    +        if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info)))
                 return NSK_FALSE;
     
             NSK_DISPLAY3("    thread #%d (%s): %p\n", i, info.name, threads[i]);
    @@ -99,24 +97,20 @@ static int prepare() {
         }
     
         /* deallocate threads list */
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads)))
             return NSK_FALSE;
     
         /* get tested thread class */
    -    if (!NSK_JNI_VERIFY(jni, (klass =
    -            NSK_CPP_STUB2(GetObjectClass, jni, thread)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (klass = jni->GetObjectClass(thread)) != NULL))
             return NSK_FALSE;
     
         /* get tested thread method 'run' */
    -    if (!NSK_JNI_VERIFY(jni, (method =
    -            NSK_CPP_STUB4(GetMethodID, jni, klass, "run", "()V")) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (method = jni->GetMethodID(klass, "run", "()V")) != NULL))
             return NSK_FALSE;
     
         /* get tested thread field 'waitingMonitor' */
         if (!NSK_JNI_VERIFY(jni, (field =
    -            NSK_CPP_STUB4(GetFieldID, jni, klass,
    -                "waitingMonitor", "Ljava/lang/Object;")) != NULL))
    +            jni->GetFieldID(klass, "waitingMonitor", "Ljava/lang/Object;")) != NULL))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -130,23 +124,21 @@ static int checkSuspend() {
         jvmtiError err;
     
         NSK_DISPLAY0("Checking negative: SuspendThread\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(SuspendThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->SuspendThread(thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: ResumeThread\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(ResumeThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->ResumeThread(thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SuspendThreadList\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(SuspendThreadList, jvmti, 1, &thread, &err)))
    +            jvmti->SuspendThreadList(1, &thread, &err)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: ResumeThreadList\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(ResumeThreadList, jvmti, 1, &thread, &err)))
    +            jvmti->ResumeThreadList(1, &thread, &err)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -162,27 +154,23 @@ static int checkSignalThread() {
         jmethodID ctor = NULL;
         jobject exception = NULL;
     
    -    if (!NSK_JNI_VERIFY(jni, (cls =
    -            NSK_CPP_STUB2(FindClass, jni, THREAD_DEATH_CLASS_NAME)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (cls = jni->FindClass(THREAD_DEATH_CLASS_NAME)) != NULL))
             return NSK_FALSE;
     
         if (!NSK_JNI_VERIFY(jni, (ctor =
    -            NSK_CPP_STUB4(GetMethodID, jni, cls,
    -                THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
    +            jni->GetMethodID(cls, THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
             return NSK_FALSE;
     
    -    if (!NSK_JNI_VERIFY(jni, (exception =
    -            NSK_CPP_STUB3(NewObject, jni, cls, ctor)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (exception = jni->NewObject(cls, ctor)) != NULL))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: StopThread\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(StopThread, jvmti, thread, exception)))
    +            jvmti->StopThread(thread, exception)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: InterruptThread\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(InterruptThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->InterruptThread(thread)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -196,7 +184,7 @@ static int checkGetOwnedMonitorInfo() {
     
         NSK_DISPLAY0("Checking negative: GetOwnedMonitorInfo\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetOwnedMonitorInfo, jvmti, thread, &count, &monitors)))
    +            jvmti->GetOwnedMonitorInfo(thread, &count, &monitors)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -209,7 +197,7 @@ static int checkGetCurrentContendedMonitor() {
     
         NSK_DISPLAY0("Checking negative: GetCurrentContendedMonitor\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetCurrentContendedMonitor, jvmti, thread, &monitor)))
    +            jvmti->GetCurrentContendedMonitor(thread, &monitor)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -219,8 +207,7 @@ static int checkGetCurrentContendedMonitor() {
      */
     static int checkPopFrame() {
         NSK_DISPLAY0("Checking negative: PopFrame\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(PopFrame, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->PopFrame(thread)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -264,43 +251,45 @@ static int checkHeapFunctions() {
     
         NSK_DISPLAY0("Checking negative: SetTag\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(SetTag, jvmti, thread, TAG_VALUE)))
    +            jvmti->SetTag(thread, TAG_VALUE)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetTag\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetTag, jvmti, thread, &tag)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->GetTag(thread, &tag)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetObjectsWithTags\n");
         tag = TAG_VALUE;
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB6(GetObjectsWithTags, jvmti, 1, &tag,
    -                &count, &res_objects, &res_tags)))
    +            jvmti->GetObjectsWithTags(1, &tag, &count, &res_objects, &res_tags)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverHeap\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(IterateOverHeap, jvmti, JVMTI_HEAP_OBJECT_TAGGED,
    -                HeapObject, &dummy_user_data)))
    +            jvmti->IterateOverHeap(JVMTI_HEAP_OBJECT_TAGGED, HeapObject, &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverInstancesOfClass\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(IterateOverInstancesOfClass, jvmti, klass,
    -                JVMTI_HEAP_OBJECT_UNTAGGED, HeapObject, &dummy_user_data)))
    +            jvmti->IterateOverInstancesOfClass(klass,
    +                                               JVMTI_HEAP_OBJECT_UNTAGGED,
    +                                               HeapObject,
    +                                               &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverObjectsReachableFromObject\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(IterateOverObjectsReachableFromObject, jvmti, thread,
    -                ObjectReference, &dummy_user_data)))
    +            jvmti->IterateOverObjectsReachableFromObject(thread,
    +                                                         ObjectReference,
    +                                                         &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverReachableObjects\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(IterateOverReachableObjects, jvmti,
    -                HeapRoot, StackReference, ObjectReference, &dummy_user_data)))
    +            jvmti->IterateOverReachableObjects(HeapRoot,
    +                                               StackReference,
    +                                               ObjectReference,
    +                                               &dummy_user_data)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -319,58 +308,57 @@ static int checkLocalVariableFunctions() {
     
         NSK_DISPLAY0("Checking negative: GetLocalVariableTable\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetLocalVariableTable, jvmti, method, &count,
    -                &local_variable_table)))
    +            jvmti->GetLocalVariableTable(method, &count, &local_variable_table)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalObject\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalObject, jvmti, thread, 0, 0, &object_value)))
    +            jvmti->GetLocalObject(thread, 0, 0, &object_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalInt\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalInt, jvmti, thread, 0, 0, &int_value)))
    +            jvmti->GetLocalInt(thread, 0, 0, &int_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalLong\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalLong, jvmti, thread, 0, 0, &long_value)))
    +            jvmti->GetLocalLong(thread, 0, 0, &long_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalFloat\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalFloat, jvmti, thread, 0, 0, &float_value)))
    +            jvmti->GetLocalFloat(thread, 0, 0, &float_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalDouble\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalDouble, jvmti, thread, 0, 0, &double_value)))
    +            jvmti->GetLocalDouble(thread, 0, 0, &double_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalObject\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalObject, jvmti, thread, 0, 0, thread)))
    +            jvmti->SetLocalObject(thread, 0, 0, thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalInt\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalInt, jvmti, thread, 0, 0, (jint)0)))
    +            jvmti->SetLocalInt(thread, 0, 0, (jint)0)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalLong\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalLong, jvmti, thread, 0, 0, (jlong)0)))
    +            jvmti->SetLocalLong(thread, 0, 0, (jlong)0)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalFloat\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalFloat, jvmti, thread, 0, 0, (jfloat)0.0)))
    +            jvmti->SetLocalFloat(thread, 0, 0, (jfloat)0.0)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalDouble\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalDouble, jvmti, thread, 0, 0, (jdouble)0.0)))
    +            jvmti->SetLocalDouble(thread, 0, 0, (jdouble)0.0)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -385,18 +373,16 @@ static int checkSourceInfoFunctions() {
     
         NSK_DISPLAY0("Checking negative: GetSourceFileName\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetSourceFileName, jvmti, klass, &name)))
    +            jvmti->GetSourceFileName(klass, &name)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetSourceDebugExtension\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetSourceDebugExtension, jvmti, klass, &name)))
    +            jvmti->GetSourceDebugExtension(klass, &name)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking positive: GetLineNumberTable\n");
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB4(GetLineNumberTable, jvmti, method, &count,
    -                &line_number_table)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetLineNumberTable(method, &count, &line_number_table)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -412,7 +398,7 @@ static int checkRedefineClasses() {
         class_def.class_byte_count = 0;
         class_def.class_bytes = NULL;
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(RedefineClasses, jvmti, 1, &class_def)))
    +            jvmti->RedefineClasses(1, &class_def)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -425,7 +411,7 @@ static int checkGetObjectMonitorUsage() {
     
         NSK_DISPLAY0("Checking negative: GetObjectMonitorUsage\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetObjectMonitorUsage, jvmti, thread, &monitor_info)))
    +            jvmti->GetObjectMonitorUsage(thread, &monitor_info)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -438,12 +424,12 @@ static int checkIsSyntheticFunctions() {
     
         NSK_DISPLAY0("Checking negative: IsFieldSynthetic\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(IsFieldSynthetic, jvmti, klass, field, &is_synthetic)))
    +            jvmti->IsFieldSynthetic(klass, field, &is_synthetic)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IsMethodSynthetic\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(IsMethodSynthetic, jvmti, method, &is_synthetic)))
    +            jvmti->IsMethodSynthetic(method, &is_synthetic)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -457,7 +443,7 @@ static int checkGetBytecodes() {
     
         NSK_DISPLAY0("Checking negative: GetBytecodes\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetBytecodes, jvmti, method, &count, &bytecodes)))
    +            jvmti->GetBytecodes(method, &count, &bytecodes)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -471,12 +457,12 @@ static int checkGetCurrentThreadCpuTime() {
     
         NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTimerInfo\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(GetCurrentThreadCpuTimerInfo, jvmti, &info)))
    +            jvmti->GetCurrentThreadCpuTimerInfo(&info)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTime\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(GetCurrentThreadCpuTime, jvmti, &nanos)))
    +            jvmti->GetCurrentThreadCpuTime(&nanos)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -490,12 +476,12 @@ static int checkGetThreadCpuTime() {
     
         NSK_DISPLAY0("Checking negative: GetThreadCpuTimerInfo\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(GetThreadCpuTimerInfo, jvmti, &info)))
    +            jvmti->GetThreadCpuTimerInfo(&info)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetThreadCpuTime\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetThreadCpuTime, jvmti, thread, &nanos)))
    +            jvmti->GetThreadCpuTime(thread, &nanos)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -591,7 +577,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
     
         /* testcase #1: check GetPotentialCapabilities */
         NSK_DISPLAY0("Testcase #1: check if GetPotentialCapabilities returns the capability\n");
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPotentialCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetPotentialCapabilities(&caps)))
             return JNI_ERR;
         if (!caps.CAPABILITY) {
             NSK_COMPLAIN1("GetPotentialCapabilities does not return \"%s\" capability\n",
    @@ -603,13 +589,13 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         NSK_DISPLAY0("Testcase #2: add the capability during Onload phase\n");
         memset(&caps, 0, sizeof(caps));
         caps.CAPABILITY = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
             return JNI_ERR;
     
         /* testcase #3: check if GetCapabilities returns the capability */
         NSK_DISPLAY0("Testcase #3: check if GetCapabilities returns the capability\n");
         memset(&caps, 0, sizeof(caps));
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
             return JNI_ERR;
         if (!caps.CAPABILITY) {
             NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
    @@ -621,13 +607,13 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         NSK_DISPLAY0("Testcase #4: relinquish the capability during Onload phase\n");
         memset(&caps, 0, sizeof(caps));
         caps.CAPABILITY = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RelinquishCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->RelinquishCapabilities(&caps)))
             return JNI_ERR;
     
         /* testcase #5: check if GetCapabilities does not return the capability */
         NSK_DISPLAY0("Testcase #5: check if GetCapabilities does not return the capability\n");
         memset(&caps, 0, sizeof(caps));
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
             return JNI_ERR;
         if (caps.CAPABILITY) {
             NSK_COMPLAIN1("GetCapabilities returns relinquished \"%s\" capability\n",
    @@ -639,10 +625,10 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         NSK_DISPLAY0("Testcase #6: add back the capability and check with GetCapabilities\n");
         memset(&caps, 0, sizeof(caps));
         caps.CAPABILITY = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
             return JNI_ERR;
         memset(&caps, 0, sizeof(caps));
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
             return JNI_ERR;
         if (!caps.CAPABILITY) {
             NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
    diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t014/cm01t014.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t014/cm01t014.cpp
    index 7a4930959fc..58d80995614 100644
    --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t014/cm01t014.cpp
    +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t014/cm01t014.cpp
    @@ -74,8 +74,7 @@ static int prepare() {
         NSK_DISPLAY0("Prepare: find tested thread\n");
     
         /* get all live threads */
    -    if (!NSK_JVMTI_VERIFY(
    -           NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads)))
             return NSK_FALSE;
     
         if (!NSK_VERIFY(threads_count > 0 && threads != NULL))
    @@ -87,8 +86,7 @@ static int prepare() {
                 return NSK_FALSE;
     
             /* get thread information */
    -        if (!NSK_JVMTI_VERIFY(
    -                NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info)))
    +        if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info)))
                 return NSK_FALSE;
     
             NSK_DISPLAY3("    thread #%d (%s): %p\n", i, info.name, threads[i]);
    @@ -100,24 +98,20 @@ static int prepare() {
         }
     
         /* deallocate threads list */
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads)))
             return NSK_FALSE;
     
         /* get tested thread class */
    -    if (!NSK_JNI_VERIFY(jni, (klass =
    -            NSK_CPP_STUB2(GetObjectClass, jni, thread)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (klass = jni->GetObjectClass(thread)) != NULL))
             return NSK_FALSE;
     
         /* get tested thread method 'run' */
    -    if (!NSK_JNI_VERIFY(jni, (method =
    -            NSK_CPP_STUB4(GetMethodID, jni, klass, "run", "()V")) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (method = jni->GetMethodID(klass, "run", "()V")) != NULL))
             return NSK_FALSE;
     
         /* get tested thread field 'waitingMonitor' */
         if (!NSK_JNI_VERIFY(jni, (field =
    -            NSK_CPP_STUB4(GetFieldID, jni, klass,
    -                "waitingMonitor", "Ljava/lang/Object;")) != NULL))
    +            jni->GetFieldID(klass, "waitingMonitor", "Ljava/lang/Object;")) != NULL))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -130,7 +124,7 @@ static int prepare() {
     static int checkGetPotentialCapabilities() {
         jvmtiCapabilities caps;
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPotentialCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetPotentialCapabilities(&caps)))
             return NSK_FALSE;
         if (!caps.CAPABILITY) {
             NSK_COMPLAIN1("GetPotentialCapabilities does not return \"%s\" capability\n",
    @@ -148,7 +142,7 @@ static int checkAddCapabilities() {
     
         memset(&caps, 0, sizeof(caps));
         caps.CAPABILITY = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -160,7 +154,7 @@ static int checkGetCapabilities(int owe) {
         jvmtiCapabilities caps;
     
         memset(&caps, 0, sizeof(caps));
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
             return NSK_FALSE;
         if (owe && !caps.CAPABILITY) {
             NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
    @@ -182,7 +176,7 @@ static int checkRelinquishCapabilities() {
     
         memset(&caps, 0, sizeof(caps));
         caps.CAPABILITY = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RelinquishCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->RelinquishCapabilities(&caps)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -196,23 +190,21 @@ static int checkSuspend() {
         jvmtiError err;
     
         NSK_DISPLAY0("Checking negative: SuspendThread\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(SuspendThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->SuspendThread(thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: ResumeThread\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(ResumeThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->ResumeThread(thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SuspendThreadList\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(SuspendThreadList, jvmti, 1, &thread, &err)))
    +            jvmti->SuspendThreadList(1, &thread, &err)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: ResumeThreadList\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(ResumeThreadList, jvmti, 1, &thread, &err)))
    +            jvmti->ResumeThreadList(1, &thread, &err)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -228,27 +220,23 @@ static int checkSignalThread() {
         jmethodID ctor = NULL;
         jobject exception = NULL;
     
    -    if (!NSK_JNI_VERIFY(jni, (cls =
    -            NSK_CPP_STUB2(FindClass, jni, THREAD_DEATH_CLASS_NAME)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (cls = jni->FindClass(THREAD_DEATH_CLASS_NAME)) != NULL))
             return NSK_FALSE;
     
         if (!NSK_JNI_VERIFY(jni, (ctor =
    -            NSK_CPP_STUB4(GetMethodID, jni, cls,
    -                THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
    +            jni->GetMethodID(cls, THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
             return NSK_FALSE;
     
    -    if (!NSK_JNI_VERIFY(jni, (exception =
    -            NSK_CPP_STUB3(NewObject, jni, cls, ctor)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (exception = jni->NewObject(cls, ctor)) != NULL))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: StopThread\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(StopThread, jvmti, thread, exception)))
    +            jvmti->StopThread(thread, exception)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: InterruptThread\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(InterruptThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->InterruptThread(thread)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -262,7 +250,7 @@ static int checkGetOwnedMonitorInfo() {
     
         NSK_DISPLAY0("Checking negative: GetOwnedMonitorInfo\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetOwnedMonitorInfo, jvmti, thread, &count, &monitors)))
    +            jvmti->GetOwnedMonitorInfo(thread, &count, &monitors)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -275,7 +263,7 @@ static int checkGetCurrentContendedMonitor() {
     
         NSK_DISPLAY0("Checking negative: GetCurrentContendedMonitor\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetCurrentContendedMonitor, jvmti, thread, &monitor)))
    +            jvmti->GetCurrentContendedMonitor(thread, &monitor)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -285,8 +273,7 @@ static int checkGetCurrentContendedMonitor() {
      */
     static int checkPopFrame() {
         NSK_DISPLAY0("Checking negative: PopFrame\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(PopFrame, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->PopFrame(thread)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -330,43 +317,45 @@ static int checkHeapFunctions() {
     
         NSK_DISPLAY0("Checking negative: SetTag\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(SetTag, jvmti, thread, TAG_VALUE)))
    +            jvmti->SetTag(thread, TAG_VALUE)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetTag\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetTag, jvmti, thread, &tag)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->GetTag(thread, &tag)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetObjectsWithTags\n");
         tag = TAG_VALUE;
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB6(GetObjectsWithTags, jvmti, 1, &tag,
    -                &count, &res_objects, &res_tags)))
    +            jvmti->GetObjectsWithTags(1, &tag, &count, &res_objects, &res_tags)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverHeap\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(IterateOverHeap, jvmti, JVMTI_HEAP_OBJECT_TAGGED,
    -                HeapObject, &dummy_user_data)))
    +            jvmti->IterateOverHeap(JVMTI_HEAP_OBJECT_TAGGED, HeapObject, &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverInstancesOfClass\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(IterateOverInstancesOfClass, jvmti, klass,
    -                JVMTI_HEAP_OBJECT_UNTAGGED, HeapObject, &dummy_user_data)))
    +            jvmti->IterateOverInstancesOfClass(klass,
    +                                               JVMTI_HEAP_OBJECT_UNTAGGED,
    +                                               HeapObject,
    +                                               &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverObjectsReachableFromObject\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(IterateOverObjectsReachableFromObject, jvmti, thread,
    -                ObjectReference, &dummy_user_data)))
    +            jvmti->IterateOverObjectsReachableFromObject(thread,
    +                                                         ObjectReference,
    +                                                         &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverReachableObjects\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(IterateOverReachableObjects, jvmti,
    -                HeapRoot, StackReference, ObjectReference, &dummy_user_data)))
    +            jvmti->IterateOverReachableObjects(HeapRoot,
    +                                               StackReference,
    +                                               ObjectReference,
    +                                               &dummy_user_data)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -385,58 +374,57 @@ static int checkLocalVariableFunctions() {
     
         NSK_DISPLAY0("Checking negative: GetLocalVariableTable\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetLocalVariableTable, jvmti, method, &count,
    -                &local_variable_table)))
    +            jvmti->GetLocalVariableTable(method, &count, &local_variable_table)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalObject\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalObject, jvmti, thread, 0, 0, &object_value)))
    +            jvmti->GetLocalObject(thread, 0, 0, &object_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalInt\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalInt, jvmti, thread, 0, 0, &int_value)))
    +            jvmti->GetLocalInt(thread, 0, 0, &int_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalLong\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalLong, jvmti, thread, 0, 0, &long_value)))
    +            jvmti->GetLocalLong(thread, 0, 0, &long_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalFloat\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalFloat, jvmti, thread, 0, 0, &float_value)))
    +            jvmti->GetLocalFloat(thread, 0, 0, &float_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalDouble\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalDouble, jvmti, thread, 0, 0, &double_value)))
    +            jvmti->GetLocalDouble(thread, 0, 0, &double_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalObject\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalObject, jvmti, thread, 0, 0, thread)))
    +            jvmti->SetLocalObject(thread, 0, 0, thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalInt\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalInt, jvmti, thread, 0, 0, (jint)0)))
    +            jvmti->SetLocalInt(thread, 0, 0, (jint)0)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalLong\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalLong, jvmti, thread, 0, 0, (jlong)0)))
    +            jvmti->SetLocalLong(thread, 0, 0, (jlong)0)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalFloat\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalFloat, jvmti, thread, 0, 0, (jfloat)0.0)))
    +            jvmti->SetLocalFloat(thread, 0, 0, (jfloat)0.0)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalDouble\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalDouble, jvmti, thread, 0, 0, (jdouble)0.0)))
    +            jvmti->SetLocalDouble(thread, 0, 0, (jdouble)0.0)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -451,18 +439,17 @@ static int checkSourceInfoFunctions() {
     
         NSK_DISPLAY0("Checking negative: GetSourceFileName\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetSourceFileName, jvmti, klass, &name)))
    +            jvmti->GetSourceFileName(klass, &name)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetSourceDebugExtension\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetSourceDebugExtension, jvmti, klass, &name)))
    +            jvmti->GetSourceDebugExtension(klass, &name)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLineNumberTable\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetLineNumberTable, jvmti, method, &count,
    -                &line_number_table)))
    +            jvmti->GetLineNumberTable(method, &count, &line_number_table)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -478,7 +465,7 @@ static int checkRedefineClasses() {
         class_def.class_byte_count = 0;
         class_def.class_bytes = NULL;
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(RedefineClasses, jvmti, 1, &class_def)))
    +            jvmti->RedefineClasses(1, &class_def)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -491,7 +478,7 @@ static int checkGetObjectMonitorUsage() {
     
         NSK_DISPLAY0("Checking negative: GetObjectMonitorUsage\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetObjectMonitorUsage, jvmti, thread, &monitor_info)))
    +            jvmti->GetObjectMonitorUsage(thread, &monitor_info)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -504,12 +491,12 @@ static int checkIsSyntheticFunctions() {
     
         NSK_DISPLAY0("Checking negative: IsFieldSynthetic\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(IsFieldSynthetic, jvmti, klass, field, &is_synthetic)))
    +            jvmti->IsFieldSynthetic(klass, field, &is_synthetic)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IsMethodSynthetic\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(IsMethodSynthetic, jvmti, method, &is_synthetic)))
    +            jvmti->IsMethodSynthetic(method, &is_synthetic)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -523,15 +510,14 @@ static int checkGetBytecodes(int positive) {
     
         if (positive) {
             NSK_DISPLAY0("Checking positive: GetBytecodes\n");
    -        if (!NSK_JVMTI_VERIFY(
    -                NSK_CPP_STUB4(GetBytecodes, jvmti, method, &count, &bytecodes)))
    +        if (!NSK_JVMTI_VERIFY(jvmti->GetBytecodes(method, &count, &bytecodes)))
                 return NSK_FALSE;
    -        if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(Deallocate, jvmti, bytecodes)))
    +        if (!NSK_JVMTI_VERIFY(jvmti->Deallocate(bytecodes)))
                 return NSK_FALSE;
         } else {
             NSK_DISPLAY0("Checking negative: GetBytecodes\n");
             if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -                NSK_CPP_STUB4(GetBytecodes, jvmti, method, &count, &bytecodes)))
    +                jvmti->GetBytecodes(method, &count, &bytecodes)))
                 return NSK_FALSE;
         }
     
    @@ -546,12 +532,12 @@ static int checkGetCurrentThreadCpuTime() {
     
         NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTimerInfo\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(GetCurrentThreadCpuTimerInfo, jvmti, &info)))
    +            jvmti->GetCurrentThreadCpuTimerInfo(&info)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTime\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(GetCurrentThreadCpuTime, jvmti, &nanos)))
    +            jvmti->GetCurrentThreadCpuTime(&nanos)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -565,12 +551,12 @@ static int checkGetThreadCpuTime() {
     
         NSK_DISPLAY0("Checking negative: GetThreadCpuTimerInfo\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(GetThreadCpuTimerInfo, jvmti, &info)))
    +            jvmti->GetThreadCpuTimerInfo(&info)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetThreadCpuTime\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetThreadCpuTime, jvmti, thread, &nanos)))
    +            jvmti->GetThreadCpuTime(thread, &nanos)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t015/cm01t015.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t015/cm01t015.cpp
    index dbcecbf7360..4919c2874dc 100644
    --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t015/cm01t015.cpp
    +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t015/cm01t015.cpp
    @@ -76,8 +76,7 @@ static int prepare() {
         NSK_DISPLAY0("Prepare: find tested thread\n");
     
         /* get all live threads */
    -    if (!NSK_JVMTI_VERIFY(
    -           NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads)))
             return NSK_FALSE;
     
         if (!NSK_VERIFY(threads_count > 0 && threads != NULL))
    @@ -89,8 +88,7 @@ static int prepare() {
                 return NSK_FALSE;
     
             /* get thread information */
    -        if (!NSK_JVMTI_VERIFY(
    -                NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info)))
    +        if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info)))
                 return NSK_FALSE;
     
             NSK_DISPLAY3("    thread #%d (%s): %p\n", i, info.name, threads[i]);
    @@ -102,24 +100,20 @@ static int prepare() {
         }
     
         /* deallocate threads list */
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads)))
             return NSK_FALSE;
     
         /* get tested thread class */
    -    if (!NSK_JNI_VERIFY(jni, (klass =
    -            NSK_CPP_STUB2(GetObjectClass, jni, thread)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (klass = jni->GetObjectClass(thread)) != NULL))
             return NSK_FALSE;
     
         /* get tested thread method 'run' */
    -    if (!NSK_JNI_VERIFY(jni, (method =
    -            NSK_CPP_STUB4(GetMethodID, jni, klass, "run", "()V")) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (method = jni->GetMethodID(klass, "run", "()V")) != NULL))
             return NSK_FALSE;
     
         /* get tested thread field 'waitingMonitor' */
         if (!NSK_JNI_VERIFY(jni, (field =
    -            NSK_CPP_STUB4(GetFieldID, jni, klass,
    -                "waitingMonitor", "Ljava/lang/Object;")) != NULL))
    +            jni->GetFieldID(klass, "waitingMonitor", "Ljava/lang/Object;")) != NULL))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -132,7 +126,7 @@ static int prepare() {
     static int checkGetPotentialCapabilities() {
         jvmtiCapabilities caps;
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPotentialCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetPotentialCapabilities(&caps)))
             return NSK_FALSE;
         if (!caps.CAPABILITY) {
             NSK_COMPLAIN1("GetPotentialCapabilities does not return \"%s\" capability\n",
    @@ -150,7 +144,7 @@ static int checkAddCapabilities() {
     
         memset(&caps, 0, sizeof(caps));
         caps.CAPABILITY = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -162,7 +156,7 @@ static int checkGetCapabilities(int owe) {
         jvmtiCapabilities caps;
     
         memset(&caps, 0, sizeof(caps));
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
             return NSK_FALSE;
         if (owe && !caps.CAPABILITY) {
             NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
    @@ -184,7 +178,7 @@ static int checkRelinquishCapabilities() {
     
         memset(&caps, 0, sizeof(caps));
         caps.CAPABILITY = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RelinquishCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->RelinquishCapabilities(&caps)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -198,23 +192,21 @@ static int checkSuspend() {
         jvmtiError err;
     
         NSK_DISPLAY0("Checking negative: SuspendThread\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(SuspendThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->SuspendThread(thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: ResumeThread\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(ResumeThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->ResumeThread(thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SuspendThreadList\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(SuspendThreadList, jvmti, 1, &thread, &err)))
    +            jvmti->SuspendThreadList(1, &thread, &err)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: ResumeThreadList\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(ResumeThreadList, jvmti, 1, &thread, &err)))
    +            jvmti->ResumeThreadList(1, &thread, &err)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -230,27 +222,23 @@ static int checkSignalThread() {
         jmethodID ctor = NULL;
         jobject exception = NULL;
     
    -    if (!NSK_JNI_VERIFY(jni, (cls =
    -            NSK_CPP_STUB2(FindClass, jni, THREAD_DEATH_CLASS_NAME)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (cls = jni->FindClass(THREAD_DEATH_CLASS_NAME)) != NULL))
             return NSK_FALSE;
     
         if (!NSK_JNI_VERIFY(jni, (ctor =
    -            NSK_CPP_STUB4(GetMethodID, jni, cls,
    -                THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
    +            jni->GetMethodID(cls, THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
             return NSK_FALSE;
     
    -    if (!NSK_JNI_VERIFY(jni, (exception =
    -            NSK_CPP_STUB3(NewObject, jni, cls, ctor)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (exception = jni->NewObject(cls, ctor)) != NULL))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: StopThread\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(StopThread, jvmti, thread, exception)))
    +            jvmti->StopThread(thread, exception)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: InterruptThread\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(InterruptThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->InterruptThread(thread)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -264,7 +252,7 @@ static int checkGetOwnedMonitorInfo() {
     
         NSK_DISPLAY0("Checking negative: GetOwnedMonitorInfo\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetOwnedMonitorInfo, jvmti, thread, &count, &monitors)))
    +            jvmti->GetOwnedMonitorInfo(thread, &count, &monitors)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -277,7 +265,7 @@ static int checkGetCurrentContendedMonitor() {
     
         NSK_DISPLAY0("Checking negative: GetCurrentContendedMonitor\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetCurrentContendedMonitor, jvmti, thread, &monitor)))
    +            jvmti->GetCurrentContendedMonitor(thread, &monitor)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -287,8 +275,7 @@ static int checkGetCurrentContendedMonitor() {
      */
     static int checkPopFrame() {
         NSK_DISPLAY0("Checking negative: PopFrame\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(PopFrame, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->PopFrame(thread)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -332,43 +319,45 @@ static int checkHeapFunctions() {
     
         NSK_DISPLAY0("Checking negative: SetTag\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(SetTag, jvmti, thread, TAG_VALUE)))
    +            jvmti->SetTag(thread, TAG_VALUE)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetTag\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetTag, jvmti, thread, &tag)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->GetTag(thread, &tag)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetObjectsWithTags\n");
         tag = TAG_VALUE;
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB6(GetObjectsWithTags, jvmti, 1, &tag,
    -                &count, &res_objects, &res_tags)))
    +            jvmti->GetObjectsWithTags(1, &tag, &count, &res_objects, &res_tags)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverHeap\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(IterateOverHeap, jvmti, JVMTI_HEAP_OBJECT_TAGGED,
    -                HeapObject, &dummy_user_data)))
    +            jvmti->IterateOverHeap(JVMTI_HEAP_OBJECT_TAGGED, HeapObject, &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverInstancesOfClass\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(IterateOverInstancesOfClass, jvmti, klass,
    -                JVMTI_HEAP_OBJECT_UNTAGGED, HeapObject, &dummy_user_data)))
    +            jvmti->IterateOverInstancesOfClass(klass,
    +                                               JVMTI_HEAP_OBJECT_UNTAGGED,
    +                                               HeapObject,
    +                                               &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverObjectsReachableFromObject\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(IterateOverObjectsReachableFromObject, jvmti, thread,
    -                ObjectReference, &dummy_user_data)))
    +            jvmti->IterateOverObjectsReachableFromObject(thread,
    +                                                         ObjectReference,
    +                                                         &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverReachableObjects\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(IterateOverReachableObjects, jvmti,
    -                HeapRoot, StackReference, ObjectReference, &dummy_user_data)))
    +            jvmti->IterateOverReachableObjects(HeapRoot,
    +                                               StackReference,
    +                                               ObjectReference,
    +                                               &dummy_user_data)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -387,58 +376,57 @@ static int checkLocalVariableFunctions() {
     
         NSK_DISPLAY0("Checking negative: GetLocalVariableTable\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetLocalVariableTable, jvmti, method, &count,
    -                &local_variable_table)))
    +            jvmti->GetLocalVariableTable(method, &count, &local_variable_table)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalObject\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalObject, jvmti, thread, 0, 0, &object_value)))
    +            jvmti->GetLocalObject(thread, 0, 0, &object_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalInt\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalInt, jvmti, thread, 0, 0, &int_value)))
    +            jvmti->GetLocalInt(thread, 0, 0, &int_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalLong\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalLong, jvmti, thread, 0, 0, &long_value)))
    +            jvmti->GetLocalLong(thread, 0, 0, &long_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalFloat\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalFloat, jvmti, thread, 0, 0, &float_value)))
    +            jvmti->GetLocalFloat(thread, 0, 0, &float_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalDouble\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalDouble, jvmti, thread, 0, 0, &double_value)))
    +            jvmti->GetLocalDouble(thread, 0, 0, &double_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalObject\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalObject, jvmti, thread, 0, 0, thread)))
    +            jvmti->SetLocalObject(thread, 0, 0, thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalInt\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalInt, jvmti, thread, 0, 0, (jint)0)))
    +            jvmti->SetLocalInt(thread, 0, 0, (jint)0)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalLong\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalLong, jvmti, thread, 0, 0, (jlong)0)))
    +            jvmti->SetLocalLong(thread, 0, 0, (jlong)0)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalFloat\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalFloat, jvmti, thread, 0, 0, (jfloat)0.0)))
    +            jvmti->SetLocalFloat(thread, 0, 0, (jfloat)0.0)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalDouble\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalDouble, jvmti, thread, 0, 0, (jdouble)0.0)))
    +            jvmti->SetLocalDouble(thread, 0, 0, (jdouble)0.0)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -453,18 +441,17 @@ static int checkSourceInfoFunctions() {
     
         NSK_DISPLAY0("Checking negative: GetSourceFileName\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetSourceFileName, jvmti, klass, &name)))
    +            jvmti->GetSourceFileName(klass, &name)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetSourceDebugExtension\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetSourceDebugExtension, jvmti, klass, &name)))
    +            jvmti->GetSourceDebugExtension(klass, &name)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLineNumberTable\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetLineNumberTable, jvmti, method, &count,
    -                &line_number_table)))
    +            jvmti->GetLineNumberTable(method, &count, &line_number_table)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -480,7 +467,7 @@ static int checkRedefineClasses() {
         class_def.class_byte_count = 0;
         class_def.class_bytes = NULL;
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(RedefineClasses, jvmti, 1, &class_def)))
    +            jvmti->RedefineClasses(1, &class_def)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -493,7 +480,7 @@ static int checkGetObjectMonitorUsage() {
     
         NSK_DISPLAY0("Checking negative: GetObjectMonitorUsage\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetObjectMonitorUsage, jvmti, thread, &monitor_info)))
    +            jvmti->GetObjectMonitorUsage(thread, &monitor_info)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -506,23 +493,21 @@ static int checkIsSyntheticFunctions(int positive) {
     
         if (positive) {
             NSK_DISPLAY0("Checking positive: IsFieldSynthetic\n");
    -        if (!NSK_JVMTI_VERIFY(
    -                NSK_CPP_STUB4(IsFieldSynthetic, jvmti, klass, field, &is_synthetic)))
    +        if (!NSK_JVMTI_VERIFY(jvmti->IsFieldSynthetic(klass, field, &is_synthetic)))
                 return NSK_FALSE;
     
             NSK_DISPLAY0("Checking positive: IsMethodSynthetic\n");
    -        if (!NSK_JVMTI_VERIFY(
    -                NSK_CPP_STUB3(IsMethodSynthetic, jvmti, method, &is_synthetic)))
    +        if (!NSK_JVMTI_VERIFY(jvmti->IsMethodSynthetic(method, &is_synthetic)))
                 return NSK_FALSE;
         } else {
             NSK_DISPLAY0("Checking negative: IsFieldSynthetic\n");
             if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -                NSK_CPP_STUB4(IsFieldSynthetic, jvmti, klass, field, &is_synthetic)))
    +                jvmti->IsFieldSynthetic(klass, field, &is_synthetic)))
                 return NSK_FALSE;
     
             NSK_DISPLAY0("Checking negative: IsMethodSynthetic\n");
             if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -                NSK_CPP_STUB3(IsMethodSynthetic, jvmti, method, &is_synthetic)))
    +                jvmti->IsMethodSynthetic(method, &is_synthetic)))
                 return NSK_FALSE;
         }
     
    @@ -537,7 +522,7 @@ static int checkGetBytecodes() {
     
         NSK_DISPLAY0("Checking negative: GetBytecodes\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetBytecodes, jvmti, method, &count, &bytecodes)))
    +            jvmti->GetBytecodes(method, &count, &bytecodes)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -551,12 +536,12 @@ static int checkGetCurrentThreadCpuTime() {
     
         NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTimerInfo\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(GetCurrentThreadCpuTimerInfo, jvmti, &info)))
    +            jvmti->GetCurrentThreadCpuTimerInfo(&info)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTime\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(GetCurrentThreadCpuTime, jvmti, &nanos)))
    +            jvmti->GetCurrentThreadCpuTime(&nanos)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -570,12 +555,12 @@ static int checkGetThreadCpuTime() {
     
         NSK_DISPLAY0("Checking negative: GetThreadCpuTimerInfo\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(GetThreadCpuTimerInfo, jvmti, &info)))
    +            jvmti->GetThreadCpuTimerInfo(&info)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetThreadCpuTime\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetThreadCpuTime, jvmti, thread, &nanos)))
    +            jvmti->GetThreadCpuTime(thread, &nanos)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t016/cm01t016.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t016/cm01t016.cpp
    index 01731a4a811..0952ff8d3dc 100644
    --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t016/cm01t016.cpp
    +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t016/cm01t016.cpp
    @@ -74,8 +74,7 @@ static int prepare() {
         NSK_DISPLAY0("Prepare: find tested thread\n");
     
         /* get all live threads */
    -    if (!NSK_JVMTI_VERIFY(
    -           NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads)))
             return NSK_FALSE;
     
         if (!NSK_VERIFY(threads_count > 0 && threads != NULL))
    @@ -87,8 +86,7 @@ static int prepare() {
                 return NSK_FALSE;
     
             /* get thread information */
    -        if (!NSK_JVMTI_VERIFY(
    -                NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info)))
    +        if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info)))
                 return NSK_FALSE;
     
             NSK_DISPLAY3("    thread #%d (%s): %p\n", i, info.name, threads[i]);
    @@ -100,24 +98,20 @@ static int prepare() {
         }
     
         /* deallocate threads list */
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads)))
             return NSK_FALSE;
     
         /* get tested thread class */
    -    if (!NSK_JNI_VERIFY(jni, (klass =
    -            NSK_CPP_STUB2(GetObjectClass, jni, thread)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (klass = jni->GetObjectClass(thread)) != NULL))
             return NSK_FALSE;
     
         /* get tested thread method 'run' */
    -    if (!NSK_JNI_VERIFY(jni, (method =
    -            NSK_CPP_STUB4(GetMethodID, jni, klass, "run", "()V")) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (method = jni->GetMethodID(klass, "run", "()V")) != NULL))
             return NSK_FALSE;
     
         /* get tested thread field 'waitingMonitor' */
         if (!NSK_JNI_VERIFY(jni, (field =
    -            NSK_CPP_STUB4(GetFieldID, jni, klass,
    -                "waitingMonitor", "Ljava/lang/Object;")) != NULL))
    +            jni->GetFieldID(klass, "waitingMonitor", "Ljava/lang/Object;")) != NULL))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -130,7 +124,7 @@ static int prepare() {
     static int checkGetPotentialCapabilities() {
         jvmtiCapabilities caps;
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPotentialCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetPotentialCapabilities(&caps)))
             return NSK_FALSE;
         if (!caps.CAPABILITY) {
             NSK_COMPLAIN1("GetPotentialCapabilities does not return \"%s\" capability\n",
    @@ -148,7 +142,7 @@ static int checkAddCapabilities() {
     
         memset(&caps, 0, sizeof(caps));
         caps.CAPABILITY = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -160,7 +154,7 @@ static int checkGetCapabilities(int owe) {
         jvmtiCapabilities caps;
     
         memset(&caps, 0, sizeof(caps));
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
             return NSK_FALSE;
         if (owe && !caps.CAPABILITY) {
             NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
    @@ -182,7 +176,7 @@ static int checkRelinquishCapabilities() {
     
         memset(&caps, 0, sizeof(caps));
         caps.CAPABILITY = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RelinquishCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->RelinquishCapabilities(&caps)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -196,23 +190,21 @@ static int checkSuspend() {
         jvmtiError err;
     
         NSK_DISPLAY0("Checking negative: SuspendThread\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(SuspendThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->SuspendThread(thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: ResumeThread\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(ResumeThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->ResumeThread(thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SuspendThreadList\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(SuspendThreadList, jvmti, 1, &thread, &err)))
    +            jvmti->SuspendThreadList(1, &thread, &err)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: ResumeThreadList\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(ResumeThreadList, jvmti, 1, &thread, &err)))
    +            jvmti->ResumeThreadList(1, &thread, &err)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -228,27 +220,23 @@ static int checkSignalThread() {
         jmethodID ctor = NULL;
         jobject exception = NULL;
     
    -    if (!NSK_JNI_VERIFY(jni, (cls =
    -            NSK_CPP_STUB2(FindClass, jni, THREAD_DEATH_CLASS_NAME)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (cls = jni->FindClass(THREAD_DEATH_CLASS_NAME)) != NULL))
             return NSK_FALSE;
     
         if (!NSK_JNI_VERIFY(jni, (ctor =
    -            NSK_CPP_STUB4(GetMethodID, jni, cls,
    -                THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
    +            jni->GetMethodID(cls, THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
             return NSK_FALSE;
     
    -    if (!NSK_JNI_VERIFY(jni, (exception =
    -            NSK_CPP_STUB3(NewObject, jni, cls, ctor)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (exception = jni->NewObject(cls, ctor)) != NULL))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: StopThread\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(StopThread, jvmti, thread, exception)))
    +            jvmti->StopThread(thread, exception)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: InterruptThread\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(InterruptThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->InterruptThread(thread)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -262,7 +250,7 @@ static int checkGetOwnedMonitorInfo() {
     
         NSK_DISPLAY0("Checking negative: GetOwnedMonitorInfo\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetOwnedMonitorInfo, jvmti, thread, &count, &monitors)))
    +            jvmti->GetOwnedMonitorInfo(thread, &count, &monitors)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -275,7 +263,7 @@ static int checkGetCurrentContendedMonitor() {
     
         NSK_DISPLAY0("Checking negative: GetCurrentContendedMonitor\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetCurrentContendedMonitor, jvmti, thread, &monitor)))
    +            jvmti->GetCurrentContendedMonitor(thread, &monitor)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -285,8 +273,7 @@ static int checkGetCurrentContendedMonitor() {
      */
     static int checkPopFrame() {
         NSK_DISPLAY0("Checking negative: PopFrame\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(PopFrame, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->PopFrame(thread)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -330,43 +317,45 @@ static int checkHeapFunctions() {
     
         NSK_DISPLAY0("Checking negative: SetTag\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(SetTag, jvmti, thread, TAG_VALUE)))
    +            jvmti->SetTag(thread, TAG_VALUE)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetTag\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetTag, jvmti, thread, &tag)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->GetTag(thread, &tag)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetObjectsWithTags\n");
         tag = TAG_VALUE;
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB6(GetObjectsWithTags, jvmti, 1, &tag,
    -                &count, &res_objects, &res_tags)))
    +            jvmti->GetObjectsWithTags(1, &tag, &count, &res_objects, &res_tags)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverHeap\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(IterateOverHeap, jvmti, JVMTI_HEAP_OBJECT_TAGGED,
    -                HeapObject, &dummy_user_data)))
    +            jvmti->IterateOverHeap(JVMTI_HEAP_OBJECT_TAGGED, HeapObject, &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverInstancesOfClass\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(IterateOverInstancesOfClass, jvmti, klass,
    -                JVMTI_HEAP_OBJECT_UNTAGGED, HeapObject, &dummy_user_data)))
    +            jvmti->IterateOverInstancesOfClass(klass,
    +                                               JVMTI_HEAP_OBJECT_UNTAGGED,
    +                                               HeapObject,
    +                                               &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverObjectsReachableFromObject\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(IterateOverObjectsReachableFromObject, jvmti, thread,
    -                ObjectReference, &dummy_user_data)))
    +            jvmti->IterateOverObjectsReachableFromObject(thread,
    +                                                         ObjectReference,
    +                                                         &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverReachableObjects\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(IterateOverReachableObjects, jvmti,
    -                HeapRoot, StackReference, ObjectReference, &dummy_user_data)))
    +            jvmti->IterateOverReachableObjects(HeapRoot,
    +                                               StackReference,
    +                                               ObjectReference,
    +                                               &dummy_user_data)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -385,58 +374,57 @@ static int checkLocalVariableFunctions() {
     
         NSK_DISPLAY0("Checking negative: GetLocalVariableTable\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetLocalVariableTable, jvmti, method, &count,
    -                &local_variable_table)))
    +            jvmti->GetLocalVariableTable(method, &count, &local_variable_table)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalObject\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalObject, jvmti, thread, 0, 0, &object_value)))
    +            jvmti->GetLocalObject(thread, 0, 0, &object_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalInt\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalInt, jvmti, thread, 0, 0, &int_value)))
    +            jvmti->GetLocalInt(thread, 0, 0, &int_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalLong\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalLong, jvmti, thread, 0, 0, &long_value)))
    +            jvmti->GetLocalLong(thread, 0, 0, &long_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalFloat\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalFloat, jvmti, thread, 0, 0, &float_value)))
    +            jvmti->GetLocalFloat(thread, 0, 0, &float_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalDouble\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalDouble, jvmti, thread, 0, 0, &double_value)))
    +            jvmti->GetLocalDouble(thread, 0, 0, &double_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalObject\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalObject, jvmti, thread, 0, 0, thread)))
    +            jvmti->SetLocalObject(thread, 0, 0, thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalInt\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalInt, jvmti, thread, 0, 0, (jint)0)))
    +            jvmti->SetLocalInt(thread, 0, 0, (jint)0)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalLong\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalLong, jvmti, thread, 0, 0, (jlong)0)))
    +            jvmti->SetLocalLong(thread, 0, 0, (jlong)0)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalFloat\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalFloat, jvmti, thread, 0, 0, (jfloat)0.0)))
    +            jvmti->SetLocalFloat(thread, 0, 0, (jfloat)0.0)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalDouble\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalDouble, jvmti, thread, 0, 0, (jdouble)0.0)))
    +            jvmti->SetLocalDouble(thread, 0, 0, (jdouble)0.0)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -451,18 +439,17 @@ static int checkSourceInfoFunctions() {
     
         NSK_DISPLAY0("Checking negative: GetSourceFileName\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetSourceFileName, jvmti, klass, &name)))
    +            jvmti->GetSourceFileName(klass, &name)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetSourceDebugExtension\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetSourceDebugExtension, jvmti, klass, &name)))
    +            jvmti->GetSourceDebugExtension(klass, &name)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLineNumberTable\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetLineNumberTable, jvmti, method, &count,
    -                &line_number_table)))
    +            jvmti->GetLineNumberTable(method, &count, &line_number_table)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -478,7 +465,7 @@ static int checkRedefineClasses() {
         class_def.class_byte_count = 0;
         class_def.class_bytes = NULL;
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(RedefineClasses, jvmti, 1, &class_def)))
    +            jvmti->RedefineClasses(1, &class_def)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -491,14 +478,12 @@ static int checkGetObjectMonitorUsage(int positive) {
     
         if (positive) {
             NSK_DISPLAY0("Checking positive: GetObjectMonitorUsage\n");
    -        if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(GetObjectMonitorUsage, jvmti,
    -                thread, &monitor_info)))
    +        if (!NSK_JVMTI_VERIFY(jvmti->GetObjectMonitorUsage(thread, &monitor_info)))
                 return NSK_FALSE;
         } else {
             NSK_DISPLAY0("Checking negative: GetObjectMonitorUsage\n");
             if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -                NSK_CPP_STUB3(GetObjectMonitorUsage, jvmti,
    -                    thread, &monitor_info)))
    +                jvmti->GetObjectMonitorUsage(thread, &monitor_info)))
                 return NSK_FALSE;
         }
     
    @@ -512,12 +497,12 @@ static int checkIsSyntheticFunctions() {
     
         NSK_DISPLAY0("Checking negative: IsFieldSynthetic\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(IsFieldSynthetic, jvmti, klass, field, &is_synthetic)))
    +            jvmti->IsFieldSynthetic(klass, field, &is_synthetic)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IsMethodSynthetic\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(IsMethodSynthetic, jvmti, method, &is_synthetic)))
    +            jvmti->IsMethodSynthetic(method, &is_synthetic)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -531,7 +516,7 @@ static int checkGetBytecodes() {
     
         NSK_DISPLAY0("Checking negative: GetBytecodes\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetBytecodes, jvmti, method, &count, &bytecodes)))
    +            jvmti->GetBytecodes(method, &count, &bytecodes)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -545,12 +530,12 @@ static int checkGetCurrentThreadCpuTime() {
     
         NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTimerInfo\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(GetCurrentThreadCpuTimerInfo, jvmti, &info)))
    +            jvmti->GetCurrentThreadCpuTimerInfo(&info)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTime\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(GetCurrentThreadCpuTime, jvmti, &nanos)))
    +            jvmti->GetCurrentThreadCpuTime(&nanos)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -564,12 +549,12 @@ static int checkGetThreadCpuTime() {
     
         NSK_DISPLAY0("Checking negative: GetThreadCpuTimerInfo\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(GetThreadCpuTimerInfo, jvmti, &info)))
    +            jvmti->GetThreadCpuTimerInfo(&info)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetThreadCpuTime\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetThreadCpuTime, jvmti, thread, &nanos)))
    +            jvmti->GetThreadCpuTime(thread, &nanos)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t017/cm01t017.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t017/cm01t017.cpp
    index 3f3381d8fcd..13804681b1a 100644
    --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t017/cm01t017.cpp
    +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t017/cm01t017.cpp
    @@ -76,8 +76,7 @@ static int prepare() {
         NSK_DISPLAY0("Prepare: find tested thread\n");
     
         /* get all live threads */
    -    if (!NSK_JVMTI_VERIFY(
    -           NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads)))
             return NSK_FALSE;
     
         if (!NSK_VERIFY(threads_count > 0 && threads != NULL))
    @@ -89,8 +88,7 @@ static int prepare() {
                 return NSK_FALSE;
     
             /* get thread information */
    -        if (!NSK_JVMTI_VERIFY(
    -                NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info)))
    +        if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info)))
                 return NSK_FALSE;
     
             NSK_DISPLAY3("    thread #%d (%s): %p\n", i, info.name, threads[i]);
    @@ -102,24 +100,20 @@ static int prepare() {
         }
     
         /* deallocate threads list */
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads)))
             return NSK_FALSE;
     
         /* get tested thread class */
    -    if (!NSK_JNI_VERIFY(jni, (klass =
    -            NSK_CPP_STUB2(GetObjectClass, jni, thread)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (klass = jni->GetObjectClass(thread)) != NULL))
             return NSK_FALSE;
     
         /* get tested thread method 'run' */
    -    if (!NSK_JNI_VERIFY(jni, (method =
    -            NSK_CPP_STUB4(GetMethodID, jni, klass, "run", "()V")) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (method = jni->GetMethodID(klass, "run", "()V")) != NULL))
             return NSK_FALSE;
     
         /* get tested thread field 'waitingMonitor' */
         if (!NSK_JNI_VERIFY(jni, (field =
    -            NSK_CPP_STUB4(GetFieldID, jni, klass,
    -                "waitingMonitor", "Ljava/lang/Object;")) != NULL))
    +            jni->GetFieldID(klass, "waitingMonitor", "Ljava/lang/Object;")) != NULL))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -132,7 +126,7 @@ static int prepare() {
     static int checkGetPotentialCapabilities() {
         jvmtiCapabilities caps;
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPotentialCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetPotentialCapabilities(&caps)))
             return NSK_FALSE;
         if (!caps.CAPABILITY) {
             NSK_COMPLAIN1("GetPotentialCapabilities does not return \"%s\" capability\n",
    @@ -150,7 +144,7 @@ static int checkAddCapabilities() {
     
         memset(&caps, 0, sizeof(caps));
         caps.CAPABILITY = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -162,7 +156,7 @@ static int checkGetCapabilities(int owe) {
         jvmtiCapabilities caps;
     
         memset(&caps, 0, sizeof(caps));
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
             return NSK_FALSE;
         if (owe && !caps.CAPABILITY) {
             NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
    @@ -184,7 +178,7 @@ static int checkRelinquishCapabilities() {
     
         memset(&caps, 0, sizeof(caps));
         caps.CAPABILITY = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RelinquishCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->RelinquishCapabilities(&caps)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -198,23 +192,21 @@ static int checkSuspend() {
         jvmtiError err;
     
         NSK_DISPLAY0("Checking negative: SuspendThread\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(SuspendThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->SuspendThread(thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: ResumeThread\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(ResumeThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->ResumeThread(thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SuspendThreadList\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(SuspendThreadList, jvmti, 1, &thread, &err)))
    +            jvmti->SuspendThreadList(1, &thread, &err)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: ResumeThreadList\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(ResumeThreadList, jvmti, 1, &thread, &err)))
    +            jvmti->ResumeThreadList(1, &thread, &err)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -230,37 +222,33 @@ static int checkSignalThread(int positive) {
         jmethodID ctor = NULL;
         jobject exception = NULL;
     
    -    if (!NSK_JNI_VERIFY(jni, (cls =
    -            NSK_CPP_STUB2(FindClass, jni, THREAD_DEATH_CLASS_NAME)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (cls = jni->FindClass(THREAD_DEATH_CLASS_NAME)) != NULL))
             return NSK_FALSE;
     
         if (!NSK_JNI_VERIFY(jni, (ctor =
    -            NSK_CPP_STUB4(GetMethodID, jni, cls,
    -                THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
    +            jni->GetMethodID(cls, THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
             return NSK_FALSE;
     
    -    if (!NSK_JNI_VERIFY(jni, (exception =
    -            NSK_CPP_STUB3(NewObject, jni, cls, ctor)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (exception = jni->NewObject(cls, ctor)) != NULL))
             return NSK_FALSE;
     
         if (positive) {
             NSK_DISPLAY0("Checking positive: InterruptThread\n");
    -        if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(InterruptThread, jvmti, thread)))
    +        if (!NSK_JVMTI_VERIFY(jvmti->InterruptThread(thread)))
                 return NSK_FALSE;
     
             NSK_DISPLAY0("Checking positive: StopThread\n");
    -        if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(StopThread, jvmti,
    -                thread, exception)))
    +        if (!NSK_JVMTI_VERIFY(jvmti->StopThread(thread, exception)))
                 return NSK_FALSE;
         } else {
             NSK_DISPLAY0("Checking negative: StopThread\n");
             if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -                NSK_CPP_STUB3(StopThread, jvmti, thread, exception)))
    +                jvmti->StopThread(thread, exception)))
                 return NSK_FALSE;
     
             NSK_DISPLAY0("Checking negative: InterruptThread\n");
             if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -                NSK_CPP_STUB2(InterruptThread, jvmti, thread)))
    +                jvmti->InterruptThread(thread)))
                 return NSK_FALSE;
         }
     
    @@ -275,7 +263,7 @@ static int checkGetOwnedMonitorInfo() {
     
         NSK_DISPLAY0("Checking negative: GetOwnedMonitorInfo\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetOwnedMonitorInfo, jvmti, thread, &count, &monitors)))
    +            jvmti->GetOwnedMonitorInfo(thread, &count, &monitors)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -288,7 +276,7 @@ static int checkGetCurrentContendedMonitor() {
     
         NSK_DISPLAY0("Checking negative: GetCurrentContendedMonitor\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetCurrentContendedMonitor, jvmti, thread, &monitor)))
    +            jvmti->GetCurrentContendedMonitor(thread, &monitor)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -298,8 +286,7 @@ static int checkGetCurrentContendedMonitor() {
      */
     static int checkPopFrame() {
         NSK_DISPLAY0("Checking negative: PopFrame\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(PopFrame, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->PopFrame(thread)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -343,43 +330,45 @@ static int checkHeapFunctions() {
     
         NSK_DISPLAY0("Checking negative: SetTag\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(SetTag, jvmti, thread, TAG_VALUE)))
    +            jvmti->SetTag(thread, TAG_VALUE)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetTag\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetTag, jvmti, thread, &tag)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->GetTag(thread, &tag)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetObjectsWithTags\n");
         tag = TAG_VALUE;
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB6(GetObjectsWithTags, jvmti, 1, &tag,
    -                &count, &res_objects, &res_tags)))
    +            jvmti->GetObjectsWithTags(1, &tag, &count, &res_objects, &res_tags)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverHeap\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(IterateOverHeap, jvmti, JVMTI_HEAP_OBJECT_TAGGED,
    -                HeapObject, &dummy_user_data)))
    +            jvmti->IterateOverHeap(JVMTI_HEAP_OBJECT_TAGGED, HeapObject, &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverInstancesOfClass\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(IterateOverInstancesOfClass, jvmti, klass,
    -                JVMTI_HEAP_OBJECT_UNTAGGED, HeapObject, &dummy_user_data)))
    +            jvmti->IterateOverInstancesOfClass(klass,
    +                                               JVMTI_HEAP_OBJECT_UNTAGGED,
    +                                               HeapObject,
    +                                               &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverObjectsReachableFromObject\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(IterateOverObjectsReachableFromObject, jvmti, thread,
    -                ObjectReference, &dummy_user_data)))
    +            jvmti->IterateOverObjectsReachableFromObject(thread,
    +                                                         ObjectReference,
    +                                                         &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverReachableObjects\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(IterateOverReachableObjects, jvmti,
    -                HeapRoot, StackReference, ObjectReference, &dummy_user_data)))
    +            jvmti->IterateOverReachableObjects(HeapRoot,
    +                                               StackReference,
    +                                               ObjectReference,
    +                                               &dummy_user_data)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -398,58 +387,57 @@ static int checkLocalVariableFunctions() {
     
         NSK_DISPLAY0("Checking negative: GetLocalVariableTable\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetLocalVariableTable, jvmti, method, &count,
    -                &local_variable_table)))
    +            jvmti->GetLocalVariableTable(method, &count, &local_variable_table)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalObject\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalObject, jvmti, thread, 0, 0, &object_value)))
    +            jvmti->GetLocalObject(thread, 0, 0, &object_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalInt\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalInt, jvmti, thread, 0, 0, &int_value)))
    +            jvmti->GetLocalInt(thread, 0, 0, &int_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalLong\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalLong, jvmti, thread, 0, 0, &long_value)))
    +            jvmti->GetLocalLong(thread, 0, 0, &long_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalFloat\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalFloat, jvmti, thread, 0, 0, &float_value)))
    +            jvmti->GetLocalFloat(thread, 0, 0, &float_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalDouble\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalDouble, jvmti, thread, 0, 0, &double_value)))
    +            jvmti->GetLocalDouble(thread, 0, 0, &double_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalObject\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalObject, jvmti, thread, 0, 0, thread)))
    +            jvmti->SetLocalObject(thread, 0, 0, thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalInt\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalInt, jvmti, thread, 0, 0, (jint)0)))
    +            jvmti->SetLocalInt(thread, 0, 0, (jint)0)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalLong\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalLong, jvmti, thread, 0, 0, (jlong)0)))
    +            jvmti->SetLocalLong(thread, 0, 0, (jlong)0)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalFloat\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalFloat, jvmti, thread, 0, 0, (jfloat)0.0)))
    +            jvmti->SetLocalFloat(thread, 0, 0, (jfloat)0.0)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalDouble\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalDouble, jvmti, thread, 0, 0, (jdouble)0.0)))
    +            jvmti->SetLocalDouble(thread, 0, 0, (jdouble)0.0)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -464,18 +452,17 @@ static int checkSourceInfoFunctions() {
     
         NSK_DISPLAY0("Checking negative: GetSourceFileName\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetSourceFileName, jvmti, klass, &name)))
    +            jvmti->GetSourceFileName(klass, &name)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetSourceDebugExtension\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetSourceDebugExtension, jvmti, klass, &name)))
    +            jvmti->GetSourceDebugExtension(klass, &name)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLineNumberTable\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetLineNumberTable, jvmti, method, &count,
    -                &line_number_table)))
    +            jvmti->GetLineNumberTable(method, &count, &line_number_table)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -491,7 +478,7 @@ static int checkRedefineClasses() {
         class_def.class_byte_count = 0;
         class_def.class_bytes = NULL;
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(RedefineClasses, jvmti, 1, &class_def)))
    +            jvmti->RedefineClasses(1, &class_def)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -504,7 +491,7 @@ static int checkGetObjectMonitorUsage() {
     
         NSK_DISPLAY0("Checking negative: GetObjectMonitorUsage\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetObjectMonitorUsage, jvmti, thread, &monitor_info)))
    +            jvmti->GetObjectMonitorUsage(thread, &monitor_info)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -517,12 +504,12 @@ static int checkIsSyntheticFunctions() {
     
         NSK_DISPLAY0("Checking negative: IsFieldSynthetic\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(IsFieldSynthetic, jvmti, klass, field, &is_synthetic)))
    +            jvmti->IsFieldSynthetic(klass, field, &is_synthetic)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IsMethodSynthetic\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(IsMethodSynthetic, jvmti, method, &is_synthetic)))
    +            jvmti->IsMethodSynthetic(method, &is_synthetic)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -536,7 +523,7 @@ static int checkGetBytecodes() {
     
         NSK_DISPLAY0("Checking negative: GetBytecodes\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetBytecodes, jvmti, method, &count, &bytecodes)))
    +            jvmti->GetBytecodes(method, &count, &bytecodes)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -550,12 +537,12 @@ static int checkGetCurrentThreadCpuTime() {
     
         NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTimerInfo\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(GetCurrentThreadCpuTimerInfo, jvmti, &info)))
    +            jvmti->GetCurrentThreadCpuTimerInfo(&info)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTime\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(GetCurrentThreadCpuTime, jvmti, &nanos)))
    +            jvmti->GetCurrentThreadCpuTime(&nanos)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -569,12 +556,12 @@ static int checkGetThreadCpuTime() {
     
         NSK_DISPLAY0("Checking negative: GetThreadCpuTimerInfo\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(GetThreadCpuTimerInfo, jvmti, &info)))
    +            jvmti->GetThreadCpuTimerInfo(&info)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetThreadCpuTime\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetThreadCpuTime, jvmti, thread, &nanos)))
    +            jvmti->GetThreadCpuTime(thread, &nanos)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t018/cm01t018.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t018/cm01t018.cpp
    index 540519feda8..7e53745ccac 100644
    --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t018/cm01t018.cpp
    +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t018/cm01t018.cpp
    @@ -78,8 +78,7 @@ static int prepare() {
         NSK_DISPLAY0("Prepare: find tested thread\n");
     
         /* get all live threads */
    -    if (!NSK_JVMTI_VERIFY(
    -           NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads)))
             return NSK_FALSE;
     
         if (!NSK_VERIFY(threads_count > 0 && threads != NULL))
    @@ -91,8 +90,7 @@ static int prepare() {
                 return NSK_FALSE;
     
             /* get thread information */
    -        if (!NSK_JVMTI_VERIFY(
    -                NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info)))
    +        if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info)))
                 return NSK_FALSE;
     
             NSK_DISPLAY3("    thread #%d (%s): %p\n", i, info.name, threads[i]);
    @@ -104,24 +102,20 @@ static int prepare() {
         }
     
         /* deallocate threads list */
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads)))
             return NSK_FALSE;
     
         /* get tested thread class */
    -    if (!NSK_JNI_VERIFY(jni, (klass =
    -            NSK_CPP_STUB2(GetObjectClass, jni, thread)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (klass = jni->GetObjectClass(thread)) != NULL))
             return NSK_FALSE;
     
         /* get tested thread method 'run' */
    -    if (!NSK_JNI_VERIFY(jni, (method =
    -            NSK_CPP_STUB4(GetMethodID, jni, klass, "run", "()V")) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (method = jni->GetMethodID(klass, "run", "()V")) != NULL))
             return NSK_FALSE;
     
         /* get tested thread field 'waitingMonitor' */
         if (!NSK_JNI_VERIFY(jni, (field =
    -            NSK_CPP_STUB4(GetFieldID, jni, klass,
    -                "waitingMonitor", "Ljava/lang/Object;")) != NULL))
    +            jni->GetFieldID(klass, "waitingMonitor", "Ljava/lang/Object;")) != NULL))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -134,7 +128,7 @@ static int prepare() {
     static int checkGetPotentialCapabilities() {
         jvmtiCapabilities caps;
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPotentialCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetPotentialCapabilities(&caps)))
             return NSK_FALSE;
         if (!caps.CAPABILITY) {
             NSK_COMPLAIN1("GetPotentialCapabilities does not return \"%s\" capability\n",
    @@ -152,7 +146,7 @@ static int checkAddCapabilities() {
     
         memset(&caps, 0, sizeof(caps));
         caps.CAPABILITY = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -164,7 +158,7 @@ static int checkGetCapabilities(int owe) {
         jvmtiCapabilities caps;
     
         memset(&caps, 0, sizeof(caps));
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
             return NSK_FALSE;
         if (owe && !caps.CAPABILITY) {
             NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
    @@ -186,7 +180,7 @@ static int checkRelinquishCapabilities() {
     
         memset(&caps, 0, sizeof(caps));
         caps.CAPABILITY = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RelinquishCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->RelinquishCapabilities(&caps)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -201,41 +195,39 @@ static int checkSuspend(int positive) {
     
         if (positive) {
             NSK_DISPLAY0("Checking positive: SuspendThread\n");
    -        if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(SuspendThread, jvmti, thread)))
    +        if (!NSK_JVMTI_VERIFY(jvmti->SuspendThread(thread)))
                 return NSK_FALSE;
     
             NSK_DISPLAY0("Checking positive: ResumeThread\n");
    -        if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(ResumeThread, jvmti, thread)))
    +        if (!NSK_JVMTI_VERIFY(jvmti->ResumeThread(thread)))
                 return NSK_FALSE;
     
             NSK_DISPLAY0("Checking positive: SuspendThreadList\n");
    -        if (!NSK_JVMTI_VERIFY(
    -                NSK_CPP_STUB4(SuspendThreadList, jvmti, 1, &thread, &err)))
    +        if (!NSK_JVMTI_VERIFY(jvmti->SuspendThreadList(1, &thread, &err)))
                 return NSK_FALSE;
     
             NSK_DISPLAY0("Checking positive: ResumeThreadList\n");
    -        if (!NSK_JVMTI_VERIFY(
    -                NSK_CPP_STUB4(ResumeThreadList, jvmti, 1, &thread, &err)))
    +        if (!NSK_JVMTI_VERIFY(jvmti->ResumeThreadList(1, &thread, &err)))
                 return NSK_FALSE;
         } else {
             NSK_DISPLAY0("Checking negative: SuspendThread\n");
             if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -                NSK_CPP_STUB2(SuspendThread, jvmti, thread)))
    +                jvmti->SuspendThread(thread)))
                 return NSK_FALSE;
     
             NSK_DISPLAY0("Checking negative: ResumeThread\n");
             if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -                NSK_CPP_STUB2(ResumeThread, jvmti, thread)))
    +                jvmti->ResumeThread(thread)))
                 return NSK_FALSE;
     
             NSK_DISPLAY0("Checking negative: SuspendThreadList\n");
             if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -                NSK_CPP_STUB4(SuspendThreadList, jvmti, 1, &thread, &err)))
    +                jvmti->SuspendThreadList(1, &thread, &err)))
                 return NSK_FALSE;
     
             NSK_DISPLAY0("Checking negative: ResumeThreadList\n");
             if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -                NSK_CPP_STUB4(ResumeThreadList, jvmti, 1, &thread, &err)))
    +                jvmti->ResumeThreadList(1, &thread, &err)))
                 return NSK_FALSE;
         }
     
    @@ -252,27 +244,23 @@ static int checkSignalThread() {
         jmethodID ctor = NULL;
         jobject exception = NULL;
     
    -    if (!NSK_JNI_VERIFY(jni, (cls =
    -            NSK_CPP_STUB2(FindClass, jni, THREAD_DEATH_CLASS_NAME)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (cls = jni->FindClass(THREAD_DEATH_CLASS_NAME)) != NULL))
             return NSK_FALSE;
     
         if (!NSK_JNI_VERIFY(jni, (ctor =
    -            NSK_CPP_STUB4(GetMethodID, jni, cls,
    -                THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
    +            jni->GetMethodID(cls, THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
             return NSK_FALSE;
     
    -    if (!NSK_JNI_VERIFY(jni, (exception =
    -            NSK_CPP_STUB3(NewObject, jni, cls, ctor)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (exception = jni->NewObject(cls, ctor)) != NULL))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: StopThread\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(StopThread, jvmti, thread, exception)))
    +            jvmti->StopThread(thread, exception)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: InterruptThread\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(InterruptThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->InterruptThread(thread)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -286,7 +274,7 @@ static int checkGetOwnedMonitorInfo() {
     
         NSK_DISPLAY0("Checking negative: GetOwnedMonitorInfo\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetOwnedMonitorInfo, jvmti, thread, &count, &monitors)))
    +            jvmti->GetOwnedMonitorInfo(thread, &count, &monitors)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -299,7 +287,7 @@ static int checkGetCurrentContendedMonitor() {
     
         NSK_DISPLAY0("Checking negative: GetCurrentContendedMonitor\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetCurrentContendedMonitor, jvmti, thread, &monitor)))
    +            jvmti->GetCurrentContendedMonitor(thread, &monitor)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -309,8 +297,7 @@ static int checkGetCurrentContendedMonitor() {
      */
     static int checkPopFrame() {
         NSK_DISPLAY0("Checking negative: PopFrame\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(PopFrame, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->PopFrame(thread)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -354,43 +341,45 @@ static int checkHeapFunctions() {
     
         NSK_DISPLAY0("Checking negative: SetTag\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(SetTag, jvmti, thread, TAG_VALUE)))
    +            jvmti->SetTag(thread, TAG_VALUE)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetTag\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetTag, jvmti, thread, &tag)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->GetTag(thread, &tag)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetObjectsWithTags\n");
         tag = TAG_VALUE;
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB6(GetObjectsWithTags, jvmti, 1, &tag,
    -                &count, &res_objects, &res_tags)))
    +            jvmti->GetObjectsWithTags(1, &tag, &count, &res_objects, &res_tags)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverHeap\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(IterateOverHeap, jvmti, JVMTI_HEAP_OBJECT_TAGGED,
    -                HeapObject, &dummy_user_data)))
    +            jvmti->IterateOverHeap(JVMTI_HEAP_OBJECT_TAGGED, HeapObject, &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverInstancesOfClass\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(IterateOverInstancesOfClass, jvmti, klass,
    -                JVMTI_HEAP_OBJECT_UNTAGGED, HeapObject, &dummy_user_data)))
    +            jvmti->IterateOverInstancesOfClass(klass,
    +                                               JVMTI_HEAP_OBJECT_UNTAGGED,
    +                                               HeapObject,
    +                                               &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverObjectsReachableFromObject\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(IterateOverObjectsReachableFromObject, jvmti, thread,
    -                ObjectReference, &dummy_user_data)))
    +            jvmti->IterateOverObjectsReachableFromObject(thread,
    +                                                         ObjectReference,
    +                                                         &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverReachableObjects\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(IterateOverReachableObjects, jvmti,
    -                HeapRoot, StackReference, ObjectReference, &dummy_user_data)))
    +            jvmti->IterateOverReachableObjects(HeapRoot,
    +                                               StackReference,
    +                                               ObjectReference,
    +                                               &dummy_user_data)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -409,58 +398,57 @@ static int checkLocalVariableFunctions() {
     
         NSK_DISPLAY0("Checking negative: GetLocalVariableTable\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetLocalVariableTable, jvmti, method, &count,
    -                &local_variable_table)))
    +            jvmti->GetLocalVariableTable(method, &count, &local_variable_table)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalObject\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalObject, jvmti, thread, 0, 0, &object_value)))
    +            jvmti->GetLocalObject(thread, 0, 0, &object_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalInt\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalInt, jvmti, thread, 0, 0, &int_value)))
    +            jvmti->GetLocalInt(thread, 0, 0, &int_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalLong\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalLong, jvmti, thread, 0, 0, &long_value)))
    +            jvmti->GetLocalLong(thread, 0, 0, &long_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalFloat\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalFloat, jvmti, thread, 0, 0, &float_value)))
    +            jvmti->GetLocalFloat(thread, 0, 0, &float_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalDouble\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalDouble, jvmti, thread, 0, 0, &double_value)))
    +            jvmti->GetLocalDouble(thread, 0, 0, &double_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalObject\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalObject, jvmti, thread, 0, 0, thread)))
    +            jvmti->SetLocalObject(thread, 0, 0, thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalInt\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalInt, jvmti, thread, 0, 0, (jint)0)))
    +            jvmti->SetLocalInt(thread, 0, 0, (jint)0)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalLong\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalLong, jvmti, thread, 0, 0, (jlong)0)))
    +            jvmti->SetLocalLong(thread, 0, 0, (jlong)0)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalFloat\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalFloat, jvmti, thread, 0, 0, (jfloat)0.0)))
    +            jvmti->SetLocalFloat(thread, 0, 0, (jfloat)0.0)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalDouble\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalDouble, jvmti, thread, 0, 0, (jdouble)0.0)))
    +            jvmti->SetLocalDouble(thread, 0, 0, (jdouble)0.0)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -475,18 +463,17 @@ static int checkSourceInfoFunctions() {
     
         NSK_DISPLAY0("Checking negative: GetSourceFileName\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetSourceFileName, jvmti, klass, &name)))
    +            jvmti->GetSourceFileName(klass, &name)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetSourceDebugExtension\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetSourceDebugExtension, jvmti, klass, &name)))
    +            jvmti->GetSourceDebugExtension(klass, &name)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLineNumberTable\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetLineNumberTable, jvmti, method, &count,
    -                &line_number_table)))
    +            jvmti->GetLineNumberTable(method, &count, &line_number_table)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -502,7 +489,7 @@ static int checkRedefineClasses() {
         class_def.class_byte_count = 0;
         class_def.class_bytes = NULL;
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(RedefineClasses, jvmti, 1, &class_def)))
    +            jvmti->RedefineClasses(1, &class_def)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -515,7 +502,7 @@ static int checkGetObjectMonitorUsage() {
     
         NSK_DISPLAY0("Checking negative: GetObjectMonitorUsage\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetObjectMonitorUsage, jvmti, thread, &monitor_info)))
    +            jvmti->GetObjectMonitorUsage(thread, &monitor_info)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -528,12 +515,12 @@ static int checkIsSyntheticFunctions() {
     
         NSK_DISPLAY0("Checking negative: IsFieldSynthetic\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(IsFieldSynthetic, jvmti, klass, field, &is_synthetic)))
    +            jvmti->IsFieldSynthetic(klass, field, &is_synthetic)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IsMethodSynthetic\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(IsMethodSynthetic, jvmti, method, &is_synthetic)))
    +            jvmti->IsMethodSynthetic(method, &is_synthetic)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -547,7 +534,7 @@ static int checkGetBytecodes() {
     
         NSK_DISPLAY0("Checking negative: GetBytecodes\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetBytecodes, jvmti, method, &count, &bytecodes)))
    +            jvmti->GetBytecodes(method, &count, &bytecodes)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -561,12 +548,12 @@ static int checkGetCurrentThreadCpuTime() {
     
         NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTimerInfo\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(GetCurrentThreadCpuTimerInfo, jvmti, &info)))
    +            jvmti->GetCurrentThreadCpuTimerInfo(&info)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTime\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(GetCurrentThreadCpuTime, jvmti, &nanos)))
    +            jvmti->GetCurrentThreadCpuTime(&nanos)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -580,12 +567,12 @@ static int checkGetThreadCpuTime() {
     
         NSK_DISPLAY0("Checking negative: GetThreadCpuTimerInfo\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(GetThreadCpuTimerInfo, jvmti, &info)))
    +            jvmti->GetThreadCpuTimerInfo(&info)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetThreadCpuTime\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetThreadCpuTime, jvmti, thread, &nanos)))
    +            jvmti->GetThreadCpuTime(thread, &nanos)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t019/cm01t019.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t019/cm01t019.cpp
    index 292c7660fa4..9fe8b204387 100644
    --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t019/cm01t019.cpp
    +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t019/cm01t019.cpp
    @@ -73,8 +73,7 @@ static int prepare() {
         NSK_DISPLAY0("Prepare: find tested thread\n");
     
         /* get all live threads */
    -    if (!NSK_JVMTI_VERIFY(
    -           NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads)))
             return NSK_FALSE;
     
         if (!NSK_VERIFY(threads_count > 0 && threads != NULL))
    @@ -86,8 +85,7 @@ static int prepare() {
                 return NSK_FALSE;
     
             /* get thread information */
    -        if (!NSK_JVMTI_VERIFY(
    -                NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info)))
    +        if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info)))
                 return NSK_FALSE;
     
             NSK_DISPLAY3("    thread #%d (%s): %p\n", i, info.name, threads[i]);
    @@ -99,24 +97,20 @@ static int prepare() {
         }
     
         /* deallocate threads list */
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads)))
             return NSK_FALSE;
     
         /* get tested thread class */
    -    if (!NSK_JNI_VERIFY(jni, (klass =
    -            NSK_CPP_STUB2(GetObjectClass, jni, thread)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (klass = jni->GetObjectClass(thread)) != NULL))
             return NSK_FALSE;
     
         /* get tested thread method 'run' */
    -    if (!NSK_JNI_VERIFY(jni, (method =
    -            NSK_CPP_STUB4(GetMethodID, jni, klass, "run", "()V")) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (method = jni->GetMethodID(klass, "run", "()V")) != NULL))
             return NSK_FALSE;
     
         /* get tested thread field 'waitingMonitor' */
         if (!NSK_JNI_VERIFY(jni, (field =
    -            NSK_CPP_STUB4(GetFieldID, jni, klass,
    -                "waitingMonitor", "Ljava/lang/Object;")) != NULL))
    +            jni->GetFieldID(klass, "waitingMonitor", "Ljava/lang/Object;")) != NULL))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -130,23 +124,21 @@ static int checkSuspend() {
         jvmtiError err;
     
         NSK_DISPLAY0("Checking negative: SuspendThread\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(SuspendThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->SuspendThread(thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: ResumeThread\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(ResumeThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->ResumeThread(thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SuspendThreadList\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(SuspendThreadList, jvmti, 1, &thread, &err)))
    +            jvmti->SuspendThreadList(1, &thread, &err)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: ResumeThreadList\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(ResumeThreadList, jvmti, 1, &thread, &err)))
    +            jvmti->ResumeThreadList(1, &thread, &err)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -162,27 +154,23 @@ static int checkSignalThread() {
         jmethodID ctor = NULL;
         jobject exception = NULL;
     
    -    if (!NSK_JNI_VERIFY(jni, (cls =
    -            NSK_CPP_STUB2(FindClass, jni, THREAD_DEATH_CLASS_NAME)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (cls = jni->FindClass(THREAD_DEATH_CLASS_NAME)) != NULL))
             return NSK_FALSE;
     
         if (!NSK_JNI_VERIFY(jni, (ctor =
    -            NSK_CPP_STUB4(GetMethodID, jni, cls,
    -                THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
    +            jni->GetMethodID(cls, THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
             return NSK_FALSE;
     
    -    if (!NSK_JNI_VERIFY(jni, (exception =
    -            NSK_CPP_STUB3(NewObject, jni, cls, ctor)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (exception = jni->NewObject(cls, ctor)) != NULL))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: StopThread\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(StopThread, jvmti, thread, exception)))
    +            jvmti->StopThread(thread, exception)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: InterruptThread\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(InterruptThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->InterruptThread(thread)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -196,7 +184,7 @@ static int checkGetOwnedMonitorInfo() {
     
         NSK_DISPLAY0("Checking negative: GetOwnedMonitorInfo\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetOwnedMonitorInfo, jvmti, thread, &count, &monitors)))
    +            jvmti->GetOwnedMonitorInfo(thread, &count, &monitors)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -209,7 +197,7 @@ static int checkGetCurrentContendedMonitor() {
     
         NSK_DISPLAY0("Checking negative: GetCurrentContendedMonitor\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetCurrentContendedMonitor, jvmti, thread, &monitor)))
    +            jvmti->GetCurrentContendedMonitor(thread, &monitor)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -219,8 +207,7 @@ static int checkGetCurrentContendedMonitor() {
      */
     static int checkPopFrame() {
         NSK_DISPLAY0("Checking negative: PopFrame\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(PopFrame, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->PopFrame(thread)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -264,43 +251,45 @@ static int checkHeapFunctions() {
     
         NSK_DISPLAY0("Checking negative: SetTag\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(SetTag, jvmti, thread, TAG_VALUE)))
    +            jvmti->SetTag(thread, TAG_VALUE)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetTag\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetTag, jvmti, thread, &tag)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->GetTag(thread, &tag)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetObjectsWithTags\n");
         tag = TAG_VALUE;
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB6(GetObjectsWithTags, jvmti, 1, &tag,
    -                &count, &res_objects, &res_tags)))
    +            jvmti->GetObjectsWithTags(1, &tag, &count, &res_objects, &res_tags)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverHeap\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(IterateOverHeap, jvmti, JVMTI_HEAP_OBJECT_TAGGED,
    -                HeapObject, &dummy_user_data)))
    +            jvmti->IterateOverHeap(JVMTI_HEAP_OBJECT_TAGGED, HeapObject, &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverInstancesOfClass\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(IterateOverInstancesOfClass, jvmti, klass,
    -                JVMTI_HEAP_OBJECT_UNTAGGED, HeapObject, &dummy_user_data)))
    +            jvmti->IterateOverInstancesOfClass(klass,
    +                                               JVMTI_HEAP_OBJECT_UNTAGGED,
    +                                               HeapObject,
    +                                               &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverObjectsReachableFromObject\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(IterateOverObjectsReachableFromObject, jvmti, thread,
    -                ObjectReference, &dummy_user_data)))
    +            jvmti->IterateOverObjectsReachableFromObject(thread,
    +                                                         ObjectReference,
    +                                                         &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverReachableObjects\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(IterateOverReachableObjects, jvmti,
    -                HeapRoot, StackReference, ObjectReference, &dummy_user_data)))
    +            jvmti->IterateOverReachableObjects(HeapRoot,
    +                                               StackReference,
    +                                               ObjectReference,
    +                                               &dummy_user_data)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -319,58 +308,57 @@ static int checkLocalVariableFunctions() {
     
         NSK_DISPLAY0("Checking negative: GetLocalVariableTable\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetLocalVariableTable, jvmti, method, &count,
    -                &local_variable_table)))
    +            jvmti->GetLocalVariableTable(method, &count, &local_variable_table)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalObject\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalObject, jvmti, thread, 0, 0, &object_value)))
    +            jvmti->GetLocalObject(thread, 0, 0, &object_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalInt\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalInt, jvmti, thread, 0, 0, &int_value)))
    +            jvmti->GetLocalInt(thread, 0, 0, &int_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalLong\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalLong, jvmti, thread, 0, 0, &long_value)))
    +            jvmti->GetLocalLong(thread, 0, 0, &long_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalFloat\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalFloat, jvmti, thread, 0, 0, &float_value)))
    +            jvmti->GetLocalFloat(thread, 0, 0, &float_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalDouble\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalDouble, jvmti, thread, 0, 0, &double_value)))
    +            jvmti->GetLocalDouble(thread, 0, 0, &double_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalObject\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalObject, jvmti, thread, 0, 0, thread)))
    +            jvmti->SetLocalObject(thread, 0, 0, thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalInt\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalInt, jvmti, thread, 0, 0, (jint)0)))
    +            jvmti->SetLocalInt(thread, 0, 0, (jint)0)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalLong\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalLong, jvmti, thread, 0, 0, (jlong)0)))
    +            jvmti->SetLocalLong(thread, 0, 0, (jlong)0)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalFloat\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalFloat, jvmti, thread, 0, 0, (jfloat)0.0)))
    +            jvmti->SetLocalFloat(thread, 0, 0, (jfloat)0.0)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalDouble\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalDouble, jvmti, thread, 0, 0, (jdouble)0.0)))
    +            jvmti->SetLocalDouble(thread, 0, 0, (jdouble)0.0)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -385,18 +373,17 @@ static int checkSourceInfoFunctions() {
     
         NSK_DISPLAY0("Checking negative: GetSourceFileName\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetSourceFileName, jvmti, klass, &name)))
    +            jvmti->GetSourceFileName(klass, &name)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking positive: GetSourceDebugExtension\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_ABSENT_INFORMATION,
    -            NSK_CPP_STUB3(GetSourceDebugExtension, jvmti, klass, &name)))
    +            jvmti->GetSourceDebugExtension(klass, &name)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLineNumberTable\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetLineNumberTable, jvmti, method, &count,
    -                &line_number_table)))
    +            jvmti->GetLineNumberTable(method, &count, &line_number_table)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -412,7 +399,7 @@ static int checkRedefineClasses() {
         class_def.class_byte_count = 0;
         class_def.class_bytes = NULL;
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(RedefineClasses, jvmti, 1, &class_def)))
    +            jvmti->RedefineClasses(1, &class_def)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -425,7 +412,7 @@ static int checkGetObjectMonitorUsage() {
     
         NSK_DISPLAY0("Checking negative: GetObjectMonitorUsage\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetObjectMonitorUsage, jvmti, thread, &monitor_info)))
    +            jvmti->GetObjectMonitorUsage(thread, &monitor_info)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -438,12 +425,12 @@ static int checkIsSyntheticFunctions() {
     
         NSK_DISPLAY0("Checking negative: IsFieldSynthetic\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(IsFieldSynthetic, jvmti, klass, field, &is_synthetic)))
    +            jvmti->IsFieldSynthetic(klass, field, &is_synthetic)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IsMethodSynthetic\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(IsMethodSynthetic, jvmti, method, &is_synthetic)))
    +            jvmti->IsMethodSynthetic(method, &is_synthetic)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -457,7 +444,7 @@ static int checkGetBytecodes() {
     
         NSK_DISPLAY0("Checking negative: GetBytecodes\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetBytecodes, jvmti, method, &count, &bytecodes)))
    +            jvmti->GetBytecodes(method, &count, &bytecodes)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -471,12 +458,12 @@ static int checkGetCurrentThreadCpuTime() {
     
         NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTimerInfo\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(GetCurrentThreadCpuTimerInfo, jvmti, &info)))
    +            jvmti->GetCurrentThreadCpuTimerInfo(&info)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTime\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(GetCurrentThreadCpuTime, jvmti, &nanos)))
    +            jvmti->GetCurrentThreadCpuTime(&nanos)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -490,12 +477,12 @@ static int checkGetThreadCpuTime() {
     
         NSK_DISPLAY0("Checking negative: GetThreadCpuTimerInfo\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(GetThreadCpuTimerInfo, jvmti, &info)))
    +            jvmti->GetThreadCpuTimerInfo(&info)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetThreadCpuTime\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetThreadCpuTime, jvmti, thread, &nanos)))
    +            jvmti->GetThreadCpuTime(thread, &nanos)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -591,7 +578,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
     
         /* testcase #1: check GetPotentialCapabilities */
         NSK_DISPLAY0("Testcase #1: check if GetPotentialCapabilities returns the capability\n");
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPotentialCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetPotentialCapabilities(&caps)))
             return JNI_ERR;
         if (!caps.CAPABILITY) {
             NSK_COMPLAIN1("GetPotentialCapabilities does not return \"%s\" capability\n",
    @@ -603,13 +590,13 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         NSK_DISPLAY0("Testcase #2: add the capability during Onload phase\n");
         memset(&caps, 0, sizeof(caps));
         caps.CAPABILITY = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
             return JNI_ERR;
     
         /* testcase #3: check if GetCapabilities returns the capability */
         NSK_DISPLAY0("Testcase #3: check if GetCapabilities returns the capability\n");
         memset(&caps, 0, sizeof(caps));
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
             return JNI_ERR;
         if (!caps.CAPABILITY) {
             NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
    @@ -621,13 +608,13 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         NSK_DISPLAY0("Testcase #4: relinquish the capability during Onload phase\n");
         memset(&caps, 0, sizeof(caps));
         caps.CAPABILITY = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RelinquishCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->RelinquishCapabilities(&caps)))
             return JNI_ERR;
     
         /* testcase #5: check if GetCapabilities does not return the capability */
         NSK_DISPLAY0("Testcase #5: check if GetCapabilities does not return the capability\n");
         memset(&caps, 0, sizeof(caps));
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
             return JNI_ERR;
         if (caps.CAPABILITY) {
             NSK_COMPLAIN1("GetCapabilities returns relinquished \"%s\" capability\n",
    @@ -639,10 +626,10 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         NSK_DISPLAY0("Testcase #6: add back the capability and check with GetCapabilities\n");
         memset(&caps, 0, sizeof(caps));
         caps.CAPABILITY = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
             return JNI_ERR;
         memset(&caps, 0, sizeof(caps));
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
             return JNI_ERR;
         if (!caps.CAPABILITY) {
             NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
    diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t020/cm01t020.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t020/cm01t020.cpp
    index b436b4ff437..25d4ed9a06e 100644
    --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t020/cm01t020.cpp
    +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t020/cm01t020.cpp
    @@ -74,8 +74,7 @@ static int prepare() {
         NSK_DISPLAY0("Prepare: find tested thread\n");
     
         /* get all live threads */
    -    if (!NSK_JVMTI_VERIFY(
    -           NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads)))
             return NSK_FALSE;
     
         if (!NSK_VERIFY(threads_count > 0 && threads != NULL))
    @@ -87,8 +86,7 @@ static int prepare() {
                 return NSK_FALSE;
     
             /* get thread information */
    -        if (!NSK_JVMTI_VERIFY(
    -                NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info)))
    +        if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info)))
                 return NSK_FALSE;
     
             NSK_DISPLAY3("    thread #%d (%s): %p\n", i, info.name, threads[i]);
    @@ -100,24 +98,20 @@ static int prepare() {
         }
     
         /* deallocate threads list */
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads)))
             return NSK_FALSE;
     
         /* get tested thread class */
    -    if (!NSK_JNI_VERIFY(jni, (klass =
    -            NSK_CPP_STUB2(GetObjectClass, jni, thread)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (klass = jni->GetObjectClass(thread)) != NULL))
             return NSK_FALSE;
     
         /* get tested thread method 'run' */
    -    if (!NSK_JNI_VERIFY(jni, (method =
    -            NSK_CPP_STUB4(GetMethodID, jni, klass, "run", "()V")) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (method = jni->GetMethodID(klass, "run", "()V")) != NULL))
             return NSK_FALSE;
     
         /* get tested thread field 'waitingMonitor' */
         if (!NSK_JNI_VERIFY(jni, (field =
    -            NSK_CPP_STUB4(GetFieldID, jni, klass,
    -                "waitingMonitor", "Ljava/lang/Object;")) != NULL))
    +            jni->GetFieldID(klass, "waitingMonitor", "Ljava/lang/Object;")) != NULL))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -131,23 +125,21 @@ static int checkSuspend() {
         jvmtiError err;
     
         NSK_DISPLAY0("Checking negative: SuspendThread\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(SuspendThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->SuspendThread(thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: ResumeThread\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(ResumeThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->ResumeThread(thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SuspendThreadList\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(SuspendThreadList, jvmti, 1, &thread, &err)))
    +            jvmti->SuspendThreadList(1, &thread, &err)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: ResumeThreadList\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(ResumeThreadList, jvmti, 1, &thread, &err)))
    +            jvmti->ResumeThreadList(1, &thread, &err)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -163,27 +155,23 @@ static int checkSignalThread() {
         jmethodID ctor = NULL;
         jobject exception = NULL;
     
    -    if (!NSK_JNI_VERIFY(jni, (cls =
    -            NSK_CPP_STUB2(FindClass, jni, THREAD_DEATH_CLASS_NAME)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (cls = jni->FindClass(THREAD_DEATH_CLASS_NAME)) != NULL))
             return NSK_FALSE;
     
         if (!NSK_JNI_VERIFY(jni, (ctor =
    -            NSK_CPP_STUB4(GetMethodID, jni, cls,
    -                THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
    +            jni->GetMethodID(cls, THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
             return NSK_FALSE;
     
    -    if (!NSK_JNI_VERIFY(jni, (exception =
    -            NSK_CPP_STUB3(NewObject, jni, cls, ctor)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (exception = jni->NewObject(cls, ctor)) != NULL))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: StopThread\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(StopThread, jvmti, thread, exception)))
    +            jvmti->StopThread(thread, exception)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: InterruptThread\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(InterruptThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->InterruptThread(thread)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -197,7 +185,7 @@ static int checkGetOwnedMonitorInfo() {
     
         NSK_DISPLAY0("Checking negative: GetOwnedMonitorInfo\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetOwnedMonitorInfo, jvmti, thread, &count, &monitors)))
    +            jvmti->GetOwnedMonitorInfo(thread, &count, &monitors)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -210,7 +198,7 @@ static int checkGetCurrentContendedMonitor() {
     
         NSK_DISPLAY0("Checking negative: GetCurrentContendedMonitor\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetCurrentContendedMonitor, jvmti, thread, &monitor)))
    +            jvmti->GetCurrentContendedMonitor(thread, &monitor)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -220,8 +208,7 @@ static int checkGetCurrentContendedMonitor() {
      */
     static int checkPopFrame() {
         NSK_DISPLAY0("Checking negative: PopFrame\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(PopFrame, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->PopFrame(thread)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -265,43 +252,45 @@ static int checkHeapFunctions() {
     
         NSK_DISPLAY0("Checking negative: SetTag\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(SetTag, jvmti, thread, TAG_VALUE)))
    +            jvmti->SetTag(thread, TAG_VALUE)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetTag\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetTag, jvmti, thread, &tag)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->GetTag(thread, &tag)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetObjectsWithTags\n");
         tag = TAG_VALUE;
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB6(GetObjectsWithTags, jvmti, 1, &tag,
    -                &count, &res_objects, &res_tags)))
    +            jvmti->GetObjectsWithTags(1, &tag, &count, &res_objects, &res_tags)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverHeap\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(IterateOverHeap, jvmti, JVMTI_HEAP_OBJECT_TAGGED,
    -                HeapObject, &dummy_user_data)))
    +            jvmti->IterateOverHeap(JVMTI_HEAP_OBJECT_TAGGED, HeapObject, &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverInstancesOfClass\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(IterateOverInstancesOfClass, jvmti, klass,
    -                JVMTI_HEAP_OBJECT_UNTAGGED, HeapObject, &dummy_user_data)))
    +            jvmti->IterateOverInstancesOfClass(klass,
    +                                               JVMTI_HEAP_OBJECT_UNTAGGED,
    +                                               HeapObject,
    +                                               &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverObjectsReachableFromObject\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(IterateOverObjectsReachableFromObject, jvmti, thread,
    -                ObjectReference, &dummy_user_data)))
    +            jvmti->IterateOverObjectsReachableFromObject(thread,
    +                                                         ObjectReference,
    +                                                         &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverReachableObjects\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(IterateOverReachableObjects, jvmti,
    -                HeapRoot, StackReference, ObjectReference, &dummy_user_data)))
    +            jvmti->IterateOverReachableObjects(HeapRoot,
    +                                               StackReference,
    +                                               ObjectReference,
    +                                               &dummy_user_data)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -320,58 +309,57 @@ static int checkLocalVariableFunctions() {
     
         NSK_DISPLAY0("Checking negative: GetLocalVariableTable\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetLocalVariableTable, jvmti, method, &count,
    -                &local_variable_table)))
    +            jvmti->GetLocalVariableTable(method, &count, &local_variable_table)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalObject\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalObject, jvmti, thread, 0, 0, &object_value)))
    +            jvmti->GetLocalObject(thread, 0, 0, &object_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalInt\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalInt, jvmti, thread, 0, 0, &int_value)))
    +            jvmti->GetLocalInt(thread, 0, 0, &int_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalLong\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalLong, jvmti, thread, 0, 0, &long_value)))
    +            jvmti->GetLocalLong(thread, 0, 0, &long_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalFloat\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalFloat, jvmti, thread, 0, 0, &float_value)))
    +            jvmti->GetLocalFloat(thread, 0, 0, &float_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalDouble\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalDouble, jvmti, thread, 0, 0, &double_value)))
    +            jvmti->GetLocalDouble(thread, 0, 0, &double_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalObject\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalObject, jvmti, thread, 0, 0, thread)))
    +            jvmti->SetLocalObject(thread, 0, 0, thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalInt\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalInt, jvmti, thread, 0, 0, (jint)0)))
    +            jvmti->SetLocalInt(thread, 0, 0, (jint)0)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalLong\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalLong, jvmti, thread, 0, 0, (jlong)0)))
    +            jvmti->SetLocalLong(thread, 0, 0, (jlong)0)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalFloat\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalFloat, jvmti, thread, 0, 0, (jfloat)0.0)))
    +            jvmti->SetLocalFloat(thread, 0, 0, (jfloat)0.0)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalDouble\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalDouble, jvmti, thread, 0, 0, (jdouble)0.0)))
    +            jvmti->SetLocalDouble(thread, 0, 0, (jdouble)0.0)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -386,18 +374,17 @@ static int checkSourceInfoFunctions() {
     
         NSK_DISPLAY0("Checking negative: GetSourceFileName\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetSourceFileName, jvmti, klass, &name)))
    +            jvmti->GetSourceFileName(klass, &name)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetSourceDebugExtension\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetSourceDebugExtension, jvmti, klass, &name)))
    +            jvmti->GetSourceDebugExtension(klass, &name)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLineNumberTable\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetLineNumberTable, jvmti, method, &count,
    -                &line_number_table)))
    +            jvmti->GetLineNumberTable(method, &count, &line_number_table)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -413,7 +400,7 @@ static int checkRedefineClasses() {
         class_def.class_byte_count = 0;
         class_def.class_bytes = NULL;
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(RedefineClasses, jvmti, 1, &class_def)))
    +            jvmti->RedefineClasses(1, &class_def)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -426,7 +413,7 @@ static int checkGetObjectMonitorUsage() {
     
         NSK_DISPLAY0("Checking negative: GetObjectMonitorUsage\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetObjectMonitorUsage, jvmti, thread, &monitor_info)))
    +            jvmti->GetObjectMonitorUsage(thread, &monitor_info)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -439,12 +426,12 @@ static int checkIsSyntheticFunctions() {
     
         NSK_DISPLAY0("Checking negative: IsFieldSynthetic\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(IsFieldSynthetic, jvmti, klass, field, &is_synthetic)))
    +            jvmti->IsFieldSynthetic(klass, field, &is_synthetic)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IsMethodSynthetic\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(IsMethodSynthetic, jvmti, method, &is_synthetic)))
    +            jvmti->IsMethodSynthetic(method, &is_synthetic)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -458,7 +445,7 @@ static int checkGetBytecodes() {
     
         NSK_DISPLAY0("Checking negative: GetBytecodes\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetBytecodes, jvmti, method, &count, &bytecodes)))
    +            jvmti->GetBytecodes(method, &count, &bytecodes)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -471,13 +458,11 @@ static int checkGetCurrentThreadCpuTime() {
         jlong nanos;
     
         NSK_DISPLAY0("Checking positive: GetCurrentThreadCpuTimerInfo\n");
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB2(GetCurrentThreadCpuTimerInfo, jvmti, &info)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCurrentThreadCpuTimerInfo(&info)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking positive: GetCurrentThreadCpuTime\n");
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB2(GetCurrentThreadCpuTime, jvmti, &nanos)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCurrentThreadCpuTime(&nanos)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -491,12 +476,12 @@ static int checkGetThreadCpuTime() {
     
         NSK_DISPLAY0("Checking negative: GetThreadCpuTimerInfo\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(GetThreadCpuTimerInfo, jvmti, &info)))
    +            jvmti->GetThreadCpuTimerInfo(&info)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: checkGetThreadCpuTime\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetThreadCpuTime, jvmti, thread, &nanos)))
    +            jvmti->GetThreadCpuTime(thread, &nanos)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -592,7 +577,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
     
         /* testcase #1: check GetPotentialCapabilities */
         NSK_DISPLAY0("Testcase #1: check if GetPotentialCapabilities returns the capability\n");
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPotentialCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetPotentialCapabilities(&caps)))
             return JNI_ERR;
         if (!caps.CAPABILITY) {
             NSK_COMPLAIN1("GetPotentialCapabilities does not return \"%s\" capability\n",
    @@ -604,13 +589,13 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         NSK_DISPLAY0("Testcase #2: add the capability during Onload phase\n");
         memset(&caps, 0, sizeof(caps));
         caps.CAPABILITY = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
             return JNI_ERR;
     
         /* testcase #3: check if GetCapabilities returns the capability */
         NSK_DISPLAY0("Testcase #3: check if GetCapabilities returns the capability\n");
         memset(&caps, 0, sizeof(caps));
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
             return JNI_ERR;
         if (!caps.CAPABILITY) {
             NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
    @@ -622,13 +607,13 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         NSK_DISPLAY0("Testcase #4: relinquish the capability during Onload phase\n");
         memset(&caps, 0, sizeof(caps));
         caps.CAPABILITY = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RelinquishCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->RelinquishCapabilities(&caps)))
             return JNI_ERR;
     
         /* testcase #5: check if GetCapabilities does not return the capability */
         NSK_DISPLAY0("Testcase #5: check if GetCapabilities does not return the capability\n");
         memset(&caps, 0, sizeof(caps));
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
             return JNI_ERR;
         if (caps.CAPABILITY) {
             NSK_COMPLAIN1("GetCapabilities returns relinquished \"%s\" capability\n",
    @@ -640,10 +625,10 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         NSK_DISPLAY0("Testcase #6: add back the capability and check with GetCapabilities\n");
         memset(&caps, 0, sizeof(caps));
         caps.CAPABILITY = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
             return JNI_ERR;
         memset(&caps, 0, sizeof(caps));
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
             return JNI_ERR;
         if (!caps.CAPABILITY) {
             NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
    diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t021/cm01t021.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t021/cm01t021.cpp
    index 32f5ff88bcb..829a7c8f3dd 100644
    --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t021/cm01t021.cpp
    +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t021/cm01t021.cpp
    @@ -74,8 +74,7 @@ static int prepare() {
         NSK_DISPLAY0("Prepare: find tested thread\n");
     
         /* get all live threads */
    -    if (!NSK_JVMTI_VERIFY(
    -           NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads)))
             return NSK_FALSE;
     
         if (!NSK_VERIFY(threads_count > 0 && threads != NULL))
    @@ -87,8 +86,7 @@ static int prepare() {
                 return NSK_FALSE;
     
             /* get thread information */
    -        if (!NSK_JVMTI_VERIFY(
    -                NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info)))
    +        if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info)))
                 return NSK_FALSE;
     
             NSK_DISPLAY3("    thread #%d (%s): %p\n", i, info.name, threads[i]);
    @@ -100,24 +98,20 @@ static int prepare() {
         }
     
         /* deallocate threads list */
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads)))
             return NSK_FALSE;
     
         /* get tested thread class */
    -    if (!NSK_JNI_VERIFY(jni, (klass =
    -            NSK_CPP_STUB2(GetObjectClass, jni, thread)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (klass = jni->GetObjectClass(thread)) != NULL))
             return NSK_FALSE;
     
         /* get tested thread method 'run' */
    -    if (!NSK_JNI_VERIFY(jni, (method =
    -            NSK_CPP_STUB4(GetMethodID, jni, klass, "run", "()V")) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (method = jni->GetMethodID(klass, "run", "()V")) != NULL))
             return NSK_FALSE;
     
         /* get tested thread field 'waitingMonitor' */
         if (!NSK_JNI_VERIFY(jni, (field =
    -            NSK_CPP_STUB4(GetFieldID, jni, klass,
    -                "waitingMonitor", "Ljava/lang/Object;")) != NULL))
    +            jni->GetFieldID(klass, "waitingMonitor", "Ljava/lang/Object;")) != NULL))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -131,23 +125,21 @@ static int checkSuspend() {
         jvmtiError err;
     
         NSK_DISPLAY0("Checking negative: SuspendThread\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(SuspendThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->SuspendThread(thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: ResumeThread\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(ResumeThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->ResumeThread(thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SuspendThreadList\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(SuspendThreadList, jvmti, 1, &thread, &err)))
    +            jvmti->SuspendThreadList(1, &thread, &err)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: ResumeThreadList\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(ResumeThreadList, jvmti, 1, &thread, &err)))
    +            jvmti->ResumeThreadList(1, &thread, &err)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -163,27 +155,23 @@ static int checkSignalThread() {
         jmethodID ctor = NULL;
         jobject exception = NULL;
     
    -    if (!NSK_JNI_VERIFY(jni, (cls =
    -            NSK_CPP_STUB2(FindClass, jni, THREAD_DEATH_CLASS_NAME)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (cls = jni->FindClass(THREAD_DEATH_CLASS_NAME)) != NULL))
             return NSK_FALSE;
     
         if (!NSK_JNI_VERIFY(jni, (ctor =
    -            NSK_CPP_STUB4(GetMethodID, jni, cls,
    -                THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
    +            jni->GetMethodID(cls, THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
             return NSK_FALSE;
     
    -    if (!NSK_JNI_VERIFY(jni, (exception =
    -            NSK_CPP_STUB3(NewObject, jni, cls, ctor)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (exception = jni->NewObject(cls, ctor)) != NULL))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: StopThread\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(StopThread, jvmti, thread, exception)))
    +            jvmti->StopThread(thread, exception)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: InterruptThread\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(InterruptThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->InterruptThread(thread)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -197,7 +185,7 @@ static int checkGetOwnedMonitorInfo() {
     
         NSK_DISPLAY0("Checking negative: GetOwnedMonitorInfo\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetOwnedMonitorInfo, jvmti, thread, &count, &monitors)))
    +            jvmti->GetOwnedMonitorInfo(thread, &count, &monitors)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -210,7 +198,7 @@ static int checkGetCurrentContendedMonitor() {
     
         NSK_DISPLAY0("Checking negative: GetCurrentContendedMonitor\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetCurrentContendedMonitor, jvmti, thread, &monitor)))
    +            jvmti->GetCurrentContendedMonitor(thread, &monitor)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -220,8 +208,7 @@ static int checkGetCurrentContendedMonitor() {
      */
     static int checkPopFrame() {
         NSK_DISPLAY0("Checking negative: PopFrame\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(PopFrame, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->PopFrame(thread)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -265,43 +252,45 @@ static int checkHeapFunctions() {
     
         NSK_DISPLAY0("Checking negative: SetTag\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(SetTag, jvmti, thread, TAG_VALUE)))
    +            jvmti->SetTag(thread, TAG_VALUE)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetTag\n");
    -    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetTag, jvmti, thread, &tag)))
    +    if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY, jvmti->GetTag(thread, &tag)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetObjectsWithTags\n");
         tag = TAG_VALUE;
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB6(GetObjectsWithTags, jvmti, 1, &tag,
    -                &count, &res_objects, &res_tags)))
    +            jvmti->GetObjectsWithTags(1, &tag, &count, &res_objects, &res_tags)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverHeap\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(IterateOverHeap, jvmti, JVMTI_HEAP_OBJECT_TAGGED,
    -                HeapObject, &dummy_user_data)))
    +            jvmti->IterateOverHeap(JVMTI_HEAP_OBJECT_TAGGED, HeapObject, &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverInstancesOfClass\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(IterateOverInstancesOfClass, jvmti, klass,
    -                JVMTI_HEAP_OBJECT_UNTAGGED, HeapObject, &dummy_user_data)))
    +            jvmti->IterateOverInstancesOfClass(klass,
    +                                               JVMTI_HEAP_OBJECT_UNTAGGED,
    +                                               HeapObject,
    +                                               &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverObjectsReachableFromObject\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(IterateOverObjectsReachableFromObject, jvmti, thread,
    -                ObjectReference, &dummy_user_data)))
    +            jvmti->IterateOverObjectsReachableFromObject(thread,
    +                                                         ObjectReference,
    +                                                         &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IterateOverReachableObjects\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(IterateOverReachableObjects, jvmti,
    -                HeapRoot, StackReference, ObjectReference, &dummy_user_data)))
    +            jvmti->IterateOverReachableObjects(HeapRoot,
    +                                               StackReference,
    +                                               ObjectReference,
    +                                               &dummy_user_data)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -320,58 +309,57 @@ static int checkLocalVariableFunctions() {
     
         NSK_DISPLAY0("Checking negative: GetLocalVariableTable\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetLocalVariableTable, jvmti, method, &count,
    -                &local_variable_table)))
    +            jvmti->GetLocalVariableTable(method, &count, &local_variable_table)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalObject\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalObject, jvmti, thread, 0, 0, &object_value)))
    +            jvmti->GetLocalObject(thread, 0, 0, &object_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalInt\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalInt, jvmti, thread, 0, 0, &int_value)))
    +            jvmti->GetLocalInt(thread, 0, 0, &int_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalLong\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalLong, jvmti, thread, 0, 0, &long_value)))
    +            jvmti->GetLocalLong(thread, 0, 0, &long_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalFloat\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalFloat, jvmti, thread, 0, 0, &float_value)))
    +            jvmti->GetLocalFloat(thread, 0, 0, &float_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLocalDouble\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(GetLocalDouble, jvmti, thread, 0, 0, &double_value)))
    +            jvmti->GetLocalDouble(thread, 0, 0, &double_value)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalObject\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalObject, jvmti, thread, 0, 0, thread)))
    +            jvmti->SetLocalObject(thread, 0, 0, thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalInt\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalInt, jvmti, thread, 0, 0, (jint)0)))
    +            jvmti->SetLocalInt(thread, 0, 0, (jint)0)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalLong\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalLong, jvmti, thread, 0, 0, (jlong)0)))
    +            jvmti->SetLocalLong(thread, 0, 0, (jlong)0)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalFloat\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalFloat, jvmti, thread, 0, 0, (jfloat)0.0)))
    +            jvmti->SetLocalFloat(thread, 0, 0, (jfloat)0.0)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: SetLocalDouble\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB5(SetLocalDouble, jvmti, thread, 0, 0, (jdouble)0.0)))
    +            jvmti->SetLocalDouble(thread, 0, 0, (jdouble)0.0)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -386,18 +374,17 @@ static int checkSourceInfoFunctions() {
     
         NSK_DISPLAY0("Checking negative: GetSourceFileName\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetSourceFileName, jvmti, klass, &name)))
    +            jvmti->GetSourceFileName(klass, &name)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetSourceDebugExtension\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetSourceDebugExtension, jvmti, klass, &name)))
    +            jvmti->GetSourceDebugExtension(klass, &name)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetLineNumberTable\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetLineNumberTable, jvmti, method, &count,
    -                &line_number_table)))
    +            jvmti->GetLineNumberTable(method, &count, &line_number_table)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -413,7 +400,7 @@ static int checkRedefineClasses() {
         class_def.class_byte_count = 0;
         class_def.class_bytes = NULL;
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(RedefineClasses, jvmti, 1, &class_def)))
    +            jvmti->RedefineClasses(1, &class_def)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -426,7 +413,7 @@ static int checkGetObjectMonitorUsage() {
     
         NSK_DISPLAY0("Checking negative: GetObjectMonitorUsage\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(GetObjectMonitorUsage, jvmti, thread, &monitor_info)))
    +            jvmti->GetObjectMonitorUsage(thread, &monitor_info)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -439,12 +426,12 @@ static int checkIsSyntheticFunctions() {
     
         NSK_DISPLAY0("Checking negative: IsFieldSynthetic\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(IsFieldSynthetic, jvmti, klass, field, &is_synthetic)))
    +            jvmti->IsFieldSynthetic(klass, field, &is_synthetic)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: IsMethodSynthetic\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB3(IsMethodSynthetic, jvmti, method, &is_synthetic)))
    +            jvmti->IsMethodSynthetic(method, &is_synthetic)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -458,7 +445,7 @@ static int checkGetBytecodes() {
     
         NSK_DISPLAY0("Checking negative: GetBytecodes\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB4(GetBytecodes, jvmti, method, &count, &bytecodes)))
    +            jvmti->GetBytecodes(method, &count, &bytecodes)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -472,12 +459,12 @@ static int checkGetCurrentThreadCpuTime() {
     
         NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTimerInfo\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(GetCurrentThreadCpuTimerInfo, jvmti, &info)))
    +            jvmti->GetCurrentThreadCpuTimerInfo(&info)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking negative: GetCurrentThreadCpuTime\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -            NSK_CPP_STUB2(GetCurrentThreadCpuTime, jvmti, &nanos)))
    +            jvmti->GetCurrentThreadCpuTime(&nanos)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -490,13 +477,11 @@ static int checkGetThreadCpuTime() {
         jlong nanos;
     
         NSK_DISPLAY0("Checking positive: GetThreadCpuTimerInfo\n");
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB2(GetThreadCpuTimerInfo, jvmti, &info)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetThreadCpuTimerInfo(&info)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking positive: checkGetThreadCpuTime\n");
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB3(GetThreadCpuTime, jvmti, thread, &nanos)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetThreadCpuTime(thread, &nanos)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -592,7 +577,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
     
         /* testcase #1: check GetPotentialCapabilities */
         NSK_DISPLAY0("Testcase #1: check if GetPotentialCapabilities returns the capability\n");
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPotentialCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetPotentialCapabilities(&caps)))
             return JNI_ERR;
         if (!caps.CAPABILITY) {
             NSK_COMPLAIN1("GetPotentialCapabilities does not return \"%s\" capability\n",
    @@ -604,13 +589,13 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         NSK_DISPLAY0("Testcase #2: add the capability during Onload phase\n");
         memset(&caps, 0, sizeof(caps));
         caps.CAPABILITY = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
             return JNI_ERR;
     
         /* testcase #3: check if GetCapabilities returns the capability */
         NSK_DISPLAY0("Testcase #3: check if GetCapabilities returns the capability\n");
         memset(&caps, 0, sizeof(caps));
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
             return JNI_ERR;
         if (!caps.CAPABILITY) {
             NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
    @@ -622,13 +607,13 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         NSK_DISPLAY0("Testcase #4: relinquish the capability during Onload phase\n");
         memset(&caps, 0, sizeof(caps));
         caps.CAPABILITY = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RelinquishCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->RelinquishCapabilities(&caps)))
             return JNI_ERR;
     
         /* testcase #5: check if GetCapabilities does not return the capability */
         NSK_DISPLAY0("Testcase #5: check if GetCapabilities does not return the capability\n");
         memset(&caps, 0, sizeof(caps));
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
             return JNI_ERR;
         if (caps.CAPABILITY) {
             NSK_COMPLAIN1("GetCapabilities returns relinquished \"%s\" capability\n",
    @@ -640,10 +625,10 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         NSK_DISPLAY0("Testcase #6: add back the capability and check with GetCapabilities\n");
         memset(&caps, 0, sizeof(caps));
         caps.CAPABILITY = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
             return JNI_ERR;
         memset(&caps, 0, sizeof(caps));
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
             return JNI_ERR;
         if (!caps.CAPABILITY) {
             NSK_COMPLAIN1("GetCapabilities does not return \"%s\" capability\n",
    diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM02/cm02t001/cm02t001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM02/cm02t001/cm02t001.cpp
    index c6e857a4cfe..2f85f7a09dc 100644
    --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM02/cm02t001/cm02t001.cpp
    +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM02/cm02t001/cm02t001.cpp
    @@ -99,17 +99,16 @@ CompiledMethodLoad(jvmtiEnv *jvmti_env, jmethodID method,
     
         CompiledMethodLoadEventsCount++;
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(GetMethodName,
    -            jvmti_env, method, &name, &signature, NULL))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti_env->GetMethodName(method, &name, &signature, NULL))) {
             nsk_jvmti_setFailStatus();
             return;
         }
         NSK_DISPLAY3("CompiledMethodLoad event: %s%s (0x%p)\n",
             name, signature, code_addr);
         if (name != NULL)
    -        NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)name);
    +        jvmti_env->Deallocate((unsigned char*)name);
         if (signature != NULL)
    -        NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)signature);
    +        jvmti_env->Deallocate((unsigned char*)signature);
     }
     
     static void JNICALL
    @@ -126,8 +125,8 @@ CompiledMethodUnload(jvmtiEnv *jvmti_env, jmethodID method,
         if (err == JVMTI_ERROR_NONE) {
             NSK_DISPLAY3("for: \tmethod: name=\"%s\" signature=\"%s\"\n\tnative address=0x%p\n",
               name, sig, code_addr);
    -        NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)name);
    -        NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)sig);
    +        jvmti_env->Deallocate((unsigned char*)name);
    +        jvmti_env->Deallocate((unsigned char*)sig);
         }
     }
     
    @@ -139,8 +138,7 @@ MonitorContendedEnter(jvmtiEnv *jvmti_env, JNIEnv* jni_env,
         MonitorContendedEnterEventsCount++;
     
         /* get thread information */
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(GetThreadInfo, jvmti_env,
    -            thread, &info))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti_env->GetThreadInfo(thread, &info))) {
             nsk_jvmti_setFailStatus();
             return;
         }
    @@ -156,8 +154,7 @@ MonitorContendedEntered(jvmtiEnv *jvmti_env, JNIEnv* jni_env,
         MonitorContendedEnteredEventsCount++;
     
         /* get thread information */
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(GetThreadInfo, jvmti_env,
    -            thread, &info))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti_env->GetThreadInfo(thread, &info))) {
             nsk_jvmti_setFailStatus();
             return;
         }
    @@ -173,8 +170,7 @@ MonitorWait(jvmtiEnv *jvmti_env, JNIEnv* jni_env,
         MonitorWaitEventsCount++;
     
         /* get thread information */
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(GetThreadInfo, jvmti_env,
    -            thread, &info))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti_env->GetThreadInfo(thread, &info))) {
             nsk_jvmti_setFailStatus();
             return;
         }
    @@ -190,8 +186,7 @@ MonitorWaited(jvmtiEnv *jvmti_env, JNIEnv* jni_env,
         MonitorWaitedEventsCount++;
     
         /* get thread information */
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(GetThreadInfo, jvmti_env,
    -            thread, &info))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti_env->GetThreadInfo(thread, &info))) {
             nsk_jvmti_setFailStatus();
             return;
         }
    @@ -207,14 +202,13 @@ VMObjectAlloc(jvmtiEnv *jvmti_env, JNIEnv* jni_env,
     
         VMObjectAllocEventsCount++;
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(GetClassSignature, jvmti_env,
    -            object_klass, &signature, NULL))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti_env->GetClassSignature(object_klass, &signature, NULL))) {
             nsk_jvmti_setFailStatus();
             return;
         }
         NSK_DISPLAY2("VMObjectAlloc: \"%s\", size=%d\n", signature, size);
         if (signature != NULL)
    -        NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)signature);
    +        jvmti_env->Deallocate((unsigned char*)signature);
     }
     
     static void JNICALL
    @@ -226,7 +220,7 @@ NativeMethodBind(jvmtiEnv* jvmti_env, JNIEnv *jni_env,
     
         NativeMethodBindEventsCount++;
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPhase, jvmti_env, &phase))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti_env->GetPhase(&phase))) {
             nsk_jvmti_setFailStatus();
             return;
         }
    @@ -234,8 +228,7 @@ NativeMethodBind(jvmtiEnv* jvmti_env, JNIEnv *jni_env,
         if (phase != JVMTI_PHASE_START && phase != JVMTI_PHASE_LIVE)
             return;
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(GetMethodName,
    -            jvmti_env, method, &name, &signature, NULL))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti_env->GetMethodName(method, &name, &signature, NULL))) {
             nsk_jvmti_setFailStatus();
             return;
         }
    @@ -243,9 +236,9 @@ NativeMethodBind(jvmtiEnv* jvmti_env, JNIEnv *jni_env,
         NSK_DISPLAY2("NativeMethodBind event: %s%s\n", name, signature);
     
         if (name != NULL)
    -        NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)name);
    +        jvmti_env->Deallocate((unsigned char*)name);
         if (signature != NULL)
    -        NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)signature);
    +        jvmti_env->Deallocate((unsigned char*)signature);
     }
     
     static void JNICALL
    @@ -280,8 +273,7 @@ static int prepare(jvmtiEnv* jvmti, JNIEnv* jni) {
         NSK_DISPLAY0("Prepare: find tested thread\n");
     
         /* get all live threads */
    -    if (!NSK_JVMTI_VERIFY(
    -           NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads)))
             return NSK_FALSE;
     
         if (!NSK_VERIFY(threads_count > 0 && threads != NULL))
    @@ -293,8 +285,7 @@ static int prepare(jvmtiEnv* jvmti, JNIEnv* jni) {
                 return NSK_FALSE;
     
             /* get thread information */
    -        if (!NSK_JVMTI_VERIFY(
    -                NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info)))
    +        if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info)))
                 return NSK_FALSE;
     
             NSK_DISPLAY3("    thread #%d (%s): %p\n", i, info.name, threads[i]);
    @@ -305,18 +296,15 @@ static int prepare(jvmtiEnv* jvmti, JNIEnv* jni) {
             }
         }
     
    -    if (!NSK_JNI_VERIFY(jni, (thread =
    -            NSK_CPP_STUB2(NewGlobalRef, jni, thread)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (thread = jni->NewGlobalRef(thread)) != NULL))
             return NSK_FALSE;
     
         /* deallocate threads list */
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads)))
             return NSK_FALSE;
     
         /* get tested thread class */
    -    if (!NSK_JNI_VERIFY(jni, (klass =
    -            NSK_CPP_STUB2(GetObjectClass, jni, thread)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (klass = jni->GetObjectClass(thread)) != NULL))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -330,7 +318,7 @@ static int checkGetCapabilities(jvmtiEnv* jvmti) {
         jvmtiCapabilities caps;
     
         memset(&caps, 0, sizeof(caps));
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
             return NSK_FALSE;
         if (!NSK_VERIFY(caps.can_tag_objects))
             return NSK_FALSE;
    @@ -373,8 +361,7 @@ static int checkGetOwnedMonitorInfo(jvmtiEnv* jvmti) {
         jobject *monitors = NULL;
     
         NSK_DISPLAY0("Checking positive: GetOwnedMonitorInfo\n");
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB4(GetOwnedMonitorInfo, jvmti, thread, &count, &monitors)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetOwnedMonitorInfo(thread, &count, &monitors)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -386,8 +373,7 @@ static int checkGetCurrentContendedMonitor(jvmtiEnv* jvmti) {
         jobject monitor = NULL;
     
         NSK_DISPLAY0("Checking positive: GetCurrentContendedMonitor\n");
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB3(GetCurrentContendedMonitor, jvmti, thread, &monitor)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCurrentContendedMonitor(thread, &monitor)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -439,44 +425,44 @@ static int checkHeapFunctions(jvmtiEnv* jvmti) {
         jint dummy_user_data = 0;
     
         NSK_DISPLAY0("Checking positive: SetTag\n");
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB3(SetTag, jvmti, thread, TAG_VALUE)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->SetTag(thread, TAG_VALUE)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking positive: GetTag\n");
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB3(GetTag, jvmti, thread, &tag)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetTag(thread, &tag)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking positive: GetObjectsWithTags\n");
         tag = TAG_VALUE;
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB6(GetObjectsWithTags, jvmti, 1, &tag,
    -                &count, &res_objects, &res_tags)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetObjectsWithTags(1, &tag, &count, &res_objects, &res_tags)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking positive: IterateOverHeap\n");
         if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB4(IterateOverHeap, jvmti, JVMTI_HEAP_OBJECT_TAGGED,
    -                HeapObject, &dummy_user_data)))
    +            jvmti->IterateOverHeap(JVMTI_HEAP_OBJECT_TAGGED, HeapObject, &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking positive: IterateOverInstancesOfClass\n");
         if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB5(IterateOverInstancesOfClass, jvmti, klass,
    -                JVMTI_HEAP_OBJECT_UNTAGGED, HeapObject, &dummy_user_data)))
    +            jvmti->IterateOverInstancesOfClass(klass,
    +                                               JVMTI_HEAP_OBJECT_UNTAGGED,
    +                                               HeapObject,
    +                                               &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking positive: IterateOverObjectsReachableFromObject\n");
         if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB4(IterateOverObjectsReachableFromObject, jvmti, thread,
    -                ThreadObjectReference, &dummy_user_data)))
    +            jvmti->IterateOverObjectsReachableFromObject(thread,
    +                                                         ThreadObjectReference,
    +                                                         &dummy_user_data)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking positive: IterateOverReachableObjects\n");
         if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB5(IterateOverReachableObjects, jvmti,
    -                HeapRoot, StackReference, ObjectReference, &dummy_user_data)))
    +            jvmti->IterateOverReachableObjects(HeapRoot,
    +                                               StackReference,
    +                                               ObjectReference,
    +                                               &dummy_user_data)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -488,8 +474,7 @@ static int checkGetObjectMonitorUsage(jvmtiEnv* jvmti) {
         jvmtiMonitorUsage monitor_info;
     
         NSK_DISPLAY0("Checking positive: GetObjectMonitorUsage\n");
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB3(GetObjectMonitorUsage, jvmti, thread, &monitor_info)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetObjectMonitorUsage(thread, &monitor_info)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -502,13 +487,11 @@ static int checkGetCurrentThreadCpuTime(jvmtiEnv* jvmti) {
         jlong nanos;
     
         NSK_DISPLAY0("Checking positive: GetCurrentThreadCpuTimerInfo\n");
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB2(GetCurrentThreadCpuTimerInfo, jvmti, &info)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCurrentThreadCpuTimerInfo(&info)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking positive: GetCurrentThreadCpuTime\n");
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB2(GetCurrentThreadCpuTime, jvmti, &nanos)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCurrentThreadCpuTime(&nanos)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -521,13 +504,11 @@ static int checkGetThreadCpuTime(jvmtiEnv* jvmti) {
         jlong nanos;
     
         NSK_DISPLAY0("Checking positive: GetThreadCpuTimerInfo\n");
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB2(GetThreadCpuTimerInfo, jvmti, &info)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetThreadCpuTimerInfo(&info)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking positive: checkGetThreadCpuTime\n");
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB3(GetThreadCpuTime, jvmti, thread, &nanos)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetThreadCpuTime(thread, &nanos)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -641,7 +622,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) {
         if (!checkGetThreadCpuTime(jvmti))
             nsk_jvmti_setFailStatus();
     
    -    NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, thread));
    +    NSK_TRACE(jni->DeleteGlobalRef(thread));
     
         /* resume debugee and wait for sync */
         if (!nsk_jvmti_resumeSync())
    @@ -706,7 +687,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         caps.can_generate_native_method_bind_events = 1;
         caps.can_generate_garbage_collection_events = 1;
         caps.can_generate_object_free_events = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
             return JNI_ERR;
     
         /* set event callbacks */
    @@ -723,46 +704,45 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         callbacks.GarbageCollectionStart = &GarbageCollectionStart;
         callbacks.GarbageCollectionFinish = &GarbageCollectionFinish;
         callbacks.ObjectFree = &ObjectFree;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetEventCallbacks,
    -            jvmti, &callbacks, sizeof(callbacks))))
    +    if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, sizeof(callbacks))))
             return JNI_ERR;
     
         /* enable events */
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode,
    -            jvmti, JVMTI_ENABLE, JVMTI_EVENT_CLASS_FILE_LOAD_HOOK, NULL)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(
    +            JVMTI_ENABLE, JVMTI_EVENT_CLASS_FILE_LOAD_HOOK, NULL)))
             return JNI_ERR;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode,
    -            jvmti, JVMTI_ENABLE, JVMTI_EVENT_COMPILED_METHOD_LOAD, NULL)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(
    +            JVMTI_ENABLE, JVMTI_EVENT_COMPILED_METHOD_LOAD, NULL)))
             return JNI_ERR;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode,
    -            jvmti, JVMTI_ENABLE, JVMTI_EVENT_COMPILED_METHOD_UNLOAD, NULL)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(
    +            JVMTI_ENABLE, JVMTI_EVENT_COMPILED_METHOD_UNLOAD, NULL)))
             return JNI_ERR;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode,
    -            jvmti, JVMTI_ENABLE, JVMTI_EVENT_MONITOR_CONTENDED_ENTER, NULL)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(
    +            JVMTI_ENABLE, JVMTI_EVENT_MONITOR_CONTENDED_ENTER, NULL)))
             return JNI_ERR;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode,
    -            jvmti, JVMTI_ENABLE, JVMTI_EVENT_MONITOR_CONTENDED_ENTERED, NULL)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(
    +            JVMTI_ENABLE, JVMTI_EVENT_MONITOR_CONTENDED_ENTERED, NULL)))
             return JNI_ERR;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode,
    -            jvmti, JVMTI_ENABLE, JVMTI_EVENT_MONITOR_WAIT, NULL)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(
    +            JVMTI_ENABLE, JVMTI_EVENT_MONITOR_WAIT, NULL)))
             return JNI_ERR;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode,
    -            jvmti, JVMTI_ENABLE, JVMTI_EVENT_MONITOR_WAITED, NULL)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(
    +            JVMTI_ENABLE, JVMTI_EVENT_MONITOR_WAITED, NULL)))
             return JNI_ERR;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode,
    -            jvmti, JVMTI_ENABLE, JVMTI_EVENT_VM_OBJECT_ALLOC, NULL)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(
    +            JVMTI_ENABLE, JVMTI_EVENT_VM_OBJECT_ALLOC, NULL)))
             return JNI_ERR;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode,
    -            jvmti, JVMTI_ENABLE, JVMTI_EVENT_NATIVE_METHOD_BIND, NULL)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(
    +            JVMTI_ENABLE, JVMTI_EVENT_NATIVE_METHOD_BIND, NULL)))
             return JNI_ERR;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode,
    -            jvmti, JVMTI_ENABLE, JVMTI_EVENT_GARBAGE_COLLECTION_START, NULL)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(
    +            JVMTI_ENABLE, JVMTI_EVENT_GARBAGE_COLLECTION_START, NULL)))
             return JNI_ERR;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode,
    -            jvmti, JVMTI_ENABLE, JVMTI_EVENT_GARBAGE_COLLECTION_FINISH, NULL)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(
    +            JVMTI_ENABLE, JVMTI_EVENT_GARBAGE_COLLECTION_FINISH, NULL)))
             return JNI_ERR;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode,
    -            jvmti, JVMTI_ENABLE, JVMTI_EVENT_OBJECT_FREE, NULL)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(
    +            JVMTI_ENABLE, JVMTI_EVENT_OBJECT_FREE, NULL)))
             return JNI_ERR;
     
         /* register agent proc and arg */
    diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM03/cm03t001/cm03t001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM03/cm03t001/cm03t001.cpp
    index a26107419a5..3dad6406c42 100644
    --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM03/cm03t001/cm03t001.cpp
    +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/capability/CM03/cm03t001/cm03t001.cpp
    @@ -95,15 +95,15 @@ ClassFileLoadHook(jvmtiEnv *jvmti_env, JNIEnv *jni_env,
     
         if (name != NULL && (strcmp(name, CLASS_NAME) == 0)) {
             NSK_DISPLAY1("ClassFileLoadHook: %s\n", name);
    -        if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(Allocate,
    -                jvmti_env, class_data_len, &klass_bytes)))
    +        if (!NSK_JVMTI_VERIFY(jvmti_env->Allocate(class_data_len, &klass_bytes)))
                 nsk_jvmti_setFailStatus();
             else {
                 memcpy(klass_bytes, class_data, class_data_len);
                 klass_byte_count = class_data_len;
             }
    -        NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode,
    -            jvmti_env, JVMTI_DISABLE, JVMTI_EVENT_CLASS_FILE_LOAD_HOOK, NULL));
    +        NSK_JVMTI_VERIFY(
    +            jvmti_env->SetEventNotificationMode(
    +                JVMTI_DISABLE, JVMTI_EVENT_CLASS_FILE_LOAD_HOOK, NULL));
         }
     }
     
    @@ -116,20 +116,18 @@ FieldAccess(jvmtiEnv *jvmti_env, JNIEnv *jni_env,
     
         FieldAccessEventsCount++;
     
    -    if (!NSK_JVMTI_VERIFY(
    -           NSK_CPP_STUB3(ClearFieldAccessWatch, jvmti_env, klass, field)))
    +    if (!NSK_JVMTI_VERIFY(jvmti_env->ClearFieldAccessWatch(klass, field)))
             return;
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB6(GetFieldName,
    -            jvmti_env, field_klass, field, &name, &signature, NULL))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti_env->GetFieldName(field_klass, field, &name, &signature, NULL))) {
             nsk_jvmti_setFailStatus();
             return;
         }
         NSK_DISPLAY2("FieldAccess event: %s:%s\n", name, signature);
         if (name != NULL)
    -        NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)name);
    +        jvmti_env->Deallocate((unsigned char*)name);
         if (signature != NULL)
    -        NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)signature);
    +        jvmti_env->Deallocate((unsigned char*)signature);
     }
     
     static void JNICALL
    @@ -142,16 +140,15 @@ FieldModification(jvmtiEnv *jvmti_env, JNIEnv *jni_env,
     
         FieldModificationEventsCount++;
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB6(GetFieldName,
    -            jvmti_env, field_klass, field, &name, &signature, NULL))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti_env->GetFieldName(field_klass, field, &name, &signature, NULL))) {
             nsk_jvmti_setFailStatus();
             return;
         }
         NSK_DISPLAY2("FieldModification event: %s:%s\n", name, signature);
         if (name != NULL)
    -        NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)name);
    +        jvmti_env->Deallocate((unsigned char*)name);
         if (signature != NULL)
    -        NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)signature);
    +        jvmti_env->Deallocate((unsigned char*)signature);
     }
     
     static void JNICALL
    @@ -162,19 +159,19 @@ SingleStep(jvmtiEnv *jvmti_env, JNIEnv* jni_env, jthread thread,
     
         SingleStepEventsCount++;
     
    -    NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode,
    -        jvmti_env, JVMTI_DISABLE, JVMTI_EVENT_SINGLE_STEP, NULL));
    +    NSK_JVMTI_VERIFY(
    +        jvmti_env->SetEventNotificationMode(
    +            JVMTI_DISABLE, JVMTI_EVENT_SINGLE_STEP, NULL));
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(GetMethodName,
    -            jvmti_env, method, &name, &signature, NULL))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti_env->GetMethodName(method, &name, &signature, NULL))) {
             nsk_jvmti_setFailStatus();
             return;
         }
         NSK_DISPLAY2("SingleStep event: %s%s\n", name, signature);
         if (name != NULL)
    -        NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)name);
    +        jvmti_env->Deallocate((unsigned char*)name);
         if (signature != NULL)
    -        NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)signature);
    +        jvmti_env->Deallocate((unsigned char*)signature);
     }
     
     static void JNICALL
    @@ -186,19 +183,17 @@ Exception(jvmtiEnv *jvmti_env, JNIEnv *jni_env, jthread thread,
     
         ExceptionEventsCount++;
     
    -    if (!NSK_JNI_VERIFY(jni_env, (klass =
    -            NSK_CPP_STUB2(GetObjectClass, jni_env, exception)) != NULL)) {
    +    if (!NSK_JNI_VERIFY(jni_env, (klass = jni_env->GetObjectClass(exception)) != NULL)) {
             nsk_jvmti_setFailStatus();
             return;
         }
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(GetClassSignature, jvmti_env,
    -            klass, &signature, NULL))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti_env->GetClassSignature(klass, &signature, NULL))) {
             nsk_jvmti_setFailStatus();
             return;
         }
         NSK_DISPLAY1("Exception event: %s\n", signature);
         if (signature != NULL)
    -        NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)signature);
    +        jvmti_env->Deallocate((unsigned char*)signature);
     }
     
     void JNICALL
    @@ -209,19 +204,17 @@ ExceptionCatch(jvmtiEnv *jvmti_env, JNIEnv *jni_env, jthread thread,
     
         ExceptionCatchEventsCount++;
     
    -    if (!NSK_JNI_VERIFY(jni_env, (klass =
    -            NSK_CPP_STUB2(GetObjectClass, jni_env, exception)) != NULL)) {
    +    if (!NSK_JNI_VERIFY(jni_env, (klass = jni_env->GetObjectClass(exception)) != NULL)) {
             nsk_jvmti_setFailStatus();
             return;
         }
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(GetClassSignature, jvmti_env,
    -            klass, &signature, NULL))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti_env->GetClassSignature(klass, &signature, NULL))) {
             nsk_jvmti_setFailStatus();
             return;
         }
         NSK_DISPLAY1("ExceptionCatch event: %s\n", signature);
         if (signature != NULL)
    -        NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)signature);
    +        jvmti_env->Deallocate((unsigned char*)signature);
     }
     
     static void JNICALL
    @@ -231,18 +224,17 @@ Breakpoint(jvmtiEnv *jvmti_env, JNIEnv *jni_env,
         char *signature = NULL;
     
         BreakpointEventsCount++;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(GetMethodName,
    -            jvmti_env, method, &name, &signature, NULL))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti_env->GetMethodName(method, &name, &signature, NULL))) {
             nsk_jvmti_setFailStatus();
             return;
         }
         NSK_DISPLAY2("Breakpoint event: %s%s\n", name, signature);
         if (name != NULL)
    -        NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)name);
    +        jvmti_env->Deallocate((unsigned char*)name);
         if (signature != NULL)
    -        NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)signature);
    +        jvmti_env->Deallocate((unsigned char*)signature);
     
    -    NSK_CPP_STUB3(NotifyFramePop, jvmti_env, thread, 0);
    +    jvmti_env->NotifyFramePop(thread, 0);
     }
     
     static void JNICALL
    @@ -253,16 +245,15 @@ FramePop(jvmtiEnv *jvmti_env, JNIEnv *jni_env,
         char *signature = NULL;
     
         FramePopEventsCount++;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(GetMethodName,
    -            jvmti_env, method, &name, &signature, NULL))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti_env->GetMethodName(method, &name, &signature, NULL))) {
             nsk_jvmti_setFailStatus();
             return;
         }
         NSK_DISPLAY2("FramePop event: %s%s\n", name, signature);
         if (name != NULL)
    -        NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)name);
    +        jvmti_env->Deallocate((unsigned char*)name);
         if (signature != NULL)
    -        NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)signature);
    +        jvmti_env->Deallocate((unsigned char*)signature);
     }
     
     static void JNICALL
    @@ -272,16 +263,15 @@ MethodEntry(jvmtiEnv *jvmti_env, JNIEnv *jni_env,
         char *signature = NULL;
     
         MethodEntryEventsCount++;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(GetMethodName,
    -            jvmti_env, method, &name, &signature, NULL))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti_env->GetMethodName(method, &name, &signature, NULL))) {
             nsk_jvmti_setFailStatus();
             return;
         }
         NSK_DISPLAY2("MethodEntry event: %s%s\n", name, signature);
         if (name != NULL)
    -        NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)name);
    +        jvmti_env->Deallocate((unsigned char*)name);
         if (signature != NULL)
    -        NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)signature);
    +        jvmti_env->Deallocate((unsigned char*)signature);
     }
     
     static void JNICALL
    @@ -292,16 +282,15 @@ MethodExit(jvmtiEnv *jvmti_env, JNIEnv *jni_env,
         char *signature = NULL;
     
         MethodExitEventsCount++;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(GetMethodName,
    -            jvmti_env, method, &name, &signature, NULL))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti_env->GetMethodName(method, &name, &signature, NULL))) {
             nsk_jvmti_setFailStatus();
             return;
         }
         NSK_DISPLAY2("MethodExit event: %s%s\n", name, signature);
         if (name != NULL)
    -        NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)name);
    +        jvmti_env->Deallocate((unsigned char*)name);
         if (signature != NULL)
    -        NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)signature);
    +        jvmti_env->Deallocate((unsigned char*)signature);
     }
     
     /* ========================================================================== */
    @@ -316,8 +305,7 @@ static int prepare(jvmtiEnv* jvmti, JNIEnv* jni) {
         NSK_DISPLAY0("Prepare: find tested thread\n");
     
         /* get all live threads */
    -    if (!NSK_JVMTI_VERIFY(
    -           NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads)))
             return NSK_FALSE;
     
         if (!NSK_VERIFY(threads_count > 0 && threads != NULL))
    @@ -329,8 +317,7 @@ static int prepare(jvmtiEnv* jvmti, JNIEnv* jni) {
                 return NSK_FALSE;
     
             /* get thread information */
    -        if (!NSK_JVMTI_VERIFY(
    -                NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info)))
    +        if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info)))
                 return NSK_FALSE;
     
             NSK_DISPLAY3("    thread #%d (%s): %p\n", i, info.name, threads[i]);
    @@ -341,28 +328,23 @@ static int prepare(jvmtiEnv* jvmti, JNIEnv* jni) {
             }
         }
     
    -    if (!NSK_JNI_VERIFY(jni, (thread =
    -            NSK_CPP_STUB2(NewGlobalRef, jni, thread)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (thread = jni->NewGlobalRef(thread)) != NULL))
             return NSK_FALSE;
     
         /* deallocate threads list */
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads)))
             return NSK_FALSE;
     
         /* get tested thread class */
    -    if (!NSK_JNI_VERIFY(jni, (klass =
    -            NSK_CPP_STUB2(GetObjectClass, jni, thread)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (klass = jni->GetObjectClass(thread)) != NULL))
             return NSK_FALSE;
     
         /* get tested thread method 'delay' */
    -    if (!NSK_JNI_VERIFY(jni, (method =
    -            NSK_CPP_STUB4(GetMethodID, jni, klass, "delay", "()V")) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (method = jni->GetMethodID(klass, "delay", "()V")) != NULL))
             return NSK_FALSE;
     
         /* get tested thread field 'waitingFlag' */
    -    if (!NSK_JNI_VERIFY(jni, (field =
    -            NSK_CPP_STUB4(GetFieldID, jni, klass, "waitingFlag", "Z")) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (field = jni->GetFieldID(klass, "waitingFlag", "Z")) != NULL))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -372,41 +354,37 @@ static int prepareEvents(jvmtiEnv* jvmti, JNIEnv* jni) {
         NSK_DISPLAY0("Prepare events ...\n");
     
         /* get tested thread method 'letItGo' */
    -    if (!NSK_JNI_VERIFY(jni, (method =
    -            NSK_CPP_STUB4(GetMethodID, jni, klass, "letItGo", "()V")) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (method = jni->GetMethodID(klass, "letItGo", "()V")) != NULL))
             return NSK_FALSE;
     
         /* get tested thread field 'waitingFlag' */
    -    if (!NSK_JNI_VERIFY(jni, (field =
    -            NSK_CPP_STUB4(GetFieldID, jni, klass, "waitingFlag", "Z")) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (field = jni->GetFieldID(klass, "waitingFlag", "Z")) != NULL))
             return NSK_FALSE;
     
    -    if (!NSK_JVMTI_VERIFY(
    -           NSK_CPP_STUB3(SetFieldAccessWatch, jvmti, klass, field)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->SetFieldAccessWatch(klass, field)))
             return NSK_FALSE;
     
    -    if (!NSK_JVMTI_VERIFY(
    -           NSK_CPP_STUB3(SetFieldModificationWatch, jvmti, klass, field)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->SetFieldModificationWatch(klass, field)))
             return NSK_FALSE;
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetBreakpoint, jvmti, method, 0)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->SetBreakpoint(method, 0)))
             return NSK_FALSE;
     
         /* enable events */
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode,
    -            jvmti, JVMTI_ENABLE, JVMTI_EVENT_SINGLE_STEP, NULL)))
    +    if (!NSK_JVMTI_VERIFY(
    +            jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_SINGLE_STEP, NULL)))
             return JNI_ERR;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode,
    -            jvmti, JVMTI_ENABLE, JVMTI_EVENT_EXCEPTION, NULL)))
    +    if (!NSK_JVMTI_VERIFY(
    +            jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_EXCEPTION, NULL)))
             return JNI_ERR;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode,
    -            jvmti, JVMTI_ENABLE, JVMTI_EVENT_EXCEPTION_CATCH, NULL)))
    +    if (!NSK_JVMTI_VERIFY(
    +            jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_EXCEPTION_CATCH, NULL)))
             return JNI_ERR;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode,
    -            jvmti, JVMTI_ENABLE, JVMTI_EVENT_METHOD_ENTRY, thread)))
    +    if (!NSK_JVMTI_VERIFY(
    +            jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_METHOD_ENTRY, thread)))
             return NSK_FALSE;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode,
    -            jvmti, JVMTI_ENABLE, JVMTI_EVENT_METHOD_EXIT, thread)))
    +    if (!NSK_JVMTI_VERIFY(
    +            jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_METHOD_EXIT, thread)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -420,7 +398,7 @@ static int checkGetCapabilities(jvmtiEnv* jvmti) {
         jvmtiCapabilities caps;
     
         memset(&caps, 0, sizeof(caps));
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps)))
             return NSK_FALSE;
         if (!NSK_VERIFY(caps.can_get_bytecodes))
             return NSK_FALSE;
    @@ -471,10 +449,9 @@ static int checkGetBytecodes(jvmtiEnv* jvmti) {
         unsigned char *bytecodes;
     
         NSK_DISPLAY0("Checking positive: GetBytecodes\n");
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB4(GetBytecodes, jvmti, method, &count, &bytecodes)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetBytecodes(method, &count, &bytecodes)))
             return NSK_FALSE;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(Deallocate, jvmti, bytecodes)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->Deallocate(bytecodes)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -486,13 +463,11 @@ static int checkIsSyntheticFunctions(jvmtiEnv* jvmti) {
         jboolean is_synthetic;
     
         NSK_DISPLAY0("Checking positive: IsFieldSynthetic\n");
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB4(IsFieldSynthetic, jvmti, klass, field, &is_synthetic)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->IsFieldSynthetic(klass, field, &is_synthetic)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking positive: IsMethodSynthetic\n");
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB3(IsMethodSynthetic, jvmti, method, &is_synthetic)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->IsMethodSynthetic(method, &is_synthetic)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -511,12 +486,11 @@ static int checkRedefineClasses(jvmtiEnv* jvmti) {
         class_def.klass = klass;
         class_def.class_byte_count = klass_byte_count;
         class_def.class_bytes = klass_bytes;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(RedefineClasses, jvmti, 1, &class_def)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->RedefineClasses(1, &class_def)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking positive: IsMethodObsolete\n");
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB3(IsMethodObsolete, jvmti, method, &is_obsolete)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->IsMethodObsolete(method, &is_obsolete)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -528,8 +502,7 @@ static int checkGetSourceFileName(jvmtiEnv* jvmti) {
         char *name;
     
         NSK_DISPLAY0("Checking positive: GetSourceFileName\n");
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB3(GetSourceFileName, jvmti, klass, &name)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetSourceFileName(klass, &name)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -542,9 +515,7 @@ static int checkGetLineNumberTable(jvmtiEnv* jvmti) {
         jvmtiLineNumberEntry *line_number_table = NULL;
     
         NSK_DISPLAY0("Checking positive: GetLineNumberTable\n");
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB4(GetLineNumberTable, jvmti, method, &count,
    -                &line_number_table)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetLineNumberTable(method, &count, &line_number_table)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -557,7 +528,7 @@ static int checkGetSourceDebugExtension(jvmtiEnv* jvmti) {
     
         NSK_DISPLAY0("Checking positive: GetSourceDebugExtension\n");
         if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_ABSENT_INFORMATION,
    -            NSK_CPP_STUB3(GetSourceDebugExtension, jvmti, klass, &name)))
    +            jvmti->GetSourceDebugExtension(klass, &name)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -576,77 +547,74 @@ static int checkLocalVariableFunctions(jvmtiEnv* jvmti) {
         int i;
     
         NSK_DISPLAY0("Checking positive: GetLocalVariableTable\n");
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB4(GetLocalVariableTable, jvmti, method, &count,
    -                &local_variable_table)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetLocalVariableTable(method, &count, &local_variable_table)))
             return NSK_FALSE;
     
     /* DEBUG -- while 4913796 bug not fixed thread should be suspended
      */
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(SuspendThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->SuspendThread(thread)))
             return NSK_FALSE;
     
         for (i = 0; i < count; i++) {
             if (strcmp(local_variable_table[i].name, "o") ==0) {
                 NSK_DISPLAY0("Checking positive: GetLocalObject\n");
    -            if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(GetLocalObject, jvmti,
    -                    thread, 1, local_variable_table[i].slot, &object_value)))
    +            if (!NSK_JVMTI_VERIFY(
    +                    jvmti->GetLocalObject(thread, 1, local_variable_table[i].slot, &object_value)))
                     return NSK_FALSE;
     
                 NSK_DISPLAY0("Checking positive: SetLocalObject\n");
    -            if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(SetLocalObject, jvmti,
    -                    thread, 1, local_variable_table[i].slot, object_value)))
    +            if (!NSK_JVMTI_VERIFY(
    +                    jvmti->SetLocalObject(thread, 1, local_variable_table[i].slot, object_value)))
                     return NSK_FALSE;
             } else if (strcmp(local_variable_table[i].name, "i") ==0) {
                 NSK_DISPLAY0("Checking positive: GetLocalInt\n");
    -            if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(GetLocalInt, jvmti,
    -                    thread, 1, local_variable_table[i].slot, &int_value)))
    +            if (!NSK_JVMTI_VERIFY(
    +                    jvmti->GetLocalInt(thread, 1, local_variable_table[i].slot, &int_value)))
                     return NSK_FALSE;
     
                 NSK_DISPLAY0("Checking positive: SetLocalInt\n");
    -            if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(SetLocalInt, jvmti,
    -                    thread, 1, local_variable_table[i].slot, int_value)))
    +            if (!NSK_JVMTI_VERIFY(
    +                    jvmti->SetLocalInt(thread, 1, local_variable_table[i].slot, int_value)))
                     return NSK_FALSE;
             } else if (strcmp(local_variable_table[i].name, "l") ==0) {
                 NSK_DISPLAY0("Checking positive: GetLocalLong\n");
    -            if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(GetLocalLong, jvmti,
    -                    thread, 1, local_variable_table[i].slot, &long_value)))
    +            if (!NSK_JVMTI_VERIFY(
    +                    jvmti->GetLocalLong(thread, 1, local_variable_table[i].slot, &long_value)))
                     return NSK_FALSE;
     
                 NSK_DISPLAY0("Checking positive: SetLocalLong\n");
    -            if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(SetLocalLong, jvmti,
    -                    thread, 1, local_variable_table[i].slot, long_value)))
    +            if (!NSK_JVMTI_VERIFY(
    +                    jvmti->SetLocalLong(thread, 1, local_variable_table[i].slot, long_value)))
                     return NSK_FALSE;
             } else if (strcmp(local_variable_table[i].name, "f") ==0) {
                 NSK_DISPLAY0("Checking positive: GetLocalFloat\n");
    -            if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(GetLocalFloat, jvmti,
    -                    thread, 1, local_variable_table[i].slot, &float_value)))
    +            if (!NSK_JVMTI_VERIFY(
    +                    jvmti->GetLocalFloat(thread, 1, local_variable_table[i].slot, &float_value)))
                     return NSK_FALSE;
     
                 NSK_DISPLAY0("Checking positive: SetLocalFloat\n");
    -            if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(SetLocalFloat, jvmti,
    -                    thread, 1, local_variable_table[i].slot, float_value)))
    +            if (!NSK_JVMTI_VERIFY(
    +                    jvmti->SetLocalFloat(thread, 1, local_variable_table[i].slot, float_value)))
                     return NSK_FALSE;
             } else if (strcmp(local_variable_table[i].name, "d") ==0) {
                 NSK_DISPLAY0("Checking positive: GetLocalDouble\n");
    -            if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(GetLocalDouble, jvmti,
    -                    thread, 1, local_variable_table[i].slot, &double_value)))
    +            if (!NSK_JVMTI_VERIFY(
    +                    jvmti->GetLocalDouble(thread, 1, local_variable_table[i].slot, &double_value)))
                     return NSK_FALSE;
     
                 NSK_DISPLAY0("Checking positive: SetLocalDouble\n");
    -            if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(SetLocalDouble, jvmti,
    -                    thread, 1, local_variable_table[i].slot, double_value)))
    +            if (!NSK_JVMTI_VERIFY(
    +                    jvmti->SetLocalDouble(thread, 1, local_variable_table[i].slot, double_value)))
                     return NSK_FALSE;
             }
         }
     
     /* DEBUG -- while 4913796 bug not fixed thread should be suspended
      */
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(ResumeThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->ResumeThread(thread)))
             return NSK_FALSE;
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(Deallocate, jvmti,
    -            (unsigned char*)local_variable_table)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)local_variable_table)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -658,21 +626,19 @@ static int checkSuspend(jvmtiEnv* jvmti) {
         jvmtiError err;
     
         NSK_DISPLAY0("Checking positive: SuspendThread\n");
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(SuspendThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->SuspendThread(thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking positive: ResumeThread\n");
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(ResumeThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->ResumeThread(thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking positive: SuspendThreadList\n");
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB4(SuspendThreadList, jvmti, 1, &thread, &err)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->SuspendThreadList(1, &thread, &err)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking positive: ResumeThreadList\n");
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB4(ResumeThreadList, jvmti, 1, &thread, &err)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->ResumeThreadList(1, &thread, &err)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -685,20 +651,20 @@ static int checkPopFrame(jvmtiEnv* jvmti) {
         jvmtiError err;
     
         NSK_DISPLAY0("Checking positive: PopFrame\n");
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(SuspendThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->SuspendThread(thread)))
             return NSK_FALSE;
     
         // PopFrame is allowed to fail with JVMTI_ERROR_OPAQUE_FRAME.
         // That will happen if we are in a native function,
         // for example while waiting for a Condition.
         // See JCK-5020108.
    -    err = NSK_CPP_STUB2(PopFrame, jvmti, thread);
    +    err = jvmti->PopFrame(thread);
         if (err != JVMTI_ERROR_NONE && err != JVMTI_ERROR_OPAQUE_FRAME) {
           result = NSK_FALSE;
           NSK_DISPLAY1("jvmti error from PopFrame: %d\n", err);
         }
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(ResumeThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->ResumeThread(thread)))
             result = NSK_FALSE;
     
         return result;
    @@ -714,25 +680,22 @@ static int checkSignalThread(jvmtiEnv* jvmti, JNIEnv* jni) {
         jmethodID ctor = NULL;
         jobject exception = NULL;
     
    -    if (!NSK_JNI_VERIFY(jni, (cls =
    -            NSK_CPP_STUB2(FindClass, jni, THREAD_DEATH_CLASS_NAME)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (cls = jni->FindClass(THREAD_DEATH_CLASS_NAME)) != NULL))
             return NSK_FALSE;
     
         if (!NSK_JNI_VERIFY(jni, (ctor =
    -            NSK_CPP_STUB4(GetMethodID, jni, cls,
    -                THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
    +            jni->GetMethodID(cls, THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL))
             return NSK_FALSE;
     
    -    if (!NSK_JNI_VERIFY(jni, (exception =
    -            NSK_CPP_STUB3(NewObject, jni, cls, ctor)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (exception = jni->NewObject(cls, ctor)) != NULL))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking positive: InterruptThread\n");
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(InterruptThread, jvmti, thread)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->InterruptThread(thread)))
             return NSK_FALSE;
     
         NSK_DISPLAY0("Checking positive: StopThread\n");
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(StopThread, jvmti, thread, exception)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->StopThread(thread, exception)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -847,7 +810,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) {
         if (!checkSignalThread(jvmti, jni))
             nsk_jvmti_setFailStatus();
     
    -    NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, thread));
    +    NSK_TRACE(jni->DeleteGlobalRef(thread));
     
         /* resume debugee and wait for sync */
         if (!nsk_jvmti_resumeSync())
    @@ -916,7 +879,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         caps.can_generate_breakpoint_events = 1;
         caps.can_generate_method_entry_events = 1;
         caps.can_generate_method_exit_events = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
             return JNI_ERR;
     
         /* set event callbacks */
    @@ -931,25 +894,24 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         callbacks.FramePop = &FramePop;
         callbacks.MethodEntry = &MethodEntry;
         callbacks.MethodExit = &MethodExit;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetEventCallbacks,
    -            jvmti, &callbacks, sizeof(callbacks))))
    +    if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, sizeof(callbacks))))
             return JNI_ERR;
     
         /* enable events */
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode,
    -            jvmti, JVMTI_ENABLE, JVMTI_EVENT_CLASS_FILE_LOAD_HOOK, NULL)))
    +    if (!NSK_JVMTI_VERIFY(
    +            jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_CLASS_FILE_LOAD_HOOK, NULL)))
             return JNI_ERR;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode,
    -            jvmti, JVMTI_ENABLE, JVMTI_EVENT_FIELD_ACCESS, NULL)))
    +    if (!NSK_JVMTI_VERIFY(
    +            jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_FIELD_ACCESS, NULL)))
             return JNI_ERR;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode,
    -            jvmti, JVMTI_ENABLE, JVMTI_EVENT_FIELD_MODIFICATION, NULL)))
    +    if (!NSK_JVMTI_VERIFY(
    +            jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_FIELD_MODIFICATION, NULL)))
             return JNI_ERR;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode,
    -            jvmti, JVMTI_ENABLE, JVMTI_EVENT_BREAKPOINT, NULL)))
    +    if (!NSK_JVMTI_VERIFY(
    +            jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_BREAKPOINT, NULL)))
             return JNI_ERR;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode,
    -            jvmti, JVMTI_ENABLE, JVMTI_EVENT_FRAME_POP, NULL)))
    +    if (!NSK_JVMTI_VERIFY(
    +            jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_FRAME_POP, NULL)))
             return JNI_ERR;
     
         /* register agent proc and arg */
    diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/contention/TC01/tc01t001/tc01t001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/contention/TC01/tc01t001/tc01t001.cpp
    index 3b4458420a4..852c148dc6d 100644
    --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/contention/TC01/tc01t001/tc01t001.cpp
    +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/contention/TC01/tc01t001/tc01t001.cpp
    @@ -54,8 +54,7 @@ static int prepare(jvmtiEnv* jvmti, JNIEnv* jni) {
         NSK_DISPLAY0("Prepare: find tested thread\n");
     
         /* get all live threads */
    -    if (!NSK_JVMTI_VERIFY(
    -           NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads)))
             return NSK_FALSE;
     
         if (!NSK_VERIFY(threads_count > 0 && threads != NULL))
    @@ -67,8 +66,7 @@ static int prepare(jvmtiEnv* jvmti, JNIEnv* jni) {
                 return NSK_FALSE;
     
             /* get thread information */
    -        if (!NSK_JVMTI_VERIFY(
    -                NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info)))
    +        if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info)))
                 return NSK_FALSE;
     
             NSK_DISPLAY3("    thread #%d (%s): %p\n", i, info.name, threads[i]);
    @@ -79,38 +77,31 @@ static int prepare(jvmtiEnv* jvmti, JNIEnv* jni) {
             }
     
             if (info.name != NULL) {
    -            if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(
    -                    Deallocate, jvmti, (unsigned char*)info.name)))
    +            if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)info.name)))
                     return NSK_FALSE;
             }
         }
     
         /* deallocate threads list */
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads)))
             return NSK_FALSE;
     
         /* get tested thread class */
    -    if (!NSK_JNI_VERIFY(jni, (klass =
    -            NSK_CPP_STUB2(GetObjectClass, jni, thread)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (klass = jni->GetObjectClass(thread)) != NULL))
             return NSK_FALSE;
     
         /* get tested thread field 'M1' */
    -    if (!NSK_JNI_VERIFY(jni, (field =
    -            NSK_CPP_STUB4(GetFieldID, jni, klass, "M1", FIELD_SIG)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (field = jni->GetFieldID(klass, "M1", FIELD_SIG)) != NULL))
             return NSK_FALSE;
     
    -    if (!NSK_JNI_VERIFY(jni, (object_M1 =
    -            NSK_CPP_STUB3(GetObjectField, jni, thread, field)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (object_M1 = jni->GetObjectField(thread, field)) != NULL))
             return NSK_FALSE;
     
         /* get tested thread field 'M2' */
    -    if (!NSK_JNI_VERIFY(jni, (field =
    -            NSK_CPP_STUB4(GetFieldID, jni, klass, "M2", FIELD_SIG)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (field = jni->GetFieldID(klass, "M2", FIELD_SIG)) != NULL))
             return NSK_FALSE;
     
    -    if (!NSK_JNI_VERIFY(jni, (object_M2 =
    -            NSK_CPP_STUB3(GetObjectField, jni, thread, field)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (object_M2 = jni->GetObjectField(thread, field)) != NULL))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -126,22 +117,19 @@ static int checkGetObjectMonitorUsage(jvmtiEnv* jvmti, JNIEnv* jni,
         int i;
     
         NSK_DISPLAY1("Checking GetObjectMonitorUsage for 0x%p\n", object);
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(
    -            GetObjectMonitorUsage, jvmti, object, &inf)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetObjectMonitorUsage(object, &inf)))
             return NSK_FALSE;
     
         if (nsk_getVerboseMode()) {
             if (inf.owner == NULL) {
                 NSK_DISPLAY0("\towner: none (0x0)\n");
             } else {
    -            if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(
    -                    GetThreadInfo, jvmti, inf.owner, &tinf))) {
    +            if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(inf.owner, &tinf))) {
                     result = NSK_FALSE;
                 } else {
                     NSK_DISPLAY2("\towner: %s (0x%p)\n", tinf.name, inf.owner);
                     if (tinf.name != NULL) {
    -                    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(
    -                            Deallocate, jvmti, (unsigned char*)tinf.name)))
    +                    if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)tinf.name)))
                             result = NSK_FALSE;
                     }
                 }
    @@ -152,15 +140,13 @@ static int checkGetObjectMonitorUsage(jvmtiEnv* jvmti, JNIEnv* jni,
             if (inf.waiter_count > 0) {
                 NSK_DISPLAY0("\twaiters:\n");
                 for (i = 0; i < inf.waiter_count; i++) {
    -                if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(
    -                        GetThreadInfo, jvmti, inf.waiters[i], &tinf))) {
    +                if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(inf.waiters[i], &tinf))) {
                         result = NSK_FALSE;
                     } else {
                         NSK_DISPLAY3("\t\t%2d: %s (0x%p)\n",
                             i, tinf.name, inf.waiters[i]);
                         if (tinf.name != NULL) {
    -                        if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(
    -                                Deallocate, jvmti, (unsigned char*)tinf.name)))
    +                        if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)tinf.name)))
                                 result = NSK_FALSE;
                         }
                     }
    @@ -171,15 +157,13 @@ static int checkGetObjectMonitorUsage(jvmtiEnv* jvmti, JNIEnv* jni,
             if (inf.notify_waiter_count > 0) {
                 NSK_DISPLAY0("\tnotify_waiters:\n");
                 for (i = 0; i < inf.notify_waiter_count; i++) {
    -                if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(
    -                        GetThreadInfo, jvmti, inf.notify_waiters[i], &tinf))) {
    +                if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(inf.notify_waiters[i], &tinf))) {
                         result = NSK_FALSE;
                     } else {
                         NSK_DISPLAY3("\t\t%2d: %s (0x%p)\n",
                             i, tinf.name, inf.notify_waiters[i]);
                         if (tinf.name != NULL) {
    -                        if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(
    -                                Deallocate, jvmti, (unsigned char*)tinf.name)))
    +                        if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)tinf.name)))
                                 result = NSK_FALSE;
                         }
                     }
    @@ -188,8 +172,7 @@ static int checkGetObjectMonitorUsage(jvmtiEnv* jvmti, JNIEnv* jni,
         }
     
         /* check owner to be debugee thread */
    -    if (!NSK_JNI_VERIFY(jni, (NSK_CPP_STUB3(
    -            IsSameObject, jni, inf.owner, thread)) == JNI_TRUE))
    +    if (!NSK_JNI_VERIFY(jni, (jni->IsSameObject(inf.owner, thread)) == JNI_TRUE))
             result = NSK_FALSE;
     
         if (!NSK_VERIFY(inf.entry_count == 2))
    @@ -203,13 +186,11 @@ static int checkGetObjectMonitorUsage(jvmtiEnv* jvmti, JNIEnv* jni,
     
         /* deallocate monitor waiters arrays */
         if (inf.waiters != NULL) {
    -        if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(
    -                Deallocate, jvmti, (unsigned char*)inf.waiters)))
    +        if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)inf.waiters)))
                 result = NSK_FALSE;
         }
         if (inf.notify_waiters != NULL) {
    -        if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(
    -                Deallocate, jvmti, (unsigned char*)inf.notify_waiters)))
    +        if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)inf.notify_waiters)))
                 result = NSK_FALSE;
         }
     
    @@ -279,7 +260,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         /* add capabilities */
         memset(&caps, 0, sizeof(caps));
         caps.can_get_monitor_info = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
             return JNI_ERR;
     
         /* register agent proc and arg */
    diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/contention/TC02/tc02t001/tc02t001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/contention/TC02/tc02t001/tc02t001.cpp
    index 53ce7aacb8c..853e2403903 100644
    --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/contention/TC02/tc02t001/tc02t001.cpp
    +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/contention/TC02/tc02t001/tc02t001.cpp
    @@ -52,8 +52,7 @@ static jint findLineNumber(jvmtiEnv *jvmti, jthread thread) {
         jint line = 0;
         int i;
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(
    -            GetFrameLocation, jvmti, thread, 0, &method, &location)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetFrameLocation(thread, 0, &method, &location)))
             return 0;
     
         if (!NSK_VERIFY(method != NULL))
    @@ -62,8 +61,7 @@ static jint findLineNumber(jvmtiEnv *jvmti, jthread thread) {
         if (!NSK_VERIFY(location != -1))
             return 0;
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(
    -            GetLineNumberTable, jvmti, method, &count, &table)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetLineNumberTable(method, &count, &table)))
             return 0;
     
         if (!NSK_VERIFY(table != NULL))
    @@ -81,8 +79,7 @@ static jint findLineNumber(jvmtiEnv *jvmti, jthread thread) {
         line = table[i-1].line_number;
     
         if (table != NULL) {
    -        if (!NSK_JVMTI_VERIFY(
    -                NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)table)))
    +        if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)table)))
                 return 0;
         }
     
    @@ -108,8 +105,8 @@ MonitorContendedEnter(jvmtiEnv *jvmti, JNIEnv* jni, jthread thr, jobject obj) {
         }
     
         /* check if event is for tested thread and object */
    -    if (NSK_CPP_STUB3(IsSameObject, jni, thread, thr) &&
    -            NSK_CPP_STUB3(IsSameObject, jni, object_M, obj)) {
    +    if (jni->IsSameObject(thread, thr) &&
    +            jni->IsSameObject(object_M, obj)) {
     
             if (!(line = findLineNumber(jvmti, thread))) {
                 nsk_jvmti_setFailStatus();
    @@ -152,8 +149,8 @@ MonitorContendedEntered(jvmtiEnv *jvmti, JNIEnv* jni, jthread thr, jobject obj)
         }
     
         /* check if event is for tested thread and object */
    -    if (NSK_CPP_STUB3(IsSameObject, jni, thread, thr) &&
    -            NSK_CPP_STUB3(IsSameObject, jni, object_M, obj)) {
    +    if (jni->IsSameObject(thread, thr) &&
    +            jni->IsSameObject(object_M, obj)) {
     
             if (!(line = findLineNumber(jvmti, thread))) {
                 nsk_jvmti_setFailStatus();
    @@ -194,8 +191,7 @@ static int prepare(jvmtiEnv* jvmti, JNIEnv* jni) {
         NSK_DISPLAY0("Prepare: find tested thread\n");
     
         /* get all live threads */
    -    if (!NSK_JVMTI_VERIFY(
    -           NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads)))
             return NSK_FALSE;
     
         if (!NSK_VERIFY(threads_count > 0 && threads != NULL))
    @@ -207,8 +203,7 @@ static int prepare(jvmtiEnv* jvmti, JNIEnv* jni) {
                 return NSK_FALSE;
     
             /* get thread information */
    -        if (!NSK_JVMTI_VERIFY(
    -                NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info)))
    +        if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info)))
                 return NSK_FALSE;
     
             NSK_DISPLAY3("    thread #%d (%s): %p\n", i, info.name, threads[i]);
    @@ -219,15 +214,13 @@ static int prepare(jvmtiEnv* jvmti, JNIEnv* jni) {
             }
     
             if (info.name != NULL) {
    -            if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(
    -                    Deallocate, jvmti, (unsigned char*)info.name)))
    +            if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)info.name)))
                     return NSK_FALSE;
             }
         }
     
         /* deallocate threads list */
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads)))
             return NSK_FALSE;
     
         if (thread == NULL) {
    @@ -236,39 +229,34 @@ static int prepare(jvmtiEnv* jvmti, JNIEnv* jni) {
         }
     
         /* make thread accessable for a long time */
    -    if (!NSK_JNI_VERIFY(jni, (thread =
    -            NSK_CPP_STUB2(NewGlobalRef, jni, thread)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (thread = jni->NewGlobalRef(thread)) != NULL))
             return NSK_FALSE;
     
         /* get tested thread class */
    -    if (!NSK_JNI_VERIFY(jni, (klass =
    -            NSK_CPP_STUB2(GetObjectClass, jni, thread)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (klass = jni->GetObjectClass(thread)) != NULL))
             return NSK_FALSE;
     
         /* get tested thread field 'M' */
    -    if (!NSK_JNI_VERIFY(jni, (field =
    -            NSK_CPP_STUB4(GetFieldID, jni, klass, "M", FIELD_SIG)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (field = jni->GetFieldID(klass, "M", FIELD_SIG)) != NULL))
             return NSK_FALSE;
     
    -    if (!NSK_JNI_VERIFY(jni, (object_M =
    -            NSK_CPP_STUB3(GetObjectField, jni, thread, field)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (object_M = jni->GetObjectField(thread, field)) != NULL))
             return NSK_FALSE;
     
         /* make object accessable for a long time */
    -    if (!NSK_JNI_VERIFY(jni, (object_M =
    -            NSK_CPP_STUB2(NewGlobalRef, jni, object_M)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (object_M = jni->NewGlobalRef(object_M)) != NULL))
             return NSK_FALSE;
     
         /* enable MonitorContendedEntered event */
         if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB4(SetEventNotificationMode, jvmti, JVMTI_ENABLE,
    -                JVMTI_EVENT_MONITOR_CONTENDED_ENTER, NULL)))
    +            jvmti->SetEventNotificationMode(
    +                JVMTI_ENABLE, JVMTI_EVENT_MONITOR_CONTENDED_ENTER, NULL)))
             return NSK_FALSE;
     
         /* enable MonitorContendedEntered event */
         if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB4(SetEventNotificationMode, jvmti, JVMTI_ENABLE,
    -                JVMTI_EVENT_MONITOR_CONTENDED_ENTERED, NULL)))
    +            jvmti->SetEventNotificationMode(
    +                JVMTI_ENABLE, JVMTI_EVENT_MONITOR_CONTENDED_ENTERED, NULL)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -278,8 +266,8 @@ static int clean(jvmtiEnv* jvmti, JNIEnv* jni) {
     
         /* disable MonitorContendedEntered event */
         if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB4(SetEventNotificationMode, jvmti, JVMTI_DISABLE,
    -                JVMTI_EVENT_MONITOR_CONTENDED_ENTERED, NULL)))
    +            jvmti->SetEventNotificationMode(
    +                JVMTI_DISABLE, JVMTI_EVENT_MONITOR_CONTENDED_ENTERED, NULL)))
             nsk_jvmti_setFailStatus();
     
         return NSK_TRUE;
    @@ -364,15 +352,13 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         memset(&caps, 0, sizeof(caps));
         caps.can_generate_monitor_events = 1;
         caps.can_get_line_numbers = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
             return JNI_ERR;
     
         memset(&callbacks, 0, sizeof(callbacks));
         callbacks.MonitorContendedEnter = &MonitorContendedEnter;
         callbacks.MonitorContendedEntered = &MonitorContendedEntered;
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB3(SetEventCallbacks, jvmti,
    -                &callbacks, sizeof(callbacks))))
    +    if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, sizeof(callbacks))))
             return JNI_ERR;
     
         /* register agent proc and arg */
    diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/contention/TC03/tc03t001/tc03t001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/contention/TC03/tc03t001/tc03t001.cpp
    index 91d2cab6995..9760e0c0207 100644
    --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/contention/TC03/tc03t001/tc03t001.cpp
    +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/contention/TC03/tc03t001/tc03t001.cpp
    @@ -57,38 +57,32 @@ static int printDeadlock(jvmtiEnv* jvmti, JNIEnv* jni, int dThread) {
         NSK_DISPLAY1("Found deadlock #%d:\n", numberOfDeadlocks);
         for (pThread = dThread;;pThread = cThread) {
             NSK_DISPLAY1(" \"%s\":\n", threadList[pThread].name);
    -        if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(GetCurrentContendedMonitor,
    -                jvmti, threadList[pThread].thread, &monitor)))
    +        if (!NSK_JVMTI_VERIFY(
    +                jvmti->GetCurrentContendedMonitor(threadList[pThread].thread, &monitor)))
                 return NSK_FALSE;
             if (monitor != NULL) {
    -            if (!NSK_JNI_VERIFY(jni, (klass =
    -                    NSK_CPP_STUB2(GetObjectClass, jni, monitor)) != NULL))
    +            if (!NSK_JNI_VERIFY(jni, (klass = jni->GetObjectClass(monitor)) != NULL))
                     return NSK_FALSE;
    -            if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(
    -                    GetClassSignature, jvmti, klass, &name, NULL)))
    +            if (!NSK_JVMTI_VERIFY(jvmti->GetClassSignature(klass, &name, NULL)))
                     return NSK_FALSE;
                 NSK_DISPLAY2("    waiting to lock %p (%s),\n", monitor, name);
    -            NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)name);
    +            jvmti->Deallocate((unsigned char*)name);
             } else {
                 NSK_DISPLAY0(" (JVMTI raw monitor),\n");
             }
    -        if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(GetObjectMonitorUsage,
    -                jvmti, monitor, &usageInfo)))
    +        if (!NSK_JVMTI_VERIFY(jvmti->GetObjectMonitorUsage(monitor, &usageInfo)))
                 return NSK_FALSE;
             if (usageInfo.owner == NULL)
                 break;
             for (cThread = 0; cThread < threads_count; cThread++) {
    -            if (NSK_CPP_STUB3(IsSameObject, jni,
    -                    threadList[cThread].thread, usageInfo.owner))
    +            if (jni->IsSameObject(threadList[cThread].thread, usageInfo.owner))
                     break;
             }
             if (usageInfo.waiters != NULL) {
    -            NSK_CPP_STUB2(Deallocate, jvmti,
    -                    (unsigned char*)usageInfo.waiters);
    +            jvmti->Deallocate((unsigned char*)usageInfo.waiters);
             }
             if (usageInfo.notify_waiters != NULL) {
    -            NSK_CPP_STUB2(Deallocate, jvmti,
    -                    (unsigned char*)usageInfo.notify_waiters);
    +            jvmti->Deallocate((unsigned char*)usageInfo.notify_waiters);
             }
             if (!NSK_VERIFY(cThread != threads_count))
                 return NSK_FALSE;
    @@ -113,15 +107,14 @@ static int findDeadlockThreads(jvmtiEnv* jvmti, JNIEnv* jni) {
         NSK_DISPLAY0("Create threadList\n");
     
         /* get all live threads */
    -    if (!NSK_JVMTI_VERIFY(
    -           NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads)))
             return NSK_FALSE;
     
         if (!NSK_VERIFY(threads_count > 0 && threads != NULL))
             return NSK_FALSE;
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(Allocate, jvmti,
    -            threads_count*sizeof(threadDesc), (unsigned char**)&threadList)))
    +    if (!NSK_JVMTI_VERIFY(
    +            jvmti->Allocate(threads_count*sizeof(threadDesc), (unsigned char**)&threadList)))
             return NSK_FALSE;
     
         for (i = 0; i < threads_count; i++) {
    @@ -129,8 +122,7 @@ static int findDeadlockThreads(jvmtiEnv* jvmti, JNIEnv* jni) {
                 return NSK_FALSE;
     
             /* get thread information */
    -        if (!NSK_JVMTI_VERIFY(
    -                NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info)))
    +        if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info)))
                 return NSK_FALSE;
     
             NSK_DISPLAY3("    thread #%d (%s): %p\n", i, info.name, threads[i]);
    @@ -141,8 +133,7 @@ static int findDeadlockThreads(jvmtiEnv* jvmti, JNIEnv* jni) {
         }
     
         /* deallocate thread list */
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads)))
             return NSK_FALSE;
     
         for (i = 0; i < threads_count; i++) {
    @@ -150,28 +141,24 @@ static int findDeadlockThreads(jvmtiEnv* jvmti, JNIEnv* jni) {
                 tDfn = gDfn;
                 threadList[i].dfn = gDfn++;
                 for (pThread = i;;pThread = cThread) {
    -                if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(GetCurrentContendedMonitor,
    -                        jvmti, threadList[pThread].thread, &monitor)))
    +                if (!NSK_JVMTI_VERIFY(
    +                        jvmti->GetCurrentContendedMonitor(threadList[pThread].thread, &monitor)))
                         return NSK_FALSE;
                     if (monitor == NULL)
                         break;
    -                if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(GetObjectMonitorUsage,
    -                        jvmti, monitor, &usageInfo)))
    +                if (!NSK_JVMTI_VERIFY(jvmti->GetObjectMonitorUsage(monitor, &usageInfo)))
                         return NSK_FALSE;
                     if (usageInfo.owner == NULL)
                         break;
                     for (cThread = 0; cThread < threads_count; cThread++) {
    -                    if (NSK_CPP_STUB3(IsSameObject, jni,
    -                            threadList[cThread].thread, usageInfo.owner))
    +                    if (jni->IsSameObject(threadList[cThread].thread, usageInfo.owner))
                             break;
                     }
                     if (usageInfo.waiters != NULL) {
    -                    NSK_CPP_STUB2(Deallocate, jvmti,
    -                            (unsigned char*)usageInfo.waiters);
    +                    jvmti->Deallocate((unsigned char*)usageInfo.waiters);
                     }
                     if (usageInfo.notify_waiters != NULL) {
    -                    NSK_CPP_STUB2(Deallocate, jvmti,
    -                            (unsigned char*)usageInfo.notify_waiters);
    +                    jvmti->Deallocate((unsigned char*)usageInfo.notify_waiters);
                     }
                     if (!NSK_VERIFY(cThread != threads_count))
                         return NSK_FALSE;
    @@ -194,8 +181,7 @@ static int findDeadlockThreads(jvmtiEnv* jvmti, JNIEnv* jni) {
         /* deallocate thread names */
         for (i = 0; i < threads_count; i++) {
             if (threadList[i].name != NULL) {
    -            if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(
    -                    Deallocate, jvmti, (unsigned char*)threadList[i].name)))
    +            if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threadList[i].name)))
                     return NSK_FALSE;
             }
         }
    @@ -261,7 +247,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         memset(&caps, 0, sizeof(caps));
         caps.can_get_current_contended_monitor = 1;
         caps.can_get_monitor_info = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
             return JNI_ERR;
     
         /* register agent proc and arg */
    diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/contention/TC03/tc03t002/tc03t002.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/contention/TC03/tc03t002/tc03t002.cpp
    index 1217bf1e04a..f98c80c34c1 100644
    --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/contention/TC03/tc03t002/tc03t002.cpp
    +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/contention/TC03/tc03t002/tc03t002.cpp
    @@ -57,38 +57,32 @@ static int printDeadlock(jvmtiEnv* jvmti, JNIEnv* jni, int dThread) {
         NSK_DISPLAY1("Found deadlock #%d:\n", numberOfDeadlocks);
         for (pThread = dThread;;pThread = cThread) {
             NSK_DISPLAY1(" \"%s\":\n", threadList[pThread].name);
    -        if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(GetCurrentContendedMonitor,
    -                jvmti, threadList[pThread].thread, &monitor)))
    +        if (!NSK_JVMTI_VERIFY(
    +                jvmti->GetCurrentContendedMonitor(threadList[pThread].thread, &monitor)))
                 return NSK_FALSE;
             if (monitor != NULL) {
    -            if (!NSK_JNI_VERIFY(jni, (klass =
    -                    NSK_CPP_STUB2(GetObjectClass, jni, monitor)) != NULL))
    +            if (!NSK_JNI_VERIFY(jni, (klass = jni->GetObjectClass(monitor)) != NULL))
                     return NSK_FALSE;
    -            if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(
    -                    GetClassSignature, jvmti, klass, &name, NULL)))
    +            if (!NSK_JVMTI_VERIFY(jvmti->GetClassSignature(klass, &name, NULL)))
                     return NSK_FALSE;
                 NSK_DISPLAY2("    waiting to lock %p (%s),\n", monitor, name);
    -            NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)name);
    +            jvmti->Deallocate((unsigned char*)name);
             } else {
                 NSK_DISPLAY0(" (JVMTI raw monitor),\n");
             }
    -        if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(GetObjectMonitorUsage,
    -                jvmti, monitor, &usageInfo)))
    +        if (!NSK_JVMTI_VERIFY(jvmti->GetObjectMonitorUsage(monitor, &usageInfo)))
                 return NSK_FALSE;
             if (usageInfo.owner == NULL)
                 break;
             for (cThread = 0; cThread < threads_count; cThread++) {
    -            if (NSK_CPP_STUB3(IsSameObject, jni,
    -                    threadList[cThread].thread, usageInfo.owner))
    +            if (jni->IsSameObject(threadList[cThread].thread, usageInfo.owner))
                     break;
             }
             if (usageInfo.waiters != NULL) {
    -            NSK_CPP_STUB2(Deallocate, jvmti,
    -                    (unsigned char*)usageInfo.waiters);
    +            jvmti->Deallocate((unsigned char*)usageInfo.waiters);
             }
             if (usageInfo.notify_waiters != NULL) {
    -            NSK_CPP_STUB2(Deallocate, jvmti,
    -                    (unsigned char*)usageInfo.notify_waiters);
    +            jvmti->Deallocate((unsigned char*)usageInfo.notify_waiters);
             }
             if (!NSK_VERIFY(cThread != threads_count))
                 return NSK_FALSE;
    @@ -113,15 +107,14 @@ static int findDeadlockThreads(jvmtiEnv* jvmti, JNIEnv* jni) {
         NSK_DISPLAY0("Create threadList\n");
     
         /* get all live threads */
    -    if (!NSK_JVMTI_VERIFY(
    -           NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads)))
             return NSK_FALSE;
     
         if (!NSK_VERIFY(threads_count > 0 && threads != NULL))
             return NSK_FALSE;
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(Allocate, jvmti,
    -            threads_count*sizeof(threadDesc), (unsigned char**)&threadList)))
    +    if (!NSK_JVMTI_VERIFY(
    +            jvmti->Allocate(threads_count*sizeof(threadDesc), (unsigned char**)&threadList)))
             return NSK_FALSE;
     
         for (i = 0; i < threads_count; i++) {
    @@ -129,8 +122,7 @@ static int findDeadlockThreads(jvmtiEnv* jvmti, JNIEnv* jni) {
                 return NSK_FALSE;
     
             /* get thread information */
    -        if (!NSK_JVMTI_VERIFY(
    -                NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info)))
    +        if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info)))
                 return NSK_FALSE;
     
             NSK_DISPLAY3("    thread #%d (%s): %p\n", i, info.name, threads[i]);
    @@ -141,8 +133,7 @@ static int findDeadlockThreads(jvmtiEnv* jvmti, JNIEnv* jni) {
         }
     
         /* deallocate thread list */
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads)))
             return NSK_FALSE;
     
         for (i = 0; i < threads_count; i++) {
    @@ -150,28 +141,24 @@ static int findDeadlockThreads(jvmtiEnv* jvmti, JNIEnv* jni) {
                 tDfn = gDfn;
                 threadList[i].dfn = gDfn++;
                 for (pThread = i;;pThread = cThread) {
    -                if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(GetCurrentContendedMonitor,
    -                        jvmti, threadList[pThread].thread, &monitor)))
    +                if (!NSK_JVMTI_VERIFY(
    +                        jvmti->GetCurrentContendedMonitor(threadList[pThread].thread, &monitor)))
                         return NSK_FALSE;
                     if (monitor == NULL)
                         break;
    -                if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(GetObjectMonitorUsage,
    -                        jvmti, monitor, &usageInfo)))
    +                if (!NSK_JVMTI_VERIFY(jvmti->GetObjectMonitorUsage(monitor, &usageInfo)))
                         return NSK_FALSE;
                     if (usageInfo.owner == NULL)
                         break;
                     for (cThread = 0; cThread < threads_count; cThread++) {
    -                    if (NSK_CPP_STUB3(IsSameObject, jni,
    -                            threadList[cThread].thread, usageInfo.owner))
    +                    if (jni->IsSameObject(threadList[cThread].thread, usageInfo.owner))
                             break;
                     }
                     if (usageInfo.waiters != NULL) {
    -                    NSK_CPP_STUB2(Deallocate, jvmti,
    -                            (unsigned char*)usageInfo.waiters);
    +                    jvmti->Deallocate((unsigned char*)usageInfo.waiters);
                     }
                     if (usageInfo.notify_waiters != NULL) {
    -                    NSK_CPP_STUB2(Deallocate, jvmti,
    -                            (unsigned char*)usageInfo.notify_waiters);
    +                    jvmti->Deallocate((unsigned char*)usageInfo.notify_waiters);
                     }
                     if (!NSK_VERIFY(cThread != threads_count))
                         return NSK_FALSE;
    @@ -194,8 +181,7 @@ static int findDeadlockThreads(jvmtiEnv* jvmti, JNIEnv* jni) {
         /* deallocate thread names */
         for (i = 0; i < threads_count; i++) {
             if (threadList[i].name != NULL) {
    -            if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(
    -                    Deallocate, jvmti, (unsigned char*)threadList[i].name)))
    +            if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threadList[i].name)))
                     return NSK_FALSE;
             }
         }
    @@ -261,7 +247,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         memset(&caps, 0, sizeof(caps));
         caps.can_get_current_contended_monitor = 1;
         caps.can_get_monitor_info = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
             return JNI_ERR;
     
         /* register agent proc and arg */
    diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/contention/TC04/tc04t001/tc04t001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/contention/TC04/tc04t001/tc04t001.cpp
    index 1203bc36139..325f47eda1e 100644
    --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/contention/TC04/tc04t001/tc04t001.cpp
    +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/contention/TC04/tc04t001/tc04t001.cpp
    @@ -44,14 +44,14 @@ static jrawMonitorID syncLock = NULL;
     
     
     static jboolean lockSyncLock(jvmtiEnv* jvmti) {
    -    jboolean status = NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorEnter, jvmti, syncLock));
    +    jboolean status = NSK_JVMTI_VERIFY(jvmti->RawMonitorEnter(syncLock));
         if (!status)
             nsk_jvmti_setFailStatus();
         return status;
     }
     
     static void unlockSyncLock(jvmtiEnv* jvmti) {
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorExit, jvmti, syncLock)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorExit(syncLock)))
             nsk_jvmti_setFailStatus();
     }
     
    @@ -73,7 +73,7 @@ MonitorWait(jvmtiEnv *jvmti, JNIEnv* jni,
         }
     
         /* check if event is for tested object */
    -    if (NSK_CPP_STUB3(IsInstanceOf, jni, obj, object_M)) {
    +    if (jni->IsInstanceOf(obj, object_M)) {
             if (lockSyncLock(jvmti)) {
                 waitEventsCount++;
                 unlockSyncLock(jvmti);
    @@ -96,7 +96,7 @@ MonitorWaited(jvmtiEnv *jvmti, JNIEnv* jni,
         }
     
         /* check if event is for tested object */
    -    if (NSK_CPP_STUB3(IsInstanceOf, jni, obj, object_M)) {
    +    if (jni->IsInstanceOf(obj, object_M)) {
             if (lockSyncLock(jvmti)) {
                 waitedEventsCount++;
                 unlockSyncLock(jvmti);
    @@ -118,7 +118,7 @@ MonitorContendedEnter(jvmtiEnv *jvmti, JNIEnv* jni, jthread thr, jobject obj) {
         }
     
         /* check if event is for tested object */
    -    if (NSK_CPP_STUB3(IsSameObject, jni, object_M, obj)) {
    +    if (jni->IsSameObject(object_M, obj)) {
             jvmtiMonitorUsage usageInfo;
     
             if (lockSyncLock(jvmti)) {
    @@ -126,12 +126,10 @@ MonitorContendedEnter(jvmtiEnv *jvmti, JNIEnv* jni, jthread thr, jobject obj) {
                 unlockSyncLock(jvmti);
             }
     
    -        if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(GetObjectMonitorUsage,
    -                jvmti, obj, &usageInfo))) {
    +        if (!NSK_JVMTI_VERIFY(jvmti->GetObjectMonitorUsage(obj, &usageInfo))) {
                 nsk_jvmti_setFailStatus();
             } else if (usageInfo.owner != NULL) {
    -            if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(
    -                    InterruptThread, jvmti, usageInfo.owner)))
    +            if (!NSK_JVMTI_VERIFY(jvmti->InterruptThread(usageInfo.owner)))
                     nsk_jvmti_setFailStatus();
             }
         }
    @@ -151,7 +149,7 @@ MonitorContendedEntered(jvmtiEnv *jvmti, JNIEnv* jni, jthread thr, jobject obj)
         }
     
         /* check if event is for tested object */
    -    if (NSK_CPP_STUB3(IsSameObject, jni, object_M, obj)) {
    +    if (jni->IsSameObject(object_M, obj)) {
             if (lockSyncLock(jvmti)) {
                 enteredEventsCount++;
                 unlockSyncLock(jvmti);
    @@ -166,40 +164,35 @@ static int prepare(jvmtiEnv* jvmti, JNIEnv* jni) {
     
         NSK_DISPLAY0("Obtain tested object from debugee thread class\n");
     
    -    if (!NSK_JNI_VERIFY(jni, (object_M =
    -            NSK_CPP_STUB2(FindClass, jni, CLASS_NAME)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (object_M = jni->FindClass(CLASS_NAME)) != NULL))
             return NSK_FALSE;
     
    -    if (!NSK_JNI_VERIFY(jni, (object_M = (jclass)
    -            NSK_CPP_STUB2(NewGlobalRef, jni, object_M)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (object_M = (jclass)jni->NewGlobalRef(object_M)) != NULL))
             return NSK_FALSE;
     
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB3(CreateRawMonitor, jvmti, "_syncLock", &syncLock)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->CreateRawMonitor("_syncLock", &syncLock)))
             return NSK_FALSE;
     
         /* enable MonitorWait event */
         if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB4(SetEventNotificationMode, jvmti, JVMTI_ENABLE,
    -                JVMTI_EVENT_MONITOR_WAIT, NULL)))
    +            jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_MONITOR_WAIT, NULL)))
             nsk_jvmti_setFailStatus();
     
         /* enable MonitorWaited event */
         if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB4(SetEventNotificationMode, jvmti, JVMTI_ENABLE,
    -                JVMTI_EVENT_MONITOR_WAITED, NULL)))
    +            jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_MONITOR_WAITED, NULL)))
             nsk_jvmti_setFailStatus();
     
         /* enable MonitorContendedEnter event */
         if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB4(SetEventNotificationMode, jvmti, JVMTI_ENABLE,
    -                JVMTI_EVENT_MONITOR_CONTENDED_ENTER, NULL)))
    +            jvmti->SetEventNotificationMode(
    +                JVMTI_ENABLE, JVMTI_EVENT_MONITOR_CONTENDED_ENTER, NULL)))
             nsk_jvmti_setFailStatus();
     
         /* enable MonitorContendedEntered event */
         if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB4(SetEventNotificationMode, jvmti, JVMTI_ENABLE,
    -                JVMTI_EVENT_MONITOR_CONTENDED_ENTERED, NULL)))
    +            jvmti->SetEventNotificationMode(
    +                JVMTI_ENABLE, JVMTI_EVENT_MONITOR_CONTENDED_ENTERED, NULL)))
             nsk_jvmti_setFailStatus();
     
         return NSK_TRUE;
    @@ -209,30 +202,27 @@ static int clean(jvmtiEnv* jvmti, JNIEnv* jni) {
     
         /* disable MonitorWait event */
         if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB4(SetEventNotificationMode, jvmti, JVMTI_DISABLE,
    -                JVMTI_EVENT_MONITOR_WAIT, NULL)))
    +            jvmti->SetEventNotificationMode(JVMTI_DISABLE, JVMTI_EVENT_MONITOR_WAIT, NULL)))
             nsk_jvmti_setFailStatus();
     
         /* disable MonitorWaited event */
         if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB4(SetEventNotificationMode, jvmti, JVMTI_DISABLE,
    -                JVMTI_EVENT_MONITOR_WAITED, NULL)))
    +            jvmti->SetEventNotificationMode(JVMTI_DISABLE, JVMTI_EVENT_MONITOR_WAITED, NULL)))
             nsk_jvmti_setFailStatus();
     
         /* disable MonitorContendedEnter event */
         if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB4(SetEventNotificationMode, jvmti, JVMTI_DISABLE,
    -                JVMTI_EVENT_MONITOR_CONTENDED_ENTER, NULL)))
    +            jvmti->SetEventNotificationMode(
    +                JVMTI_DISABLE, JVMTI_EVENT_MONITOR_CONTENDED_ENTER, NULL)))
             nsk_jvmti_setFailStatus();
     
         /* disable MonitorContendedEntered event */
         if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB4(SetEventNotificationMode, jvmti, JVMTI_DISABLE,
    -                JVMTI_EVENT_MONITOR_CONTENDED_ENTERED, NULL)))
    +            jvmti->SetEventNotificationMode(
    +                JVMTI_DISABLE, JVMTI_EVENT_MONITOR_CONTENDED_ENTERED, NULL)))
             nsk_jvmti_setFailStatus();
     
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB2(DestroyRawMonitor, jvmti, syncLock)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->DestroyRawMonitor(syncLock)))
             nsk_jvmti_setFailStatus();
     
         return NSK_TRUE;
    @@ -336,7 +326,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         caps.can_generate_monitor_events = 1;
         caps.can_get_monitor_info = 1;
         caps.can_signal_thread = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
             return JNI_ERR;
     
         memset(&callbacks, 0, sizeof(callbacks));
    @@ -344,8 +334,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         callbacks.MonitorWaited = &MonitorWaited;
         callbacks.MonitorContendedEnter = &MonitorContendedEnter;
         callbacks.MonitorContendedEntered = &MonitorContendedEntered;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetEventCallbacks, jvmti,
    -            &callbacks, sizeof(callbacks))))
    +    if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, sizeof(callbacks))))
             return JNI_ERR;
     
         /* register agent proc and arg */
    diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/contention/TC05/tc05t001/tc05t001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/contention/TC05/tc05t001/tc05t001.cpp
    index 2d4990ae87d..ff46d671ab0 100644
    --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/contention/TC05/tc05t001/tc05t001.cpp
    +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/contention/TC05/tc05t001/tc05t001.cpp
    @@ -72,14 +72,12 @@ MonitorWait(jvmtiEnv *jvmti, JNIEnv* jni,
         }
     
         /* check if event is for tested thread and object */
    -    if (NSK_CPP_STUB3(IsSameObject, jni, thread, thr) &&
    -            NSK_CPP_STUB3(IsSameObject, jni, object_M, obj)) {
    -        if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(
    -                GetThreadCpuTime, jvmti, thr, &waitThreadCpuTime))) {
    +    if (jni->IsSameObject(thread, thr) &&
    +            jni->IsSameObject(object_M, obj)) {
    +        if (!NSK_JVMTI_VERIFY(jvmti->GetThreadCpuTime(thr, &waitThreadCpuTime))) {
                 nsk_jvmti_setFailStatus();
             }
    -        if (!NSK_JVMTI_VERIFY(
    -                NSK_CPP_STUB2(GetTime, jvmti, &waitTime))) {
    +        if (!NSK_JVMTI_VERIFY(jvmti->GetTime(&waitTime))) {
                 nsk_jvmti_setFailStatus();
             }
             waitEventsCount++;
    @@ -113,14 +111,12 @@ MonitorWaited(jvmtiEnv *jvmti, JNIEnv* jni,
         }
     
         /* check if event is for tested thread and object */
    -    if (NSK_CPP_STUB3(IsSameObject, jni, thread, thr) &&
    -            NSK_CPP_STUB3(IsSameObject, jni, object_M, obj)) {
    -        if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(
    -                GetThreadCpuTime, jvmti, thr, &waitedThreadCpuTime))) {
    +    if (jni->IsSameObject(thread, thr) &&
    +            jni->IsSameObject(object_M, obj)) {
    +        if (!NSK_JVMTI_VERIFY(jvmti->GetThreadCpuTime(thr, &waitedThreadCpuTime))) {
                 nsk_jvmti_setFailStatus();
             }
    -        if (!NSK_JVMTI_VERIFY(
    -                NSK_CPP_STUB2(GetTime, jvmti, &waitedTime))) {
    +        if (!NSK_JVMTI_VERIFY(jvmti->GetTime(&waitedTime))) {
                 nsk_jvmti_setFailStatus();
             }
             waitedEventsCount++;
    @@ -149,8 +145,7 @@ static int prepare(jvmtiEnv* jvmti, JNIEnv* jni) {
         NSK_DISPLAY0("Prepare: find tested thread\n");
     
         /* get all live threads */
    -    if (!NSK_JVMTI_VERIFY(
    -           NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads)))
             return NSK_FALSE;
     
         if (!NSK_VERIFY(threads_count > 0 && threads != NULL))
    @@ -162,8 +157,7 @@ static int prepare(jvmtiEnv* jvmti, JNIEnv* jni) {
                 return NSK_FALSE;
     
             /* get thread information */
    -        if (!NSK_JVMTI_VERIFY(
    -                NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info)))
    +        if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info)))
                 return NSK_FALSE;
     
             NSK_DISPLAY3("    thread #%d (%s): %p\n", i, info.name, threads[i]);
    @@ -174,15 +168,13 @@ static int prepare(jvmtiEnv* jvmti, JNIEnv* jni) {
             }
     
             if (info.name != NULL) {
    -            if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(
    -                    Deallocate, jvmti, (unsigned char*)info.name)))
    +            if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)info.name)))
                     return NSK_FALSE;
             }
         }
     
         /* deallocate threads list */
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads)))
             return NSK_FALSE;
     
         if (thread == NULL) {
    @@ -191,39 +183,32 @@ static int prepare(jvmtiEnv* jvmti, JNIEnv* jni) {
         }
     
         /* make thread accessable for a long time */
    -    if (!NSK_JNI_VERIFY(jni, (thread =
    -            NSK_CPP_STUB2(NewGlobalRef, jni, thread)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (thread = jni->NewGlobalRef(thread)) != NULL))
             return NSK_FALSE;
     
         /* get tested thread class */
    -    if (!NSK_JNI_VERIFY(jni, (klass =
    -            NSK_CPP_STUB2(GetObjectClass, jni, thread)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (klass = jni->GetObjectClass(thread)) != NULL))
             return NSK_FALSE;
     
         /* get tested thread field 'M' */
    -    if (!NSK_JNI_VERIFY(jni, (field =
    -            NSK_CPP_STUB4(GetFieldID, jni, klass, "M", FIELD_SIG)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (field = jni->GetFieldID(klass, "M", FIELD_SIG)) != NULL))
             return NSK_FALSE;
     
    -    if (!NSK_JNI_VERIFY(jni, (object_M =
    -            NSK_CPP_STUB3(GetObjectField, jni, thread, field)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (object_M = jni->GetObjectField(thread, field)) != NULL))
             return NSK_FALSE;
     
         /* make object accessable for a long time */
    -    if (!NSK_JNI_VERIFY(jni, (object_M =
    -            NSK_CPP_STUB2(NewGlobalRef, jni, object_M)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (object_M = jni->NewGlobalRef(object_M)) != NULL))
             return NSK_FALSE;
     
         /* enable MonitorWait event */
         if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB4(SetEventNotificationMode, jvmti, JVMTI_ENABLE,
    -                JVMTI_EVENT_MONITOR_WAIT, NULL)))
    +            jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_MONITOR_WAIT, NULL)))
             return NSK_FALSE;
     
         /* enable MonitorWaited event */
         if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB4(SetEventNotificationMode, jvmti, JVMTI_ENABLE,
    -                JVMTI_EVENT_MONITOR_WAITED, NULL)))
    +            jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_MONITOR_WAITED, NULL)))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -233,14 +218,12 @@ static int clean(jvmtiEnv* jvmti, JNIEnv* jni) {
     
         /* disable MonitorWait event */
         if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB4(SetEventNotificationMode, jvmti, JVMTI_DISABLE,
    -                JVMTI_EVENT_MONITOR_WAIT, NULL)))
    +            jvmti->SetEventNotificationMode(JVMTI_DISABLE, JVMTI_EVENT_MONITOR_WAIT, NULL)))
             nsk_jvmti_setFailStatus();
     
         /* disable MonitorWaited event */
         if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB4(SetEventNotificationMode, jvmti, JVMTI_DISABLE,
    -                JVMTI_EVENT_MONITOR_WAITED, NULL)))
    +            jvmti->SetEventNotificationMode(JVMTI_DISABLE, JVMTI_EVENT_MONITOR_WAITED, NULL)))
             nsk_jvmti_setFailStatus();
     
         return NSK_TRUE;
    @@ -343,14 +326,13 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         memset(&caps, 0, sizeof(caps));
         caps.can_generate_monitor_events = 1;
         caps.can_get_thread_cpu_time = 1;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
             return JNI_ERR;
     
         memset(&callbacks, 0, sizeof(callbacks));
         callbacks.MonitorWait = &MonitorWait;
         callbacks.MonitorWaited = &MonitorWaited;
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(SetEventCallbacks, jvmti,
    -            &callbacks, sizeof(callbacks))))
    +    if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, sizeof(callbacks))))
             return JNI_ERR;
     
         /* register agent proc and arg */
    diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM01/em01t001/em01t001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM01/em01t001/em01t001.cpp
    index 5f4ba6ca666..207d22ff17f 100644
    --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM01/em01t001/em01t001.cpp
    +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM01/em01t001/em01t001.cpp
    @@ -54,12 +54,12 @@ static jvmtiPhase currentPhase;
     static void
     changeCount(jvmtiEvent event) {
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorEnter, jvmti, syncLock)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorEnter(syncLock)))
             nsk_jvmti_setFailStatus();
     
         eventCount[event - JVMTI_MIN_EVENT_TYPE_VAL]++;
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorExit, jvmti, syncLock)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorExit(syncLock)))
             nsk_jvmti_setFailStatus();
     
     }
    @@ -92,9 +92,7 @@ classEventsHandler(jvmtiEvent event, jvmtiEnv* jvmti_env, JNIEnv* jni_env,
         char *generic;
         jvmtiPhase phase;
     
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB4(GetClassSignature, jvmti_env, klass,
    -                                &className, &generic))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti_env->GetClassSignature(klass, &className, &generic))) {
             nsk_jvmti_setFailStatus();
             return;
         }
    @@ -107,7 +105,7 @@ classEventsHandler(jvmtiEvent event, jvmtiEnv* jvmti_env, JNIEnv* jni_env,
                                 className);
         }
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPhase, jvmti_env, &phase))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti_env->GetPhase(&phase))) {
             nsk_jvmti_setFailStatus();
         }
     
    @@ -125,13 +123,11 @@ classEventsHandler(jvmtiEvent event, jvmtiEnv* jvmti_env, JNIEnv* jni_env,
             nsk_jvmti_setFailStatus();
         }
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(Deallocate,
    -            jvmti_env, (unsigned char*)className))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti_env->Deallocate((unsigned char*)className))) {
             nsk_jvmti_setFailStatus();
         }
         if (generic != NULL)
    -        if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(Deallocate,
    -                jvmti_env, (unsigned char*)generic))) {
    +        if (!NSK_JVMTI_VERIFY(jvmti_env->Deallocate((unsigned char*)generic))) {
                 nsk_jvmti_setFailStatus();
             }
     }
    @@ -145,15 +141,12 @@ threadEventHandler(jvmtiEvent event, jvmtiEnv* jvmti_env, JNIEnv* jni_env,
         jvmtiPhase phase;
     
     
    -    if (!NSK_JNI_VERIFY(jni_env, (classObject =
    -            NSK_CPP_STUB2(GetObjectClass, jni_env, thread)) != NULL)) {
    +    if (!NSK_JNI_VERIFY(jni_env, (classObject = jni_env->GetObjectClass(thread)) != NULL)) {
             nsk_jvmti_setFailStatus();
             return;
         }
     
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB4(GetClassSignature, jvmti_env, classObject,
    -                                &className, &generic))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti_env->GetClassSignature(classObject, &className, &generic))) {
             nsk_jvmti_setFailStatus();
             return;
         }
    @@ -166,7 +159,7 @@ threadEventHandler(jvmtiEvent event, jvmtiEnv* jvmti_env, JNIEnv* jni_env,
                                 className);
         }
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPhase, jvmti_env, &phase))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti_env->GetPhase(&phase))) {
             nsk_jvmti_setFailStatus();
         }
     
    @@ -184,13 +177,11 @@ threadEventHandler(jvmtiEvent event, jvmtiEnv* jvmti_env, JNIEnv* jni_env,
             nsk_jvmti_setFailStatus();
         }
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(Deallocate,
    -            jvmti_env, (unsigned char*)className))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti_env->Deallocate((unsigned char*)className))) {
             nsk_jvmti_setFailStatus();
         }
         if (generic != NULL)
    -        if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(Deallocate,
    -                jvmti_env, (unsigned char*)generic))) {
    +        if (!NSK_JVMTI_VERIFY(jvmti_env->Deallocate((unsigned char*)generic))) {
                 nsk_jvmti_setFailStatus();
             }
     }
    @@ -200,7 +191,7 @@ cbVMStart(jvmtiEnv* jvmti_env, JNIEnv* jni_env) {
     
         jvmtiPhase phase;
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPhase, jvmti_env, &phase))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti_env->GetPhase(&phase))) {
             nsk_jvmti_setFailStatus();
         }
     
    @@ -221,7 +212,7 @@ cbVMInit(jvmtiEnv* jvmti_env, JNIEnv* jni_env, jthread thread) {
     
         jvmtiPhase phase;
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPhase, jvmti_env, &phase))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti_env->GetPhase(&phase))) {
             nsk_jvmti_setFailStatus();
         }
     
    @@ -242,7 +233,7 @@ cbVMDeath(jvmtiEnv* jvmti_env, JNIEnv* jni_env) {
     
         jvmtiPhase phase;
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPhase, jvmti_env, &phase))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti_env->GetPhase(&phase))) {
             nsk_jvmti_setFailStatus();
         }
     
    @@ -257,8 +248,7 @@ cbVMDeath(jvmtiEnv* jvmti_env, JNIEnv* jni_env) {
         currentPhase = JVMTI_PHASE_DEAD;
         changeCount(JVMTI_EVENT_VM_DEATH);
     
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB2(DestroyRawMonitor, jvmti, syncLock)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->DestroyRawMonitor(syncLock)))
             nsk_jvmti_setFailStatus();
     
     }
    @@ -294,9 +284,7 @@ cbThreadEnd(jvmtiEnv* jvmti_env, JNIEnv* jni_env, jthread thread) {
     static int
     enableEvent(jvmtiEventMode enable, jvmtiEvent event) {
         NSK_DISPLAY1("enabling %s\n", TranslateEvent(event));
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB4(SetEventNotificationMode, jvmti, enable,
    -                                            event, NULL))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(enable, event, NULL))) {
             nsk_jvmti_setFailStatus();
             return NSK_FALSE;
         }
    @@ -369,10 +357,7 @@ setCallBacks() {
         eventCallbacks.ThreadStart  = cbThreadStart;
         eventCallbacks.ThreadEnd    = cbThreadEnd;
     
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB3(SetEventCallbacks, jvmti,
    -                                &eventCallbacks,
    -                                sizeof(eventCallbacks))))
    +    if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks))))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -446,8 +431,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         if (!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(jvm, reserved)) != NULL))
             return JNI_ERR;
     
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB3(CreateRawMonitor, jvmti, "_syncLock", &syncLock))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti->CreateRawMonitor("_syncLock", &syncLock))) {
             nsk_jvmti_setFailStatus();
             return JNI_ERR;
         }
    diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM01/em01t002/em01t002.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM01/em01t002/em01t002.cpp
    index d04231d6ece..5f2bf1b0766 100644
    --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM01/em01t002/em01t002.cpp
    +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM01/em01t002/em01t002.cpp
    @@ -65,22 +65,20 @@ Java_nsk_jvmti_scenarios_events_EM01_em01t002_loadClass(JNIEnv *jni_env,
         jmethodID methodID;
         jclass loadedClass;
     
    -    if (!NSK_JNI_VERIFY(jni_env, (klass =
    -            NSK_CPP_STUB2(GetObjectClass, jni_env, loader)) != NULL)) {
    +    if (!NSK_JNI_VERIFY(jni_env, (klass = jni_env->GetObjectClass(loader)) != NULL)) {
             nsk_jvmti_setFailStatus();
             return NULL;
         }
     
    -    if (!NSK_JNI_VERIFY(jni_env, (methodID =
    -            NSK_CPP_STUB4(GetMethodID, jni_env, klass, "loadClass",
    -                        "(Ljava/lang/String;)Ljava/lang/Class;")) != NULL)) {
    +    if (!NSK_JNI_VERIFY(jni_env,
    +            (methodID = jni_env->GetMethodID(
    +                klass, "loadClass", "(Ljava/lang/String;)Ljava/lang/Class;")) != NULL)) {
             nsk_jvmti_setFailStatus();
             return NULL;
         }
     
         if (!NSK_JNI_VERIFY(jni_env, (loadedClass = (jclass)
    -            NSK_CPP_STUB4(CallObjectMethod, jni_env, loader, methodID,
    -                                    className)) != NULL)) {
    +            jni_env->CallObjectMethod(loader, methodID, className)) != NULL)) {
             nsk_jvmti_setFailStatus();
             return NULL;
         }
    @@ -99,8 +97,7 @@ Java_nsk_jvmti_scenarios_events_EM01_em01t002_prepareClass(JNIEnv *jni_env,
         jfieldID fieldID;
     
         if (!NSK_JNI_VERIFY(jni_env, (fieldID =
    -            NSK_CPP_STUB4(GetStaticFieldID, jni_env, klass,
    -                        "toProvokePreparation", "I")) != NULL)) {
    +            jni_env->GetStaticFieldID(klass, "toProvokePreparation", "I")) != NULL)) {
             nsk_jvmti_setFailStatus();
             return NSK_FALSE;
         }
    @@ -119,20 +116,18 @@ Java_nsk_jvmti_scenarios_events_EM01_em01t002_startThread(JNIEnv *jni_env,
         jclass klass;
         jmethodID methodID;
     
    -    if (!NSK_JNI_VERIFY(jni_env, (klass =
    -            NSK_CPP_STUB2(GetObjectClass, jni_env, thread)) != NULL)) {
    +    if (!NSK_JNI_VERIFY(jni_env, (klass = jni_env->GetObjectClass(thread)) != NULL)) {
             nsk_jvmti_setFailStatus();
             return NSK_FALSE;
         }
     
         if (!NSK_JNI_VERIFY(jni_env, (methodID =
    -            NSK_CPP_STUB4(GetMethodID, jni_env, klass, "start", "()V")) != NULL)) {
    +            jni_env->GetMethodID(klass, "start", "()V")) != NULL)) {
             nsk_jvmti_setFailStatus();
             return NSK_FALSE;
         }
     
    -    if (!NSK_JNI_VERIFY_VOID(jni_env,
    -            NSK_CPP_STUB3(CallVoidMethod, jni_env, thread, methodID)) ) {
    +    if (!NSK_JNI_VERIFY_VOID(jni_env,jni_env->CallVoidMethod(thread, methodID)) ) {
             nsk_jvmti_setFailStatus();
             return NSK_FALSE;
         }
    @@ -146,12 +141,12 @@ Java_nsk_jvmti_scenarios_events_EM01_em01t002_startThread(JNIEnv *jni_env,
     static void
     changeCount(jvmtiEvent event) {
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorEnter, jvmti, syncLock)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorEnter(syncLock)))
             nsk_jvmti_setFailStatus();
     
         eventCount[event - JVMTI_MIN_EVENT_TYPE_VAL]++;
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorExit, jvmti, syncLock)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorExit(syncLock)))
             nsk_jvmti_setFailStatus();
     
     }
    @@ -184,9 +179,7 @@ classEventsHandler(jvmtiEvent event, jvmtiEnv* jvmti_env, JNIEnv* jni_env,
         char *generic;
         jvmtiPhase phase;
     
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB4(GetClassSignature, jvmti_env, klass,
    -                                &className, &generic))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti_env->GetClassSignature(klass, &className, &generic))) {
             nsk_jvmti_setFailStatus();
             return;
         }
    @@ -199,7 +192,7 @@ classEventsHandler(jvmtiEvent event, jvmtiEnv* jvmti_env, JNIEnv* jni_env,
                                 className);
         }
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPhase, jvmti_env, &phase))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti_env->GetPhase(&phase))) {
             nsk_jvmti_setFailStatus();
         }
     
    @@ -217,13 +210,11 @@ classEventsHandler(jvmtiEvent event, jvmtiEnv* jvmti_env, JNIEnv* jni_env,
             nsk_jvmti_setFailStatus();
         }
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(Deallocate,
    -            jvmti_env, (unsigned char*)className))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti_env->Deallocate((unsigned char*)className))) {
             nsk_jvmti_setFailStatus();
         }
         if (generic != NULL)
    -        if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(Deallocate,
    -                jvmti_env, (unsigned char*)generic))) {
    +        if (!NSK_JVMTI_VERIFY(jvmti_env->Deallocate((unsigned char*)generic))) {
                 nsk_jvmti_setFailStatus();
             }
     }
    @@ -237,15 +228,12 @@ threadEventHandler(jvmtiEvent event, jvmtiEnv* jvmti_env, JNIEnv* jni_env,
         jvmtiPhase phase;
     
     
    -    if (!NSK_JNI_VERIFY(jni_env, (classObject =
    -            NSK_CPP_STUB2(GetObjectClass, jni_env, thread)) != NULL)) {
    +    if (!NSK_JNI_VERIFY(jni_env, (classObject = jni_env->GetObjectClass(thread)) != NULL)) {
             nsk_jvmti_setFailStatus();
             return;
         }
     
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB4(GetClassSignature, jvmti_env, classObject,
    -                                &className, &generic))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti_env->GetClassSignature(classObject, &className, &generic))) {
             nsk_jvmti_setFailStatus();
             return;
         }
    @@ -258,7 +246,7 @@ threadEventHandler(jvmtiEvent event, jvmtiEnv* jvmti_env, JNIEnv* jni_env,
                                 className);
         }
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPhase, jvmti_env, &phase))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti_env->GetPhase(&phase))) {
             nsk_jvmti_setFailStatus();
         }
     
    @@ -276,13 +264,11 @@ threadEventHandler(jvmtiEvent event, jvmtiEnv* jvmti_env, JNIEnv* jni_env,
             nsk_jvmti_setFailStatus();
         }
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(Deallocate,
    -            jvmti_env, (unsigned char*)className))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti_env->Deallocate((unsigned char*)className))) {
             nsk_jvmti_setFailStatus();
         }
         if (generic != NULL)
    -        if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(Deallocate,
    -                jvmti_env, (unsigned char*)generic))) {
    +        if (!NSK_JVMTI_VERIFY(jvmti_env->Deallocate((unsigned char*)generic))) {
                 nsk_jvmti_setFailStatus();
             }
     }
    @@ -292,7 +278,7 @@ cbVMStart(jvmtiEnv* jvmti_env, JNIEnv* jni_env) {
     
         jvmtiPhase phase;
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPhase, jvmti_env, &phase))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti_env->GetPhase(&phase))) {
             nsk_jvmti_setFailStatus();
         }
     
    @@ -313,7 +299,7 @@ cbVMInit(jvmtiEnv* jvmti_env, JNIEnv* jni_env, jthread thread) {
     
         jvmtiPhase phase;
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPhase, jvmti_env, &phase))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti_env->GetPhase(&phase))) {
             nsk_jvmti_setFailStatus();
         }
     
    @@ -334,7 +320,7 @@ cbVMDeath(jvmtiEnv* jvmti_env, JNIEnv* jni_env) {
     
         jvmtiPhase phase;
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPhase, jvmti_env, &phase))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti_env->GetPhase(&phase))) {
             nsk_jvmti_setFailStatus();
         }
     
    @@ -349,8 +335,7 @@ cbVMDeath(jvmtiEnv* jvmti_env, JNIEnv* jni_env) {
         currentPhase = JVMTI_PHASE_DEAD;
         changeCount(JVMTI_EVENT_VM_DEATH);
     
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB2(DestroyRawMonitor, jvmti, syncLock)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->DestroyRawMonitor(syncLock)))
             nsk_jvmti_setFailStatus();
     
     }
    @@ -393,9 +378,7 @@ enableEvent(jvmtiEventMode enable, jvmtiEvent event) {
         }
     
     
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB4(SetEventNotificationMode, jvmti, enable,
    -                                            event, NULL))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(enable, event, NULL))) {
             nsk_jvmti_setFailStatus();
             return NSK_FALSE;
         }
    @@ -468,10 +451,7 @@ setCallBacks() {
         eventCallbacks.ThreadStart  = cbThreadStart;
         eventCallbacks.ThreadEnd    = cbThreadEnd;
     
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB3(SetEventCallbacks, jvmti,
    -                                &eventCallbacks,
    -                                sizeof(eventCallbacks))))
    +    if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks))))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -544,8 +524,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         if (!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(jvm, reserved)) != NULL))
             return JNI_ERR;
     
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB3(CreateRawMonitor, jvmti, "_syncLock", &syncLock))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti->CreateRawMonitor("_syncLock", &syncLock))) {
             nsk_jvmti_setFailStatus();
             return JNI_ERR;
         }
    diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t001/em02t001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t001/em02t001.cpp
    index 8260374f4b4..fe6fbf6972e 100644
    --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t001/em02t001.cpp
    +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t001/em02t001.cpp
    @@ -68,8 +68,7 @@ findThread(const char *threadName) {
         int i;
     
         /* get all live threads */
    -    if (!NSK_JVMTI_VERIFY(
    -           NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads)))
             return NULL;
     
         if (!NSK_VERIFY(threads != NULL))
    @@ -81,8 +80,7 @@ findThread(const char *threadName) {
                 break;
     
             /* get thread information */
    -        if (!NSK_JVMTI_VERIFY(
    -                NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info)))
    +        if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info)))
                 break;
     
             /* find by name */
    @@ -92,8 +90,7 @@ findThread(const char *threadName) {
         }
     
         /* deallocate threads list */
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads)))
             return NULL;
     
         return returnValue;
    @@ -108,16 +105,14 @@ getStaticObjField(const char* className, const char* objFieldName,
         jfieldID fieldID;
         jclass klass = NULL;
     
    -    if (!NSK_JNI_VERIFY(jni, (klass =
    -            NSK_CPP_STUB2(FindClass, jni, className)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (klass = jni->FindClass(className)) != NULL))
             return NULL;
     
         if (!NSK_JNI_VERIFY(jni, (fieldID =
    -            NSK_CPP_STUB4(GetStaticFieldID, jni, klass, objFieldName,
    -                                signature)) != NULL))
    +            jni->GetStaticFieldID(klass, objFieldName, signature)) != NULL))
             return NULL;
     
    -    return NSK_CPP_STUB3(GetStaticObjectField, jni, klass, fieldID);
    +    return jni->GetStaticObjectField(klass, fieldID);
     }
     
     /* ============================================================================= */
    @@ -130,8 +125,7 @@ static int prepare() {
         }
     
         /* make thread accessable for a long time */
    -    if (!NSK_JNI_VERIFY(jni, (mainThread =
    -            NSK_CPP_STUB2(NewGlobalRef, jni, mainThread)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (mainThread = jni->NewGlobalRef(mainThread)) != NULL))
             return NSK_FALSE;
     
         if (!NSK_VERIFY((startObject =
    @@ -140,8 +134,7 @@ static int prepare() {
             return NSK_FALSE;
     
         /*make object accessable for a long time*/
    -    if (!NSK_JNI_VERIFY(jni, (startObject =
    -            NSK_CPP_STUB2(NewGlobalRef, jni, startObject)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (startObject = jni->NewGlobalRef(startObject)) != NULL))
             return NSK_FALSE;
     
     
    @@ -151,8 +144,7 @@ static int prepare() {
             return NSK_FALSE;
     
         /*make object accessable for a long time*/
    -    if (!NSK_JNI_VERIFY(jni, (endObject =
    -            NSK_CPP_STUB2(NewGlobalRef, jni, endObject)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (endObject = jni->NewGlobalRef(endObject)) != NULL))
             return NSK_FALSE;
     
     
    @@ -162,8 +154,7 @@ static int prepare() {
             return NSK_FALSE;
     
         /* make thread accessable for a long time */
    -    if (!NSK_JNI_VERIFY(jni, (debuggeeThread =
    -            NSK_CPP_STUB2(NewGlobalRef, jni, debuggeeThread)) != NULL))
    +    if (!NSK_JNI_VERIFY(jni, (debuggeeThread = jni->NewGlobalRef(debuggeeThread)) != NULL))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -176,15 +167,15 @@ clean() {
     
         /* disable MonitorContendedEnter event */
         if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB4(SetEventNotificationMode, jvmti, JVMTI_DISABLE,
    -                JVMTI_EVENT_MONITOR_CONTENDED_ENTER, NULL)))
    +            jvmti->SetEventNotificationMode(
    +                JVMTI_DISABLE, JVMTI_EVENT_MONITOR_CONTENDED_ENTER, NULL)))
             nsk_jvmti_setFailStatus();
     
         /* dispose global references */
    -    NSK_CPP_STUB2(DeleteGlobalRef, jni, startObject);
    -    NSK_CPP_STUB2(DeleteGlobalRef, jni, endObject);
    -    NSK_CPP_STUB2(DeleteGlobalRef, jni, debuggeeThread);
    -    NSK_CPP_STUB2(DeleteGlobalRef, jni, mainThread);
    +    jni->DeleteGlobalRef(startObject);
    +    jni->DeleteGlobalRef(endObject);
    +    jni->DeleteGlobalRef(debuggeeThread);
    +    jni->DeleteGlobalRef(mainThread);
     
         startObject = NULL;
         endObject = NULL;
    @@ -219,8 +210,7 @@ showEventStatistics(int step /*int *currentCounts*/) {
     static void
     showThreadInfo(jthread thread) {
         jvmtiThreadInfo info;
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB3(GetThreadInfo, jvmti, thread, &info)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(thread, &info)))
             return;
     
         NSK_DISPLAY2("\tthread (%s): %p\n", info.name, thread);
    @@ -231,12 +221,12 @@ showThreadInfo(jthread thread) {
     static void
     changeCount(jvmtiEvent event, int *currentCounts) {
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorEnter, jvmti, syncLock)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorEnter(syncLock)))
             nsk_jvmti_setFailStatus();
     
         currentCounts[event - JVMTI_MIN_EVENT_TYPE_VAL]++;
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorExit, jvmti, syncLock)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorExit(syncLock)))
             nsk_jvmti_setFailStatus();
     
     }
    @@ -327,8 +317,7 @@ cbVMDeath(jvmtiEnv* jvmti, JNIEnv* jni_env) {
             nsk_jvmti_setFailStatus();
         }
     
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB2(DestroyRawMonitor, jvmti, syncLock)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->DestroyRawMonitor(syncLock)))
             nsk_jvmti_setFailStatus();
     
     }
    @@ -420,13 +409,13 @@ handlerMC1(jvmtiEvent event, jvmtiEnv* jvmti, JNIEnv* jni_env,
             return;
     
         /* check if event is for tested thread and for tested object */
    -    if (NSK_CPP_STUB3(IsSameObject, jni_env, expectedThread, thread) &&
    -            NSK_CPP_STUB3(IsSameObject, jni_env, expectedObject, object)) {
    +    if (jni_env->IsSameObject(expectedThread, thread) &&
    +            jni_env->IsSameObject(expectedObject, object)) {
     
             NSK_DISPLAY1("--->%-40s is received\n", TranslateEvent(event));
     
             showThreadInfo(thread);
    -        if (NSK_CPP_STUB3(IsSameObject, jni_env, expectedObject, endObject))
    +        if (jni_env->IsSameObject(expectedObject, endObject))
                 NSK_DISPLAY0("\tobject: 'endingMonitor'\n");
             else
                 NSK_DISPLAY0("\tobject: 'startingMonitor'\n");
    @@ -506,13 +495,13 @@ handlerMC2(jvmtiEvent event, jvmtiEnv* jvmti, JNIEnv* jni_env,
             return;
     
         /* check if event is for tested thread and for tested object */
    -    if (NSK_CPP_STUB3(IsSameObject, jni_env, expectedThread, thread) &&
    -            NSK_CPP_STUB3(IsSameObject, jni_env, expectedObject, object)) {
    +    if (jni_env->IsSameObject(expectedThread, thread) &&
    +            jni_env->IsSameObject(expectedObject, object)) {
     
             NSK_DISPLAY1("--->%-40s is received (new callbacks)\n", TranslateEvent(event));
     
             showThreadInfo(thread);
    -        if (NSK_CPP_STUB3(IsSameObject, jni_env, expectedObject, endObject))
    +        if (jni_env->IsSameObject(expectedObject, endObject))
                 NSK_DISPLAY0("\tobject: 'endingMonitor'\n");
             else
                 NSK_DISPLAY0("\tobject: 'startingMonitor'\n");
    @@ -572,16 +561,13 @@ static int enableEvent(jvmtiEvent event) {
                 && (event != JVMTI_EVENT_MONITOR_WAIT)
                 && (event != JVMTI_EVENT_MONITOR_WAITED)) {
             if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -                NSK_CPP_STUB4(SetEventNotificationMode, jvmti,
    -                    JVMTI_ENABLE, event, NULL))) {
    +                jvmti->SetEventNotificationMode(JVMTI_ENABLE, event, NULL))) {
                 NSK_COMPLAIN1("Unexpected error enabling %s\n",
                     TranslateEvent(event));
                 return NSK_FALSE;
             }
         } else {
    -        if (!NSK_JVMTI_VERIFY(
    -                NSK_CPP_STUB4(SetEventNotificationMode, jvmti,
    -                    JVMTI_ENABLE, event, NULL))) {
    +        if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, event, NULL))) {
                 NSK_COMPLAIN1("Unexpected error enabling %s\n",
                     TranslateEvent(event));
                 return NSK_FALSE;
    @@ -679,10 +665,7 @@ setCallBacks(int step) {
                 break;
     
         }
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB3(SetEventCallbacks, jvmti,
    -                                &eventCallbacks,
    -                                sizeof(eventCallbacks))))
    +    if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks))))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -771,8 +754,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         if (!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(jvm, reserved)) != NULL))
             return JNI_ERR;
     
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB3(CreateRawMonitor, jvmti, "_syncLock", &syncLock))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti->CreateRawMonitor("_syncLock", &syncLock))) {
             nsk_jvmti_setFailStatus();
             return JNI_ERR;
         }
    @@ -782,7 +764,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
             memset(&caps, 0, sizeof(caps));
     
             caps.can_generate_monitor_events = 1;
    -        if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
    +        if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
                 return JNI_ERR;
         }
     
    diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t002/em02t002.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t002/em02t002.cpp
    index 9e8215d7516..7b86f45cc34 100644
    --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t002/em02t002.cpp
    +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t002/em02t002.cpp
    @@ -150,12 +150,12 @@ int checkEvents(int step) {
     static void
     changeCount(jvmtiEvent event, int *currentCounts) {
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorEnter, jvmti, syncLock)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorEnter(syncLock)))
             nsk_jvmti_setFailStatus();
     
         currentCounts[event - JVMTI_MIN_EVENT_TYPE_VAL]++;
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorExit, jvmti, syncLock)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorExit(syncLock)))
             nsk_jvmti_setFailStatus();
     
     }
    @@ -177,8 +177,7 @@ cbVMDeath(jvmtiEnv* jvmti, JNIEnv* jni_env) {
         if (!checkEvents(STEP_AMOUNT))
             nsk_jvmti_setFailStatus();
     
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB2(DestroyRawMonitor, jvmti, syncLock)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->DestroyRawMonitor(syncLock)))
             nsk_jvmti_setFailStatus();
     
     }
    @@ -345,16 +344,13 @@ static int enableEvent(jvmtiEvent event) {
                 && (event != JVMTI_EVENT_GARBAGE_COLLECTION_START)
                 && (event != JVMTI_EVENT_GARBAGE_COLLECTION_FINISH)) {
             if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -                NSK_CPP_STUB4(SetEventNotificationMode, jvmti,
    -                    JVMTI_ENABLE, event, NULL))) {
    +                jvmti->SetEventNotificationMode(JVMTI_ENABLE, event, NULL))) {
                 NSK_COMPLAIN1("Unexpected error enabling %s\n",
                     TranslateEvent(event));
                 return NSK_FALSE;
             }
         } else {
    -        if (!NSK_JVMTI_VERIFY(
    -                NSK_CPP_STUB4(SetEventNotificationMode, jvmti,
    -                    JVMTI_ENABLE, event, NULL))) {
    +        if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, event, NULL))) {
                 NSK_COMPLAIN1("Unexpected error enabling %s\n",
                     TranslateEvent(event));
                 return NSK_FALSE;
    @@ -450,10 +446,7 @@ setCallBacks(int step) {
                 break;
     
         }
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB3(SetEventCallbacks, jvmti,
    -                                &eventCallbacks,
    -                                sizeof(eventCallbacks))))
    +    if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks))))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -519,8 +512,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         if (!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(jvm, reserved)) != NULL))
             return JNI_ERR;
     
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB3(CreateRawMonitor, jvmti, "_syncLock", &syncLock))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti->CreateRawMonitor("_syncLock", &syncLock))) {
             nsk_jvmti_setFailStatus();
             return JNI_ERR;
         }
    @@ -530,7 +522,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
             memset(&caps, 0, sizeof(caps));
     
             caps.can_generate_garbage_collection_events = 1;
    -        if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
    +        if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
                 return JNI_ERR;
         }
     
    diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t003/em02t003.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t003/em02t003.cpp
    index 2de5affa16a..b541f230913 100644
    --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t003/em02t003.cpp
    +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t003/em02t003.cpp
    @@ -134,12 +134,12 @@ int checkEvents(int step) {
     static void
     changeCount(jvmtiEvent event, int *currentCounts) {
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorEnter, jvmti, syncLock)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorEnter(syncLock)))
             nsk_jvmti_setFailStatus();
     
         currentCounts[event - JVMTI_MIN_EVENT_TYPE_VAL]++;
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorExit, jvmti, syncLock)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorExit(syncLock)))
             nsk_jvmti_setFailStatus();
     
     }
    @@ -159,8 +159,7 @@ cbVMDeath(jvmtiEnv* jvmti, JNIEnv* jni_env) {
         if (!checkEvents(STEP_AMOUNT))
             nsk_jvmti_setFailStatus();
     
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB2(DestroyRawMonitor, jvmti, syncLock)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->DestroyRawMonitor(syncLock)))
             nsk_jvmti_setFailStatus();
     
     }
    @@ -265,9 +264,7 @@ handlerMC1(jvmtiEvent event, jvmtiEnv* jvmti, jmethodID method) {
         char *sign;
         char *genc;
     
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB5(
    -                GetMethodName, jvmti, method, &name, &sign, &genc))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetMethodName(method, &name, &sign, &genc))) {
             nsk_jvmti_setFailStatus();
             return;
         }
    @@ -277,17 +274,14 @@ handlerMC1(jvmtiEvent event, jvmtiEnv* jvmti, jmethodID method) {
             changeCount(event, &eventCount[0]);
         }
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(Deallocate,
    -            jvmti, (unsigned char*)name))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)name))) {
             nsk_jvmti_setFailStatus();
         }
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(Deallocate,
    -            jvmti, (unsigned char*)sign))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)sign))) {
             nsk_jvmti_setFailStatus();
         }
         if (genc != NULL)
    -        if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(Deallocate,
    -                jvmti, (unsigned char*)genc))) {
    +        if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)genc))) {
                 nsk_jvmti_setFailStatus();
             }
     }
    @@ -338,9 +332,7 @@ handlerMC2(jvmtiEvent event, jvmtiEnv* jvmti, jmethodID method) {
         char *sign;
         char *genc;
     
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB5(
    -                GetMethodName, jvmti, method, &name, &sign, &genc))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti->GetMethodName(method, &name, &sign, &genc))) {
             nsk_jvmti_setFailStatus();
             return;
         }
    @@ -348,17 +340,14 @@ handlerMC2(jvmtiEvent event, jvmtiEnv* jvmti, jmethodID method) {
         NSK_DISPLAY2("\tMethod: %s, signature: %s\n", name, sign);
         changeCount(event, &newEventCount[0]);
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(Deallocate,
    -            jvmti, (unsigned char*)name))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)name))) {
             nsk_jvmti_setFailStatus();
         }
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(Deallocate,
    -            jvmti, (unsigned char*)sign))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)sign))) {
             nsk_jvmti_setFailStatus();
         }
         if (genc != NULL)
    -        if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(Deallocate,
    -                jvmti, (unsigned char*)genc))) {
    +        if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)genc))) {
                 nsk_jvmti_setFailStatus();
             }
     }
    @@ -389,16 +378,13 @@ static int enableEvent(jvmtiEvent event) {
                 && (event != JVMTI_EVENT_COMPILED_METHOD_LOAD)
                 && (event != JVMTI_EVENT_COMPILED_METHOD_UNLOAD)) {
             if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -                NSK_CPP_STUB4(SetEventNotificationMode, jvmti,
    -                    JVMTI_ENABLE, event, NULL))) {
    +                jvmti->SetEventNotificationMode(JVMTI_ENABLE, event, NULL))) {
                 NSK_COMPLAIN1("Unexpected error enabling %s\n",
                     TranslateEvent(event));
                 return NSK_FALSE;
             }
         } else {
    -        if (!NSK_JVMTI_VERIFY(
    -                NSK_CPP_STUB4(SetEventNotificationMode, jvmti,
    -                    JVMTI_ENABLE, event, NULL))) {
    +        if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, event, NULL))) {
                 NSK_COMPLAIN1("Unexpected error enabling %s\n",
                     TranslateEvent(event));
                 return NSK_FALSE;
    @@ -498,10 +484,7 @@ setCallBacks(int step) {
                 break;
     
         }
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB3(SetEventCallbacks, jvmti,
    -                                &eventCallbacks,
    -                                sizeof(eventCallbacks))))
    +    if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks))))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -568,8 +551,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         if (!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(jvm, reserved)) != NULL))
             return JNI_ERR;
     
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB3(CreateRawMonitor, jvmti, "_syncLock", &syncLock))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti->CreateRawMonitor("_syncLock", &syncLock))) {
             nsk_jvmti_setFailStatus();
             return JNI_ERR;
         }
    @@ -579,7 +561,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
             memset(&caps, 0, sizeof(caps));
     
             caps.can_generate_compiled_method_load_events = 1;
    -        if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
    +        if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
                 return JNI_ERR;
         }
     
    diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t004/em02t004.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t004/em02t004.cpp
    index e2fac4a7c3f..194bc6c9ef9 100644
    --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t004/em02t004.cpp
    +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t004/em02t004.cpp
    @@ -146,12 +146,12 @@ int checkEvents(int step) {
     static void
     changeCount(jvmtiEvent event, int *currentCounts) {
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorEnter, jvmti, syncLock)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorEnter(syncLock)))
             nsk_jvmti_setFailStatus();
     
         currentCounts[event - JVMTI_MIN_EVENT_TYPE_VAL]++;
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorExit, jvmti, syncLock)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorExit(syncLock)))
             nsk_jvmti_setFailStatus();
     
     }
    @@ -171,8 +171,7 @@ cbVMDeath(jvmtiEnv* jvmti, JNIEnv* jni_env) {
         if (!checkEvents(STEP_AMOUNT))
             nsk_jvmti_setFailStatus();
     
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB2(DestroyRawMonitor, jvmti, syncLock)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->DestroyRawMonitor(syncLock)))
             nsk_jvmti_setFailStatus();
     
     }
    @@ -310,7 +309,7 @@ cbNativeMethodBind(jvmtiEnv *jvmti_env, JNIEnv* jni_env,jthread thread,
         char *genc;
         jvmtiPhase phase;
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPhase, jvmti_env, &phase))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti_env->GetPhase(&phase))) {
             nsk_jvmti_setFailStatus();
         }
     
    @@ -318,9 +317,7 @@ cbNativeMethodBind(jvmtiEnv *jvmti_env, JNIEnv* jni_env,jthread thread,
             return;
         }
     
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB5(
    -                GetMethodName, jvmti_env, method, &name, &sign, &genc))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti_env->GetMethodName(method, &name, &sign, &genc))) {
             return;
         }
     
    @@ -331,17 +328,14 @@ cbNativeMethodBind(jvmtiEnv *jvmti_env, JNIEnv* jni_env,jthread thread,
             changeCount(JVMTI_EVENT_NATIVE_METHOD_BIND, &eventCount[0]);
         }
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(Deallocate,
    -            jvmti_env, (unsigned char*)name))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti_env->Deallocate((unsigned char*)name))) {
             nsk_jvmti_setFailStatus();
         }
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(Deallocate,
    -            jvmti_env, (unsigned char*)sign))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti_env->Deallocate((unsigned char*)sign))) {
             nsk_jvmti_setFailStatus();
         }
         if (genc != NULL)
    -        if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(Deallocate,
    -                jvmti_env, (unsigned char*)genc))) {
    +        if (!NSK_JVMTI_VERIFY(jvmti_env->Deallocate((unsigned char*)genc))) {
                 nsk_jvmti_setFailStatus();
             }
     }
    @@ -355,7 +349,7 @@ cbNewNativeMethodBind(jvmtiEnv *jvmti_env, JNIEnv* jni_env,jthread thread,
     
         jvmtiPhase phase;
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPhase, jvmti_env, &phase))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti_env->GetPhase(&phase))) {
             nsk_jvmti_setFailStatus();
         }
     
    @@ -363,9 +357,7 @@ cbNewNativeMethodBind(jvmtiEnv *jvmti_env, JNIEnv* jni_env,jthread thread,
             return;
         }
     
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB5(
    -                GetMethodName, jvmti_env, method, &name, &sign, &genc))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti_env->GetMethodName(method, &name, &sign, &genc))) {
             return;
         }
     
    @@ -376,17 +368,14 @@ cbNewNativeMethodBind(jvmtiEnv *jvmti_env, JNIEnv* jni_env,jthread thread,
             changeCount(JVMTI_EVENT_NATIVE_METHOD_BIND, &newEventCount[0]);
         }
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(Deallocate,
    -            jvmti_env, (unsigned char*)name))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti_env->Deallocate((unsigned char*)name))) {
             nsk_jvmti_setFailStatus();
         }
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(Deallocate,
    -            jvmti_env, (unsigned char*)sign))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti_env->Deallocate((unsigned char*)sign))) {
             nsk_jvmti_setFailStatus();
         }
         if (genc != NULL)
    -        if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(Deallocate,
    -                jvmti_env, (unsigned char*)genc))) {
    +        if (!NSK_JVMTI_VERIFY(jvmti_env->Deallocate((unsigned char*)genc))) {
                 nsk_jvmti_setFailStatus();
             }
     }
    @@ -398,16 +387,13 @@ static int enableEvent(jvmtiEvent event) {
         if (nsk_jvmti_isOptionalEvent(event)
                 && (event != JVMTI_EVENT_NATIVE_METHOD_BIND)) {
             if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -                NSK_CPP_STUB4(SetEventNotificationMode, jvmti,
    -                    JVMTI_ENABLE, event, NULL))) {
    +                jvmti->SetEventNotificationMode(JVMTI_ENABLE, event, NULL))) {
                 NSK_COMPLAIN1("Unexpected error enabling %s\n",
                     TranslateEvent(event));
                 return NSK_FALSE;
             }
         } else {
    -        if (!NSK_JVMTI_VERIFY(
    -                NSK_CPP_STUB4(SetEventNotificationMode, jvmti,
    -                    JVMTI_ENABLE, event, NULL))) {
    +        if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, event, NULL))) {
                 NSK_COMPLAIN1("Unexpected error enabling %s\n",
                     TranslateEvent(event));
                 return NSK_FALSE;
    @@ -505,10 +491,7 @@ setCallBacks(int step) {
                 break;
     
         }
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB3(SetEventCallbacks, jvmti,
    -                                &eventCallbacks,
    -                                sizeof(eventCallbacks))))
    +    if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks))))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -574,8 +557,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
         if (!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(jvm, reserved)) != NULL))
             return JNI_ERR;
     
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB3(CreateRawMonitor, jvmti, "_syncLock", &syncLock))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti->CreateRawMonitor("_syncLock", &syncLock))) {
             nsk_jvmti_setFailStatus();
             return JNI_ERR;
         }
    @@ -585,7 +567,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
             memset(&caps, 0, sizeof(caps));
     
             caps.can_generate_native_method_bind_events = 1;
    -        if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
    +        if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
                 return JNI_ERR;
         }
     
    diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t005/em02t005.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t005/em02t005.cpp
    index e6dd2fc70e4..ee9a28eb1cb 100644
    --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t005/em02t005.cpp
    +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t005/em02t005.cpp
    @@ -133,12 +133,12 @@ int checkEvents(int step) {
     static void
     changeCount(jvmtiEvent event, int *currentCounts) {
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorEnter, jvmti, syncLock)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorEnter(syncLock)))
             nsk_jvmti_setFailStatus();
     
         currentCounts[event - JVMTI_MIN_EVENT_TYPE_VAL]++;
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorExit, jvmti, syncLock)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorExit(syncLock)))
             nsk_jvmti_setFailStatus();
     
     }
    @@ -158,8 +158,7 @@ cbVMDeath(jvmtiEnv* jvmti, JNIEnv* jni_env) {
         if (!checkEvents(STEP_NUMBER))
             nsk_jvmti_setFailStatus();
     
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB2(DestroyRawMonitor, jvmti, syncLock)))
    +    if (!NSK_JVMTI_VERIFY(jvmti->DestroyRawMonitor(syncLock)))
             nsk_jvmti_setFailStatus();
     
     }
    @@ -302,9 +301,7 @@ cbVMObjectAlloc(jvmtiEnv *jvmti_env, JNIEnv* jni_env, jthread thread,
     
         jvmtiPhase phase;
     
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB4(GetClassSignature, jvmti_env, object_klass,
    -                                &sign_ptr, &gen_ptr))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti_env->GetClassSignature(object_klass, &sign_ptr, &gen_ptr))) {
             nsk_jvmti_setFailStatus();
             return;
         }
    @@ -313,7 +310,7 @@ cbVMObjectAlloc(jvmtiEnv *jvmti_env, JNIEnv* jni_env, jthread thread,
             changeCount(JVMTI_EVENT_VM_OBJECT_ALLOC, &eventCount[0]);
         }
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPhase, jvmti_env, &phase))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti_env->GetPhase(&phase))) {
             nsk_jvmti_setFailStatus();
         }
     
    @@ -326,13 +323,11 @@ cbVMObjectAlloc(jvmtiEnv *jvmti_env, JNIEnv* jni_env, jthread thread,
             nsk_jvmti_setFailStatus();
         }
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(Deallocate,
    -            jvmti_env, (unsigned char*)sign_ptr))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti_env->Deallocate((unsigned char*)sign_ptr))) {
             nsk_jvmti_setFailStatus();
         }
         if (gen_ptr != NULL)
    -        if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(Deallocate,
    -                jvmti_env, (unsigned char*)gen_ptr))) {
    +        if (!NSK_JVMTI_VERIFY(jvmti_env->Deallocate((unsigned char*)gen_ptr))) {
                 nsk_jvmti_setFailStatus();
             }
     }
    @@ -346,9 +341,7 @@ cbNewVMObjectAlloc(jvmtiEnv *jvmti_env, JNIEnv* jni_env, jthread thread,
     
         jvmtiPhase phase;
     
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB4(GetClassSignature, jvmti_env, object_klass,
    -                                &sign_ptr, &gen_ptr))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti_env->GetClassSignature(object_klass, &sign_ptr, &gen_ptr))) {
             nsk_jvmti_setFailStatus();
             return;
         }
    @@ -357,7 +350,7 @@ cbNewVMObjectAlloc(jvmtiEnv *jvmti_env, JNIEnv* jni_env, jthread thread,
             changeCount(JVMTI_EVENT_VM_OBJECT_ALLOC, &newEventCount[0]);
         }
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(GetPhase, jvmti_env, &phase))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti_env->GetPhase(&phase))) {
             nsk_jvmti_setFailStatus();
         }
     
    @@ -370,13 +363,11 @@ cbNewVMObjectAlloc(jvmtiEnv *jvmti_env, JNIEnv* jni_env, jthread thread,
             nsk_jvmti_setFailStatus();
         }
     
    -    if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(Deallocate,
    -            jvmti_env, (unsigned char*)sign_ptr))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti_env->Deallocate((unsigned char*)sign_ptr))) {
             nsk_jvmti_setFailStatus();
         }
         if (gen_ptr != NULL)
    -        if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(Deallocate,
    -                jvmti_env, (unsigned char*)gen_ptr))) {
    +        if (!NSK_JVMTI_VERIFY(jvmti_env->Deallocate((unsigned char*)gen_ptr))) {
                 nsk_jvmti_setFailStatus();
             }
     }
    @@ -388,16 +379,13 @@ static int enableEvent(jvmtiEvent event) {
         if (nsk_jvmti_isOptionalEvent(event)
                 && (event != JVMTI_EVENT_VM_OBJECT_ALLOC)) {
             if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_MUST_POSSESS_CAPABILITY,
    -                NSK_CPP_STUB4(SetEventNotificationMode, jvmti,
    -                    JVMTI_ENABLE, event, NULL))) {
    +                jvmti->SetEventNotificationMode(JVMTI_ENABLE, event, NULL))) {
                 NSK_COMPLAIN1("Unexpected error enabling %s\n",
                     TranslateEvent(event));
                 return NSK_FALSE;
             }
         } else {
    -        if (!NSK_JVMTI_VERIFY(
    -                NSK_CPP_STUB4(SetEventNotificationMode, jvmti,
    -                    JVMTI_ENABLE, event, NULL))) {
    +        if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, event, NULL))) {
                 NSK_COMPLAIN1("Unexpected error enabling %s\n",
                     TranslateEvent(event));
                 return NSK_FALSE;
    @@ -490,10 +478,7 @@ setCallBacks(int step) {
                 break;
     
         }
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB3(SetEventCallbacks, jvmti,
    -                                &eventCallbacks,
    -                                sizeof(eventCallbacks))))
    +    if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks))))
             return NSK_FALSE;
     
         return NSK_TRUE;
    @@ -553,8 +538,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
             return JNI_ERR;
     
     
    -    if (!NSK_JVMTI_VERIFY(
    -            NSK_CPP_STUB3(CreateRawMonitor, jvmti, "_syncLock", &syncLock))) {
    +    if (!NSK_JVMTI_VERIFY(jvmti->CreateRawMonitor("_syncLock", &syncLock))) {
             nsk_jvmti_setFailStatus();
             return JNI_ERR;
         }
    @@ -564,7 +548,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
             memset(&caps, 0, sizeof(caps));
     
             caps.can_generate_vm_object_alloc_events = 1;
    -        if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps)))
    +        if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps)))
                 return JNI_ERR;
         }
     
    
    From b35e7feb5a6d0d3d606aa15be69192829617a24f Mon Sep 17 00:00:00 2001
    From: Christian Tornqvist 
    Date: Wed, 10 Oct 2018 11:47:01 -0700
    Subject: [PATCH 072/124] 8212008: Use of TREAT_EXIT_CODE_1_AS_0 hide problems
     with jtreg Java
    
    Reviewed-by: erikj
    ---
     test/hotspot/jtreg/Makefile | 2 --
     test/jdk/Makefile           | 2 --
     2 files changed, 4 deletions(-)
    
    diff --git a/test/hotspot/jtreg/Makefile b/test/hotspot/jtreg/Makefile
    index 820527c8ca1..a512ddfb843 100644
    --- a/test/hotspot/jtreg/Makefile
    +++ b/test/hotspot/jtreg/Makefile
    @@ -24,8 +24,6 @@
     
     NATIVE_TEST_PATH := hotspot/jtreg/native
     
    -TREAT_EXIT_CODE_1_AS_0 := true
    -
     CLEAN_BEFORE_PREP := true
     
     USE_JTREG_VERSION := 4.1
    diff --git a/test/jdk/Makefile b/test/jdk/Makefile
    index d02c0ed513c..5ccfd3fc9a5 100644
    --- a/test/jdk/Makefile
    +++ b/test/jdk/Makefile
    @@ -29,8 +29,6 @@ NATIVE_TEST_PATH := jdk/jtreg/native
     
     USE_FAILURE_HANDLER := true
     
    -TREAT_EXIT_CODE_1_AS_0 := true
    -
     include ../TestCommon.gmk
     
     # Default make rule (runs default jdk tests)
    
    From dde89f72dfc3b3b81aca716ba070db1515fe7c68 Mon Sep 17 00:00:00 2001
    From: Sean Mullan 
    Date: Wed, 10 Oct 2018 15:23:38 -0400
    Subject: [PATCH 073/124] 8211878: Bad/broken links in
     docs/api/java.xml.crypto/javax/xml/crypto/dsig/Reference.html
    
    Reviewed-by: jjg
    ---
     .../share/classes/javax/xml/crypto/dsig/Reference.java      | 6 +++---
     1 file changed, 3 insertions(+), 3 deletions(-)
    
    diff --git a/src/java.xml.crypto/share/classes/javax/xml/crypto/dsig/Reference.java b/src/java.xml.crypto/share/classes/javax/xml/crypto/dsig/Reference.java
    index 6f3ce617317..dfa34796fb6 100644
    --- a/src/java.xml.crypto/share/classes/javax/xml/crypto/dsig/Reference.java
    +++ b/src/java.xml.crypto/share/classes/javax/xml/crypto/dsig/Reference.java
    @@ -1,5 +1,5 @@
     /*
    - * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
    + * Copyright (c) 2005, 2018, 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
    @@ -144,7 +144,7 @@ public interface Reference extends URIReference, XMLStructure {
     
         /**
          * Returns the dereferenced data, if
    -     * reference caching
    +     * reference caching
          * is enabled. This is the result of dereferencing the URI of this
          * reference during a validation or generation operation.
          *
    @@ -156,7 +156,7 @@ public interface Reference extends URIReference, XMLStructure {
     
         /**
          * Returns the pre-digested input stream, if
    -     * reference caching
    +     * reference caching
          * is enabled. This is the input to the digest operation during a
          * validation or signing operation.
          *
    
    From d9731f0c549f453bbc6556b29479974c679c9bef Mon Sep 17 00:00:00 2001
    From: Sean Mullan 
    Date: Wed, 10 Oct 2018 16:25:40 -0400
    Subject: [PATCH 074/124] 8191053: Provide a mechanism to make system's
     security manager immutable
    
    Make System.setSecurityManager optional to support and add new disallow and allow options to the java.security.manager system property
    
    Reviewed-by: alanb, mchung, rriggs, smarks
    ---
     .../classes/java/lang/SecurityManager.java    | 102 ++++++++++++-
     .../share/classes/java/lang/System.java       | 138 ++++++++++++------
     .../lang/System/AllowSecurityManager.java     |  53 +++++++
     3 files changed, 239 insertions(+), 54 deletions(-)
     create mode 100644 test/jdk/java/lang/System/AllowSecurityManager.java
    
    diff --git a/src/java.base/share/classes/java/lang/SecurityManager.java b/src/java.base/share/classes/java/lang/SecurityManager.java
    index 74da4daeda5..dc1b46e2372 100644
    --- a/src/java.base/share/classes/java/lang/SecurityManager.java
    +++ b/src/java.base/share/classes/java/lang/SecurityManager.java
    @@ -28,7 +28,6 @@ package java.lang;
     import java.lang.module.ModuleDescriptor;
     import java.lang.module.ModuleDescriptor.Exports;
     import java.lang.module.ModuleDescriptor.Opens;
    -import java.lang.module.ModuleReference;
     import java.lang.reflect.Member;
     import java.io.FileDescriptor;
     import java.io.File;
    @@ -47,9 +46,7 @@ import java.util.Objects;
     import java.util.PropertyPermission;
     import java.util.Set;
     import java.util.concurrent.ConcurrentHashMap;
    -import java.util.stream.Collectors;
     
    -import jdk.internal.module.ModuleBootstrap;
     import jdk.internal.module.ModuleLoaderMap;
     import jdk.internal.reflect.CallerSensitive;
     import sun.security.util.SecurityConstants;
    @@ -81,10 +78,100 @@ import sun.security.util.SecurityConstants;
      * throws a SecurityException if the operation is not
      * permitted.
      * 

    - * The current security manager is set by the - * setSecurityManager method in class - * System. The current security manager is obtained - * by the getSecurityManager method. + * Environments using a security manager will typically set the security + * manager at startup. In the JDK implementation, this is done by setting + * the system property {@code java.security.manager} on the command line to + * the class name of the security manager. It can also be set to the empty + * String ("") or the special token "{@code default}" to use the + * default {@code java.lang.SecurityManager}. If a class name is specified, + * it must be {@code java.lang.SecurityManager} or a public subclass and have + * a public no-arg constructor. The class is loaded by the + * {@linkplain ClassLoader#getSystemClassLoader() built-in system class loader} + * if it is not {@code java.lang.SecurityManager}. If the + * {@code java.security.manager} system property is not set, the default value + * is {@code null}, which means a security manager will not be set at startup. + *

    + * The Java run-time may also allow, but is not required to allow, the security + * manager to be set dynamically by invoking the + * {@link System#setSecurityManager(SecurityManager) setSecurityManager} method. + * In the JDK implementation, if the Java virtual machine is started with + * the {@code java.security.manager} system property set to the special token + * "{@code disallow}" then a security manager will not be set at startup and + * cannot be set dynamically (the + * {@link System#setSecurityManager(SecurityManager) setSecurityManager} + * method will throw an {@code UnsupportedOperationException}). If the + * {@code java.security.manager} system property is not set or is set to the + * special token "{@code allow}", then a security manager will not be set at + * startup but can be set dynamically. Finally, if the + * {@code java.security.manager} system property is set to the class name of + * the security manager, or to the empty String ("") or the special token + * "{@code default}", then a security manager is set at startup (as described + * previously) and can also be subsequently replaced (or disabled) dynamically + * (subject to the policy of the currently installed security manager). The + * following table illustrates the behavior of the JDK implementation for the + * different settings of the {@code java.security.manager} system property: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    property value, + * the SecurityManager set at startup, + * can dynamically set a SecurityManager + *
    Property ValueThe SecurityManager set at startupSystem.setSecurityManager run-time behavior
    nullNoneSuccess or throws {@code SecurityException} if not permitted by + * the currently installed security manager
    empty String (""){@code java.lang.SecurityManager}Success or throws {@code SecurityException} if not permitted by + * the currently installed security manager
    "default"{@code java.lang.SecurityManager}Success or throws {@code SecurityException} if not permitted by + * the currently installed security manager
    "disallow"NoneAlways throws {@code UnsupportedOperationException}
    "allow"NoneSuccess or throws {@code SecurityException} if not permitted by + * the currently installed security manager
    a class namethe named classSuccess or throws {@code SecurityException} if not permitted by + * the currently installed security manager
    + *

    A future release of the JDK may change the default value of the + * {@code java.security.manager} system property to "{@code disallow}". + *

    + * The current security manager is returned by the + * {@link System#getSecurityManager() getSecurityManager} method. *

    * The special method * {@link SecurityManager#checkPermission(java.security.Permission)} @@ -221,7 +308,6 @@ import sun.security.util.SecurityConstants; * @see java.net.SocketPermission * @see java.util.PropertyPermission * @see java.lang.RuntimePermission - * @see java.awt.AWTPermission * @see java.security.Policy Policy * @see java.security.SecurityPermission SecurityPermission * @see java.security.ProtectionDomain diff --git a/src/java.base/share/classes/java/lang/System.java b/src/java.base/share/classes/java/lang/System.java index 88cd2977a55..8021951c84e 100644 --- a/src/java.base/share/classes/java/lang/System.java +++ b/src/java.base/share/classes/java/lang/System.java @@ -72,6 +72,7 @@ import jdk.internal.misc.VM; import jdk.internal.logger.LoggerFinderLoader; import jdk.internal.logger.LazyLoggers; import jdk.internal.logger.LocalizedLoggerWrapper; +import jdk.internal.vm.annotation.Stable; import sun.reflect.annotation.AnnotationType; import sun.nio.ch.Interruptible; import sun.security.util.SecurityConstants; @@ -154,9 +155,18 @@ public final class System { */ public static final PrintStream err = null; - /* The security manager for the system. - */ - private static volatile SecurityManager security; + // indicates if a security manager is possible + private static final int NEVER = 1; + private static final int MAYBE = 2; + private static @Stable int allowSecurityManager; + + // current security manager + private static volatile SecurityManager security; // read by VM + + // return true if a security manager is allowed + private static boolean allowSecurityManager() { + return (allowSecurityManager != NEVER); + } /** * Reassigns the "standard" input stream. @@ -231,6 +241,7 @@ public final class System { } private static volatile Console cons; + /** * Returns the unique {@link java.io.Console Console} object associated * with the current Java virtual machine, if any. @@ -292,7 +303,7 @@ public final class System { private static native void setErr0(PrintStream err); /** - * Sets the System security. + * Sets the system-wide security manager. * * If there is a security manager already installed, this method first * calls the security manager's {@code checkPermission} method @@ -306,27 +317,46 @@ public final class System { * security manager has been established, then no action is taken and * the method simply returns. * - * @param s the security manager. - * @throws SecurityException if the security manager has already - * been set and its {@code checkPermission} method - * doesn't allow it to be replaced. + * @implNote In the JDK implementation, if the Java virtual machine is + * started with the system property {@code java.security.manager} set to + * the special token "{@code disallow}" then the {@code setSecurityManager} + * method cannot be used to set a security manager. + * + * @param sm the security manager or {@code null} + * @throws SecurityException + * if the security manager has already been set and its {@code + * checkPermission} method doesn't allow it to be replaced + * @throws UnsupportedOperationException + * if {@code sm} is non-null and a security manager is not allowed + * to be set dynamically * @see #getSecurityManager * @see SecurityManager#checkPermission * @see java.lang.RuntimePermission */ - public static void setSecurityManager(final SecurityManager s) { - if (security == null) { - // ensure image reader is initialized - Object.class.getResource("java/lang/ANY"); - } - if (s != null) { - try { - s.checkPackageAccess("java.lang"); - } catch (Exception e) { - // no-op + public static void setSecurityManager(SecurityManager sm) { + if (allowSecurityManager()) { + if (security == null) { + // ensure image reader is initialized + Object.class.getResource("java/lang/ANY"); + } + if (sm != null) { + try { + // pre-populates the SecurityManager.packageAccess cache + // to avoid recursive permission checking issues with custom + // SecurityManager implementations + sm.checkPackageAccess("java.lang"); + } catch (Exception e) { + // no-op + } + } + setSecurityManager0(sm); + } else { + // security manager not allowed + if (sm != null) { + throw new UnsupportedOperationException( + "Runtime configured to disallow security manager"); } } - setSecurityManager0(s); } private static synchronized @@ -335,13 +365,12 @@ public final class System { if (sm != null) { // ask the currently installed security manager if we // can replace it. - sm.checkPermission(new RuntimePermission - ("setSecurityManager")); + sm.checkPermission(new RuntimePermission("setSecurityManager")); } if ((s != null) && (s.getClass().getClassLoader() != null)) { // New security manager class is not on bootstrap classpath. - // Cause policy to get initialized before we install the new + // Force policy to get initialized before we install the new // security manager, in order to prevent infinite loops when // trying to initialize the policy (which usually involves // accessing some security and/or system properties, which in turn @@ -361,7 +390,7 @@ public final class System { } /** - * Gets the system security interface. + * Gets the system-wide security manager. * * @return if a security manager has already been established for the * current application, then that security manager is returned; @@ -369,7 +398,11 @@ public final class System { * @see #setSecurityManager */ public static SecurityManager getSecurityManager() { - return security; + if (allowSecurityManager()) { + return security; + } else { + return null; + } } /** @@ -2028,35 +2061,48 @@ public final class System { * 3. set TCCL * * This method must be called after the module system initialization. - * The security manager and system class loader may be custom class from + * The security manager and system class loader may be a custom class from * the application classpath or modulepath. */ private static void initPhase3() { - // set security manager - String cn = System.getProperty("java.security.manager"); - if (cn != null) { - if (cn.isEmpty() || "default".equals(cn)) { - System.setSecurityManager(new SecurityManager()); - } else { - try { - Class c = Class.forName(cn, false, ClassLoader.getBuiltinAppClassLoader()); - Constructor ctor = c.getConstructor(); - // Must be a public subclass of SecurityManager with - // a public no-arg constructor - if (!SecurityManager.class.isAssignableFrom(c) || + String smProp = System.getProperty("java.security.manager"); + if (smProp != null) { + switch (smProp) { + case "disallow": + allowSecurityManager = NEVER; + break; + case "allow": + allowSecurityManager = MAYBE; + break; + case "": + case "default": + setSecurityManager(new SecurityManager()); + allowSecurityManager = MAYBE; + break; + default: + try { + ClassLoader cl = ClassLoader.getBuiltinAppClassLoader(); + Class c = Class.forName(smProp, false, cl); + Constructor ctor = c.getConstructor(); + // Must be a public subclass of SecurityManager with + // a public no-arg constructor + if (!SecurityManager.class.isAssignableFrom(c) || !Modifier.isPublic(c.getModifiers()) || !Modifier.isPublic(ctor.getModifiers())) { - throw new Error("Could not create SecurityManager: " + ctor.toString()); + throw new Error("Could not create SecurityManager: " + + ctor.toString()); + } + // custom security manager may be in non-exported package + ctor.setAccessible(true); + SecurityManager sm = (SecurityManager) ctor.newInstance(); + setSecurityManager(sm); + } catch (Exception e) { + throw new InternalError("Could not create SecurityManager", e); } - // custom security manager implementation may be in unnamed module - // or a named module but non-exported package - ctor.setAccessible(true); - SecurityManager sm = (SecurityManager) ctor.newInstance(); - System.setSecurityManager(sm); - } catch (Exception e) { - throw new Error("Could not create SecurityManager", e); - } + allowSecurityManager = MAYBE; } + } else { + allowSecurityManager = MAYBE; } // initializing the system class loader diff --git a/test/jdk/java/lang/System/AllowSecurityManager.java b/test/jdk/java/lang/System/AllowSecurityManager.java new file mode 100644 index 00000000000..7d46664e625 --- /dev/null +++ b/test/jdk/java/lang/System/AllowSecurityManager.java @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2018, 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. + * + * 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 8191053 + * @summary Test that the allow/disallow options of the java.security.manager + * system property work correctly + * @run main/othervm AllowSecurityManager + * @run main/othervm -Djava.security.manager=disallow AllowSecurityManager + * @run main/othervm -Djava.security.manager=allow AllowSecurityManager + */ + +public class AllowSecurityManager { + + public static void main(String args[]) throws Exception { + String prop = System.getProperty("java.security.manager"); + boolean disallow = "disallow".equals(prop); + try { + System.setSecurityManager(new SecurityManager()); + if (disallow) { + throw new Exception("System.setSecurityManager did not " + + "throw UnsupportedOperationException"); + } + } catch (UnsupportedOperationException uoe) { + if (!disallow) { + throw new Exception("UnsupportedOperationException " + + "unexpectedly thrown by " + + "System.setSecurityManager"); + } + } + } +} From 99ca4f349758b2a065953fa727d8e39dacc1e5af Mon Sep 17 00:00:00 2001 From: Abdul Kolarkunnu Date: Fri, 5 Oct 2018 05:03:15 -0700 Subject: [PATCH 075/124] 8210055: Enable different look and feel tests in SwingSet3 demo tests Reviewed-by: serb --- .../jdk/sanity/client/SwingSet/src/DialogDemoTest.java | 8 +++++--- .../sanity/client/SwingSet/src/SwingSet2DemoTest.java | 10 ++++++---- .../jdk/sanity/client/SwingSet/src/WindowDemoTest.java | 8 +++++--- .../lib/Extensions/src/org/jemmy2ext/JemmyExt.java | 8 ++++---- .../jdk/sanity/client/lib/SwingSet2/src/SwingSet2.java | 5 +---- 5 files changed, 21 insertions(+), 18 deletions(-) diff --git a/test/jdk/sanity/client/SwingSet/src/DialogDemoTest.java b/test/jdk/sanity/client/SwingSet/src/DialogDemoTest.java index 69ee970373b..1d92414509f 100644 --- a/test/jdk/sanity/client/SwingSet/src/DialogDemoTest.java +++ b/test/jdk/sanity/client/SwingSet/src/DialogDemoTest.java @@ -1,6 +1,6 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 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 @@ -27,6 +27,7 @@ import static com.sun.swingset3.demos.dialog.DialogDemo.*; import java.awt.Dimension; import java.awt.Point; import javax.swing.JDialog; +import javax.swing.UIManager; import static org.testng.AssertJUnit.*; import org.testng.annotations.Test; import static org.jemmy2ext.JemmyExt.isIconified; @@ -61,8 +62,9 @@ public class DialogDemoTest { private final ComponentChooser jDialogClassChooser = new ByClassChooser(JDialog.class); - @Test - public void test() throws Exception { + @Test(dataProvider = "availableLookAndFeels", dataProviderClass = TestHelpers.class) + public void test(String lookAndFeel) throws Exception { + UIManager.setLookAndFeel(lookAndFeel); new ClassReference(DialogDemo.class.getCanonicalName()).startApplication(); JFrameOperator mainFrame = new JFrameOperator(DIALOG_DEMO_TITLE); JDialogOperator dialog = new JDialogOperator(DIALOG_TITLE); diff --git a/test/jdk/sanity/client/SwingSet/src/SwingSet2DemoTest.java b/test/jdk/sanity/client/SwingSet/src/SwingSet2DemoTest.java index 214af5b38e9..a8898a1e9e2 100644 --- a/test/jdk/sanity/client/SwingSet/src/SwingSet2DemoTest.java +++ b/test/jdk/sanity/client/SwingSet/src/SwingSet2DemoTest.java @@ -27,6 +27,7 @@ import static org.testng.Assert.assertTrue; import javax.swing.JCheckBoxMenuItem; import javax.swing.JRadioButtonMenuItem; import javax.swing.ToolTipManager; +import javax.swing.UIManager; import javax.swing.plaf.metal.MetalLookAndFeel; import org.jtregext.GuiTestListener; @@ -58,7 +59,7 @@ import org.testng.annotations.Test; * java.logging * @build org.jemmy2ext.JemmyExt * @build SwingSet2 - * @run testng SwingSet2DemoTest + * @run testng/timeout=600 SwingSet2DemoTest */ @Listeners(GuiTestListener.class) public class SwingSet2DemoTest { @@ -74,8 +75,9 @@ public class SwingSet2DemoTest { * * @throws Exception */ - @Test - public void test() throws Exception { + @Test(dataProvider = "availableLookAndFeels", dataProviderClass = TestHelpers.class) + public void test(String lookAndFeel) throws Exception { + UIManager.setLookAndFeel(lookAndFeel); new ClassReference(SwingSet2.class.getCanonicalName()).startApplication(); JFrameOperator frameOperator = new JFrameOperator(SwingSet2.FRAME_TITLE); @@ -192,4 +194,4 @@ public class SwingSet2DemoTest { } } -} \ No newline at end of file +} diff --git a/test/jdk/sanity/client/SwingSet/src/WindowDemoTest.java b/test/jdk/sanity/client/SwingSet/src/WindowDemoTest.java index 014f3ca6bc2..e9fc06f2ac3 100644 --- a/test/jdk/sanity/client/SwingSet/src/WindowDemoTest.java +++ b/test/jdk/sanity/client/SwingSet/src/WindowDemoTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2018, 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 @@ -26,6 +26,7 @@ import com.sun.swingset3.demos.window.WindowDemo; import static com.sun.swingset3.demos.window.WindowDemo.*; import static org.jemmy2ext.JemmyExt.*; import static org.testng.AssertJUnit.*; +import javax.swing.UIManager; import org.testng.annotations.Test; import org.netbeans.jemmy.ClassReference; import org.netbeans.jemmy.operators.JButtonOperator; @@ -53,8 +54,9 @@ import org.testng.annotations.Listeners; @Listeners(GuiTestListener.class) public class WindowDemoTest { - @Test - public void test() throws Exception { + @Test(dataProvider = "availableLookAndFeels", dataProviderClass = TestHelpers.class) + public void test(String lookAndFeel) throws Exception { + UIManager.setLookAndFeel(lookAndFeel); new ClassReference(WindowDemo.class.getCanonicalName()).startApplication(); diff --git a/test/jdk/sanity/client/lib/Extensions/src/org/jemmy2ext/JemmyExt.java b/test/jdk/sanity/client/lib/Extensions/src/org/jemmy2ext/JemmyExt.java index f2d344f4c3f..2c3b23677ac 100644 --- a/test/jdk/sanity/client/lib/Extensions/src/org/jemmy2ext/JemmyExt.java +++ b/test/jdk/sanity/client/lib/Extensions/src/org/jemmy2ext/JemmyExt.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2018, 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 @@ -406,7 +406,7 @@ public class JemmyExt { Window[] windows = Window.getWindows(); int windowCount = 0; for (Window w : windows) { - if (w.getClass().equals(JWindow.class)) { + if (w.getClass().equals(JWindow.class) && ((JWindow)w).isShowing()) { windowCount++; } } @@ -427,7 +427,7 @@ public class JemmyExt { Window[] windows = Window.getWindows(); int windowIndex = 0; for (Window w : windows) { - if (w.getClass().equals(JWindow.class)) { + if (w.getClass().equals(JWindow.class) && ((JWindow)w).isShowing()) { if (windowIndex == index) { return (JWindow) w; } @@ -565,7 +565,7 @@ public class JemmyExt { @Override public boolean checkComponent(Component comp) { - return comp.getClass().equals(clazz); + return comp.getClass().equals(clazz) && comp.isShowing(); } @Override diff --git a/test/jdk/sanity/client/lib/SwingSet2/src/SwingSet2.java b/test/jdk/sanity/client/lib/SwingSet2/src/SwingSet2.java index a41f7e17f9d..862ed409439 100644 --- a/test/jdk/sanity/client/lib/SwingSet2/src/SwingSet2.java +++ b/test/jdk/sanity/client/lib/SwingSet2/src/SwingSet2.java @@ -323,8 +323,6 @@ public class SwingSet2 extends JPanel { "FileMenu.exit_accessible_description", new ExitAction(this) ); - // Create these menu items for the first SwingSet only. - if (numSSs == 0) { // ***** create laf switcher menu lafMenu = (JMenu) menuBar.add(new JMenu(getString("LafMenu.laf_label"))); lafMenu.setMnemonic(getMnemonic("LafMenu.laf_mnemonic")); @@ -432,7 +430,6 @@ public class SwingSet2 extends JPanel { "OptionsMenu.dragEnabled_mnemonic", "OptionsMenu.dragEnabled_accessible_description", new DragSupportAction()); - } // ***** create the multiscreen menu, if we have multiple screens GraphicsDevice[] screens = GraphicsEnvironment. @@ -1258,4 +1255,4 @@ public class SwingSet2 extends JPanel { return className; } } -} \ No newline at end of file +} From 5a36050cfda56a332e3df811eff53a54fd8a48c1 Mon Sep 17 00:00:00 2001 From: Mandy Chung Date: Wed, 10 Oct 2018 15:19:34 -0700 Subject: [PATCH 076/124] 8211921: AssertionError in MethodHandles$Lookup.defineClass Reviewed-by: alanb --- .../share/classes/java/lang/invoke/MethodHandles.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/java.base/share/classes/java/lang/invoke/MethodHandles.java b/src/java.base/share/classes/java/lang/invoke/MethodHandles.java index f5c326c6302..e9b4244fd8f 100644 --- a/src/java.base/share/classes/java/lang/invoke/MethodHandles.java +++ b/src/java.base/share/classes/java/lang/invoke/MethodHandles.java @@ -969,9 +969,6 @@ public class MethodHandles { ProtectionDomain pd = (loader != null) ? lookupClassProtectionDomain() : null; String source = "__Lookup_defineClass__"; Class clazz = SharedSecrets.getJavaLangAccess().defineClass(loader, cn, bytes, pd, source); - assert clazz.getClassLoader() == lookupClass.getClassLoader() - && clazz.getPackageName().equals(lookupClass.getPackageName()) - && protectionDomain(clazz) == lookupClassProtectionDomain(); return clazz; } From 635a875123815b6f34b126d4861cd0ec09ec9813 Mon Sep 17 00:00:00 2001 From: Jesper Wilhelmsson Date: Thu, 11 Oct 2018 00:43:09 +0200 Subject: [PATCH 077/124] Added tag jdk-12+15 for changeset f8626bcc1698 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 5f2accdd825..0fd57b33348 100644 --- a/.hgtags +++ b/.hgtags @@ -517,3 +517,4 @@ f0f5d23449d31f1b3580c8a73313918cafeaefd7 jdk-12+11 8897e41b327c0a5601c6ba2bba5d07f15a3ffc91 jdk-12+14 8897e41b327c0a5601c6ba2bba5d07f15a3ffc91 jdk-12+14 6f04692c7d5137ee34a6bd94c0c8a6c9219cb127 jdk-12+14 +f8626bcc169813a4b2a15880386b952719d1d6d1 jdk-12+15 From 2d7d9b83803b9735d12d78f4d2d44fc74e8b83b3 Mon Sep 17 00:00:00 2001 From: Peter Levart Date: Wed, 10 Oct 2018 17:53:22 -0700 Subject: [PATCH 078/124] 8152910: Get performance improvement with Stable annotation Reviewed-by: darcy --- src/java.base/share/classes/java/math/BigInteger.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/java.base/share/classes/java/math/BigInteger.java b/src/java.base/share/classes/java/math/BigInteger.java index 63dae3d4003..5fd51b57ea5 100644 --- a/src/java.base/share/classes/java/math/BigInteger.java +++ b/src/java.base/share/classes/java/math/BigInteger.java @@ -41,6 +41,7 @@ import java.util.concurrent.ThreadLocalRandom; import jdk.internal.math.DoubleConsts; import jdk.internal.math.FloatConsts; import jdk.internal.HotSpotIntrinsicCandidate; +import jdk.internal.vm.annotation.Stable; /** * Immutable arbitrary-precision integers. All operations behave as if @@ -1219,8 +1220,10 @@ public class BigInteger extends Number implements Comparable { * Initialize static constant array when class is loaded. */ private static final int MAX_CONSTANT = 16; - private static BigInteger posConst[] = new BigInteger[MAX_CONSTANT+1]; - private static BigInteger negConst[] = new BigInteger[MAX_CONSTANT+1]; + @Stable + private static final BigInteger[] posConst = new BigInteger[MAX_CONSTANT+1]; + @Stable + private static final BigInteger[] negConst = new BigInteger[MAX_CONSTANT+1]; /** * The cache of powers of each radix. This allows us to not have to From 47e7b141c03b338ef7bbadc3c554e50c8fb210a9 Mon Sep 17 00:00:00 2001 From: Kim Barrett Date: Wed, 10 Oct 2018 23:47:36 -0400 Subject: [PATCH 079/124] 8211962: Implicit narrowing in MacOSX java.desktop jsound Cast value to needed type. Reviewed-by: serb --- .../macosx/native/libjsound/PLATFORM_API_MacOSX_Ports.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/java.desktop/macosx/native/libjsound/PLATFORM_API_MacOSX_Ports.cpp b/src/java.desktop/macosx/native/libjsound/PLATFORM_API_MacOSX_Ports.cpp index 12ee4f2109c..8db89debb8c 100644 --- a/src/java.desktop/macosx/native/libjsound/PLATFORM_API_MacOSX_Ports.cpp +++ b/src/java.desktop/macosx/native/libjsound/PLATFORM_API_MacOSX_Ports.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2018, 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 @@ -609,7 +609,7 @@ void PORT_GetControls(void* id, INT32 portIndex, PortControlCreator* creator) { // get the channel name char *channelName; CFStringRef cfname = NULL; - const AudioObjectPropertyAddress address = {kAudioObjectPropertyElementName, port->scope, ch}; + const AudioObjectPropertyAddress address = {kAudioObjectPropertyElementName, port->scope, (unsigned)ch}; UInt32 size = sizeof(cfname); OSStatus err = AudioObjectGetPropertyData(mixer->deviceID, &address, 0, NULL, &size, &cfname); if (err == noErr) { From e2d7983ab825b2f4544eec176cf1f4aabaf1a60b Mon Sep 17 00:00:00 2001 From: Matthias Baesken Date: Wed, 10 Oct 2018 16:56:18 +0200 Subject: [PATCH 080/124] 8211929: hotspot/share/opto/parse2.cpp compile error with gcc 7.3.1 Reviewed-by: kvn, stuefe --- src/hotspot/share/opto/parse2.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hotspot/share/opto/parse2.cpp b/src/hotspot/share/opto/parse2.cpp index ca87b8132ed..19d0bb723c5 100644 --- a/src/hotspot/share/opto/parse2.cpp +++ b/src/hotspot/share/opto/parse2.cpp @@ -1346,7 +1346,7 @@ float Parse::dynamic_branch_prediction(float &cnt, BoolTest::mask btest, Node* t if (prob <= PROB_MIN) prob_str = (prob == PROB_MIN) ? "min" : "never"; char prob_str_buf[30]; if (prob_str == NULL) { - sprintf(prob_str_buf, "%g", prob); + jio_snprintf(prob_str_buf, sizeof(prob_str_buf), "%20.2f", prob); prob_str = prob_str_buf; } C->log()->elem("branch target_bci='%d' taken='%d' not_taken='%d' cnt='%f' prob='%s'", @@ -2854,7 +2854,7 @@ void Parse::do_one_bytecode() { IdealGraphPrinter *printer = C->printer(); if (printer && printer->should_print(1)) { char buffer[256]; - sprintf(buffer, "Bytecode %d: %s", bci(), Bytecodes::name(bc())); + jio_snprintf(buffer, sizeof(buffer), "Bytecode %d: %s", bci(), Bytecodes::name(bc())); bool old = printer->traverse_outs(); printer->set_traverse_outs(true); printer->print_method(buffer, 4); From 2b21c73b2d605273f0b821c4d052bf71b743d9f1 Mon Sep 17 00:00:00 2001 From: Aleksey Shipilev Date: Thu, 11 Oct 2018 10:42:17 +0200 Subject: [PATCH 081/124] 8212005: Epsilon elastic TLAB sizing may cause misalignment Reviewed-by: rkennke, tschatzl --- src/hotspot/share/gc/epsilon/epsilonHeap.cpp | 6 +++ .../jtreg/gc/epsilon/TestAlignment.java | 44 +++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 test/hotspot/jtreg/gc/epsilon/TestAlignment.java diff --git a/src/hotspot/share/gc/epsilon/epsilonHeap.cpp b/src/hotspot/share/gc/epsilon/epsilonHeap.cpp index 612914b9747..42f681f3c62 100644 --- a/src/hotspot/share/gc/epsilon/epsilonHeap.cpp +++ b/src/hotspot/share/gc/epsilon/epsilonHeap.cpp @@ -118,6 +118,8 @@ EpsilonHeap* EpsilonHeap::heap() { } HeapWord* EpsilonHeap::allocate_work(size_t size) { + assert(is_object_aligned(size), "Allocation size should be aligned: " SIZE_FORMAT, size); + HeapWord* res = _space->par_allocate(size); while (res == NULL) { @@ -168,6 +170,7 @@ HeapWord* EpsilonHeap::allocate_work(size_t size) { } } + assert(is_object_aligned(res), "Object should be aligned: " PTR_FORMAT, p2i(res)); return res; } @@ -211,6 +214,9 @@ HeapWord* EpsilonHeap::allocate_new_tlab(size_t min_size, // Always honor boundaries size = MAX2(min_size, MIN2(_max_tlab_size, size)); + // Always honor alignment + size = align_up(size, MinObjAlignment); + if (log_is_enabled(Trace, gc)) { ResourceMark rm; log_trace(gc)("TLAB size for \"%s\" (Requested: " SIZE_FORMAT "K, Min: " SIZE_FORMAT diff --git a/test/hotspot/jtreg/gc/epsilon/TestAlignment.java b/test/hotspot/jtreg/gc/epsilon/TestAlignment.java new file mode 100644 index 00000000000..330c4e48fb0 --- /dev/null +++ b/test/hotspot/jtreg/gc/epsilon/TestAlignment.java @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2018, Red Hat, Inc. 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. + * + * 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 TestAlignment + * @key gc + * @requires vm.gc.Epsilon & !vm.graal.enabled + * @summary Check Epsilon runs fine with (un)usual alignments + * @bug 8212005 + * @run main/othervm -XX:+UnlockExperimentalVMOptions -Xmx128m -XX:+UseEpsilonGC -XX:+UseTLAB TestAlignment + * @run main/othervm -XX:+UnlockExperimentalVMOptions -Xmx128m -XX:+UseEpsilonGC -XX:-UseTLAB TestAlignment + * @run main/othervm -XX:+UnlockExperimentalVMOptions -Xmx128m -XX:+UseEpsilonGC -XX:+UseTLAB -XX:+IgnoreUnrecognizedVMOptions -XX:ObjectAlignmentInBytes=16 TestAlignment + * @run main/othervm -XX:+UnlockExperimentalVMOptions -Xmx128m -XX:+UseEpsilonGC -XX:-UseTLAB -XX:+IgnoreUnrecognizedVMOptions -XX:ObjectAlignmentInBytes=16 TestAlignment + */ + +public class TestAlignment { + static Object sink; + + public static void main(String[] args) throws Exception { + for (int c = 0; c < 1000; c++) { + sink = new byte[c]; + } + } +} From 17f301f734b577564fa5dbbb5d6ca0636e2896a7 Mon Sep 17 00:00:00 2001 From: Roland Westrelin Date: Tue, 18 Sep 2018 20:41:17 +0200 Subject: [PATCH 082/124] 8210389: C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc Reviewed-by: kvn, thartmann --- src/hotspot/share/opto/compile.cpp | 26 ++++++ .../regalloc/VolatileLoadMemBarsOnlyUses.java | 80 +++++++++++++++++++ 2 files changed, 106 insertions(+) create mode 100644 test/hotspot/jtreg/compiler/regalloc/VolatileLoadMemBarsOnlyUses.java diff --git a/src/hotspot/share/opto/compile.cpp b/src/hotspot/share/opto/compile.cpp index cd3743deec1..f2a9d95a0fd 100644 --- a/src/hotspot/share/opto/compile.cpp +++ b/src/hotspot/share/opto/compile.cpp @@ -3379,6 +3379,32 @@ void Compile::final_graph_reshaping_impl( Node *n, Final_Reshape_Counts &frc) { n->set_req(MemBarNode::Precedent, top()); } break; + case Op_MemBarAcquire: { + if (n->as_MemBar()->trailing_load() && n->req() > MemBarNode::Precedent) { + // At parse time, the trailing MemBarAcquire for a volatile load + // is created with an edge to the load. After optimizations, + // that input may be a chain of Phis. If those phis have no + // other use, then the MemBarAcquire keeps them alive and + // register allocation can be confused. + ResourceMark rm; + Unique_Node_List wq; + wq.push(n->in(MemBarNode::Precedent)); + n->set_req(MemBarNode::Precedent, top()); + while (wq.size() > 0) { + Node* m = wq.pop(); + if (m->outcnt() == 0) { + for (uint j = 0; j < m->req(); j++) { + Node* in = m->in(j); + if (in != NULL) { + wq.push(in); + } + } + m->disconnect_inputs(NULL, this); + } + } + } + break; + } case Op_RangeCheck: { RangeCheckNode* rc = n->as_RangeCheck(); Node* iff = new IfNode(rc->in(0), rc->in(1), rc->_prob, rc->_fcnt); diff --git a/test/hotspot/jtreg/compiler/regalloc/VolatileLoadMemBarsOnlyUses.java b/test/hotspot/jtreg/compiler/regalloc/VolatileLoadMemBarsOnlyUses.java new file mode 100644 index 00000000000..e09fb048b99 --- /dev/null +++ b/test/hotspot/jtreg/compiler/regalloc/VolatileLoadMemBarsOnlyUses.java @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2018, Red Hat, Inc. 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. + * + * 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 8210389 + * @summary C2: assert(n->outcnt() != 0 || C->top() == n || n->is_Proj()) failed: No dead instructions after post-alloc + * + * @run main/othervm -Xcomp -XX:CompileOnly=VolatileLoadMemBarsOnlyUses VolatileLoadMemBarsOnlyUses + * + */ + +public class VolatileLoadMemBarsOnlyUses { + + public static final int N = 400; + public static long instanceCount=-94L; + public static volatile byte byFld=-108; + + public int mainTest(String[] strArr1) { + + int i17=9, i19=1, i20=63, i21=-32916, i22=0, iArr[]=new int[N]; + boolean b1=false; + double d3=76.18241; + + for (int i : iArr) { + for (i17 = 2; i17 < 63; i17++) { + if (b1) break; + byFld += (byte)(0.131F + (i17 * i17)); + } + for (i19 = 1; 63 > i19; ++i19) { + for (i21 = 1; i21 < 2; i21++) { + d3 = i22; + if (b1) continue; + i20 = i21; + } + d3 -= byFld; + instanceCount = 46725L; + } + switch ((((i22 >>> 1) % 4) * 5) + 91) { + case 98: + break; + case 110: + break; + case 105: + break; + case 103: + break; + default: + } + } + + return i20; + } + public static void main(String[] strArr) { + VolatileLoadMemBarsOnlyUses _instance = new VolatileLoadMemBarsOnlyUses(); + for (int i = 0; i < 10; i++ ) { + _instance.mainTest(strArr); + } + } +} From 2ab522db78e5b722beffbbf06e69b304a0b16f8d Mon Sep 17 00:00:00 2001 From: Roland Westrelin Date: Thu, 27 Sep 2018 17:46:01 +0200 Subject: [PATCH 083/124] 8211233: MemBarNode::trailing_membar() and MemBarNode::leading_membar() need to handle dying subgraphs better Reviewed-by: kvn, thartmann --- src/hotspot/share/opto/memnode.cpp | 66 +++++++++++++++++++++++------- 1 file changed, 52 insertions(+), 14 deletions(-) diff --git a/src/hotspot/share/opto/memnode.cpp b/src/hotspot/share/opto/memnode.cpp index 560d8357bad..14cd6e3bae8 100644 --- a/src/hotspot/share/opto/memnode.cpp +++ b/src/hotspot/share/opto/memnode.cpp @@ -3174,21 +3174,43 @@ void MemBarNode::set_load_store_pair(MemBarNode* leading, MemBarNode* trailing) } MemBarNode* MemBarNode::trailing_membar() const { + ResourceMark rm; Node* trailing = (Node*)this; VectorSet seen(Thread::current()->resource_area()); - while (!trailing->is_MemBar() || !trailing->as_MemBar()->trailing()) { - if (seen.test_set(trailing->_idx)) { - // Dying subgraph? - return NULL; - } - for (DUIterator_Fast jmax, j = trailing->fast_outs(jmax); j < jmax; j++) { - Node* next = trailing->fast_out(j); - if (next != trailing && next->is_CFG()) { - trailing = next; + Node_Stack multis(0); + do { + Node* c = trailing; + uint i = 0; + do { + trailing = NULL; + for (; i < c->outcnt(); i++) { + Node* next = c->raw_out(i); + if (next != c && next->is_CFG()) { + if (c->is_MultiBranch()) { + if (multis.node() == c) { + multis.set_index(i+1); + } else { + multis.push(c, i+1); + } + } + trailing = next; + break; + } + } + if (trailing != NULL && !seen.test_set(trailing->_idx)) { break; } - } - } + while (multis.size() > 0) { + c = multis.node(); + i = multis.index(); + if (i < c->req()) { + break; + } + multis.pop(); + } + } while (multis.size() > 0); + } while (!trailing->is_MemBar() || !trailing->as_MemBar()->trailing()); + MemBarNode* mb = trailing->as_MemBar(); assert((mb->_kind == TrailingStore && _kind == LeadingStore) || (mb->_kind == TrailingLoadStore && _kind == LeadingLoadStore), "bad trailing membar"); @@ -3197,14 +3219,30 @@ MemBarNode* MemBarNode::trailing_membar() const { } MemBarNode* MemBarNode::leading_membar() const { + ResourceMark rm; VectorSet seen(Thread::current()->resource_area()); + Node_Stack regions(0); Node* leading = in(0); while (leading != NULL && (!leading->is_MemBar() || !leading->as_MemBar()->leading())) { - if (seen.test_set(leading->_idx)) { - // Dying subgraph? - return NULL; + while (leading == NULL || leading->is_top() || seen.test_set(leading->_idx)) { + leading = NULL; + while (regions.size() > 0) { + Node* r = regions.node(); + uint i = regions.index(); + if (i < r->req()) { + leading = r->in(i); + regions.set_index(i+1); + } else { + regions.pop(); + } + } + if (leading == NULL) { + assert(regions.size() == 0, "all paths should have been tried"); + return NULL; + } } if (leading->is_Region()) { + regions.push(leading, 2); leading = leading->in(1); } else { leading = leading->in(0); From 9701ffd293d510fb11e722214a2c69524566444f Mon Sep 17 00:00:00 2001 From: Chris Hegarty Date: Thu, 11 Oct 2018 13:40:09 +0100 Subject: [PATCH 084/124] 8211922: Remove test/jdk/javax/naming/module/RunBasic.java from the ProblemList Reviewed-by: lancea --- test/jdk/ProblemList.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/test/jdk/ProblemList.txt b/test/jdk/ProblemList.txt index d5bd1ef73f2..2409be84246 100644 --- a/test/jdk/ProblemList.txt +++ b/test/jdk/ProblemList.txt @@ -874,8 +874,6 @@ com/sun/jndi/ldap/LdapTimeoutTest.java 8151678 linux-al javax/rmi/ssl/SSLSocketParametersTest.sh 8162906 generic-all -javax/naming/module/RunBasic.java 8211850 generic-all - ############################################################################ ########################################################################### From 01a3fec4cb19826b1afd85a9c06e723ec79a62a7 Mon Sep 17 00:00:00 2001 From: Pavel Rappo Date: Thu, 11 Oct 2018 14:10:13 +0100 Subject: [PATCH 085/124] 8212001: Verify exported symbols in java.base (libjava) Reviewed-by: chegar --- src/java.base/share/native/libjava/io_util.c | 2 +- src/java.base/share/native/libjava/io_util.h | 3 +-- src/java.base/windows/native/libjava/io_util_md.c | 3 +-- src/java.base/windows/native/libjava/io_util_md.h | 3 +-- src/jdk.hotspot.agent/share/native/libsaproc/sadis.c | 2 +- 5 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/java.base/share/native/libjava/io_util.c b/src/java.base/share/native/libjava/io_util.c index 1c21cf0a2fa..812a13549b7 100644 --- a/src/java.base/share/native/libjava/io_util.c +++ b/src/java.base/share/native/libjava/io_util.c @@ -201,7 +201,7 @@ writeBytes(JNIEnv *env, jobject this, jbyteArray bytes, } } -JNIEXPORT void JNICALL +void throwFileNotFoundException(JNIEnv *env, jstring path) { char buf[256]; diff --git a/src/java.base/share/native/libjava/io_util.h b/src/java.base/share/native/libjava/io_util.h index 1d72bf2ed02..6e960c0347f 100644 --- a/src/java.base/share/native/libjava/io_util.h +++ b/src/java.base/share/native/libjava/io_util.h @@ -54,8 +54,7 @@ void writeSingle(JNIEnv *env, jobject this, jint byte, jboolean append, jfieldID void writeBytes(JNIEnv *env, jobject this, jbyteArray bytes, jint off, jint len, jboolean append, jfieldID fid); void fileOpen(JNIEnv *env, jobject this, jstring path, jfieldID fid, int flags); -JNIEXPORT void JNICALL -throwFileNotFoundException(JNIEnv *env, jstring path); +void throwFileNotFoundException(JNIEnv *env, jstring path); /* * Macros for managing platform strings. The typical usage pattern is: diff --git a/src/java.base/windows/native/libjava/io_util_md.c b/src/java.base/windows/native/libjava/io_util_md.c index 9927434db89..a7e04ec4dfe 100644 --- a/src/java.base/windows/native/libjava/io_util_md.c +++ b/src/java.base/windows/native/libjava/io_util_md.c @@ -213,8 +213,7 @@ pathToNTPath(JNIEnv *env, jstring path, jboolean throwFNFE) { return pathbuf; } -JNIEXPORT FD JNICALL -winFileHandleOpen(JNIEnv *env, jstring path, int flags) +FD winFileHandleOpen(JNIEnv *env, jstring path, int flags) { const DWORD access = (flags & O_WRONLY) ? GENERIC_WRITE : diff --git a/src/java.base/windows/native/libjava/io_util_md.h b/src/java.base/windows/native/libjava/io_util_md.h index 9779672f738..df8bcfd02b1 100644 --- a/src/java.base/windows/native/libjava/io_util_md.h +++ b/src/java.base/windows/native/libjava/io_util_md.h @@ -56,8 +56,7 @@ handleLseek(FD fd, jlong offset, jint whence); * Returns an opaque handle to file named by "path". If an error occurs, * returns -1 and an exception is pending. */ -JNIEXPORT FD JNICALL -winFileHandleOpen(JNIEnv *env, jstring path, int flags); +FD winFileHandleOpen(JNIEnv *env, jstring path, int flags); /* * Macros to set/get fd from the java.io.FileDescriptor. diff --git a/src/jdk.hotspot.agent/share/native/libsaproc/sadis.c b/src/jdk.hotspot.agent/share/native/libsaproc/sadis.c index 2f01d94d6a9..5fa2b3fdcf7 100644 --- a/src/jdk.hotspot.agent/share/native/libsaproc/sadis.c +++ b/src/jdk.hotspot.agent/share/native/libsaproc/sadis.c @@ -26,7 +26,7 @@ /* * This file implements a binding between Java and the hsdis - * dissasembler. It should compile on Linux/Solaris and Windows. + * disassembler. It should compile on Linux/Solaris and Windows. * The only platform dependent pieces of the code for doing * dlopen/dlsym to find the entry point in hsdis. All the rest is * standard JNI code. From 945623c998793966598aad3c007b8bfb72cc7909 Mon Sep 17 00:00:00 2001 From: Harold Seigel Date: Thu, 11 Oct 2018 10:11:18 -0400 Subject: [PATCH 086/124] 8079784: Unexpected IllegalAccessError when trying access InnerClasses attribute Prevent classes in the InnerClasses attribute from being loaded unless they are actually being accessed. Reviewed-by: dholmes, lfoltan --- src/hotspot/share/oops/instanceKlass.cpp | 42 ------- src/hotspot/share/oops/instanceKlass.hpp | 3 - src/hotspot/share/runtime/reflection.cpp | 26 +++-- .../jtreg/runtime/InnerClassesAttr/Base.java | 28 +++++ .../jtreg/runtime/InnerClassesAttr/Child.java | 30 +++++ .../InnerClassesAttr/InnerClassesTest.jasm | 110 ++++++++++++++++++ 6 files changed, 183 insertions(+), 56 deletions(-) create mode 100644 test/hotspot/jtreg/runtime/InnerClassesAttr/Base.java create mode 100644 test/hotspot/jtreg/runtime/InnerClassesAttr/Child.java create mode 100644 test/hotspot/jtreg/runtime/InnerClassesAttr/InnerClassesTest.jasm diff --git a/src/hotspot/share/oops/instanceKlass.cpp b/src/hotspot/share/oops/instanceKlass.cpp index 319cfce81e6..9c5005e327f 100644 --- a/src/hotspot/share/oops/instanceKlass.cpp +++ b/src/hotspot/share/oops/instanceKlass.cpp @@ -2738,48 +2738,6 @@ void InstanceKlass::check_prohibited_package(Symbol* class_name, return; } -// tell if two classes have the same enclosing class (at package level) -bool InstanceKlass::is_same_package_member(const Klass* class2, TRAPS) const { - if (class2 == this) return true; - if (!class2->is_instance_klass()) return false; - - // must be in same package before we try anything else - if (!is_same_class_package(class2)) - return false; - - // As long as there is an outer_this.getEnclosingClass, - // shift the search outward. - const InstanceKlass* outer_this = this; - for (;;) { - // As we walk along, look for equalities between outer_this and class2. - // Eventually, the walks will terminate as outer_this stops - // at the top-level class around the original class. - bool ignore_inner_is_member; - const Klass* next = outer_this->compute_enclosing_class(&ignore_inner_is_member, - CHECK_false); - if (next == NULL) break; - if (next == class2) return true; - outer_this = InstanceKlass::cast(next); - } - - // Now do the same for class2. - const InstanceKlass* outer2 = InstanceKlass::cast(class2); - for (;;) { - bool ignore_inner_is_member; - Klass* next = outer2->compute_enclosing_class(&ignore_inner_is_member, - CHECK_false); - if (next == NULL) break; - // Might as well check the new outer against all available values. - if (next == this) return true; - if (next == outer_this) return true; - outer2 = InstanceKlass::cast(next); - } - - // If by this point we have not found an equality between the - // two classes, we know they are in separate package members. - return false; -} - bool InstanceKlass::find_inner_classes_attr(int* ooff, int* noff, TRAPS) const { constantPoolHandle i_cp(THREAD, constants()); for (InnerClassesIterator iter(this); !iter.done(); iter.next()) { diff --git a/src/hotspot/share/oops/instanceKlass.hpp b/src/hotspot/share/oops/instanceKlass.hpp index b69ec9466a2..41accd4a624 100644 --- a/src/hotspot/share/oops/instanceKlass.hpp +++ b/src/hotspot/share/oops/instanceKlass.hpp @@ -507,9 +507,6 @@ public: ClassLoaderData* loader_data, TRAPS); public: - // tell if two classes have the same enclosing class (at package level) - bool is_same_package_member(const Klass* class2, TRAPS) const; - // initialization state bool is_loaded() const { return _init_state >= loaded; } bool is_linked() const { return _init_state >= linked; } diff --git a/src/hotspot/share/runtime/reflection.cpp b/src/hotspot/share/runtime/reflection.cpp index 1c1bb0ebeb1..54797b0b9b2 100644 --- a/src/hotspot/share/runtime/reflection.cpp +++ b/src/hotspot/share/runtime/reflection.cpp @@ -750,10 +750,12 @@ void Reflection::check_for_inner_class(const InstanceKlass* outer, const Instanc InnerClassesIterator iter(outer); constantPoolHandle cp (THREAD, outer->constants()); for (; !iter.done(); iter.next()) { - int ioff = iter.inner_class_info_index(); - int ooff = iter.outer_class_info_index(); + int ioff = iter.inner_class_info_index(); + int ooff = iter.outer_class_info_index(); - if (inner_is_member && ioff != 0 && ooff != 0) { + if (inner_is_member && ioff != 0 && ooff != 0) { + if (cp->klass_name_at_matches(outer, ooff) && + cp->klass_name_at_matches(inner, ioff)) { Klass* o = cp->klass_at(ooff, CHECK); if (o == outer) { Klass* i = cp->klass_at(ioff, CHECK); @@ -761,14 +763,16 @@ void Reflection::check_for_inner_class(const InstanceKlass* outer, const Instanc return; } } - } - if (!inner_is_member && ioff != 0 && ooff == 0 && - cp->klass_name_at_matches(inner, ioff)) { - Klass* i = cp->klass_at(ioff, CHECK); - if (i == inner) { - return; - } - } + } + } + + if (!inner_is_member && ioff != 0 && ooff == 0 && + cp->klass_name_at_matches(inner, ioff)) { + Klass* i = cp->klass_at(ioff, CHECK); + if (i == inner) { + return; + } + } } // 'inner' not declared as an inner klass in outer diff --git a/test/hotspot/jtreg/runtime/InnerClassesAttr/Base.java b/test/hotspot/jtreg/runtime/InnerClassesAttr/Base.java new file mode 100644 index 00000000000..8d7e637fef2 --- /dev/null +++ b/test/hotspot/jtreg/runtime/InnerClassesAttr/Base.java @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2018, 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. + * + * 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. + * + */ + +package com.g; +class Base { + static class Builder { } +} diff --git a/test/hotspot/jtreg/runtime/InnerClassesAttr/Child.java b/test/hotspot/jtreg/runtime/InnerClassesAttr/Child.java new file mode 100644 index 00000000000..72863aa6102 --- /dev/null +++ b/test/hotspot/jtreg/runtime/InnerClassesAttr/Child.java @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2018, 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. + * + * 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. + * + */ + +package com.g; +public final class Child extends Base { + public Builder setJobName() { + return null; + } +} diff --git a/test/hotspot/jtreg/runtime/InnerClassesAttr/InnerClassesTest.jasm b/test/hotspot/jtreg/runtime/InnerClassesAttr/InnerClassesTest.jasm new file mode 100644 index 00000000000..fd8982c75e1 --- /dev/null +++ b/test/hotspot/jtreg/runtime/InnerClassesAttr/InnerClassesTest.jasm @@ -0,0 +1,110 @@ +/* + * Copyright (c) 2018, 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. + * + * 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 8079784 + * @compile InnerClassesTest.jasm Base.java Child.java + * @run main com.n.InnerClassesTest + */ + +// Test that if a class's InnerClasses attribute contains a class that is not +// accessible to the class with the attribute then an IllegalAccessError +// exception should not get thrown as a result of the class accessing other +// classes in the InnerClasses attribute. +// +// In this test, class InnerClassesTest has an InnerClasses attribute with two +// entries. One for inaccessable (non-public) class com/g/Base and class +// con/g/Base$Builder. And, one entry for classes com/n/InnerClassTest and +// com/n/InnerClasses/Test$Foo. The test accesses com/n/InnerClsses/Test$Foo +// by calling getSimpleName(). This should not cause an IllegalAccessError +// exception to get thrown. +// +// +// This jasm code was generated from the following Java code. The only +// difference is that, in the jasm code, the order of the entries in the +// InnerClasses attributes for class InnerClassesTest were switched. +// +// package com.n; +// import com.g.Child; +// +// public final class InnerClassesTest { +// +// public static final class Foo { } +// void unused() { +// new Child().setJobName(); +// } +// +// public static void main(String[] args) { +// Class clazz = InnerClassesTest.Foo.class; +// clazz.getSimpleName(); +// } +// } + +package com/n; + +super public final class InnerClassesTest$Foo version 53:0 { + + public Method "":"()V" stack 1 locals 1 { + aload_0; + invokespecial Method java/lang/Object."":"()V"; + return; + } + +public static final InnerClass Foo=class InnerClassesTest$Foo of class InnerClassesTest; + +} // end Class InnerClassesTest$Foo + + +super public final class InnerClassesTest version 53:0 { + + + public Method "":"()V" stack 1 locals 1 { + aload_0; + invokespecial Method java/lang/Object."":"()V"; + return; + } + + Method unused:"()V" stack 2 locals 1 { + new class com/g/Child; + dup; + invokespecial Method com/g/Child."":"()V"; + invokevirtual Method com/g/Child.setJobName:"()Lcom/g/Base$Builder;"; + pop; + return; + } + + public static Method main:"([Ljava/lang/String;)V" stack 1 locals 2 { + ldc class InnerClassesTest$Foo; + astore_1; + aload_1; + invokevirtual Method java/lang/Class.getSimpleName:"()Ljava/lang/String;"; + pop; + return; + } + +static InnerClass Builder=class com/g/Base$Builder of class com/g/Base; +public static final InnerClass Foo=class InnerClassesTest$Foo of class InnerClassesTest; + +} // end Class InnerClassesTest From 2e5653c1666cd03350157330979f99c49bcced0e Mon Sep 17 00:00:00 2001 From: Harold Seigel Date: Thu, 11 Oct 2018 11:31:37 -0400 Subject: [PATCH 087/124] 8211821: PrintStringTableStatistics crashes JVM During JVM exit, print the Symbol and String tables before current thread gets deleted. Reviewed-by: iklam, dholmes --- src/hotspot/share/runtime/java.cpp | 3 -- src/hotspot/share/runtime/thread.cpp | 8 ++-- .../PrintStringTableStatsTest.java | 43 +++++++++++++++++++ 3 files changed, 47 insertions(+), 7 deletions(-) create mode 100644 test/hotspot/jtreg/runtime/PrintStringTableStats/PrintStringTableStatsTest.java diff --git a/src/hotspot/share/runtime/java.cpp b/src/hotspot/share/runtime/java.cpp index b3f2683f597..a49b4ab7d16 100644 --- a/src/hotspot/share/runtime/java.cpp +++ b/src/hotspot/share/runtime/java.cpp @@ -575,9 +575,6 @@ void vm_direct_exit(int code) { } void vm_perform_shutdown_actions() { - // Warning: do not call 'exit_globals()' here. All threads are still running. - // Calling 'exit_globals()' will disable thread-local-storage and cause all - // kinds of assertions to trigger in debug mode. if (is_init_completed()) { Thread* thread = Thread::current_or_null(); if (thread != NULL && thread->is_Java_thread()) { diff --git a/src/hotspot/share/runtime/thread.cpp b/src/hotspot/share/runtime/thread.cpp index 1c1ee13a388..ed30d3dfbab 100644 --- a/src/hotspot/share/runtime/thread.cpp +++ b/src/hotspot/share/runtime/thread.cpp @@ -4212,10 +4212,10 @@ void JavaThread::invoke_shutdown_hooks() { // <-- do not use anything that could get blocked by Safepoint --> // + Disable tracing at JNI/JVM barriers // + Set _vm_exited flag for threads that are still running native code -// + Delete this thread // + Call exit_globals() // > deletes tty // > deletes PerfMemory resources +// + Delete this thread // + Return to caller bool Threads::destroy_vm() { @@ -4291,6 +4291,9 @@ bool Threads::destroy_vm() { notify_vm_shutdown(); + // exit_globals() will delete tty + exit_globals(); + // We are after VM_Exit::set_vm_exited() so we can't call // thread->smr_delete() or we will block on the Threads_lock. // Deleting the shutdown thread here is safe because another @@ -4304,9 +4307,6 @@ bool Threads::destroy_vm() { } #endif - // exit_globals() will delete tty - exit_globals(); - LogConfiguration::finalize(); return true; diff --git a/test/hotspot/jtreg/runtime/PrintStringTableStats/PrintStringTableStatsTest.java b/test/hotspot/jtreg/runtime/PrintStringTableStats/PrintStringTableStatsTest.java new file mode 100644 index 00000000000..73941b3d866 --- /dev/null +++ b/test/hotspot/jtreg/runtime/PrintStringTableStats/PrintStringTableStatsTest.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2018, 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. + * + * 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. + */ + +import jdk.test.lib.process.ProcessTools; +import jdk.test.lib.process.OutputAnalyzer; + +/* + * @test PrintStringTableStatsTest + * @bug 8211821 + * @library /test/lib + * @run main PrintStringTableStatsTest + */ + +public class PrintStringTableStatsTest { + public static void main(String... args) throws Exception { + ProcessBuilder pb = ProcessTools.createJavaProcessBuilder( + "-XX:+PrintStringTableStatistics", + "--version"); + OutputAnalyzer output = new OutputAnalyzer(pb.start()); + output.shouldContain("Number of buckets"); + output.shouldHaveExitValue(0); + } +} From b68500521e7119efbe0f0d827186f6060c1a9b08 Mon Sep 17 00:00:00 2001 From: Jean Christophe Beyler Date: Thu, 11 Oct 2018 09:30:10 -0700 Subject: [PATCH 088/124] 8211432: [REDO] Handle JNIGlobalRefLocker.cpp Adding a JNI verification wrapper for tests Reviewed-by: amenkov, sspitsyn, phh --- .../gc/lock/jniref/JNIGlobalRefLocker.cpp | 18 +-- .../gc/lock/jniref/libJNIGlobalRefLocker.cpp | 1 + .../nsk/share/jni/ExceptionCheckingJniEnv.cpp | 111 +++++++++++++++++ .../nsk/share/jni/ExceptionCheckingJniEnv.hpp | 117 ++++++++++++++++++ 4 files changed, 234 insertions(+), 13 deletions(-) create mode 100644 test/hotspot/jtreg/vmTestbase/nsk/share/jni/ExceptionCheckingJniEnv.cpp create mode 100644 test/hotspot/jtreg/vmTestbase/nsk/share/jni/ExceptionCheckingJniEnv.hpp diff --git a/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jniref/JNIGlobalRefLocker.cpp b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jniref/JNIGlobalRefLocker.cpp index 648c72b0bdd..8e7ab509c94 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jniref/JNIGlobalRefLocker.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jniref/JNIGlobalRefLocker.cpp @@ -20,10 +20,12 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ + #include #include #include #include "jni_tools.h" +#include "ExceptionCheckingJniEnv.hpp" extern "C" { @@ -35,28 +37,18 @@ static jfieldID objFieldId = NULL; * Signature: (JJ)V */ JNIEXPORT void JNICALL Java_nsk_share_gc_lock_jniref_JNIGlobalRefLocker_criticalNative - (JNIEnv *env, jobject o, jlong enterTime, jlong sleepTime) { + (JNIEnv *jni_env, jobject o, jlong enterTime, jlong sleepTime) { + ExceptionCheckingJniEnvPtr env(jni_env); + jobject obj; jobject gref; time_t start_time, current_time; if (objFieldId == NULL) { jclass klass = env->GetObjectClass(o); - if (klass == NULL) { - printf("Error: GetObjectClass returned NULL\n"); - return; - } objFieldId = env->GetFieldID(klass, "obj", "Ljava/lang/Object;"); - if (objFieldId == NULL) { - printf("Error: GetFieldID returned NULL\n"); - return; - } } obj = env->GetObjectField(o, objFieldId); - if (obj == NULL) { - printf("Error: GetObjectField returned NULL\n"); - return; - } env->SetObjectField(o, objFieldId, NULL); start_time = time(NULL); enterTime /= 1000; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jniref/libJNIGlobalRefLocker.cpp b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jniref/libJNIGlobalRefLocker.cpp index d523fba861a..2e02b2d395a 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jniref/libJNIGlobalRefLocker.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jniref/libJNIGlobalRefLocker.cpp @@ -24,3 +24,4 @@ #include "JNIGlobalRefLocker.cpp" #include "jni_tools.cpp" #include "nsk_tools.cpp" +#include "ExceptionCheckingJniEnv.cpp" diff --git a/test/hotspot/jtreg/vmTestbase/nsk/share/jni/ExceptionCheckingJniEnv.cpp b/test/hotspot/jtreg/vmTestbase/nsk/share/jni/ExceptionCheckingJniEnv.cpp new file mode 100644 index 00000000000..87a752d4f5e --- /dev/null +++ b/test/hotspot/jtreg/vmTestbase/nsk/share/jni/ExceptionCheckingJniEnv.cpp @@ -0,0 +1,111 @@ +/* + * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, Google 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. + * + * 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. + */ + +#include "ExceptionCheckingJniEnv.hpp" + +namespace { + +template +class JNIVerifier { + public: + JNIVerifier(ExceptionCheckingJniEnv *env, const char* base_msg) + : _env(env), _base_msg(base_msg), _return_error(NULL) { + } + + ~JNIVerifier() { + JNIEnv* jni_env = _env->GetJNIEnv(); + if (jni_env->ExceptionCheck()) { + _env->HandleError(_base_msg); + return; + } + + if (_return_error != NULL) { + ProcessReturnError(); + } + } + + void ProcessReturnError() { + int len = snprintf(NULL, 0, "%s : %s", _base_msg, _return_error) + 1; + + if (len <= 0) { + _env->HandleError(_return_error); + return; + } + + char* full_message = (char*) malloc(len); + if (full_message == NULL) { + _env->HandleError(_return_error); + return; + } + + snprintf(full_message, len, "%s : %s", _base_msg, _return_error); + + _env->HandleError(full_message); + free(full_message); + } + + T ResultNotNull(T ptr) { + if (ptr == NULL) { + _return_error = "Return is NULL"; + } + return ptr; + } + + private: + ExceptionCheckingJniEnv* _env; + const char* const _base_msg; + const char* _return_error; +}; + +} + +jclass ExceptionCheckingJniEnv::GetObjectClass(jobject obj) { + JNIVerifier marker(this, "GetObjectClass"); + return marker.ResultNotNull(_jni_env->GetObjectClass(obj)); +} + +jfieldID ExceptionCheckingJniEnv::GetFieldID(jclass klass, const char *name, const char* type) { + JNIVerifier marker(this, "GetObjectClass"); + return marker.ResultNotNull(_jni_env->GetFieldID(klass, name, type)); +} + +jobject ExceptionCheckingJniEnv::GetObjectField(jobject obj, jfieldID field) { + JNIVerifier marker(this, "GetObjectField"); + return marker.ResultNotNull(_jni_env->GetObjectField(obj, field)); +} + +void ExceptionCheckingJniEnv::SetObjectField(jobject obj, jfieldID field, jobject value) { + JNIVerifier<> marker(this, "SetObjectField"); + _jni_env->SetObjectField(obj, field, value); +} + +jobject ExceptionCheckingJniEnv::NewGlobalRef(jobject obj) { + JNIVerifier marker(this, "GetObjectField"); + return marker.ResultNotNull(_jni_env->NewGlobalRef(obj)); +} + +void ExceptionCheckingJniEnv::DeleteGlobalRef(jobject obj) { + JNIVerifier<> marker(this, "DeleteGlobalRef"); + _jni_env->DeleteGlobalRef(obj); +} diff --git a/test/hotspot/jtreg/vmTestbase/nsk/share/jni/ExceptionCheckingJniEnv.hpp b/test/hotspot/jtreg/vmTestbase/nsk/share/jni/ExceptionCheckingJniEnv.hpp new file mode 100644 index 00000000000..5345ce7d419 --- /dev/null +++ b/test/hotspot/jtreg/vmTestbase/nsk/share/jni/ExceptionCheckingJniEnv.hpp @@ -0,0 +1,117 @@ +/* + * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, Google 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. + * + * 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. + */ +#ifndef NSK_EXCEPTIONCHECKINGJNIENV_DEFINED +#define NSK_EXCEPTIONCHECKINGJNIENV_DEFINED + +#include + +/** + * ExceptionCheckingJniEnv wraps around the JNIEnv data structure and + * methods to enable automatic exception checking. This allows test writers + * and readers to concentrate on what the test is to do and leave the + * error checking and throwing to this data structure and subsystem. + * + * For example: + * + * ... JNIEnv* env ... + * jclass klass = env->GetObjectClass(o); + * if (klass == NULL) { + * printf("Error: GetObjectClass returned NULL\n"); + * return; + * } + * if (env->ExceptionCheck()) { + * ... + * } + * + * Can be simplified to: + * ... ExceptionCheckingJniEnv* env ... + * jclass klass = env->GetObjectClass(o); + * + * Where now the JNI Exception checking and the NULL return checking are done + * internally and will perform whatever action the ErrorHandler requires. + * + * By default, the error handler describes the exception via the JNI + * ExceptionDescribe method and calls FatalError. + * + * Note: at a future date, this will also include the tracing mechanism done in + * NSK_VERIFY, which will thus embed its logic into the ExceptionCheckingJniEnv + * and clearing that up for the code readers and writers. + */ +class ExceptionCheckingJniEnv { + public: + // JNIEnv API redefinitions. + jfieldID GetFieldID(jclass klass, const char *name, const char* type); + jclass GetObjectClass(jobject obj); + jobject GetObjectField(jobject obj, jfieldID field); + void SetObjectField(jobject obj, jfieldID field, jobject value); + + jobject NewGlobalRef(jobject obj); + void DeleteGlobalRef(jobject obj); + + // ExceptionCheckingJniEnv methods. + JNIEnv* GetJNIEnv() { + return _jni_env; + } + + void HandleError(const char* msg) { + if (_error_handler) { + _error_handler(_jni_env, msg); + } + } + + typedef void (*ErrorHandler)(JNIEnv* env, const char* error_message); + + static void FatalError(JNIEnv* env, const char* message) { + if (env->ExceptionCheck()) { + env->ExceptionDescribe(); + } + env->FatalError(message); + } + + ExceptionCheckingJniEnv(JNIEnv* jni_env, ErrorHandler error_handler) : + _jni_env(jni_env), _error_handler(error_handler) {} + + private: + JNIEnv* _jni_env; + ErrorHandler _error_handler; +}; + +// We cannot use unique_ptr due to this being gnu98++, so use this instead: +class ExceptionCheckingJniEnvPtr { + private: + ExceptionCheckingJniEnv _env; + + public: + ExceptionCheckingJniEnv* operator->() { + return &_env; + } + + ExceptionCheckingJniEnvPtr( + JNIEnv* jni_env, + ExceptionCheckingJniEnv::ErrorHandler error_handler = ExceptionCheckingJniEnv::FatalError) : + _env(jni_env, error_handler) { + } +}; + +#endif From 3eef363b698d13aa205e891ad97ba8831975fbb7 Mon Sep 17 00:00:00 2001 From: Jean Christophe Beyler Date: Thu, 11 Oct 2018 12:41:47 -0700 Subject: [PATCH 089/124] 8212025: Remove collector_present variable from ThreadHeapSampler Remove unused variable from ThreadHeapSampler Reviewed-by: tschatzl, pliden --- src/hotspot/share/runtime/threadHeapSampler.hpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/hotspot/share/runtime/threadHeapSampler.hpp b/src/hotspot/share/runtime/threadHeapSampler.hpp index 06bfbc8635e..2b89ffab567 100644 --- a/src/hotspot/share/runtime/threadHeapSampler.hpp +++ b/src/hotspot/share/runtime/threadHeapSampler.hpp @@ -39,10 +39,6 @@ class ThreadHeapSampler { static int _enabled; static int _sampling_interval; - // Used for assertion mode to determine if there is a path to a TLAB slow path - // without a collector present. - size_t _collectors_present; - static void init_log_table(); public: @@ -51,8 +47,6 @@ class ThreadHeapSampler { if (_rnd == 0) { _rnd = 1; } - - _collectors_present = 0; } size_t bytes_until_sample() { return _bytes_until_sample; } From 7ea2bd922bbf1acb8ee9376ca2d12f8982dbc08d Mon Sep 17 00:00:00 2001 From: Roman Kennke Date: Thu, 11 Oct 2018 23:48:55 +0200 Subject: [PATCH 090/124] 8212054: Boilerplate to bind oopDesc::equals_raw() to actual raw implementation Reviewed-by: shade, eosterlund --- src/hotspot/share/oops/accessBackend.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hotspot/share/oops/accessBackend.hpp b/src/hotspot/share/oops/accessBackend.hpp index 5a170ec3d9f..108d8acb1eb 100644 --- a/src/hotspot/share/oops/accessBackend.hpp +++ b/src/hotspot/share/oops/accessBackend.hpp @@ -998,7 +998,7 @@ namespace AccessInternal { template inline static typename EnableIf< - HasDecorator::value, bool>::type + HasDecorator::value || HasDecorator::value, bool>::type equals(oop o1, oop o2) { typedef RawAccessBarrier Raw; return Raw::equals(o1, o2); @@ -1006,7 +1006,7 @@ namespace AccessInternal { template inline static typename EnableIf< - !HasDecorator::value, bool>::type + !HasDecorator::value && !HasDecorator::value, bool>::type equals(oop o1, oop o2) { return RuntimeDispatch::equals(o1, o2); } From b3de6ff3a6d56572f153c1b0ef039b3bf9982e97 Mon Sep 17 00:00:00 2001 From: Muthusamy Chinnathambi Date: Thu, 11 Oct 2018 15:49:23 -0700 Subject: [PATCH 091/124] 8211714: Need to update vm_version.cpp to recognise VS2017 minor versions Reviewed-by: dholmes --- src/hotspot/share/runtime/vm_version.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/hotspot/share/runtime/vm_version.cpp b/src/hotspot/share/runtime/vm_version.cpp index fffa5da5205..eb05460adef 100644 --- a/src/hotspot/share/runtime/vm_version.cpp +++ b/src/hotspot/share/runtime/vm_version.cpp @@ -218,10 +218,16 @@ const char* Abstract_VM_Version::internal_vm_info_string() { #define HOTSPOT_BUILD_COMPILER "MS VC++ 12.0 (VS2013)" #elif _MSC_VER == 1900 #define HOTSPOT_BUILD_COMPILER "MS VC++ 14.0 (VS2015)" + #elif _MSC_VER == 1911 + #define HOTSPOT_BUILD_COMPILER "MS VC++ 15.3 (VS2017)" #elif _MSC_VER == 1912 #define HOTSPOT_BUILD_COMPILER "MS VC++ 15.5 (VS2017)" #elif _MSC_VER == 1913 #define HOTSPOT_BUILD_COMPILER "MS VC++ 15.6 (VS2017)" + #elif _MSC_VER == 1914 + #define HOTSPOT_BUILD_COMPILER "MS VC++ 15.7 (VS2017)" + #elif _MSC_VER == 1915 + #define HOTSPOT_BUILD_COMPILER "MS VC++ 15.8 (VS2017)" #else #define HOTSPOT_BUILD_COMPILER "unknown MS VC++:" XSTR(_MSC_VER) #endif From 7014d0bdf8bcc66a121f576db2074d4fb0a43fa5 Mon Sep 17 00:00:00 2001 From: Hamlin Li Date: Fri, 12 Oct 2018 10:35:24 +0800 Subject: [PATCH 092/124] 8186610: move ModuleUtils to top-level testlibrary Reviewed-by: alanb, iignatyev --- test/jdk/java/lang/ModuleLayer/BasicLayerTest.java | 7 +++++-- test/jdk/java/lang/ModuleLayer/LayerAndLoadersTest.java | 7 +++++-- test/jdk/java/lang/ModuleLayer/LayerControllerTest.java | 7 +++++-- test/jdk/java/lang/module/AutomaticModulesTest.java | 6 ++++-- test/jdk/java/lang/module/ConfigurationTest.java | 7 +++++-- .../SystemModuleDescriptors}/ModuleTargetHelper.java | 0 .../plugins/SystemModuleDescriptors/SystemModulesTest.java | 1 - .../plugins/SystemModuleDescriptors/UserModuleTest.java | 2 +- .../testlibrary => lib/jdk/test/lib/util}/ModuleUtils.java | 4 +++- 9 files changed, 28 insertions(+), 13 deletions(-) rename test/jdk/{lib/testlibrary => tools/jlink/plugins/SystemModuleDescriptors}/ModuleTargetHelper.java (100%) rename test/{jdk/lib/testlibrary => lib/jdk/test/lib/util}/ModuleUtils.java (96%) diff --git a/test/jdk/java/lang/ModuleLayer/BasicLayerTest.java b/test/jdk/java/lang/ModuleLayer/BasicLayerTest.java index c3f4a1337b2..e697b285ef9 100644 --- a/test/jdk/java/lang/ModuleLayer/BasicLayerTest.java +++ b/test/jdk/java/lang/ModuleLayer/BasicLayerTest.java @@ -23,9 +23,10 @@ /** * @test - * @library /lib/testlibrary + * @library /test/lib * @modules java.base/jdk.internal.misc - * @build BasicLayerTest ModuleUtils + * @build BasicLayerTest + * jdk.test.lib.util.ModuleUtils * @compile layertest/Test.java * @run testng BasicLayerTest * @summary Basic tests for java.lang.ModuleLayer @@ -41,6 +42,8 @@ import java.util.Optional; import java.util.Set; import java.util.stream.Collectors; +import jdk.test.lib.util.ModuleUtils; + import jdk.internal.misc.SharedSecrets; import org.testng.annotations.DataProvider; diff --git a/test/jdk/java/lang/ModuleLayer/LayerAndLoadersTest.java b/test/jdk/java/lang/ModuleLayer/LayerAndLoadersTest.java index 96449bda594..8b60fe13212 100644 --- a/test/jdk/java/lang/ModuleLayer/LayerAndLoadersTest.java +++ b/test/jdk/java/lang/ModuleLayer/LayerAndLoadersTest.java @@ -23,9 +23,11 @@ /** * @test - * @library /lib/testlibrary /test/lib + * @library /test/lib * @modules jdk.compiler - * @build LayerAndLoadersTest jdk.test.lib.compiler.CompilerUtils ModuleUtils + * @build LayerAndLoadersTest + * jdk.test.lib.compiler.CompilerUtils + * jdk.test.lib.util.ModuleUtils * @run testng LayerAndLoadersTest * @summary Tests for java.lang.ModuleLayer@defineModulesWithXXX methods */ @@ -54,6 +56,7 @@ import java.util.Set; import java.util.stream.Collectors; import jdk.test.lib.compiler.CompilerUtils; +import jdk.test.lib.util.ModuleUtils; import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; diff --git a/test/jdk/java/lang/ModuleLayer/LayerControllerTest.java b/test/jdk/java/lang/ModuleLayer/LayerControllerTest.java index 68e9106226b..b15a9e9100b 100644 --- a/test/jdk/java/lang/ModuleLayer/LayerControllerTest.java +++ b/test/jdk/java/lang/ModuleLayer/LayerControllerTest.java @@ -23,8 +23,9 @@ /** * @test - * @library /lib/testlibrary - * @build LayerControllerTest ModuleUtils + * @library /test/lib + * @build LayerControllerTest + * jdk.test.lib.util.ModuleUtils * @run testng LayerControllerTest * @summary Basic tests for java.lang.ModuleLayer.Controller */ @@ -35,6 +36,8 @@ import java.lang.module.ModuleFinder; import java.util.List; import java.util.Set; +import jdk.test.lib.util.ModuleUtils; + import org.testng.annotations.Test; import static org.testng.Assert.*; diff --git a/test/jdk/java/lang/module/AutomaticModulesTest.java b/test/jdk/java/lang/module/AutomaticModulesTest.java index 61b4be018fb..756f3ab2eab 100644 --- a/test/jdk/java/lang/module/AutomaticModulesTest.java +++ b/test/jdk/java/lang/module/AutomaticModulesTest.java @@ -23,9 +23,10 @@ /** * @test - * @library /lib/testlibrary /test/lib - * @build AutomaticModulesTest ModuleUtils + * @library /test/lib + * @build AutomaticModulesTest * jdk.test.lib.util.JarUtils + * jdk.test.lib.util.ModuleUtils * @run testng AutomaticModulesTest * @summary Basic tests for automatic modules */ @@ -50,6 +51,7 @@ import java.util.stream.Collectors; import java.util.stream.Stream; import jdk.test.lib.util.JarUtils; +import jdk.test.lib.util.ModuleUtils; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; diff --git a/test/jdk/java/lang/module/ConfigurationTest.java b/test/jdk/java/lang/module/ConfigurationTest.java index b06aaf03cf8..e1264acdd0a 100644 --- a/test/jdk/java/lang/module/ConfigurationTest.java +++ b/test/jdk/java/lang/module/ConfigurationTest.java @@ -23,10 +23,11 @@ /** * @test - * @library /lib/testlibrary + * @library /test/lib * @modules java.base/jdk.internal.misc * java.base/jdk.internal.module - * @build ConfigurationTest ModuleUtils + * @build ConfigurationTest + * jdk.test.lib.util.ModuleUtils * @run testng ConfigurationTest * @summary Basic tests for java.lang.module.Configuration */ @@ -47,6 +48,8 @@ import java.util.List; import java.util.Optional; import java.util.Set; +import jdk.test.lib.util.ModuleUtils; + import jdk.internal.misc.SharedSecrets; import jdk.internal.module.ModuleInfoWriter; import jdk.internal.module.ModuleTarget; diff --git a/test/jdk/lib/testlibrary/ModuleTargetHelper.java b/test/jdk/tools/jlink/plugins/SystemModuleDescriptors/ModuleTargetHelper.java similarity index 100% rename from test/jdk/lib/testlibrary/ModuleTargetHelper.java rename to test/jdk/tools/jlink/plugins/SystemModuleDescriptors/ModuleTargetHelper.java diff --git a/test/jdk/tools/jlink/plugins/SystemModuleDescriptors/SystemModulesTest.java b/test/jdk/tools/jlink/plugins/SystemModuleDescriptors/SystemModulesTest.java index 6f83ebc89a5..0b969497303 100644 --- a/test/jdk/tools/jlink/plugins/SystemModuleDescriptors/SystemModulesTest.java +++ b/test/jdk/tools/jlink/plugins/SystemModuleDescriptors/SystemModulesTest.java @@ -42,7 +42,6 @@ import static org.testng.Assert.*; /** * @test * @bug 8142968 8173381 - * @library /lib/testlibrary * @modules java.base/jdk.internal.misc * @modules java.base/jdk.internal.module * @modules java.base/jdk.internal.org.objectweb.asm diff --git a/test/jdk/tools/jlink/plugins/SystemModuleDescriptors/UserModuleTest.java b/test/jdk/tools/jlink/plugins/SystemModuleDescriptors/UserModuleTest.java index a4c25e0aff6..e3617d925a8 100644 --- a/test/jdk/tools/jlink/plugins/SystemModuleDescriptors/UserModuleTest.java +++ b/test/jdk/tools/jlink/plugins/SystemModuleDescriptors/UserModuleTest.java @@ -44,7 +44,7 @@ import static org.testng.Assert.*; /** * @test * @bug 8142968 8173381 8174740 - * @library /lib/testlibrary /test/lib + * @library /test/lib * @modules jdk.compiler jdk.jlink * @modules java.base/jdk.internal.module * @modules java.base/jdk.internal.org.objectweb.asm diff --git a/test/jdk/lib/testlibrary/ModuleUtils.java b/test/lib/jdk/test/lib/util/ModuleUtils.java similarity index 96% rename from test/jdk/lib/testlibrary/ModuleUtils.java rename to test/lib/jdk/test/lib/util/ModuleUtils.java index b3c9d5e49c8..d97fd953b99 100644 --- a/test/jdk/lib/testlibrary/ModuleUtils.java +++ b/test/lib/jdk/test/lib/util/ModuleUtils.java @@ -21,6 +21,8 @@ * questions. */ +package jdk.test.lib.util; + import java.lang.module.ModuleDescriptor; import java.lang.module.ModuleFinder; import java.lang.module.ModuleReader; @@ -47,7 +49,7 @@ public final class ModuleUtils { * Returns a ModuleFinder that finds modules with the given module * descriptors. */ - static ModuleFinder finderOf(ModuleDescriptor... descriptors) { + public static ModuleFinder finderOf(ModuleDescriptor... descriptors) { // Create a ModuleReference for each module Map namesToReference = new HashMap<>(); From 1d8a27195c5a26b355cbf3b7d62d8f928cd7ddf2 Mon Sep 17 00:00:00 2001 From: Goetz Lindenmaier Date: Fri, 12 Oct 2018 08:33:18 +0200 Subject: [PATCH 093/124] 8211931: [ppc][testbug] runtime/jni/terminatedThread/TestTerminatedThread.java fails as threads don't terminate immediately Reviewed-by: dholmes, mdoerr --- .../TestTerminatedThread.java | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/test/hotspot/jtreg/runtime/jni/terminatedThread/TestTerminatedThread.java b/test/hotspot/jtreg/runtime/jni/terminatedThread/TestTerminatedThread.java index 1cc79fa8307..df8e68eb052 100644 --- a/test/hotspot/jtreg/runtime/jni/terminatedThread/TestTerminatedThread.java +++ b/test/hotspot/jtreg/runtime/jni/terminatedThread/TestTerminatedThread.java @@ -85,10 +85,14 @@ public class TestTerminatedThread { System.out.println("Calling getThreadCpuTime ..."); long t1 = mbean.getThreadCpuTime(t.getId()); if (t1 != -1) { - throw new RuntimeException("Invalid ThreadCpuTime returned = " + - t1 + " expected = -1"); + // At least on PPC, we know threads can still be around a short + // instant. In some stress scenarios we seem to grab times of + // new threads started with the same thread id. In these cases + // we get here. + System.out.println("Unexpected: thread still reports CPU time: " + t1); + } else { + System.out.println("Okay: getThreadCpuTime() reported -1 as expected"); } - System.out.println("Okay: getThreadCpuTime() reported -1 as expected"); } else { System.out.println("Skipping Thread CPU time test as it's not supported"); } @@ -96,10 +100,14 @@ public class TestTerminatedThread { System.out.println("Calling getThreadUserTime ..."); long t1 = mbean.getThreadUserTime(t.getId()); if (t1 != -1) { - throw new RuntimeException("Invalid ThreadUserTime returned = " + - t1 + " expected = -1"); + // At least on PPC, we know threads can still be around a short + // instant. In some stress scenarios we seem to grab times of + // new threads started with the same thread id. In these cases + // we get here. + System.out.println("Unexpected: thread still reports User time: " + t1); + } else { + System.out.println("Okay: getThreadUserTime() reported -1 as expected"); } - System.out.println("Okay: getThreadUserTime() reported -1 as expected"); System.out.println("Calling getThreadInfo ..."); ThreadInfo info = mbean.getThreadInfo(t.getId()); From f4df5cb4c3a6221c1394dda8c33249920e6bbaaa Mon Sep 17 00:00:00 2001 From: Vyom Tewari Date: Fri, 12 Oct 2018 12:37:13 +0530 Subject: [PATCH 094/124] 8189366: SocketInputStream.available() should check for eof Reviewed-by: chegar --- .../classes/java/net/SocketInputStream.java | 6 +- test/jdk/java/net/Socket/CloseAvailable.java | 79 ++++++++++++++----- 2 files changed, 66 insertions(+), 19 deletions(-) diff --git a/src/java.base/share/classes/java/net/SocketInputStream.java b/src/java.base/share/classes/java/net/SocketInputStream.java index c4dbb5d59dd..717f37067ee 100644 --- a/src/java.base/share/classes/java/net/SocketInputStream.java +++ b/src/java.base/share/classes/java/net/SocketInputStream.java @@ -232,7 +232,11 @@ class SocketInputStream extends FileInputStream { * @return the number of immediately available bytes */ public int available() throws IOException { - return impl.available(); + if (eof) { + return 0; + } else { + return impl.available(); + } } /** diff --git a/test/jdk/java/net/Socket/CloseAvailable.java b/test/jdk/java/net/Socket/CloseAvailable.java index c79a914fc22..2b443cc6475 100644 --- a/test/jdk/java/net/Socket/CloseAvailable.java +++ b/test/jdk/java/net/Socket/CloseAvailable.java @@ -23,7 +23,7 @@ /* * @test - * @bug 4091859 + * @bug 4091859 8189366 * @summary Test Socket.available() * @run main CloseAvailable * @run main/othervm -Djava.net.preferIPv4Stack=true CloseAvailable @@ -33,18 +33,32 @@ import java.net.*; import java.io.*; -public class CloseAvailable implements Runnable { - static ServerSocket ss; - static InetAddress addr; - static int port; +public class CloseAvailable { public static void main(String[] args) throws Exception { - boolean error = true; - addr = InetAddress.getLocalHost(); - ss = new ServerSocket(0); - port = ss.getLocalPort(); + testClose(); + + testEOF(true); + testEOF(false); + } + + static void testClose() throws IOException { + boolean error = true; + InetAddress addr = InetAddress.getLocalHost(); + ServerSocket ss = new ServerSocket(0); + int port = ss.getLocalPort(); + + Thread t = new Thread(new Thread("Close-Available-1") { + public void run() { + try { + Socket s = new Socket(addr, port); + s.close(); + } catch (Exception e) { + e.printStackTrace(); + } + } + }); - Thread t = new Thread(new CloseAvailable()); t.start(); Socket soc = ss.accept(); @@ -63,13 +77,42 @@ public class CloseAvailable implements Runnable { throw new RuntimeException("Available() can be called after stream closed."); } - public void run() { - try { - Socket s = new Socket(addr, port); - s.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } + // Verifies consistency of `available` behaviour when EOF reached, both + // explicitly and implicitly. + static void testEOF(boolean readUntilEOF) throws IOException { + System.out.println("testEOF, readUntilEOF: " + readUntilEOF); + InetAddress addr = InetAddress.getLoopbackAddress(); + ServerSocket ss = new ServerSocket(); + ss.bind(new InetSocketAddress(addr, 0), 0); + int port = ss.getLocalPort(); + try (Socket s = new Socket(addr, port)) { + s.getOutputStream().write(0x42); + s.shutdownOutput(); + + try (Socket soc = ss.accept()) { + ss.close(); + + InputStream is = soc.getInputStream(); + int b = is.read(); + assert b == 0x42; + assert !s.isClosed(); + if (readUntilEOF) { + b = is.read(); + assert b == -1; + } + + int a; + for (int i = 0; i < 100; i++) { + a = is.available(); + System.out.print(a + ", "); + if (a != 0) + throw new RuntimeException("Unexpected non-zero available: " + a); + } + assert !s.isClosed(); + assert is.read() == -1; + } + } + System.out.println("\ncomplete"); + } } From 55692eb0ca9ee5bd1b23ca3c2b9eb82b14f50091 Mon Sep 17 00:00:00 2001 From: David Holmes Date: Fri, 12 Oct 2018 03:51:02 -0400 Subject: [PATCH 095/124] 8211046: Forced data dependencies serve no purpose on x86 Reviewed-by: eosterlund, rehn --- .../cpu/x86/jniFastGetField_x86_64.cpp | 29 ++----------------- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/src/hotspot/cpu/x86/jniFastGetField_x86_64.cpp b/src/hotspot/cpu/x86/jniFastGetField_x86_64.cpp index 179c1b55c95..0787f4e8720 100644 --- a/src/hotspot/cpu/x86/jniFastGetField_x86_64.cpp +++ b/src/hotspot/cpu/x86/jniFastGetField_x86_64.cpp @@ -35,9 +35,6 @@ #define BUFFER_SIZE 30*wordSize -// Instead of issuing lfence for LoadLoad barrier, we create data dependency -// between loads, which is more efficient than lfence. - // Common register usage: // rax/xmm0: result // c_rarg0: jni env @@ -77,12 +74,6 @@ address JNI_FastGetField::generate_fast_get_int_field0(BasicType type) { __ mov (robj, c_rarg1); __ testb (rcounter, 1); __ jcc (Assembler::notZero, slow); - - __ xorptr(robj, rcounter); - __ xorptr(robj, rcounter); // obj, since - // robj ^ rcounter ^ rcounter == robj - // robj is data dependent on rcounter. - __ mov (roffset, c_rarg2); __ shrptr(roffset, 2); // offset @@ -103,12 +94,7 @@ address JNI_FastGetField::generate_fast_get_int_field0(BasicType type) { default: ShouldNotReachHere(); } - // create data dependency on rax - __ lea(rcounter_addr, counter); - __ xorptr(rcounter_addr, rax); - __ xorptr(rcounter_addr, rax); - __ cmpl (rcounter, Address(rcounter_addr, 0)); - + __ cmp32 (rcounter, counter); __ jcc (Assembler::notEqual, slow); __ ret (0); @@ -178,11 +164,6 @@ address JNI_FastGetField::generate_fast_get_float_field0(BasicType type) { __ testb (rcounter, 1); __ jcc (Assembler::notZero, slow); - __ xorptr(robj, rcounter); - __ xorptr(robj, rcounter); // obj, since - // robj ^ rcounter ^ rcounter == robj - // robj is data dependent on rcounter. - // Both robj and rtmp are clobbered by try_resolve_jobject_in_native. BarrierSetAssembler* bs = BarrierSet::barrier_set()->barrier_set_assembler(); bs->try_resolve_jobject_in_native(masm, /* jni_env */ c_rarg0, robj, rtmp, slow); @@ -198,13 +179,7 @@ address JNI_FastGetField::generate_fast_get_float_field0(BasicType type) { case T_DOUBLE: __ movdbl (xmm0, Address(robj, roffset, Address::times_1)); break; default: ShouldNotReachHere(); } - - __ lea(rcounter_addr, counter); - __ movdq (rax, xmm0); - // counter address is data dependent on xmm0. - __ xorptr(rcounter_addr, rax); - __ xorptr(rcounter_addr, rax); - __ cmpl (rcounter, Address(rcounter_addr, 0)); + __ cmp32 (rcounter, counter); __ jcc (Assembler::notEqual, slow); __ ret (0); From 96b43418b5f4aa41d51da0a45d6eff1c1bf86ce6 Mon Sep 17 00:00:00 2001 From: Michael McMahon Date: Fri, 12 Oct 2018 11:12:51 +0100 Subject: [PATCH 096/124] 8203850: java.net.http HTTP client should allow specifying Origin and Referer headers Reviewed-by: chegar, dfuchs --- .../jdk/internal/net/http/common/Utils.java | 4 +- .../net/httpclient/RequestBuilderTest.java | 28 +++++++-- .../net/httpclient/SpecialHeadersTest.java | 60 ++++++++++++++++++- 3 files changed, 82 insertions(+), 10 deletions(-) diff --git a/src/java.net.http/share/classes/jdk/internal/net/http/common/Utils.java b/src/java.net.http/share/classes/jdk/internal/net/http/common/Utils.java index 85898d59571..7632b000be2 100644 --- a/src/java.net.http/share/classes/jdk/internal/net/http/common/Utils.java +++ b/src/java.net.http/share/classes/jdk/internal/net/http/common/Utils.java @@ -133,9 +133,7 @@ public final class Utils { // A case insensitive TreeSet of strings. TreeSet treeSet = new TreeSet<>(String.CASE_INSENSITIVE_ORDER); treeSet.addAll(Set.of("connection", "content-length", - "date", "expect", "from", "host", "origin", - "referer", "upgrade", - "via", "warning")); + "date", "expect", "from", "host", "upgrade", "via", "warning")); DISALLOWED_HEADERS_SET = Collections.unmodifiableSet(treeSet); } diff --git a/test/jdk/java/net/httpclient/RequestBuilderTest.java b/test/jdk/java/net/httpclient/RequestBuilderTest.java index 2d90475b238..8c2526e9697 100644 --- a/test/jdk/java/net/httpclient/RequestBuilderTest.java +++ b/test/jdk/java/net/httpclient/RequestBuilderTest.java @@ -337,15 +337,31 @@ public class RequestBuilderTest { } } + // headers that are allowed now, but weren't before + private static final Set FORMERLY_RESTRICTED = Set.of("referer", "origin", + "OriGin", "Referer"); + + @Test + public void testFormerlyRestricted() throws URISyntaxException { + URI uri = new URI("http://localhost:80/test/"); + URI otherURI = new URI("http://www.foo.com/test/"); + for (String header : FORMERLY_RESTRICTED) { + HttpRequest req = HttpRequest.newBuilder(uri) + .header(header, otherURI.toString()) + .GET() + .build(); + } + } + private static final Set RESTRICTED = Set.of("connection", "content-length", - "date", "expect", "from", "host", "origin", - "referer", "upgrade", "via", "warning", + "date", "expect", "from", "host", + "upgrade", "via", "warning", "Connection", "Content-Length", - "DATE", "eXpect", "frOm", "hosT", "origIN", - "ReFerer", "upgradE", "vIa", "Warning", + "DATE", "eXpect", "frOm", "hosT", + "upgradE", "vIa", "Warning", "CONNection", "CONTENT-LENGTH", - "Date", "EXPECT", "From", "Host", "Origin", - "Referer", "Upgrade", "Via", "WARNING"); + "Date", "EXPECT", "From", "Host", + "Upgrade", "Via", "WARNING"); interface WithHeader { HttpRequest.Builder withHeader(HttpRequest.Builder builder, String name, String value); diff --git a/test/jdk/java/net/httpclient/SpecialHeadersTest.java b/test/jdk/java/net/httpclient/SpecialHeadersTest.java index 4bb76e80e0c..ddf054f3aea 100644 --- a/test/jdk/java/net/httpclient/SpecialHeadersTest.java +++ b/test/jdk/java/net/httpclient/SpecialHeadersTest.java @@ -57,21 +57,25 @@ import java.net.InetAddress; import java.net.InetSocketAddress; import java.net.URI; import java.net.http.HttpClient; +import java.net.http.HttpHeaders; import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.net.http.HttpResponse.BodyHandlers; import java.security.AccessController; import java.security.PrivilegedAction; +import java.time.Duration; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Locale; import java.util.Map; +import java.util.Optional; import static java.lang.System.err; import static java.lang.System.out; import static java.net.http.HttpClient.Builder.NO_PROXY; import static java.nio.charset.StandardCharsets.US_ASCII; +import org.testng.Assert; import static org.testng.Assert.assertEquals; public class SpecialHeadersTest implements HttpServerAdapters { @@ -91,6 +95,13 @@ public class SpecialHeadersTest implements HttpServerAdapters { {"User-Agent: camel-cased"}, {"user-agent: all-lower-case"}, {"user-Agent: mixed"}, + // headers which were restricted before and are now allowable + {"referer: lower"}, + {"Referer: normal"}, + {"REFERER: upper"}, + {"origin: lower"}, + {"Origin: normal"}, + {"ORIGIN: upper"}, }; @DataProvider(name = "variants") @@ -168,6 +179,50 @@ public class SpecialHeadersTest implements HttpServerAdapters { } } + @Test(dataProvider = "variants") + void testHomeMadeIllegalHeader(String uriString, String headerNameAndValue, boolean sameClient) throws Exception { + out.println("\n--- Starting "); + final URI uri = URI.create(uriString); + + HttpClient client = HttpClient.newBuilder() + .proxy(NO_PROXY) + .sslContext(sslContext) + .build(); + + // Test a request which contains an illegal header created + HttpRequest req = new HttpRequest() { + @Override public Optional bodyPublisher() { + return Optional.of(BodyPublishers.noBody()); + } + @Override public String method() { + return "GET"; + } + @Override public Optional timeout() { + return Optional.empty(); + } + @Override public boolean expectContinue() { + return false; + } + @Override public URI uri() { + return uri; + } + @Override public Optional version() { + return Optional.empty(); + } + @Override public HttpHeaders headers() { + Map> map = Map.of("via", List.of("http://foo.com")); + return HttpHeaders.of(map, (x, y) -> true); + } + }; + + try { + HttpResponse response = client.send(req, BodyHandlers.ofString()); + Assert.fail("Unexpected reply: " + response); + } catch (IllegalArgumentException ee) { + out.println("Got IAE as expected"); + } + } + @Test(dataProvider = "variants") void testAsync(String uriString, String headerNameAndValue, boolean sameClient) { out.println("\n--- Starting "); @@ -259,7 +314,10 @@ public class SpecialHeadersTest implements HttpServerAdapters { https2TestServer.stop(); } - /** A handler that returns, as its body, the exact received request URI. */ + /** A handler that returns, as its body, the exact received request URI. + * The header whose name is in the URI query and is set in the request is + * returned in the response with its name prefixed by X- + */ static class HttpUriStringHandler implements HttpTestHandler { @Override public void handle(HttpTestExchange t) throws IOException { From f958e6642e27776192169d652a80c187dd3f1dbe Mon Sep 17 00:00:00 2001 From: Roman Kennke Date: Fri, 12 Oct 2018 16:25:24 +0200 Subject: [PATCH 097/124] 8212053: A few more missing object equals barriers Reviewed-by: shade, zgu --- src/hotspot/share/oops/compressedOops.inline.hpp | 2 +- src/hotspot/share/runtime/vframe.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hotspot/share/oops/compressedOops.inline.hpp b/src/hotspot/share/oops/compressedOops.inline.hpp index e3b1f8b6144..d9aacacde34 100644 --- a/src/hotspot/share/oops/compressedOops.inline.hpp +++ b/src/hotspot/share/oops/compressedOops.inline.hpp @@ -66,7 +66,7 @@ namespace CompressedOops { assert(OopEncodingHeapMax > pd, "change encoding max if new encoding"); uint64_t result = pd >> shift; assert((result & CONST64(0xffffffff00000000)) == 0, "narrow oop overflow"); - assert(decode(result) == v, "reversibility"); + assert(oopDesc::equals_raw(decode(result), v), "reversibility"); return (narrowOop)result; } diff --git a/src/hotspot/share/runtime/vframe.cpp b/src/hotspot/share/runtime/vframe.cpp index c33c7d5b5b4..066f333ee9c 100644 --- a/src/hotspot/share/runtime/vframe.cpp +++ b/src/hotspot/share/runtime/vframe.cpp @@ -134,7 +134,7 @@ GrowableArray* javaVFrame::locked_monitors() { // // Skip the monitor that the thread is blocked to enter or waiting on // - if (!found_first_monitor && (obj == pending_obj || obj == waiting_obj)) { + if (!found_first_monitor && (oopDesc::equals(obj, pending_obj) || oopDesc::equals(obj, waiting_obj))) { continue; } found_first_monitor = true; From cfb6fb66c2ac4f7a7a777c3897a8f19a9f7a8757 Mon Sep 17 00:00:00 2001 From: Severin Gehwolf Date: Fri, 12 Oct 2018 10:58:06 +0200 Subject: [PATCH 098/124] 8212110: Build of saproc.dll broken on Windows 32 bit after JDK-8210647 Only add RTC1 compile flag for slowdebug builds. Reviewed-by: mdoerr, erikj --- make/lib/Lib-jdk.hotspot.agent.gmk | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/make/lib/Lib-jdk.hotspot.agent.gmk b/make/lib/Lib-jdk.hotspot.agent.gmk index c7f838a3e2d..d9f25168505 100644 --- a/make/lib/Lib-jdk.hotspot.agent.gmk +++ b/make/lib/Lib-jdk.hotspot.agent.gmk @@ -44,7 +44,12 @@ else ifeq ($(OPENJDK_TARGET_OS), windows) ifeq ($(OPENJDK_TARGET_CPU), x86_64) SA_CXXFLAGS := -DWIN64 else - SA_CXXFLAGS := -RTC1 + # Only add /RTC1 flag for debug builds as it's + # incompatible with release type builds. See + # https://msdn.microsoft.com/en-us/library/8wtf2dfz.aspx + ifeq ($(DEBUG_LEVEL),slowdebug) + SA_CXXFLAGS := -RTC1 + endif endif endif From cbe11130f58bfb7331ff75f4eb0dbca4e4902ca7 Mon Sep 17 00:00:00 2001 From: Muthusamy Chinnathambi Date: Tue, 9 Oct 2018 16:08:07 +0530 Subject: [PATCH 099/124] 8027434: "-XX:OnOutOfMemoryError" uses fork instead of vfork Reviewed-by: dholmes, iklam --- src/hotspot/os/aix/os_aix.cpp | 2 +- src/hotspot/os/bsd/os_bsd.cpp | 2 +- src/hotspot/os/linux/os_linux.cpp | 10 ++++++++-- src/hotspot/os/solaris/os_solaris.cpp | 2 +- src/hotspot/os/windows/os_windows.cpp | 2 +- src/hotspot/share/runtime/os.hpp | 2 +- src/hotspot/share/utilities/vmError.cpp | 2 +- 7 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/hotspot/os/aix/os_aix.cpp b/src/hotspot/os/aix/os_aix.cpp index 98bc3f655bd..0538841dceb 100644 --- a/src/hotspot/os/aix/os_aix.cpp +++ b/src/hotspot/os/aix/os_aix.cpp @@ -4259,7 +4259,7 @@ extern char** environ; // or -1 on failure (e.g. can't fork a new process). // Unlike system(), this function can be called from signal handler. It // doesn't block SIGINT et al. -int os::fork_and_exec(char* cmd) { +int os::fork_and_exec(char* cmd, bool use_vfork_if_available) { char * argv[4] = {"sh", "-c", cmd, NULL}; pid_t pid = fork(); diff --git a/src/hotspot/os/bsd/os_bsd.cpp b/src/hotspot/os/bsd/os_bsd.cpp index 73dfc6f1ec6..be170883bb6 100644 --- a/src/hotspot/os/bsd/os_bsd.cpp +++ b/src/hotspot/os/bsd/os_bsd.cpp @@ -3785,7 +3785,7 @@ extern char** environ; // or -1 on failure (e.g. can't fork a new process). // Unlike system(), this function can be called from signal handler. It // doesn't block SIGINT et al. -int os::fork_and_exec(char* cmd) { +int os::fork_and_exec(char* cmd, bool use_vfork_if_available) { const char * argv[4] = {"sh", "-c", cmd, NULL}; // fork() in BsdThreads/NPTL is not async-safe. It needs to run diff --git a/src/hotspot/os/linux/os_linux.cpp b/src/hotspot/os/linux/os_linux.cpp index 40f97ad026b..51dea34407a 100644 --- a/src/hotspot/os/linux/os_linux.cpp +++ b/src/hotspot/os/linux/os_linux.cpp @@ -5676,10 +5676,16 @@ extern char** environ; // or -1 on failure (e.g. can't fork a new process). // Unlike system(), this function can be called from signal handler. It // doesn't block SIGINT et al. -int os::fork_and_exec(char* cmd) { +int os::fork_and_exec(char* cmd, bool use_vfork_if_available) { const char * argv[4] = {"sh", "-c", cmd, NULL}; - pid_t pid = fork(); + pid_t pid ; + + if (use_vfork_if_available) { + pid = vfork(); + } else { + pid = fork(); + } if (pid < 0) { // fork failed diff --git a/src/hotspot/os/solaris/os_solaris.cpp b/src/hotspot/os/solaris/os_solaris.cpp index cfb68a1f06a..f4d13fc8d13 100644 --- a/src/hotspot/os/solaris/os_solaris.cpp +++ b/src/hotspot/os/solaris/os_solaris.cpp @@ -5252,7 +5252,7 @@ extern char** environ; // or -1 on failure (e.g. can't fork a new process). // Unlike system(), this function can be called from signal handler. It // doesn't block SIGINT et al. -int os::fork_and_exec(char* cmd) { +int os::fork_and_exec(char* cmd, bool use_vfork_if_available) { char * argv[4]; argv[0] = (char *)"sh"; argv[1] = (char *)"-c"; diff --git a/src/hotspot/os/windows/os_windows.cpp b/src/hotspot/os/windows/os_windows.cpp index 5cadf5ff0b9..bf8e6c0ceeb 100644 --- a/src/hotspot/os/windows/os_windows.cpp +++ b/src/hotspot/os/windows/os_windows.cpp @@ -5254,7 +5254,7 @@ void Parker::unpark() { // Run the specified command in a separate process. Return its exit value, // or -1 on failure (e.g. can't create a new process). -int os::fork_and_exec(char* cmd) { +int os::fork_and_exec(char* cmd, bool use_vfork_if_available) { STARTUPINFO si; PROCESS_INFORMATION pi; DWORD exit_code; diff --git a/src/hotspot/share/runtime/os.hpp b/src/hotspot/share/runtime/os.hpp index 6bc92abbc0f..5a10a5745d2 100644 --- a/src/hotspot/share/runtime/os.hpp +++ b/src/hotspot/share/runtime/os.hpp @@ -543,7 +543,7 @@ class os: AllStatic { static char* do_you_want_to_debug(const char* message); // run cmd in a separate process and return its exit code; or -1 on failures - static int fork_and_exec(char *cmd); + static int fork_and_exec(char *cmd, bool use_vfork_if_available = false); // Call ::exit() on all platforms but Windows static void exit(int num); diff --git a/src/hotspot/share/utilities/vmError.cpp b/src/hotspot/share/utilities/vmError.cpp index 8ff0b53f400..693a1caf20a 100644 --- a/src/hotspot/share/utilities/vmError.cpp +++ b/src/hotspot/share/utilities/vmError.cpp @@ -1565,7 +1565,7 @@ void VM_ReportJavaOutOfMemory::doit() { #endif tty->print_cr("\"%s\"...", cmd); - if (os::fork_and_exec(cmd) < 0) { + if (os::fork_and_exec(cmd, true) < 0) { tty->print_cr("os::fork_and_exec failed: %s (%s=%d)", os::strerror(errno), os::errno_name(errno), errno); } From a3a7edbd4d053c4ef936537c76c09dadc52ce115 Mon Sep 17 00:00:00 2001 From: Naoto Sato Date: Mon, 15 Oct 2018 09:35:05 -0700 Subject: [PATCH 100/124] 8211961: Broken link in java.util.Locale Reviewed-by: mchung --- .../share/classes/java/util/Locale.java | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/java.base/share/classes/java/util/Locale.java b/src/java.base/share/classes/java/util/Locale.java index f58b67b8ef8..50f92e2ec14 100644 --- a/src/java.base/share/classes/java/util/Locale.java +++ b/src/java.base/share/classes/java/util/Locale.java @@ -2246,22 +2246,26 @@ public final class Locale implements Cloneable, Serializable { /** * @serialField language String - * language subtag in lower case. (See getLanguage()) + * language subtag in lower case. + * (See getLanguage()) * @serialField country String - * country subtag in upper case. (See getCountry()) + * country subtag in upper case. + * (See getCountry()) * @serialField variant String - * variant subtags separated by LOWLINE characters. (See getVariant()) + * variant subtags separated by LOWLINE characters. + * (See getVariant()) * @serialField hashcode int * deprecated, for forward compatibility only * @serialField script String - * script subtag in title case (See getScript()) + * script subtag in title case + * (See getScript()) * @serialField extensions String * canonical representation of extensions, that is, * BCP47 extensions in alphabetical order followed by * BCP47 private use subtags, all in lower case letters * separated by HYPHEN-MINUS characters. - * (See getExtensionKeys(), - * getExtension(char)) + * (See getExtensionKeys(), + * getExtension(char)) */ private static final ObjectStreamField[] serialPersistentFields = { new ObjectStreamField("language", String.class), From 7d7da8976bddcfe93ef782d59864286d9a224f79 Mon Sep 17 00:00:00 2001 From: Roman Kennke Date: Wed, 10 Oct 2018 23:05:15 +0200 Subject: [PATCH 101/124] 8211955: GC abstraction for LAB reserve Reviewed-by: pliden, shade --- src/hotspot/share/gc/shared/collectedHeap.cpp | 9 +++++++++ src/hotspot/share/gc/shared/collectedHeap.hpp | 2 ++ src/hotspot/share/gc/shared/plab.cpp | 4 +--- src/hotspot/share/gc/shared/threadLocalAllocBuffer.cpp | 6 ++++++ src/hotspot/share/gc/shared/threadLocalAllocBuffer.hpp | 6 +----- 5 files changed, 19 insertions(+), 8 deletions(-) diff --git a/src/hotspot/share/gc/shared/collectedHeap.cpp b/src/hotspot/share/gc/shared/collectedHeap.cpp index 21ae92c7d79..2bef8f9c0db 100644 --- a/src/hotspot/share/gc/shared/collectedHeap.cpp +++ b/src/hotspot/share/gc/shared/collectedHeap.cpp @@ -445,6 +445,15 @@ void CollectedHeap::fill_with_dummy_object(HeapWord* start, HeapWord* end, bool CollectedHeap::fill_with_object(start, end, zap); } +size_t CollectedHeap::min_dummy_object_size() const { + return oopDesc::header_size(); +} + +size_t CollectedHeap::tlab_alloc_reserve() const { + size_t min_size = min_dummy_object_size(); + return min_size > (size_t)MinObjAlignment ? align_object_size(min_size) : 0; +} + HeapWord* CollectedHeap::allocate_new_tlab(size_t min_size, size_t requested_size, size_t* actual_size) { diff --git a/src/hotspot/share/gc/shared/collectedHeap.hpp b/src/hotspot/share/gc/shared/collectedHeap.hpp index 458d3b3ace7..e43bb28b22d 100644 --- a/src/hotspot/share/gc/shared/collectedHeap.hpp +++ b/src/hotspot/share/gc/shared/collectedHeap.hpp @@ -309,6 +309,8 @@ class CollectedHeap : public CHeapObj { } virtual void fill_with_dummy_object(HeapWord* start, HeapWord* end, bool zap); + virtual size_t min_dummy_object_size() const; + size_t tlab_alloc_reserve() const; // Return the address "addr" aligned by "alignment_in_bytes" if such // an address is below "end". Return NULL otherwise. diff --git a/src/hotspot/share/gc/shared/plab.cpp b/src/hotspot/share/gc/shared/plab.cpp index 29c4cc69481..c511bcfa63d 100644 --- a/src/hotspot/share/gc/shared/plab.cpp +++ b/src/hotspot/share/gc/shared/plab.cpp @@ -27,7 +27,6 @@ #include "gc/shared/plab.inline.hpp" #include "gc/shared/threadLocalAllocBuffer.hpp" #include "logging/log.hpp" -#include "oops/arrayOop.hpp" #include "oops/oop.inline.hpp" size_t PLAB::min_size() { @@ -43,8 +42,7 @@ PLAB::PLAB(size_t desired_plab_sz_) : _word_sz(desired_plab_sz_), _bottom(NULL), _top(NULL), _end(NULL), _hard_end(NULL), _allocated(0), _wasted(0), _undo_wasted(0) { - // ArrayOopDesc::header_size depends on command line initialization. - AlignmentReserve = oopDesc::header_size() > MinObjAlignment ? align_object_size(arrayOopDesc::header_size(T_INT)) : 0; + AlignmentReserve = Universe::heap()->tlab_alloc_reserve(); assert(min_size() > AlignmentReserve, "Minimum PLAB size " SIZE_FORMAT " must be larger than alignment reserve " SIZE_FORMAT " " "to be able to contain objects", min_size(), AlignmentReserve); diff --git a/src/hotspot/share/gc/shared/threadLocalAllocBuffer.cpp b/src/hotspot/share/gc/shared/threadLocalAllocBuffer.cpp index 018f8928d58..02598307721 100644 --- a/src/hotspot/share/gc/shared/threadLocalAllocBuffer.cpp +++ b/src/hotspot/share/gc/shared/threadLocalAllocBuffer.cpp @@ -23,6 +23,7 @@ */ #include "precompiled.hpp" +#include "gc/shared/collectedHeap.hpp" #include "gc/shared/threadLocalAllocBuffer.inline.hpp" #include "logging/log.hpp" #include "memory/resourceArea.hpp" @@ -461,3 +462,8 @@ void ThreadLocalAllocStats::publish() { _perf_max_slow_allocations ->set_value(_max_slow_allocations); } } + +size_t ThreadLocalAllocBuffer::end_reserve() { + size_t reserve_size = Universe::heap()->tlab_alloc_reserve(); + return MAX2(reserve_size, (size_t)_reserve_for_allocation_prefetch); +} diff --git a/src/hotspot/share/gc/shared/threadLocalAllocBuffer.hpp b/src/hotspot/share/gc/shared/threadLocalAllocBuffer.hpp index f03ccb1d5a8..91f1bd02757 100644 --- a/src/hotspot/share/gc/shared/threadLocalAllocBuffer.hpp +++ b/src/hotspot/share/gc/shared/threadLocalAllocBuffer.hpp @@ -26,7 +26,6 @@ #define SHARE_VM_GC_SHARED_THREADLOCALALLOCBUFFER_HPP #include "gc/shared/gcUtil.hpp" -#include "oops/typeArrayOop.hpp" #include "runtime/perfData.hpp" #include "runtime/vm_version.hpp" @@ -138,10 +137,7 @@ public: inline HeapWord* allocate(size_t size); // Reserve space at the end of TLAB - static size_t end_reserve() { - int reserve_size = typeArrayOopDesc::header_size(T_INT); - return MAX2(reserve_size, _reserve_for_allocation_prefetch); - } + static size_t end_reserve(); static size_t alignment_reserve() { return align_object_size(end_reserve()); } static size_t alignment_reserve_in_bytes() { return alignment_reserve() * HeapWordSize; } From 24fb839864c441594b1fa0f2a20366581d45a7ac Mon Sep 17 00:00:00 2001 From: Alex Menkov Date: Fri, 12 Oct 2018 10:08:11 -0700 Subject: [PATCH 102/124] 8195703: BasicJDWPConnectionTest.java: 'App exited unexpectedly with 2' Reviewed-by: sspitsyn, jcbeyler --- test/jdk/ProblemList.txt | 2 - .../com/sun/jdi/BasicJDWPConnectionTest.java | 83 ++++++++++--------- test/jdk/com/sun/jdi/DoubleAgentTest.java | 4 +- test/lib/jdk/test/lib/apps/LingeredApp.java | 12 ++- 4 files changed, 53 insertions(+), 48 deletions(-) diff --git a/test/jdk/ProblemList.txt b/test/jdk/ProblemList.txt index 2409be84246..f65e65e1488 100644 --- a/test/jdk/ProblemList.txt +++ b/test/jdk/ProblemList.txt @@ -835,8 +835,6 @@ tools/pack200/CommandLineTests.java 8059906 generic- # jdk_jdi -com/sun/jdi/BasicJDWPConnectionTest.java 8195703 generic-all - com/sun/jdi/RepStep.java 8043571 generic-all com/sun/jdi/sde/SourceDebugExtensionTest.java 8158066 windows-all diff --git a/test/jdk/com/sun/jdi/BasicJDWPConnectionTest.java b/test/jdk/com/sun/jdi/BasicJDWPConnectionTest.java index 7a4c9e3f4f3..8911f5bfbde 100644 --- a/test/jdk/com/sun/jdi/BasicJDWPConnectionTest.java +++ b/test/jdk/com/sun/jdi/BasicJDWPConnectionTest.java @@ -29,17 +29,15 @@ */ import java.io.IOException; -import java.io.BufferedReader; -import java.io.InputStreamReader; import java.net.Socket; import java.net.SocketException; import jdk.test.lib.apps.LingeredApp; -import jdk.test.lib.Utils; import java.util.ArrayList; -import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; public class BasicJDWPConnectionTest { @@ -64,25 +62,37 @@ public class BasicJDWPConnectionTest { return res; } - public static ArrayList prepareCmd(int port, String allowOpt) { - String address = "*:" + String.valueOf(port); + public static ArrayList prepareCmd(String allowOpt) { ArrayList cmd = new ArrayList<>(); String jdwpArgs = "-agentlib:jdwp=transport=dt_socket,server=y," + - "suspend=n,address=" + address + allowOpt; + "suspend=n,address=*:0" + allowOpt; cmd.add(jdwpArgs); return cmd; } + private static Pattern listenRegexp = Pattern.compile("Listening for transport \\b(.+)\\b at address: \\b(\\d+)\\b"); + private static int detectPort(String s) { + Matcher m = listenRegexp.matcher(s); + if (!m.find()) { + throw new RuntimeException("Could not detect port from '" + s + "'"); + } + // m.group(1) is transport, m.group(2) is port + return Integer.parseInt(m.group(2)); + } + public static void positiveTest(String testName, String allowOpt) throws InterruptedException, IOException { System.err.println("\nStarting " + testName); - int port = Utils.getFreePort(); - ArrayList cmd = prepareCmd(port, allowOpt); + ArrayList cmd = prepareCmd(allowOpt); LingeredApp a = LingeredApp.startApp(cmd); - int res = handshake(port); - a.stopApp(); + int res; + try { + res = handshake(detectPort(a.getProcessStdout())); + } finally { + a.stopApp(); + } if (res < 0) { throw new RuntimeException(testName + " FAILED"); } @@ -92,12 +102,15 @@ public class BasicJDWPConnectionTest { public static void negativeTest(String testName, String allowOpt) throws InterruptedException, IOException { System.err.println("\nStarting " + testName); - int port = Utils.getFreePort(); - ArrayList cmd = prepareCmd(port, allowOpt); + ArrayList cmd = prepareCmd(allowOpt); LingeredApp a = LingeredApp.startApp(cmd); - int res = handshake(port); - a.stopApp(); + int res; + try { + res = handshake(detectPort(a.getProcessStdout())); + } finally { + a.stopApp(); + } if (res > 0) { System.err.println(testName + ": res=" + res); throw new RuntimeException(testName + " FAILED"); @@ -109,16 +122,18 @@ public class BasicJDWPConnectionTest { public static void badAllowOptionTest(String testName, String allowOpt) throws InterruptedException, IOException { System.err.println("\nStarting " + testName); - int port = Utils.getFreePort(); - ArrayList cmd = prepareCmd(port, allowOpt); + ArrayList cmd = prepareCmd(allowOpt); + LingeredApp a; try { - LingeredApp a = LingeredApp.startApp(cmd); + a = LingeredApp.startApp(cmd); } catch (IOException ex) { System.err.println(testName + ": caught expected IOException"); System.err.println(testName + " PASSED"); return; } + // LingeredApp.startApp is expected to fail, but if not, terminate the app + a.stopApp(); throw new RuntimeException(testName + " FAILED"); } @@ -174,26 +189,16 @@ public class BasicJDWPConnectionTest { badAllowOptionTest("ExplicitMultiDefault2Test", allowOpt); } - public static void main(String[] args) { - try { - DefaultTest(); - ExplicitDefaultTest(); - AllowTest(); - MultiAllowTest(); - DenyTest(); - MultiDenyTest(); - EmptyAllowOptionTest(); - ExplicitMultiDefault1Test(); - ExplicitMultiDefault2Test(); - System.err.println("\nTest PASSED"); - } catch (InterruptedException ex) { - System.err.println("\nTest ERROR, getFreePort"); - ex.printStackTrace(); - System.exit(3); - } catch (IOException ex) { - System.err.println("\nTest ERROR"); - ex.printStackTrace(); - System.exit(3); - } + public static void main(String[] args) throws Exception { + DefaultTest(); + ExplicitDefaultTest(); + AllowTest(); + MultiAllowTest(); + DenyTest(); + MultiDenyTest(); + EmptyAllowOptionTest(); + ExplicitMultiDefault1Test(); + ExplicitMultiDefault2Test(); + System.err.println("\nTest PASSED"); } } diff --git a/test/jdk/com/sun/jdi/DoubleAgentTest.java b/test/jdk/com/sun/jdi/DoubleAgentTest.java index a5da2e8091f..99ec6091aaf 100644 --- a/test/jdk/com/sun/jdi/DoubleAgentTest.java +++ b/test/jdk/com/sun/jdi/DoubleAgentTest.java @@ -41,10 +41,8 @@ public class DoubleAgentTest { "test.classes", "."); public static void main(String[] args) throws Throwable { - int port = Utils.getFreePort(); - String jdwpOption = "-agentlib:jdwp=transport=dt_socket" - + ",server=y" + ",suspend=n" + ",address=*:" + String.valueOf(port); + + ",server=y" + ",suspend=n" + ",address=*:0"; OutputAnalyzer output = ProcessTools.executeTestJvm("-classpath", TEST_CLASSES, diff --git a/test/lib/jdk/test/lib/apps/LingeredApp.java b/test/lib/jdk/test/lib/apps/LingeredApp.java index 8ea3324b4df..3be74e56908 100644 --- a/test/lib/jdk/test/lib/apps/LingeredApp.java +++ b/test/lib/jdk/test/lib/apps/LingeredApp.java @@ -26,9 +26,6 @@ package jdk.test.lib.apps; import java.io.BufferedReader; import java.io.ByteArrayOutputStream; import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.OutputStream; import java.io.StringReader; import java.nio.file.Files; import java.nio.file.NoSuchFileException; @@ -43,7 +40,6 @@ import java.util.Map; import java.util.stream.Collectors; import java.util.UUID; import jdk.test.lib.process.OutputBuffer; -import jdk.test.lib.process.ProcessTools; import jdk.test.lib.process.StreamPumper; /** @@ -136,6 +132,14 @@ public class LingeredApp { return appProcess; } + /** + * @return the LingeredApp's output. + * Can be called after the app is run. + */ + public String getProcessStdout() { + return stdoutBuffer.toString(); + } + /** * * @return OutputBuffer object for the LingeredApp's output. Can only be called From 1226dcbcfe0d1c074d9b27c58d509bd73a138919 Mon Sep 17 00:00:00 2001 From: Lance Andersen Date: Fri, 12 Oct 2018 14:16:24 -0400 Subject: [PATCH 103/124] 8212045: Add back tests removed from HashesTest.java and AddExportsTest.java Reviewed-by: rriggs --- test/jdk/tools/jmod/hashes/HashesTest.java | 22 +++++++++++ .../modules/addexports/AddExportsTest.java | 38 ++++++++++++++++++- .../annotation/processing/Generated.java | 30 +++++++++++++++ .../javax/tools/ToolsHelper.java | 27 +++++++++++++ .../javax/tools/internal/Helper.java | 27 +++++++++++++ .../src/java.compiler/module-info.java | 27 +++++++++++++ .../addexports/src/m2/jdk/test2/Main.java | 32 ++++++++++++++++ .../addexports/src/m2/module-info.java | 26 +++++++++++++ 8 files changed, 227 insertions(+), 2 deletions(-) create mode 100644 test/jdk/tools/launcher/modules/addexports/src/java.compiler/javax/annotation/processing/Generated.java create mode 100644 test/jdk/tools/launcher/modules/addexports/src/java.compiler/javax/tools/ToolsHelper.java create mode 100644 test/jdk/tools/launcher/modules/addexports/src/java.compiler/javax/tools/internal/Helper.java create mode 100644 test/jdk/tools/launcher/modules/addexports/src/java.compiler/module-info.java create mode 100644 test/jdk/tools/launcher/modules/addexports/src/m2/jdk/test2/Main.java create mode 100644 test/jdk/tools/launcher/modules/addexports/src/m2/module-info.java diff --git a/test/jdk/tools/jmod/hashes/HashesTest.java b/test/jdk/tools/jmod/hashes/HashesTest.java index 34de0a765ce..31da6985336 100644 --- a/test/jdk/tools/jmod/hashes/HashesTest.java +++ b/test/jdk/tools/jmod/hashes/HashesTest.java @@ -237,6 +237,28 @@ public class HashesTest { .forEach(mn -> assertTrue(ht.hashes(mn) == null)); } + @Test + public static void upgradeableModule() throws IOException { + Path mpath = Paths.get(System.getProperty("java.home"), "jmods"); + if (!Files.exists(mpath)) { + return; + } + + Path dest = Paths.get("test4"); + HashesTest ht = new HashesTest(dest); + ht.makeModule("m1"); + ht.makeModule("java.compiler", "m1"); + ht.makeModule("m2", "java.compiler"); + + ht.makeJmod("m1"); + ht.makeJmod("m2"); + ht.makeJmod("java.compiler", + "--module-path", + ht.lib.toString() + File.pathSeparator + mpath, + "--hash-modules", "java\\.(?!se)|^m.*"); + + ht.checkHashes("java.compiler", "m2"); + } @Test public static void testImageJmods() throws IOException { diff --git a/test/jdk/tools/launcher/modules/addexports/AddExportsTest.java b/test/jdk/tools/launcher/modules/addexports/AddExportsTest.java index 92a8a7b238c..610fd7e9305 100644 --- a/test/jdk/tools/launcher/modules/addexports/AddExportsTest.java +++ b/test/jdk/tools/launcher/modules/addexports/AddExportsTest.java @@ -24,7 +24,8 @@ /** * @test * @library /test/lib - * @modules jdk.compiler + * @modules java.compiler + * jdk.compiler * @build AddExportsTest jdk.test.lib.compiler.CompilerUtils * @run testng AddExportsTest * @summary Basic tests for java --add-exports @@ -51,12 +52,15 @@ public class AddExportsTest { private static final Path SRC_DIR = Paths.get(TEST_SRC, "src"); private static final Path MODS_DIR = Paths.get("mods"); + private static final Path UPGRADE_MODS_DIRS = Paths.get("upgrademods"); // test module m1 that uses Unsafe private static final String TEST1_MODULE = "m1"; private static final String TEST1_MAIN_CLASS = "jdk.test1.Main"; - + // test module m2 uses java.compiler internals + private static final String TEST2_MODULE = "m2"; + private static final String TEST2_MAIN_CLASS = "jdk.test2.Main"; // test module m3 uses m4 internals private static final String TEST3_MODULE = "m3"; @@ -74,7 +78,19 @@ public class AddExportsTest { "--add-exports", "java.base/jdk.internal.misc=m1"); assertTrue(compiled, "module " + TEST1_MODULE + " did not compile"); + // javac -d upgrademods/java.compiler src/java.compiler/** + compiled = CompilerUtils.compile( + SRC_DIR.resolve("java.compiler"), + UPGRADE_MODS_DIRS.resolve("java.compiler")); + assertTrue(compiled, "module java.compiler did not compile"); + // javac --upgrade-module-path upgrademods -d mods/m2 src/m2/** + compiled = CompilerUtils.compile( + SRC_DIR.resolve(TEST2_MODULE), + MODS_DIR.resolve(TEST2_MODULE), + "--upgrade-module-path", UPGRADE_MODS_DIRS.toString(), + "--add-exports", "java.compiler/javax.tools.internal=m2"); + assertTrue(compiled, "module " + TEST2_MODULE + " did not compile"); // javac -d mods/m3 src/m3/** compiled = CompilerUtils.compile( @@ -146,7 +162,25 @@ public class AddExportsTest { assertTrue(exitValue == 0); } + /** + * Test --add-exports with upgraded module + */ + public void testWithUpgradedModule() throws Exception { + // java --add-exports java.compiler/javax.tools.internal=m2 + // --upgrade-module-path upgrademods --module-path mods -m ... + String mid = TEST2_MODULE + "/" + TEST2_MAIN_CLASS; + int exitValue = executeTestJava( + "--add-exports", "java.compiler/javax.tools.internal=m2", + "--upgrade-module-path", UPGRADE_MODS_DIRS.toString(), + "--module-path", MODS_DIR.toString(), + "-m", mid) + .outputTo(System.out) + .errorTo(System.out) + .getExitValue(); + + assertTrue(exitValue == 0); + } /** * Test --add-exports with module that is added to the set of root modules diff --git a/test/jdk/tools/launcher/modules/addexports/src/java.compiler/javax/annotation/processing/Generated.java b/test/jdk/tools/launcher/modules/addexports/src/java.compiler/javax/annotation/processing/Generated.java new file mode 100644 index 00000000000..2fbd20caaf5 --- /dev/null +++ b/test/jdk/tools/launcher/modules/addexports/src/java.compiler/javax/annotation/processing/Generated.java @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2018, 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. + */ +package javax.annotation.processing; + +public interface Generated { + + +} diff --git a/test/jdk/tools/launcher/modules/addexports/src/java.compiler/javax/tools/ToolsHelper.java b/test/jdk/tools/launcher/modules/addexports/src/java.compiler/javax/tools/ToolsHelper.java new file mode 100644 index 00000000000..29a971851ea --- /dev/null +++ b/test/jdk/tools/launcher/modules/addexports/src/java.compiler/javax/tools/ToolsHelper.java @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2018, 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. + * + * 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. + */ + +package javax.tools; + +public class ToolsHelper { +} diff --git a/test/jdk/tools/launcher/modules/addexports/src/java.compiler/javax/tools/internal/Helper.java b/test/jdk/tools/launcher/modules/addexports/src/java.compiler/javax/tools/internal/Helper.java new file mode 100644 index 00000000000..3d0f73a9bb3 --- /dev/null +++ b/test/jdk/tools/launcher/modules/addexports/src/java.compiler/javax/tools/internal/Helper.java @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2018, 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. + * + * 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. + */ + +package javax.tools.internal; + +public class Helper { +} diff --git a/test/jdk/tools/launcher/modules/addexports/src/java.compiler/module-info.java b/test/jdk/tools/launcher/modules/addexports/src/java.compiler/module-info.java new file mode 100644 index 00000000000..11fe1c9db95 --- /dev/null +++ b/test/jdk/tools/launcher/modules/addexports/src/java.compiler/module-info.java @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2018, 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. + * + * 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. + */ + +module java.compiler { + exports javax.tools; + exports javax.annotation.processing; +} diff --git a/test/jdk/tools/launcher/modules/addexports/src/m2/jdk/test2/Main.java b/test/jdk/tools/launcher/modules/addexports/src/m2/jdk/test2/Main.java new file mode 100644 index 00000000000..b62603a0398 --- /dev/null +++ b/test/jdk/tools/launcher/modules/addexports/src/m2/jdk/test2/Main.java @@ -0,0 +1,32 @@ +/** + * Copyright (c) 2015, 2018, 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. + * + * 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. + */ + +package jdk.test2; + +import javax.tools.internal.Helper; + +public class Main { + public static void main(String[] args) { + Helper h = new Helper(); + } +} diff --git a/test/jdk/tools/launcher/modules/addexports/src/m2/module-info.java b/test/jdk/tools/launcher/modules/addexports/src/m2/module-info.java new file mode 100644 index 00000000000..a7a3ac95de8 --- /dev/null +++ b/test/jdk/tools/launcher/modules/addexports/src/m2/module-info.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2015, 2018, 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. + * + * 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. + */ + +module m2 { + requires java.compiler; +} From 6330fc1cb662f8ddcb47094c9884032b95622b6f Mon Sep 17 00:00:00 2001 From: Kim Barrett Date: Fri, 12 Oct 2018 17:35:26 -0400 Subject: [PATCH 104/124] 8212023: Implicit narrowing in Solaris/sparc initializers Explicitly narrow or fix destination types. Reviewed-by: dholmes, tschatzl --- src/hotspot/cpu/sparc/nativeInst_sparc.cpp | 32 +++++++++++----------- src/hotspot/os/solaris/os_solaris.cpp | 10 +++---- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/hotspot/cpu/sparc/nativeInst_sparc.cpp b/src/hotspot/cpu/sparc/nativeInst_sparc.cpp index 950619dacb4..f3a486d1178 100644 --- a/src/hotspot/cpu/sparc/nativeInst_sparc.cpp +++ b/src/hotspot/cpu/sparc/nativeInst_sparc.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2018, 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 @@ -205,9 +205,9 @@ void NativeCall::test() { uint idx; int offsets[] = { 0x0, - 0xfffffff0, - 0x7ffffff0, - 0x80000000, + (int)0xfffffff0, + (int)0x7ffffff0, + (int)0x80000000, 0x20, 0x4000, }; @@ -361,9 +361,9 @@ void NativeMovConstReg::test() { uint idx; int offsets[] = { 0x0, - 0x7fffffff, - 0x80000000, - 0xffffffff, + (int)0x7fffffff, + (int)0x80000000, + (int)0xffffffff, 0x20, 4096, 4097, @@ -534,9 +534,9 @@ void NativeMovConstRegPatching::test() { uint idx; int offsets[] = { 0x0, - 0x7fffffff, - 0x80000000, - 0xffffffff, + (int)0x7fffffff, + (int)0x80000000, + (int)0xffffffff, 0x20, 4096, 4097, @@ -630,9 +630,9 @@ void NativeMovRegMem::test() { uint idx1; int offsets[] = { 0x0, - 0xffffffff, - 0x7fffffff, - 0x80000000, + (int)0xffffffff, + (int)0x7fffffff, + (int)0x80000000, 4096, 4097, 0x20, @@ -751,9 +751,9 @@ void NativeJump::test() { uint idx; int offsets[] = { 0x0, - 0xffffffff, - 0x7fffffff, - 0x80000000, + (int)0xffffffff, + (int)0x7fffffff, + (int)0x80000000, 4096, 4097, 0x20, diff --git a/src/hotspot/os/solaris/os_solaris.cpp b/src/hotspot/os/solaris/os_solaris.cpp index f4d13fc8d13..785f6bf4f31 100644 --- a/src/hotspot/os/solaris/os_solaris.cpp +++ b/src/hotspot/os/solaris/os_solaris.cpp @@ -1567,11 +1567,11 @@ void * os::dll_load(const char *filename, char *ebuf, int ebuflen) { } typedef struct { - Elf32_Half code; // Actual value as defined in elf.h - Elf32_Half compat_class; // Compatibility of archs at VM's sense - char elf_class; // 32 or 64 bit - char endianess; // MSB or LSB - char* name; // String representation + Elf32_Half code; // Actual value as defined in elf.h + Elf32_Half compat_class; // Compatibility of archs at VM's sense + unsigned char elf_class; // 32 or 64 bit + unsigned char endianess; // MSB or LSB + char* name; // String representation } arch_t; static const arch_t arch_array[]={ From 285fca70b4b9ffd904c55004816e88312df0247d Mon Sep 17 00:00:00 2001 From: Chris Yin Date: Mon, 15 Oct 2018 09:34:18 +0800 Subject: [PATCH 105/124] 8187522: test/sun/net/ftp/FtpURLConnectionLeak.java timed out Reviewed-by: chegar, vtewari --- .../jdk/sun/net/ftp/FtpURLConnectionLeak.java | 40 +++++++++---------- .../net/www/ftptest/FtpCommandHandler.java | 10 ++++- test/jdk/sun/net/www/ftptest/FtpServer.java | 13 +++++- 3 files changed, 38 insertions(+), 25 deletions(-) diff --git a/test/jdk/sun/net/ftp/FtpURLConnectionLeak.java b/test/jdk/sun/net/ftp/FtpURLConnectionLeak.java index eea7a61e5ec..4306f6a5f69 100644 --- a/test/jdk/sun/net/ftp/FtpURLConnectionLeak.java +++ b/test/jdk/sun/net/ftp/FtpURLConnectionLeak.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2018, 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 @@ -30,7 +30,6 @@ * @run main FtpURLConnectionLeak */ import java.io.FileNotFoundException; -import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.net.URL; @@ -44,27 +43,26 @@ public class FtpURLConnectionLeak { int port = server.getLocalPort(); server.start(); URL url = new URL("ftp://localhost:" + port + "/filedoesNotExist.txt"); - for (int i = 0; i < 3; i++) { - try { - InputStream stream = url.openStream(); - } catch (FileNotFoundException expectedFirstTimeAround) { - // should always reach this point since the path does not exist - } catch (IOException expected) { - System.out.println("caught expected " + expected); - int times = 1; - do { - // give some time to close the connection... - System.out.println("sleeping... " + times); - Thread.sleep(times * 1000); - } while (server.activeClientsCount() > 0 && times++ < 5); + try (server) { + for (int i = 0; i < 3; i++) { + try { + InputStream stream = url.openStream(); + } catch (FileNotFoundException expected) { + // should always reach this point since the path does not exist + System.out.println("caught expected " + expected); + int times = 1; + do { + // give some time to close the connection... + System.out.println("sleeping... " + times); + Thread.sleep(times * 1000); + } while (server.activeClientsCount() > 0 && times++ < 5); - if (server.activeClientsCount() > 0) { - server.killClients(); - throw new RuntimeException("URLConnection didn't close the" + - " FTP connection on FileNotFoundException"); + if (server.activeClientsCount() > 0) { + server.killClients(); + throw new RuntimeException("URLConnection didn't close the" + + " FTP connection on FileNotFoundException"); + } } - } finally { - server.terminate(); } } } diff --git a/test/jdk/sun/net/www/ftptest/FtpCommandHandler.java b/test/jdk/sun/net/www/ftptest/FtpCommandHandler.java index 24193362320..d1959b63b7a 100644 --- a/test/jdk/sun/net/www/ftptest/FtpCommandHandler.java +++ b/test/jdk/sun/net/www/ftptest/FtpCommandHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2018, 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 @@ -442,8 +442,14 @@ public class FtpCommandHandler extends Thread { // cmd.setSoTimeout(2000); in = new BufferedReader(new InputStreamReader(cmd.getInputStream())); out = new PrintStream(cmd.getOutputStream(), true, "ISO8859_1"); + // Below corrupted message style was intentional to test 8151586, please + // make sure each message line not broken ftp communication (such as for + // message line lenght >=4, the 4th char required '-' to allow + // implementation thinks that it has seen multi-line reply '###-' + // sequence), otherwise it will affect normal ftp tests which depends + // on this. out.println("---------------------------------\n220 Java FTP test server" - + " (j2se 6.0) ready.\n \n Please send commands\n" + + " (j2se 6.0) ready.\n \n - Please send commands\n" + "-----------------------------\n\n\n"); out.flush(); if (auth.authType() == 0) // No auth needed diff --git a/test/jdk/sun/net/www/ftptest/FtpServer.java b/test/jdk/sun/net/www/ftptest/FtpServer.java index cc31985a865..8ea5705fb52 100644 --- a/test/jdk/sun/net/www/ftptest/FtpServer.java +++ b/test/jdk/sun/net/www/ftptest/FtpServer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2018, 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 @@ -47,7 +47,7 @@ import java.util.ArrayList; * */ -public class FtpServer extends Thread { +public class FtpServer extends Thread implements AutoCloseable { private ServerSocket listener = null; private FtpFileSystemHandler fsh = null; private FtpAuthHandler auth = null; @@ -134,4 +134,13 @@ public class FtpServer extends Thread { } } + + @Override + public void close() throws Exception { + terminate(); + listener.close(); + if (activeClientsCount() > 0) { + killClients(); + } + } } From e431f6a418d0533fb527e8741da29937661a01c7 Mon Sep 17 00:00:00 2001 From: Jean Christophe Beyler Date: Sun, 14 Oct 2018 19:07:34 -0700 Subject: [PATCH 106/124] 8212082: Remove the NSK_CPP_STUB macros for remaining vmTestbase/jvmti/[sS]* Remove NSK_CPP_STUB macros from the tests Reviewed-by: amenkov, phh --- .../setenvstor001/setenvstor001.cpp | 10 +- .../setenvstor002/setenvstor002.cpp | 10 +- .../setenvstor003/setenvstor003.cpp | 10 +- .../setevntcallb001/setevntcallb001.cpp | 8 +- .../setevntcallb002/setevntcallb002.cpp | 7 +- .../setevntcallb003/setevntcallb003.cpp | 8 +- .../setextevent001/setextevent001.cpp | 14 +-- .../SetNativeMethodPrefix001.cpp | 93 ++----------------- .../SetNativeMethodPrefix002.cpp | 24 +---- .../setsysprop002/setsysprop002.cpp | 12 +-- .../setsysprop003/setsysprop003.cpp | 3 +- .../nsk/jvmti/SetTag/settag001/settag001.cpp | 25 ++--- .../setthrdstor001/setthrdstor001.cpp | 9 +- .../setthrdstor002/setthrdstor002.cpp | 8 +- .../setthrdstor003/setthrdstor003.cpp | 16 +--- .../multienv/MA08/ma08t001/ma08t001.cpp | 26 ++---- .../multienv/MA08/ma08t001/ma08t001a.cpp | 39 +++----- .../multienv/MA10/ma10t001/ma10t001.cpp | 30 +++--- .../multienv/MA10/ma10t001/ma10t001a.cpp | 18 ++-- .../multienv/MA10/ma10t002/ma10t002.cpp | 26 ++---- .../multienv/MA10/ma10t002/ma10t002a.cpp | 9 +- .../multienv/MA10/ma10t003/ma10t003.cpp | 26 ++---- .../multienv/MA10/ma10t003/ma10t003a.cpp | 9 +- .../multienv/MA10/ma10t004/ma10t004.cpp | 29 +++--- .../multienv/MA10/ma10t004/ma10t004a.cpp | 12 +-- .../multienv/MA10/ma10t005/ma10t005.cpp | 10 +- .../multienv/MA10/ma10t005/ma10t005a.cpp | 7 +- .../multienv/MA10/ma10t006/ma10t006.cpp | 19 ++-- .../multienv/MA10/ma10t006/ma10t006a.cpp | 13 ++- .../multienv/MA10/ma10t007/ma10t007.cpp | 8 +- .../multienv/MA10/ma10t007/ma10t007a.cpp | 2 +- .../multienv/MA10/ma10t008/ma10t008.cpp | 26 ++---- .../multienv/MA10/ma10t008/ma10t008a.cpp | 14 +-- .../sampling/SP01/sp01t001/sp01t001.cpp | 19 ++-- .../sampling/SP01/sp01t002/sp01t002.cpp | 26 ++---- .../sampling/SP01/sp01t003/sp01t003.cpp | 28 ++---- .../sampling/SP02/sp02t001/sp02t001.cpp | 29 ++---- .../sampling/SP02/sp02t002/sp02t002.cpp | 38 +++----- .../sampling/SP02/sp02t003/sp02t003.cpp | 41 +++----- .../sampling/SP03/sp03t001/sp03t001.cpp | 47 ++++------ .../sampling/SP03/sp03t002/sp03t002.cpp | 47 ++++------ .../sampling/SP04/sp04t001/sp04t001.cpp | 47 ++++------ .../sampling/SP04/sp04t002/sp04t002.cpp | 47 ++++------ .../sampling/SP05/sp05t002/sp05t002.cpp | 34 +++---- .../sampling/SP05/sp05t003/sp05t003.cpp | 54 ++++------- .../sampling/SP06/sp06t001/sp06t001.cpp | 45 ++++----- .../sampling/SP06/sp06t002/sp06t002.cpp | 45 ++++----- .../sampling/SP06/sp06t003/sp06t003.cpp | 48 ++++------ .../sampling/SP07/sp07t001/sp07t001.cpp | 83 +++++++---------- .../sampling/SP07/sp07t002/sp07t002.cpp | 71 ++++++-------- 50 files changed, 451 insertions(+), 878 deletions(-) diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetEnvironmentLocalStorage/setenvstor001/setenvstor001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetEnvironmentLocalStorage/setenvstor001/setenvstor001.cpp index 3b2eb1ca9ed..98400d75bf7 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetEnvironmentLocalStorage/setenvstor001/setenvstor001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetEnvironmentLocalStorage/setenvstor001/setenvstor001.cpp @@ -73,8 +73,7 @@ static void fillEnvStorage(StorageStructure* storage) { static int setEnvStorage(jvmtiEnv* jvmti, StorageStructure* storage, const char where[]) { NSK_DISPLAY1("Set local storage for current JVMTI env: 0x%p\n", (void*)storage); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(SetEnvironmentLocalStorage, jvmti, storage))) { + if (!NSK_JVMTI_VERIFY(jvmti->SetEnvironmentLocalStorage(storage))) { return NSK_FALSE; } NSK_DISPLAY0(" ... ok\n"); @@ -89,8 +88,7 @@ static int checkEnvStorage(jvmtiEnv* jvmti, StorageStructure* initialStorage, co StorageStructure* storage = NULL; NSK_DISPLAY0("Get local storage for current JVMTI env\n"); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GetEnvironmentLocalStorage, jvmti, (void**)&storage))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetEnvironmentLocalStorage((void**)&storage))) { return NSK_FALSE; } NSK_DISPLAY1(" ... got storage: 0x%p\n", (void*)storage); @@ -216,9 +214,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&eventCallbacks, 0, sizeof(eventCallbacks)); eventCallbacks.VMInit = callbackVMInit; eventCallbacks.VMDeath = callbackVMDeath; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, - &eventCallbacks, sizeof(eventCallbacks)))) { + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks)))) { return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetEnvironmentLocalStorage/setenvstor002/setenvstor002.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetEnvironmentLocalStorage/setenvstor002/setenvstor002.cpp index ce44ed9c444..9d53a2ad37a 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetEnvironmentLocalStorage/setenvstor002/setenvstor002.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetEnvironmentLocalStorage/setenvstor002/setenvstor002.cpp @@ -73,8 +73,7 @@ static void fillEnvStorage(StorageStructure* storage) { static int setEnvStorage(jvmtiEnv* jvmti, StorageStructure* storage, const char where[]) { NSK_DISPLAY1("Set local storage for current JVMTI env: 0x%p\n", (void*)storage); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(SetEnvironmentLocalStorage, jvmti, storage))) { + if (!NSK_JVMTI_VERIFY(jvmti->SetEnvironmentLocalStorage(storage))) { return NSK_FALSE; } NSK_DISPLAY0(" ... ok\n"); @@ -89,8 +88,7 @@ static int checkEnvStorage(jvmtiEnv* jvmti, StorageStructure* initialStorage, co StorageStructure* storage = NULL; NSK_DISPLAY0("Get local storage for current JVMTI env\n"); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GetEnvironmentLocalStorage, jvmti, (void**)&storage))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetEnvironmentLocalStorage((void**)&storage))) { return NSK_FALSE; } NSK_DISPLAY1(" ... got storage: 0x%p\n", (void*)storage); @@ -221,9 +219,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&eventCallbacks, 0, sizeof(eventCallbacks)); eventCallbacks.VMInit = callbackVMInit; eventCallbacks.VMDeath = callbackVMDeath; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, - &eventCallbacks, sizeof(eventCallbacks)))) { + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks)))) { return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetEnvironmentLocalStorage/setenvstor003/setenvstor003.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetEnvironmentLocalStorage/setenvstor003/setenvstor003.cpp index ecae8fe964d..6c3ec2145a3 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetEnvironmentLocalStorage/setenvstor003/setenvstor003.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetEnvironmentLocalStorage/setenvstor003/setenvstor003.cpp @@ -73,8 +73,7 @@ static void fillEnvStorage(StorageStructure* storage) { static int setEnvStorage(jvmtiEnv* jvmti, StorageStructure* storage, const char where[]) { NSK_DISPLAY1("Set local storage for current JVMTI env: 0x%p\n", (void*)storage); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(SetEnvironmentLocalStorage, jvmti, storage))) { + if (!NSK_JVMTI_VERIFY(jvmti->SetEnvironmentLocalStorage(storage))) { return NSK_FALSE; } NSK_DISPLAY0(" ... ok\n"); @@ -89,8 +88,7 @@ static int checkEnvStorage(jvmtiEnv* jvmti, StorageStructure* initialStorage, co StorageStructure* storage = NULL; NSK_DISPLAY0("Get local storage for current JVMTI env\n"); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GetEnvironmentLocalStorage, jvmti, (void**)&storage))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetEnvironmentLocalStorage((void**)&storage))) { return NSK_FALSE; } NSK_DISPLAY1(" ... got storage: 0x%p\n", (void*)storage); @@ -224,9 +222,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&eventCallbacks, 0, sizeof(eventCallbacks)); eventCallbacks.VMInit = callbackVMInit; eventCallbacks.VMDeath = callbackVMDeath; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, - &eventCallbacks, sizeof(eventCallbacks)))) { + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks)))) { return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetEventCallbacks/setevntcallb001/setevntcallb001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetEventCallbacks/setevntcallb001/setevntcallb001.cpp index c1a38a90ec1..9b15148fe19 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetEventCallbacks/setevntcallb001/setevntcallb001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetEventCallbacks/setevntcallb001/setevntcallb001.cpp @@ -143,9 +143,7 @@ callbackVMInit(jvmtiEnv* jvmti, JNIEnv* jni, jthread thread) { memset(&eventCallbacks, 0, sizeof(eventCallbacks)); eventCallbacks.ThreadStart = callbackThreadStart; eventCallbacks.ThreadEnd = callbackThreadEnd; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, - &eventCallbacks, sizeof(eventCallbacks)))) { + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks)))) { nsk_jvmti_setFailStatus(); } else { nsk_jvmti_enableEvents(JVMTI_ENABLE, EVENTS_COUNT - 1, eventsList + 1, NULL); @@ -190,9 +188,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&eventCallbacks, 0, sizeof(eventCallbacks)); eventCallbacks.VMInit = callbackVMInit; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, - &eventCallbacks, sizeof(eventCallbacks)))) { + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks)))) { nsk_jvmti_setFailStatus(); } else { nsk_jvmti_enableEvents(JVMTI_ENABLE, 1, eventsList, NULL); diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetEventCallbacks/setevntcallb002/setevntcallb002.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetEventCallbacks/setevntcallb002/setevntcallb002.cpp index b420ead74cf..65f8a2fd3f4 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetEventCallbacks/setevntcallb002/setevntcallb002.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetEventCallbacks/setevntcallb002/setevntcallb002.cpp @@ -145,8 +145,7 @@ callbackVMInit(jvmtiEnv* jvmti, JNIEnv* jni, jthread thread) { NSK_DISPLAY0(">>> Testcase #2: Set NULL for events callbacks\n"); { - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, NULL, 0))) { + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(NULL, 0))) { nsk_jvmti_setFailStatus(); } @@ -193,9 +192,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { eventCallbacks.VMInit = callbackVMInit; eventCallbacks.ThreadStart = callbackThreadStart; eventCallbacks.ThreadEnd = callbackThreadEnd; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, - &eventCallbacks, sizeof(eventCallbacks)))) { + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks)))) { nsk_jvmti_setFailStatus(); } else { nsk_jvmti_enableEvents(JVMTI_ENABLE, 1, eventsList, NULL); diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetEventCallbacks/setevntcallb003/setevntcallb003.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetEventCallbacks/setevntcallb003/setevntcallb003.cpp index 98751465b1e..72511c6776d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetEventCallbacks/setevntcallb003/setevntcallb003.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetEventCallbacks/setevntcallb003/setevntcallb003.cpp @@ -151,9 +151,7 @@ callbackVMInit(jvmtiEnv* jvmti, JNIEnv* jni, jthread thread) { memset(&eventCallbacks, 0, sizeof(eventCallbacks)); eventCallbacks.ThreadStart = callbackThreadStart; eventCallbacks.ThreadEnd = callbackThreadEnd; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, - &eventCallbacks, size))) { + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, size))) { nsk_jvmti_setFailStatus(); } @@ -198,9 +196,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&eventCallbacks, 0, sizeof(eventCallbacks)); eventCallbacks.VMInit = callbackVMInit; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, - &eventCallbacks, sizeof(eventCallbacks)))) { + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks)))) { nsk_jvmti_setFailStatus(); } else { nsk_jvmti_enableEvents(JVMTI_ENABLE, 1, eventsList, NULL); diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetExtensionEventCallback/setextevent001/setextevent001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetExtensionEventCallback/setextevent001/setextevent001.cpp index 831579cea51..722e529ac72 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetExtensionEventCallback/setextevent001/setextevent001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetExtensionEventCallback/setextevent001/setextevent001.cpp @@ -48,8 +48,7 @@ static int checkExtensions(jvmtiEnv* jvmti, const char phase[]) { int i; NSK_DISPLAY0("Get extension events list\n"); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetExtensionEvents, jvmti, &extCount, &extList))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetExtensionEvents(&extCount, &extList))) { return NSK_FALSE; } NSK_DISPLAY1(" ... got count: %d\n", (int)extCount); @@ -72,18 +71,14 @@ static int checkExtensions(jvmtiEnv* jvmti, const char phase[]) { NSK_DISPLAY1(" ... setting callback: 0x%p\n", (void*)callbackExtensionEvent); if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetExtensionEventCallback, jvmti, - extList[i].extension_event_index, - callbackExtensionEvent))) { + jvmti->SetExtensionEventCallback(extList[i].extension_event_index, callbackExtensionEvent))) { success = NSK_FALSE; } NSK_DISPLAY0(" ... done\n"); NSK_DISPLAY1(" ... clearing callback: 0x%p\n", (void*)NULL); if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetExtensionEventCallback, jvmti, - extList[i].extension_event_index, - NULL))) { + jvmti->SetExtensionEventCallback(extList[i].extension_event_index, NULL))) { success = NSK_FALSE; } NSK_DISPLAY0(" ... done\n"); @@ -91,8 +86,7 @@ static int checkExtensions(jvmtiEnv* jvmti, const char phase[]) { } NSK_DISPLAY1("Deallocate extension events list: 0x%p\n", (void*)extList); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)extList))) { + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)extList))) { return NSK_FALSE; } NSK_DISPLAY0(" ... deallocated\n"); diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetNativeMethodPrefix/SetNativeMethodPrefix001/SetNativeMethodPrefix001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetNativeMethodPrefix/SetNativeMethodPrefix001/SetNativeMethodPrefix001.cpp index ab627f48409..d9631096901 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetNativeMethodPrefix/SetNativeMethodPrefix001/SetNativeMethodPrefix001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetNativeMethodPrefix/SetNativeMethodPrefix001/SetNativeMethodPrefix001.cpp @@ -123,27 +123,11 @@ Java_nsk_jvmti_SetNativeMethodPrefix_Binder_setMethodPrefix ( char *str = NULL; if (prefix != NULL) { - if (!NSK_VERIFY( - (str = (char *) NSK_CPP_STUB3( - GetStringUTFChars - , jni - , prefix - , 0 - ) - ) != NULL - ) - ) + if (!NSK_VERIFY((str = (char *) jni->GetStringUTFChars(prefix, 0)) != NULL)) { result = JNI_FALSE; goto finally; } } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2( - SetNativeMethodPrefix - , jvmti - , str - ) - ) - ) + if (!NSK_JVMTI_VERIFY(jvmti->SetNativeMethodPrefix(str))) { result = JNI_FALSE; goto finally; } if (str != NULL) { @@ -175,27 +159,10 @@ Java_nsk_jvmti_SetNativeMethodPrefix_Binder_setMultiplePrefixes ( char *str = NULL; if (prefix != NULL) { - if (!NSK_VERIFY( - (str = (char *) NSK_CPP_STUB3( - GetStringUTFChars - , jni - , prefix - , 0 - ) - ) != NULL - ) - ) + if (!NSK_VERIFY((str = (char *) jni->GetStringUTFChars(prefix, 0)) != NULL)) { result = JNI_FALSE; goto finally; } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3( - SetNativeMethodPrefixes - , jvmti - , 1 - , (char **) &str - ) - ) - ) + if (!NSK_JVMTI_VERIFY(jvmti->SetNativeMethodPrefixes(1, (char **) &str))) { result = JNI_FALSE; goto finally; } NSK_DISPLAY1("MultiplePrefixes: New PREFIX is set: %s\n" @@ -205,15 +172,7 @@ Java_nsk_jvmti_SetNativeMethodPrefix_Binder_setMultiplePrefixes ( char* prefixes[1]; prefixes[0] = NULL; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3( - SetNativeMethodPrefixes - , jvmti - , 0 - , (char **)&prefixes - ) - ) - ) + if (!NSK_JVMTI_VERIFY(jvmti->SetNativeMethodPrefixes(0, (char **)&prefixes))) { result = JNI_FALSE; goto finally; } NSK_DISPLAY0("Old PREFIX is reset\n"); @@ -250,33 +209,11 @@ Java_nsk_jvmti_SetNativeMethodPrefix_Binder_registerMethod ( return JNI_FALSE; } - if (!NSK_VERIFY( - (method.name = - (char *) NSK_CPP_STUB3( - GetStringUTFChars - , jni - , method_name_obj - , 0 - ) - ) != NULL - ) - ) - { + if (!NSK_VERIFY((method.name = (char *) jni->GetStringUTFChars(method_name_obj, 0)) != NULL)) { goto finally; } - if (!NSK_VERIFY( - (method.signature = - (char *) NSK_CPP_STUB3( - GetStringUTFChars - , jni - , method_sig_obj - , 0 - ) - ) != NULL - ) - ) - { + if (!NSK_VERIFY((method.signature = (char *) jni->GetStringUTFChars(method_sig_obj, 0)) != NULL)) { goto finally; } @@ -341,25 +278,13 @@ jint Agent_Initialize(JavaVM *vm, char *options, void *reserved) ) return JNI_ERR; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2( - GetCapabilities - , jvmti - , &caps) - ) - ) + if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps))) return JNI_ERR; // Register all necessary JVM capabilities caps.can_set_native_method_prefix = 1; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2( - AddCapabilities - , jvmti - , &caps) - ) - ) + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) return JNI_ERR; return JNI_OK; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetNativeMethodPrefix/SetNativeMethodPrefix002/SetNativeMethodPrefix002.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetNativeMethodPrefix/SetNativeMethodPrefix002/SetNativeMethodPrefix002.cpp index d9ac7b86222..7addf0cf052 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetNativeMethodPrefix/SetNativeMethodPrefix002/SetNativeMethodPrefix002.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetNativeMethodPrefix/SetNativeMethodPrefix002/SetNativeMethodPrefix002.cpp @@ -60,13 +60,7 @@ Java_nsk_jvmti_SetNativeMethodPrefix_SetNativeMethodPrefix002_foo ( static jboolean setMethodPrefix (char *prefix) { - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2( - SetNativeMethodPrefix - , jvmti - , prefix) - ) - ) + if (!NSK_JVMTI_VERIFY(jvmti->SetNativeMethodPrefix(prefix))) return JNI_FALSE; return JNI_TRUE; @@ -114,25 +108,13 @@ jint Agent_Initialize(JavaVM *vm, char *options, void *reserved) ) return JNI_ERR; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2( - GetCapabilities - , jvmti - , &caps) - ) - ) + if (!NSK_JVMTI_VERIFY(jvmti->GetCapabilities(&caps))) return JNI_ERR; // Register all necessary JVM capabilities caps.can_set_native_method_prefix = 1; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2( - AddCapabilities - , jvmti - , &caps) - ) - ) + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) return JNI_ERR; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetSystemProperty/setsysprop002/setsysprop002.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetSystemProperty/setsysprop002/setsysprop002.cpp index af8591b886e..f35489f2583 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetSystemProperty/setsysprop002/setsysprop002.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetSystemProperty/setsysprop002/setsysprop002.cpp @@ -76,8 +76,7 @@ static int checkPropertyValue(jvmtiEnv* jvmti, const char phase[], char* value = NULL; NSK_DISPLAY1(" property: %s\n", name); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetSystemProperty, jvmti, name, &value))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetSystemProperty(name, &value))) { return NSK_FALSE; } NSK_DISPLAY1(" value: \"%s\"\n", nsk_null_string(value)); @@ -93,8 +92,7 @@ static int checkPropertyValue(jvmtiEnv* jvmti, const char phase[], success = NSK_FALSE; } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)value))) { + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)value))) { success = NSK_FALSE; } @@ -120,14 +118,12 @@ static int checkProperties(jvmtiEnv* jvmti, const char phase[], int step) { NSK_DISPLAY1(" value: \"%s\"\n", propDescList[i].values[step]); if (step > 1) { if (!NSK_JVMTI_VERIFY_CODE(JVMTI_ERROR_WRONG_PHASE, - NSK_CPP_STUB3(SetSystemProperty, jvmti, - propDescList[i].name, propDescList[i].values[step]))) { + jvmti->SetSystemProperty(propDescList[i].name, propDescList[i].values[step]))) { success = NSK_FALSE; } } else { if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetSystemProperty, jvmti, - propDescList[i].name, propDescList[i].values[step]))) { + jvmti->SetSystemProperty(propDescList[i].name, propDescList[i].values[step]))) { success = NSK_FALSE; } } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetSystemProperty/setsysprop003/setsysprop003.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetSystemProperty/setsysprop003/setsysprop003.cpp index 840f3fc2b0a..300df3403e9 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetSystemProperty/setsysprop003/setsysprop003.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetSystemProperty/setsysprop003/setsysprop003.cpp @@ -56,8 +56,7 @@ static int setProperties(jvmtiEnv* jvmti) { NSK_DISPLAY1(" property: %s\n", propDescList[i].name); NSK_DISPLAY1(" value: \"%s\"\n", propDescList[i].value); if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetSystemProperty, jvmti, - propDescList[i].name, propDescList[i].value))) { + jvmti->SetSystemProperty(propDescList[i].name, propDescList[i].value))) { success = NSK_FALSE; } } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetTag/settag001/settag001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetTag/settag001/settag001.cpp index 3cf014b04b0..3c19fb28ee9 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetTag/settag001/settag001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetTag/settag001/settag001.cpp @@ -61,7 +61,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY1("Find debugee class: %s\n", DEBUGEE_CLASS_NAME); if (!NSK_JNI_VERIFY(jni, (debugeeClass = - NSK_CPP_STUB2(FindClass, jni, DEBUGEE_CLASS_NAME)) != NULL)) { + jni->FindClass(DEBUGEE_CLASS_NAME)) != NULL)) { nsk_jvmti_setFailStatus(); return; } @@ -69,8 +69,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY1("Find static field: %s\n", OBJECT_FIELD_NAME); if (!NSK_JNI_VERIFY(jni, (objectField = - NSK_CPP_STUB4(GetStaticFieldID, jni, debugeeClass, - OBJECT_FIELD_NAME, OBJECT_CLASS_SIG)) != NULL)) { + jni->GetStaticFieldID(debugeeClass, OBJECT_FIELD_NAME, OBJECT_CLASS_SIG)) != NULL)) { nsk_jvmti_setFailStatus(); return; } @@ -78,16 +77,14 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY1("Get object from static field: %s\n", OBJECT_FIELD_NAME); if (!NSK_JNI_VERIFY(jni, (testedObject = - NSK_CPP_STUB3(GetStaticObjectField, jni, debugeeClass, - objectField)) != NULL)) { + jni->GetStaticObjectField(debugeeClass, objectField)) != NULL)) { nsk_jvmti_setFailStatus(); return; } NSK_DISPLAY1(" ... got object: 0x%p\n", (void*)testedObject); NSK_DISPLAY1("Create global reference for object: 0x%p\n", (void*)testedObject); - if (!NSK_JNI_VERIFY(jni, (testedObject = - NSK_CPP_STUB2(NewGlobalRef, jni, testedObject)) != NULL)) { + if (!NSK_JNI_VERIFY(jni, (testedObject = jni->NewGlobalRef(testedObject)) != NULL)) { nsk_jvmti_setFailStatus(); return; } @@ -97,8 +94,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY0(">>> Testcase #1: set tag for the tested object\n"); { NSK_DISPLAY1("Set tag for object: 0x%p\n", (void*)testedObject); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetTag, jvmti, testedObject, objectTag))) { + if (!NSK_JVMTI_VERIFY(jvmti->SetTag(testedObject, objectTag))) { nsk_jvmti_setFailStatus(); return; } @@ -110,8 +106,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { jlong tag = 222; NSK_DISPLAY1("Get tag for object: 0x%p\n", (void*)testedObject); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetTag, jvmti, testedObject, &tag))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetTag(testedObject, &tag))) { nsk_jvmti_setFailStatus(); return; } @@ -140,8 +135,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { return; NSK_DISPLAY1("Get tag for object: 0x%p\n", (void*)testedObject); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetTag, jvmti, testedObject, &tag))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetTag(testedObject, &tag))) { nsk_jvmti_setFailStatus(); return; } @@ -162,7 +156,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY0(">>> Clean used data\n"); { NSK_DISPLAY1("Delete object reference: 0x%p\n", (void*)testedObject); - NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, testedObject)); + NSK_TRACE(jni->DeleteGlobalRef(testedObject)); } } @@ -205,8 +199,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(caps)); caps.can_tag_objects = 1; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) { return JNI_ERR; } } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetThreadLocalStorage/setthrdstor001/setthrdstor001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetThreadLocalStorage/setthrdstor001/setthrdstor001.cpp index 5ff04ad464a..c04094a47c6 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetThreadLocalStorage/setthrdstor001/setthrdstor001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetThreadLocalStorage/setthrdstor001/setthrdstor001.cpp @@ -73,9 +73,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY1("SetThreadLocalStorage() for tested thread with pointer: %p\n", (void*)initialStorage); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetThreadLocalStorage, jvmti, - testedThread, (void*)initialStorage))) { + if (!NSK_JVMTI_VERIFY(jvmti->SetThreadLocalStorage(testedThread, (void*)initialStorage))) { nsk_jvmti_setFailStatus(); return; } @@ -90,8 +88,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY0("GetThreadLocalStorage() for tested thread\n"); if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetThreadLocalStorage, jvmti, - testedThread, (void**)&obtainedStorage))) { + jvmti->GetThreadLocalStorage(testedThread, (void**)&obtainedStorage))) { nsk_jvmti_setFailStatus(); return; } @@ -128,7 +125,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { } NSK_DISPLAY0("Delete thread reference\n"); - NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, testedThread)); + NSK_TRACE(jni->DeleteGlobalRef(testedThread)); } NSK_DISPLAY0("Let debugee to finish\n"); diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetThreadLocalStorage/setthrdstor002/setthrdstor002.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetThreadLocalStorage/setthrdstor002/setthrdstor002.cpp index 114666aca4b..9528052c9ab 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetThreadLocalStorage/setthrdstor002/setthrdstor002.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetThreadLocalStorage/setthrdstor002/setthrdstor002.cpp @@ -66,9 +66,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { NSK_DISPLAY1("SetThreadLocalStorage() for current agent thread with pointer: %p\n", (void*)initialStorage); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetThreadLocalStorage, jvmti, - NULL, (void*)initialStorage))) { + if (!NSK_JVMTI_VERIFY(jvmti->SetThreadLocalStorage(NULL, (void*)initialStorage))) { nsk_jvmti_setFailStatus(); return; } @@ -82,9 +80,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { return; NSK_DISPLAY0("GetThreadLocalStorage() for current agent thread\n"); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetThreadLocalStorage, jvmti, - NULL, (void**)&obtainedStorage))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetThreadLocalStorage(NULL, (void**)&obtainedStorage))) { nsk_jvmti_setFailStatus(); return; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetThreadLocalStorage/setthrdstor003/setthrdstor003.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetThreadLocalStorage/setthrdstor003/setthrdstor003.cpp index 81dc18d2bf3..ff49c9d060a 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetThreadLocalStorage/setthrdstor003/setthrdstor003.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetThreadLocalStorage/setthrdstor003/setthrdstor003.cpp @@ -120,8 +120,7 @@ callbackThreadStart(jvmtiEnv* jvmti, JNIEnv* jni, jthread thread) { if (thread != NULL) { jvmtiThreadInfo info; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetThreadInfo, jvmti, thread, &info))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(thread, &info))) { nsk_jvmti_setFailStatus(); return; } @@ -133,9 +132,7 @@ callbackThreadStart(jvmtiEnv* jvmti, JNIEnv* jni, jthread thread) { NSK_DISPLAY1("SetThreadLocalStorage() for current thread with pointer: %p\n", (void*)initialStorage); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetThreadLocalStorage, jvmti, - NULL, (void*)initialStorage))) { + if (!NSK_JVMTI_VERIFY(jvmti->SetThreadLocalStorage(NULL, (void*)initialStorage))) { nsk_jvmti_setFailStatus(); return; } @@ -151,8 +148,7 @@ callbackThreadEnd(jvmtiEnv* jvmti, JNIEnv* jni, jthread thread) { if (thread != NULL) { jvmtiThreadInfo info; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetThreadInfo, jvmti, thread, &info))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(thread, &info))) { nsk_jvmti_setFailStatus(); return; } @@ -168,8 +164,7 @@ callbackThreadEnd(jvmtiEnv* jvmti, JNIEnv* jni, jthread thread) { NSK_DISPLAY0("GetThreadLocalStorage() for current thread\n"); if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetThreadLocalStorage, jvmti, - NULL, (void**)&obtainedStorage))) { + jvmti->GetThreadLocalStorage(NULL, (void**)&obtainedStorage))) { nsk_jvmti_setFailStatus(); return; } @@ -243,8 +238,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&callbacks, 0, sizeof(callbacks)); callbacks.ThreadStart = callbackThreadStart; callbacks.ThreadEnd = callbackThreadEnd; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, &callbacks, sizeof(callbacks)))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&callbacks, sizeof(callbacks)))) return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA08/ma08t001/ma08t001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA08/ma08t001/ma08t001.cpp index 0fbdd11c8d5..fd6d56029d3 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA08/ma08t001/ma08t001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA08/ma08t001/ma08t001.cpp @@ -60,8 +60,7 @@ static int prepare(jvmtiEnv* jvmti, JNIEnv* jni) { NSK_DISPLAY0("Prepare: find tested thread\n"); /* get all live threads */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads))) + if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads))) return NSK_FALSE; if (!NSK_VERIFY(threads_count > 0 && threads != NULL)) @@ -73,8 +72,7 @@ static int prepare(jvmtiEnv* jvmti, JNIEnv* jni) { return NSK_FALSE; /* get thread information */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info))) + if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info))) return NSK_FALSE; NSK_DISPLAY3(" thread #%d (%s): %p\n", i, info.name, threads[i]); @@ -90,8 +88,7 @@ static int prepare(jvmtiEnv* jvmti, JNIEnv* jni) { } /* deallocate threads list */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads))) + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads))) return NSK_FALSE; if (threadForStop == NULL) { @@ -106,17 +103,14 @@ static int prepare(jvmtiEnv* jvmti, JNIEnv* jni) { NSK_DISPLAY0("Prepare: create new instance of ThreadDeath exception\n"); - if (!NSK_JNI_VERIFY(jni, (cls = - NSK_CPP_STUB2(FindClass, jni, THREAD_DEATH_CLASS_NAME)) != NULL)) + if (!NSK_JNI_VERIFY(jni, (cls = jni->FindClass(THREAD_DEATH_CLASS_NAME)) != NULL)) return NSK_FALSE; if (!NSK_JNI_VERIFY(jni, (ctor = - NSK_CPP_STUB4(GetMethodID, jni, cls, - THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL)) + jni->GetMethodID(cls, THREAD_DEATH_CTOR_NAME, THREAD_DEATH_CTOR_SIGNATURE)) != NULL)) return NSK_FALSE; - if (!NSK_JNI_VERIFY(jni, (threadDeath = - NSK_CPP_STUB3(NewObject, jni, cls, ctor)) != NULL)) + if (!NSK_JNI_VERIFY(jni, (threadDeath = jni->NewObject(cls, ctor)) != NULL)) return NSK_FALSE; return NSK_TRUE; @@ -140,8 +134,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { if (!NSK_VERIFY(threadForStop != NULL)) { nsk_jvmti_setFailStatus(); } else { - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(StopThread, jvmti, threadForStop, threadDeath))) + if (!NSK_JVMTI_VERIFY(jvmti->StopThread(threadForStop, threadDeath))) nsk_jvmti_setFailStatus(); } @@ -149,8 +142,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { if (!NSK_VERIFY(threadForInterrupt != NULL)) { nsk_jvmti_setFailStatus(); } else { - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(InterruptThread, jvmti, threadForInterrupt))) + if (!NSK_JVMTI_VERIFY(jvmti->InterruptThread(threadForInterrupt))) nsk_jvmti_setFailStatus(); } @@ -199,7 +191,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(caps)); caps.can_signal_thread = 1; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) { return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA08/ma08t001/ma08t001a.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA08/ma08t001/ma08t001a.cpp index 3c5499d5fab..2253e5a088d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA08/ma08t001/ma08t001a.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA08/ma08t001/ma08t001a.cpp @@ -56,14 +56,12 @@ Exception(jvmtiEnv *jvmti_env, JNIEnv *jni_env, jthread thread, jclass klass = NULL; char *signature = NULL; - if (!NSK_JNI_VERIFY(jni_env, (klass = - NSK_CPP_STUB2(GetObjectClass, jni_env, exception)) != NULL)) { + if (!NSK_JNI_VERIFY(jni_env, (klass = jni_env->GetObjectClass(exception)) != NULL)) { nsk_jvmti_setFailStatus(); return; } - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(GetClassSignature, jvmti_env, - klass, &signature, NULL))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->GetClassSignature(klass, &signature, NULL))) { nsk_jvmti_setFailStatus(); return; } @@ -75,7 +73,7 @@ Exception(jvmtiEnv *jvmti_env, JNIEnv *jni_env, jthread thread, NSK_DISPLAY1("Exception event: %s\n", signature); - if (NSK_CPP_STUB3(IsSameObject, jni_env, threadForInterrupt, thread)) { + if (jni_env->IsSameObject(threadForInterrupt, thread)) { if (strcmp(signature, INTERRUPTED_EXCEPTION_CLASS_SIG) == 0) { InterruptedExceptionFlag++; } else { @@ -83,7 +81,7 @@ Exception(jvmtiEnv *jvmti_env, JNIEnv *jni_env, jthread thread, signature); nsk_jvmti_setFailStatus(); } - } else if (NSK_CPP_STUB3(IsSameObject, jni_env, threadForStop, thread)) { + } else if (jni_env->IsSameObject(threadForStop, thread)) { if (strcmp(signature, THREAD_DEATH_CLASS_SIG) == 0) { ThreadDeathFlag++; } else { @@ -93,7 +91,7 @@ Exception(jvmtiEnv *jvmti_env, JNIEnv *jni_env, jthread thread, } } - NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)signature); + jvmti_env->Deallocate((unsigned char*)signature); } /* ========================================================================== */ @@ -109,8 +107,7 @@ static int prepare(jvmtiEnv* jvmti, JNIEnv* jni) { NSK_DISPLAY0("Prepare: find tested thread\n"); /* get all live threads */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads))) + if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads))) return NSK_FALSE; if (!NSK_VERIFY(threads_count > 0 && threads != NULL)) @@ -122,8 +119,7 @@ static int prepare(jvmtiEnv* jvmti, JNIEnv* jni) { return NSK_FALSE; /* get thread information */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info))) + if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info))) return NSK_FALSE; NSK_DISPLAY3(" thread #%d (%s): %p\n", i, info.name, threads[i]); @@ -139,8 +135,7 @@ static int prepare(jvmtiEnv* jvmti, JNIEnv* jni) { } /* deallocate threads list */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads))) + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads))) return NSK_FALSE; if (threadForStop == NULL) { @@ -153,17 +148,14 @@ static int prepare(jvmtiEnv* jvmti, JNIEnv* jni) { return NSK_FALSE; } - if (!NSK_JNI_VERIFY(jni, (threadForStop = - NSK_CPP_STUB2(NewGlobalRef, jni, threadForStop)) != NULL)) + if (!NSK_JNI_VERIFY(jni, (threadForStop = jni->NewGlobalRef(threadForStop)) != NULL)) return NSK_FALSE; - if (!NSK_JNI_VERIFY(jni, (threadForInterrupt = - NSK_CPP_STUB2(NewGlobalRef, jni, threadForInterrupt)) != NULL)) + if (!NSK_JNI_VERIFY(jni, (threadForInterrupt = jni->NewGlobalRef(threadForInterrupt)) != NULL)) return NSK_FALSE; /* enable event */ - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode, - jvmti, JVMTI_ENABLE, JVMTI_EVENT_EXCEPTION, NULL))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_EXCEPTION, NULL))) return NSK_FALSE; return NSK_TRUE; @@ -199,12 +191,11 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { nsk_jvmti_setFailStatus(); /* disable event */ - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode, - jvmti, JVMTI_DISABLE, JVMTI_EVENT_EXCEPTION, NULL))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_DISABLE, JVMTI_EVENT_EXCEPTION, NULL))) nsk_jvmti_setFailStatus(); - NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, threadForStop)); - NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, threadForInterrupt)); + NSK_TRACE(jni->DeleteGlobalRef(threadForStop)); + NSK_TRACE(jni->DeleteGlobalRef(threadForInterrupt)); if (!nsk_jvmti_resumeSync()) return; @@ -245,7 +236,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(caps)); caps.can_generate_exception_events = 1; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) { return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t001/ma10t001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t001/ma10t001.cpp index 4c2223898b8..1b2b5663913 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t001/ma10t001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t001/ma10t001.cpp @@ -58,19 +58,17 @@ Exception(jvmtiEnv *jvmti_env, JNIEnv *jni_env, jthread thread, ExceptionEventsCount++; - if (!NSK_JNI_VERIFY(jni_env, (klass = - NSK_CPP_STUB2(GetObjectClass, jni_env, exception)) != NULL)) { + if (!NSK_JNI_VERIFY(jni_env, (klass = jni_env->GetObjectClass(exception)) != NULL)) { nsk_jvmti_setFailStatus(); return; } - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(GetClassSignature, jvmti_env, - klass, &signature, NULL))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->GetClassSignature(klass, &signature, NULL))) { nsk_jvmti_setFailStatus(); return; } NSK_DISPLAY1("Exception event: %s\n", signature); if (signature != NULL) - NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)signature); + jvmti_env->Deallocate((unsigned char*)signature); } void JNICALL @@ -85,19 +83,17 @@ ExceptionCatch(jvmtiEnv *jvmti_env, JNIEnv *jni_env, jthread thread, ExceptionCatchEventsCount++; - if (!NSK_JNI_VERIFY(jni_env, (klass = - NSK_CPP_STUB2(GetObjectClass, jni_env, exception)) != NULL)) { + if (!NSK_JNI_VERIFY(jni_env, (klass = jni_env->GetObjectClass(exception)) != NULL)) { nsk_jvmti_setFailStatus(); return; } - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(GetClassSignature, jvmti_env, - klass, &signature, NULL))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->GetClassSignature(klass, &signature, NULL))) { nsk_jvmti_setFailStatus(); return; } NSK_DISPLAY1("ExceptionCatch event: %s\n", signature); if (signature != NULL) - NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)signature); + jvmti_env->Deallocate((unsigned char*)signature); } /* ========================================================================== */ @@ -109,11 +105,9 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { if (!nsk_jvmti_waitForSync(timeout)) return; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode, - jvmti, JVMTI_ENABLE, JVMTI_EVENT_EXCEPTION, NULL))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_EXCEPTION, NULL))) nsk_jvmti_setFailStatus(); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode, - jvmti, JVMTI_ENABLE, JVMTI_EVENT_EXCEPTION_CATCH, NULL))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_EXCEPTION_CATCH, NULL))) nsk_jvmti_setFailStatus(); /* resume debugee and wait for sync */ @@ -122,11 +116,9 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { if (!nsk_jvmti_waitForSync(timeout)) return; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode, - jvmti, JVMTI_DISABLE, JVMTI_EVENT_EXCEPTION, NULL))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_DISABLE, JVMTI_EVENT_EXCEPTION, NULL))) nsk_jvmti_setFailStatus(); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode, - jvmti, JVMTI_DISABLE, JVMTI_EVENT_EXCEPTION_CATCH, NULL))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_DISABLE, JVMTI_EVENT_EXCEPTION_CATCH, NULL))) nsk_jvmti_setFailStatus(); NSK_DISPLAY1("Exception events received: %d\n", @@ -178,7 +170,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(caps)); caps.can_generate_exception_events = 1; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) { return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t001/ma10t001a.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t001/ma10t001a.cpp index 9e9a620f13e..29863b2c2c1 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t001/ma10t001a.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t001/ma10t001a.cpp @@ -54,19 +54,17 @@ Exception(jvmtiEnv *jvmti_env, JNIEnv *jni_env, jthread thread, ExceptionEventsCount++; - if (!NSK_JNI_VERIFY(jni_env, (klass = - NSK_CPP_STUB2(GetObjectClass, jni_env, exception)) != NULL)) { + if (!NSK_JNI_VERIFY(jni_env, (klass = jni_env->GetObjectClass(exception)) != NULL)) { nsk_jvmti_setFailStatus(); return; } - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(GetClassSignature, jvmti_env, - klass, &signature, NULL))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->GetClassSignature(klass, &signature, NULL))) { nsk_jvmti_setFailStatus(); return; } NSK_DISPLAY1("Exception event: %s\n", signature); if (signature != NULL) - NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)signature); + jvmti_env->Deallocate((unsigned char*)signature); } void JNICALL @@ -77,19 +75,17 @@ ExceptionCatch(jvmtiEnv *jvmti_env, JNIEnv *jni_env, jthread thread, ExceptionCatchEventsCount++; - if (!NSK_JNI_VERIFY(jni_env, (klass = - NSK_CPP_STUB2(GetObjectClass, jni_env, exception)) != NULL)) { + if (!NSK_JNI_VERIFY(jni_env, (klass = jni_env->GetObjectClass(exception)) != NULL)) { nsk_jvmti_setFailStatus(); return; } - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(GetClassSignature, jvmti_env, - klass, &signature, NULL))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->GetClassSignature(klass, &signature, NULL))) { nsk_jvmti_setFailStatus(); return; } NSK_DISPLAY1("ExceptionCatch event: %s\n", signature); if (signature != NULL) - NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)signature); + jvmti_env->Deallocate((unsigned char*)signature); } /* ========================================================================== */ @@ -156,7 +152,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(caps)); caps.can_generate_exception_events = 1; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) { return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t002/ma10t002.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t002/ma10t002.cpp index dd75ac08542..c9b34e0eb49 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t002/ma10t002.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t002/ma10t002.cpp @@ -54,16 +54,15 @@ MethodEntry(jvmtiEnv *jvmti_env, JNIEnv *jni_env, char *signature = NULL; MethodEntryEventsCount++; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(GetMethodName, - jvmti_env, method, &name, &signature, NULL))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->GetMethodName(method, &name, &signature, NULL))) { nsk_jvmti_setFailStatus(); return; } NSK_DISPLAY2("MethodEntry event: %s%s\n", name, signature); if (name != NULL) - NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)name); + jvmti_env->Deallocate((unsigned char*)name); if (signature != NULL) - NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)signature); + jvmti_env->Deallocate((unsigned char*)signature); } /* ========================================================================== */ @@ -78,8 +77,7 @@ static int prepare(jvmtiEnv* jvmti, JNIEnv* jni) { NSK_DISPLAY0("Prepare: find tested thread\n"); /* get all live threads */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads))) + if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads))) return NSK_FALSE; if (!NSK_VERIFY(threads_count > 0 && threads != NULL)) @@ -91,8 +89,7 @@ static int prepare(jvmtiEnv* jvmti, JNIEnv* jni) { return NSK_FALSE; /* get thread information */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info))) + if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info))) return NSK_FALSE; NSK_DISPLAY3(" thread #%d (%s): %p\n", i, info.name, threads[i]); @@ -103,13 +100,11 @@ static int prepare(jvmtiEnv* jvmti, JNIEnv* jni) { } } - if (!NSK_JNI_VERIFY(jni, (thread = - NSK_CPP_STUB2(NewGlobalRef, jni, thread)) != NULL)) + if (!NSK_JNI_VERIFY(jni, (thread = jni->NewGlobalRef(thread)) != NULL)) return NSK_FALSE; /* deallocate threads list */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads))) + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads))) return NSK_FALSE; return NSK_TRUE; @@ -129,8 +124,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { return; } - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode, - jvmti, JVMTI_ENABLE, JVMTI_EVENT_METHOD_ENTRY, thread))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_METHOD_ENTRY, thread))) nsk_jvmti_setFailStatus(); /* resume debugee and wait for sync */ @@ -144,7 +138,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { if (!NSK_VERIFY(MethodEntryEventsCount != 0)) nsk_jvmti_setFailStatus(); - NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, thread)); + NSK_TRACE(jni->DeleteGlobalRef(thread)); if (!nsk_jvmti_resumeSync()) return; @@ -185,7 +179,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(caps)); caps.can_generate_method_entry_events = 1; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) { return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t002/ma10t002a.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t002/ma10t002a.cpp index 71aa890c57e..e8256ff6dc1 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t002/ma10t002a.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t002/ma10t002a.cpp @@ -51,16 +51,15 @@ MethodEntry(jvmtiEnv *jvmti_env, JNIEnv *jni_env, char *signature = NULL; MethodEntryEventsCount++; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(GetMethodName, - jvmti_env, method, &name, &signature, NULL))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->GetMethodName(method, &name, &signature, NULL))) { nsk_jvmti_setFailStatus(); return; } NSK_DISPLAY2("MethodEntry event: %s%s\n", name, signature); if (name != NULL) - NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)name); + jvmti_env->Deallocate((unsigned char*)name); if (signature != NULL) - NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)signature); + jvmti_env->Deallocate((unsigned char*)signature); } /* ========================================================================== */ @@ -122,7 +121,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(caps)); caps.can_generate_method_entry_events = 1; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) { return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t003/ma10t003.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t003/ma10t003.cpp index 9a7c547a0bb..2b75f45a6ae 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t003/ma10t003.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t003/ma10t003.cpp @@ -55,16 +55,15 @@ MethodExit(jvmtiEnv *jvmti_env, JNIEnv *jni_env, char *signature = NULL; MethodExitEventsCount++; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(GetMethodName, - jvmti_env, method, &name, &signature, NULL))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->GetMethodName(method, &name, &signature, NULL))) { nsk_jvmti_setFailStatus(); return; } NSK_DISPLAY2("MethodExit event: %s%s\n", name, signature); if (name != NULL) - NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)name); + jvmti_env->Deallocate((unsigned char*)name); if (signature != NULL) - NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)signature); + jvmti_env->Deallocate((unsigned char*)signature); } /* ========================================================================== */ @@ -79,8 +78,7 @@ static int prepare(jvmtiEnv* jvmti, JNIEnv* jni) { NSK_DISPLAY0("Prepare: find tested thread\n"); /* get all live threads */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads))) + if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads))) return NSK_FALSE; if (!NSK_VERIFY(threads_count > 0 && threads != NULL)) @@ -92,8 +90,7 @@ static int prepare(jvmtiEnv* jvmti, JNIEnv* jni) { return NSK_FALSE; /* get thread information */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info))) + if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info))) return NSK_FALSE; NSK_DISPLAY3(" thread #%d (%s): %p\n", i, info.name, threads[i]); @@ -104,13 +101,11 @@ static int prepare(jvmtiEnv* jvmti, JNIEnv* jni) { } } - if (!NSK_JNI_VERIFY(jni, (thread = - NSK_CPP_STUB2(NewGlobalRef, jni, thread)) != NULL)) + if (!NSK_JNI_VERIFY(jni, (thread = jni->NewGlobalRef(thread)) != NULL)) return NSK_FALSE; /* deallocate threads list */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads))) + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads))) return NSK_FALSE; return NSK_TRUE; @@ -130,8 +125,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { return; } - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode, - jvmti, JVMTI_ENABLE, JVMTI_EVENT_METHOD_EXIT, thread))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_METHOD_EXIT, thread))) nsk_jvmti_setFailStatus(); /* resume debugee and wait for sync */ @@ -145,7 +139,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { if (!NSK_VERIFY(MethodExitEventsCount != 0)) nsk_jvmti_setFailStatus(); - NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, thread)); + NSK_TRACE(jni->DeleteGlobalRef(thread)); if (!nsk_jvmti_resumeSync()) return; @@ -186,7 +180,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(caps)); caps.can_generate_method_exit_events = 1; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) { return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t003/ma10t003a.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t003/ma10t003a.cpp index bef66a40276..98a8f8287fb 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t003/ma10t003a.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t003/ma10t003a.cpp @@ -52,16 +52,15 @@ MethodExit(jvmtiEnv *jvmti_env, JNIEnv *jni_env, char *signature = NULL; MethodExitEventsCount++; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(GetMethodName, - jvmti_env, method, &name, &signature, NULL))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->GetMethodName(method, &name, &signature, NULL))) { nsk_jvmti_setFailStatus(); return; } NSK_DISPLAY2("MethodExit event: %s%s\n", name, signature); if (name != NULL) - NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)name); + jvmti_env->Deallocate((unsigned char*)name); if (signature != NULL) - NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)signature); + jvmti_env->Deallocate((unsigned char*)signature); } /* ========================================================================== */ @@ -123,7 +122,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(caps)); caps.can_generate_method_exit_events = 1; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) { return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t004/ma10t004.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t004/ma10t004.cpp index 110349d17f4..329da7c919c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t004/ma10t004.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t004/ma10t004.cpp @@ -56,20 +56,18 @@ SingleStep(jvmtiEnv *jvmti_env, JNIEnv* jni_env, jthread thread, SingleStepEventsCount++; - NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode, - jvmti_env, JVMTI_DISABLE, JVMTI_EVENT_SINGLE_STEP, NULL)); + NSK_JVMTI_VERIFY(jvmti_env->SetEventNotificationMode(JVMTI_DISABLE, JVMTI_EVENT_SINGLE_STEP, NULL)); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(GetMethodName, - jvmti_env, method, &name, &signature, NULL))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->GetMethodName(method, &name, &signature, NULL))) { nsk_jvmti_setFailStatus(); return; } NSK_DISPLAY3("SingleStep event: %s%s, location=%s\n", name, signature, jlong_to_string(location, buffer)); if (name != NULL) - NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)name); + jvmti_env->Deallocate((unsigned char*)name); if (signature != NULL) - NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)signature); + jvmti_env->Deallocate((unsigned char*)signature); } /* ========================================================================== */ @@ -84,8 +82,7 @@ static int prepare(jvmtiEnv* jvmti, JNIEnv* jni) { NSK_DISPLAY0("Prepare: find tested thread\n"); /* get all live threads */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads))) + if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads))) return NSK_FALSE; if (!NSK_VERIFY(threads_count > 0 && threads != NULL)) @@ -97,8 +94,7 @@ static int prepare(jvmtiEnv* jvmti, JNIEnv* jni) { return NSK_FALSE; /* get thread information */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info))) + if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info))) return NSK_FALSE; NSK_DISPLAY3(" thread #%d (%s): %p\n", i, info.name, threads[i]); @@ -109,13 +105,11 @@ static int prepare(jvmtiEnv* jvmti, JNIEnv* jni) { } } - if (!NSK_JNI_VERIFY(jni, (thread = - NSK_CPP_STUB2(NewGlobalRef, jni, thread)) != NULL)) + if (!NSK_JNI_VERIFY(jni, (thread = jni->NewGlobalRef(thread)) != NULL)) return NSK_FALSE; /* deallocate threads list */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads))) + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads))) return NSK_FALSE; return NSK_TRUE; @@ -135,8 +129,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { return; } - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode, - jvmti, JVMTI_ENABLE, JVMTI_EVENT_SINGLE_STEP, thread))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_SINGLE_STEP, thread))) nsk_jvmti_setFailStatus(); /* resume debugee and wait for sync */ @@ -150,7 +143,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) { if (!NSK_VERIFY(SingleStepEventsCount != 0)) nsk_jvmti_setFailStatus(); - NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, thread)); + NSK_TRACE(jni->DeleteGlobalRef(thread)); if (!nsk_jvmti_resumeSync()) return; @@ -191,7 +184,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(caps)); caps.can_generate_single_step_events = 1; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) { return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t004/ma10t004a.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t004/ma10t004a.cpp index 67d1b8bdce0..4f97e7c7926 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t004/ma10t004a.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t004/ma10t004a.cpp @@ -53,20 +53,18 @@ SingleStep(jvmtiEnv *jvmti_env, JNIEnv* jni_env, jthread thread, SingleStepEventsCount++; - NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode, - jvmti_env, JVMTI_DISABLE, JVMTI_EVENT_SINGLE_STEP, NULL)); + NSK_JVMTI_VERIFY(jvmti_env->SetEventNotificationMode(JVMTI_DISABLE, JVMTI_EVENT_SINGLE_STEP, NULL)); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(GetMethodName, - jvmti_env, method, &name, &signature, NULL))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->GetMethodName(method, &name, &signature, NULL))) { nsk_jvmti_setFailStatus(); return; } NSK_DISPLAY3("SingleStep event: %s%s, location=%s\n", name, signature, jlong_to_string(location, buffer)); if (name != NULL) - NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)name); + jvmti_env->Deallocate((unsigned char*)name); if (signature != NULL) - NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)signature); + jvmti_env->Deallocate((unsigned char*)signature); } /* ========================================================================== */ @@ -128,7 +126,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(caps)); caps.can_generate_single_step_events = 1; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) { return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t005/ma10t005.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t005/ma10t005.cpp index 7e3fa0f5025..2f49fe219f4 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t005/ma10t005.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t005/ma10t005.cpp @@ -52,14 +52,13 @@ VMObjectAlloc(jvmtiEnv *jvmti_env, JNIEnv* jni_env, VMObjectAllocEventsCount++; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(GetClassSignature, jvmti_env, - object_klass, &signature, NULL))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->GetClassSignature(object_klass, &signature, NULL))) { nsk_jvmti_setFailStatus(); return; } NSK_DISPLAY2("VMObjectAlloc: \"%s\", size=%d\n", signature, size); if (signature != NULL) - NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)signature); + jvmti_env->Deallocate((unsigned char*)signature); } /* ========================================================================== */ @@ -115,7 +114,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(caps)); caps.can_generate_vm_object_alloc_events = 1; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) { return JNI_ERR; } @@ -124,8 +123,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { if (!NSK_VERIFY(nsk_jvmti_init_MA(&callbacks))) return JNI_ERR; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode, - jvmti, JVMTI_ENABLE, JVMTI_EVENT_VM_OBJECT_ALLOC, NULL))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_VM_OBJECT_ALLOC, NULL))) return JNI_ERR; return JNI_OK; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t005/ma10t005a.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t005/ma10t005a.cpp index fae61e00db7..418f082f280 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t005/ma10t005a.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t005/ma10t005a.cpp @@ -52,14 +52,13 @@ VMObjectAlloc(jvmtiEnv *jvmti_env, JNIEnv* jni_env, VMObjectAllocEventsCount++; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(GetClassSignature, jvmti_env, - object_klass, &signature, NULL))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->GetClassSignature(object_klass, &signature, NULL))) { nsk_jvmti_setFailStatus(); return; } NSK_DISPLAY2("VMObjectAlloc: \"%s\", size=%d\n", signature, size); if (signature != NULL) - NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)signature); + jvmti_env->Deallocate((unsigned char*)signature); } /* ========================================================================== */ @@ -115,7 +114,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(caps)); caps.can_generate_vm_object_alloc_events = 1; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) { return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t006/ma10t006.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t006/ma10t006.cpp index c9bed7b4682..ac2d54a16ab 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t006/ma10t006.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t006/ma10t006.cpp @@ -54,17 +54,16 @@ CompiledMethodLoad(jvmtiEnv *jvmti_env, jmethodID method, CompiledMethodLoadEventsCount++; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(GetMethodName, - jvmti_env, method, &name, &signature, NULL))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->GetMethodName(method, &name, &signature, NULL))) { nsk_jvmti_setFailStatus(); return; } NSK_DISPLAY3("CompiledMethodLoad event: %s%s (0x%p)\n", name, signature, code_addr); if (name != NULL) - NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)name); + jvmti_env->Deallocate((unsigned char*)name); if (signature != NULL) - NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)signature); + jvmti_env->Deallocate((unsigned char*)signature); } static void JNICALL @@ -81,8 +80,8 @@ CompiledMethodUnload(jvmtiEnv *jvmti_env, jmethodID method, if (err == JVMTI_ERROR_NONE) { NSK_DISPLAY3("for: \tmethod: name=\"%s\" signature=\"%s\"\n\tnative address=0x%p\n", name, sig, code_addr); - NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)name); - NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)sig); + jvmti_env->Deallocate((unsigned char*)name); + jvmti_env->Deallocate((unsigned char*)sig); } } @@ -148,7 +147,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(caps)); caps.can_generate_compiled_method_load_events = 1; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) { return JNI_ERR; } @@ -158,11 +157,9 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { if (!NSK_VERIFY(nsk_jvmti_init_MA(&callbacks))) return JNI_ERR; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode, - jvmti, JVMTI_ENABLE, JVMTI_EVENT_COMPILED_METHOD_LOAD, NULL))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_COMPILED_METHOD_LOAD, NULL))) return JNI_ERR; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode, - jvmti, JVMTI_ENABLE, JVMTI_EVENT_COMPILED_METHOD_UNLOAD, NULL))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_COMPILED_METHOD_UNLOAD, NULL))) return JNI_ERR; return JNI_OK; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t006/ma10t006a.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t006/ma10t006a.cpp index 5c255b381d8..2ddf7ec6d9c 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t006/ma10t006a.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t006/ma10t006a.cpp @@ -54,17 +54,16 @@ CompiledMethodLoad(jvmtiEnv *jvmti_env, jmethodID method, CompiledMethodLoadEventsCount++; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(GetMethodName, - jvmti_env, method, &name, &signature, NULL))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->GetMethodName(method, &name, &signature, NULL))) { nsk_jvmti_setFailStatus(); return; } NSK_DISPLAY3("CompiledMethodLoad event: %s%s (0x%p)\n", name, signature, code_addr); if (name != NULL) - NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)name); + jvmti_env->Deallocate((unsigned char*)name); if (signature != NULL) - NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)signature); + jvmti_env->Deallocate((unsigned char*)signature); } static void JNICALL @@ -82,8 +81,8 @@ CompiledMethodUnload(jvmtiEnv *jvmti_env, jmethodID method, if (err == JVMTI_ERROR_NONE) { NSK_DISPLAY3("for: \tmethod: name=\"%s\" signature=\"%s\"\n\tnative address=0x%p\n", name, sig, code_addr); - NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)name); - NSK_CPP_STUB2(Deallocate, jvmti_env, (unsigned char*)sig); + jvmti_env->Deallocate((unsigned char*)name); + jvmti_env->Deallocate((unsigned char*)sig); } } @@ -145,7 +144,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(caps)); caps.can_generate_compiled_method_load_events = 1; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) { return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t007/ma10t007.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t007/ma10t007.cpp index 5ea5564c864..cee84708ed6 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t007/ma10t007.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t007/ma10t007.cpp @@ -115,7 +115,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(caps)); caps.can_generate_garbage_collection_events = 1; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) { return JNI_ERR; } @@ -125,11 +125,9 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { if (!NSK_VERIFY(nsk_jvmti_init_MA(&callbacks))) return JNI_ERR; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode, - jvmti, JVMTI_ENABLE, JVMTI_EVENT_GARBAGE_COLLECTION_START, NULL))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_GARBAGE_COLLECTION_START, NULL))) return JNI_ERR; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode, - jvmti, JVMTI_ENABLE, JVMTI_EVENT_GARBAGE_COLLECTION_FINISH, NULL))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_GARBAGE_COLLECTION_FINISH, NULL))) return JNI_ERR; return JNI_OK; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t007/ma10t007a.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t007/ma10t007a.cpp index 05f6e1976c3..e86e00fbc23 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t007/ma10t007a.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t007/ma10t007a.cpp @@ -115,7 +115,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(caps)); caps.can_generate_garbage_collection_events = 1; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) { return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t008/ma10t008.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t008/ma10t008.cpp index a1deb47179e..449f94e64b0 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t008/ma10t008.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t008/ma10t008.cpp @@ -55,8 +55,7 @@ MonitorContendedEnter(jvmtiEnv *jvmti_env, JNIEnv* jni_env, MonitorContendedEnterEventsCount++; /* get thread information */ - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(GetThreadInfo, jvmti_env, - thread, &info))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->GetThreadInfo(thread, &info))) { nsk_jvmti_setFailStatus(); return; } @@ -72,8 +71,7 @@ MonitorContendedEntered(jvmtiEnv *jvmti_env, JNIEnv* jni_env, MonitorContendedEnteredEventsCount++; /* get thread information */ - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(GetThreadInfo, jvmti_env, - thread, &info))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->GetThreadInfo(thread, &info))) { nsk_jvmti_setFailStatus(); return; } @@ -89,8 +87,7 @@ MonitorWait(jvmtiEnv *jvmti_env, JNIEnv* jni_env, MonitorWaitEventsCount++; /* get thread information */ - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(GetThreadInfo, jvmti_env, - thread, &info))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->GetThreadInfo(thread, &info))) { nsk_jvmti_setFailStatus(); return; } @@ -106,8 +103,7 @@ MonitorWaited(jvmtiEnv *jvmti_env, JNIEnv* jni_env, MonitorWaitedEventsCount++; /* get thread information */ - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(GetThreadInfo, jvmti_env, - thread, &info))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->GetThreadInfo(thread, &info))) { nsk_jvmti_setFailStatus(); return; } @@ -189,7 +185,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(caps)); caps.can_generate_monitor_events = 1; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) { return JNI_ERR; } @@ -202,17 +198,13 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { return JNI_ERR; /* enable events */ - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode, - jvmti, JVMTI_ENABLE, JVMTI_EVENT_MONITOR_CONTENDED_ENTER, NULL))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_MONITOR_CONTENDED_ENTER, NULL))) return JNI_ERR; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode, - jvmti, JVMTI_ENABLE, JVMTI_EVENT_MONITOR_CONTENDED_ENTERED, NULL))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_MONITOR_CONTENDED_ENTERED, NULL))) return JNI_ERR; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode, - jvmti, JVMTI_ENABLE, JVMTI_EVENT_MONITOR_WAIT, NULL))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_MONITOR_WAIT, NULL))) return JNI_ERR; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB4(SetEventNotificationMode, - jvmti, JVMTI_ENABLE, JVMTI_EVENT_MONITOR_WAITED, NULL))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_MONITOR_WAITED, NULL))) return JNI_ERR; return JNI_OK; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t008/ma10t008a.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t008/ma10t008a.cpp index 3f059c8f590..9d4c0d81c07 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t008/ma10t008a.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/multienv/MA10/ma10t008/ma10t008a.cpp @@ -55,8 +55,7 @@ MonitorContendedEnter(jvmtiEnv *jvmti_env, JNIEnv* jni_env, MonitorContendedEnterEventsCount++; /* get thread information */ - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(GetThreadInfo, jvmti_env, - thread, &info))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->GetThreadInfo(thread, &info))) { nsk_jvmti_setFailStatus(); return; } @@ -72,8 +71,7 @@ MonitorContendedEntered(jvmtiEnv *jvmti_env, JNIEnv* jni_env, MonitorContendedEnteredEventsCount++; /* get thread information */ - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(GetThreadInfo, jvmti_env, - thread, &info))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->GetThreadInfo(thread, &info))) { nsk_jvmti_setFailStatus(); return; } @@ -89,8 +87,7 @@ MonitorWait(jvmtiEnv *jvmti_env, JNIEnv* jni_env, MonitorWaitEventsCount++; /* get thread information */ - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(GetThreadInfo, jvmti_env, - thread, &info))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->GetThreadInfo(thread, &info))) { nsk_jvmti_setFailStatus(); return; } @@ -106,8 +103,7 @@ MonitorWaited(jvmtiEnv *jvmti_env, JNIEnv* jni_env, MonitorWaitedEventsCount++; /* get thread information */ - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(GetThreadInfo, jvmti_env, - thread, &info))) { + if (!NSK_JVMTI_VERIFY(jvmti_env->GetThreadInfo(thread, &info))) { nsk_jvmti_setFailStatus(); return; } @@ -189,7 +185,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(caps)); caps.can_generate_monitor_events = 1; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) { + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) { return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP01/sp01t001/sp01t001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP01/sp01t001/sp01t001.cpp index d0983ccd288..f0f3bc4a0a3 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP01/sp01t001/sp01t001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP01/sp01t001/sp01t001.cpp @@ -121,37 +121,35 @@ static int prepare() { jsize i; /* find debugee class */ - if (!NSK_JNI_VERIFY(jni, (debugeeClass = - NSK_CPP_STUB2(FindClass, jni, DEBUGEE_CLASS_NAME)) != NULL)) + if (!NSK_JNI_VERIFY(jni, (debugeeClass = jni->FindClass(DEBUGEE_CLASS_NAME)) != NULL)) return NSK_FALSE; /* find static field with threads array */ if (!NSK_JNI_VERIFY(jni, (threadsFieldID = - NSK_CPP_STUB4(GetStaticFieldID, jni, debugeeClass, - THREADS_FIELD_NAME, THREADS_FIELD_SIG)) != NULL)) + jni->GetStaticFieldID(debugeeClass, THREADS_FIELD_NAME, THREADS_FIELD_SIG)) != NULL)) return NSK_FALSE; /* get threads array from static field */ if (!NSK_JNI_VERIFY(jni, (threadsArray = (jobjectArray) - NSK_CPP_STUB3(GetStaticObjectField, jni, debugeeClass, threadsFieldID)) != NULL)) + jni->GetStaticObjectField(debugeeClass, threadsFieldID)) != NULL)) return NSK_FALSE; /* check array length */ if (!NSK_JNI_VERIFY(jni, (threadsArrayLength = - NSK_CPP_STUB2(GetArrayLength, jni, threadsArray)) == THREADS_COUNT)) + jni->GetArrayLength(threadsArray)) == THREADS_COUNT)) return NSK_FALSE; /* get each thread from array */ for (i = 0; i < THREADS_COUNT; i++) { if (!NSK_JNI_VERIFY(jni, (threadsList[i] = (jthread) - NSK_CPP_STUB3(GetObjectArrayElement, jni, threadsArray, i)) != NULL)) + jni->GetObjectArrayElement(threadsArray, i)) != NULL)) return NSK_FALSE; } /* make global references to threads */ for (i = 0; i < THREADS_COUNT; i++) { if (!NSK_JNI_VERIFY(jni, (threadsList[i] = (jthread) - NSK_CPP_STUB2(NewGlobalRef, jni, threadsList[i])) != NULL)) + jni->NewGlobalRef(threadsList[i])) != NULL)) return NSK_FALSE; } @@ -174,8 +172,7 @@ static int checkThreads(const char* kind) { NSK_DISPLAY2(" thread #%d (%s):\n", i, threadsName[i]); /* get thread state */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetThreadState, jvmti, threadsList[i], &state))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetThreadState(threadsList[i], &state))) { nsk_jvmti_setFailStatus(); return NSK_TRUE; } @@ -233,7 +230,7 @@ static int clean() { /* dispose global references to threads */ for (i = 0; i < THREADS_COUNT; i++) { - NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, threadsList[i])); + NSK_TRACE(jni->DeleteGlobalRef(threadsList[i])); } return NSK_TRUE; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP01/sp01t002/sp01t002.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP01/sp01t002/sp01t002.cpp index 66bbbd5c55d..99b3dcc7a38 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP01/sp01t002/sp01t002.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP01/sp01t002/sp01t002.cpp @@ -155,8 +155,7 @@ static int prepare() { } /* get all live threads */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetAllThreads, jvmti, &allThreadsCount, &allThreadsList))) + if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&allThreadsCount, &allThreadsList))) return NSK_FALSE; if (!NSK_VERIFY(allThreadsCount > 0 && allThreadsList != NULL)) @@ -170,8 +169,7 @@ static int prepare() { return NSK_FALSE; /* get thread name (info) */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetThreadInfo, jvmti, allThreadsList[i], &threadInfo))) + if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(allThreadsList[i], &threadInfo))) return NSK_FALSE; /* find by name */ @@ -189,8 +187,7 @@ static int prepare() { } /* deallocate all threads list */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)allThreadsList))) + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)allThreadsList))) return NSK_FALSE; /* check if all tested threads found */ @@ -208,8 +205,7 @@ static int prepare() { /* make global refs */ for (i = 0; i < THREADS_COUNT; i++) { - if (!NSK_JNI_VERIFY(jni, (threadsList[i] = - NSK_CPP_STUB2(NewGlobalRef, jni, threadsList[i])) != NULL)) + if (!NSK_JNI_VERIFY(jni, (threadsList[i] = jni->NewGlobalRef(threadsList[i])) != NULL)) return NSK_FALSE; } @@ -225,13 +221,11 @@ static int suspendThreadsIndividually(int suspend) { for (i = 0; i < THREADS_COUNT; i++) { if (suspend) { NSK_DISPLAY2(" suspend thread #%d (%s)\n", i, threadsName[i]); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(SuspendThread, jvmti, threadsList[i]))) + if (!NSK_JVMTI_VERIFY(jvmti->SuspendThread(threadsList[i]))) nsk_jvmti_setFailStatus(); } else { NSK_DISPLAY2(" resume thread #%d (%s)\n", i, threadsName[i]); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(ResumeThread, jvmti, threadsList[i]))) + if (!NSK_JVMTI_VERIFY(jvmti->ResumeThread(threadsList[i]))) nsk_jvmti_setFailStatus(); } } @@ -260,8 +254,7 @@ static int checkThreads(int suspended, const char* kind, jlong timeout) { /* wait for WAITTIME for thread to reach expected state */ do { /* get thread state */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetThreadState, jvmti, threadsList[i], &state))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetThreadState(threadsList[i], &state))) { nsk_jvmti_setFailStatus(); return NSK_TRUE; } @@ -371,7 +364,7 @@ static int clean() { /* dispose global references to threads */ for (i = 0; i < THREADS_COUNT; i++) { - NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, threadsList[i])); + NSK_TRACE(jni->DeleteGlobalRef(threadsList[i])); } return NSK_TRUE; @@ -449,8 +442,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { jvmtiCapabilities suspendCaps; memset(&suspendCaps, 0, sizeof(suspendCaps)); suspendCaps.can_suspend = 1; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, &suspendCaps))) + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&suspendCaps))) return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP01/sp01t003/sp01t003.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP01/sp01t003/sp01t003.cpp index 585bb08861c..814b4bf3a1e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP01/sp01t003/sp01t003.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP01/sp01t003/sp01t003.cpp @@ -155,8 +155,7 @@ static int prepare() { } /* get all live threads */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetAllThreads, jvmti, &allThreadsCount, &allThreadsList))) + if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&allThreadsCount, &allThreadsList))) return NSK_FALSE; if (!NSK_VERIFY(allThreadsCount > 0 && allThreadsList != NULL)) @@ -170,8 +169,7 @@ static int prepare() { return NSK_FALSE; /* get thread name (info) */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetThreadInfo, jvmti, allThreadsList[i], &threadInfo))) + if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(allThreadsList[i], &threadInfo))) return NSK_FALSE; /* find by name */ @@ -189,8 +187,7 @@ static int prepare() { } /* deallocate all threads list */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)allThreadsList))) + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)allThreadsList))) return NSK_FALSE; /* check if all tested threads found */ @@ -208,8 +205,7 @@ static int prepare() { /* make global refs */ for (i = 0; i < THREADS_COUNT; i++) { - if (!NSK_JNI_VERIFY(jni, (threadsList[i] = - NSK_CPP_STUB2(NewGlobalRef, jni, threadsList[i])) != NULL)) + if (!NSK_JNI_VERIFY(jni, (threadsList[i] = jni->NewGlobalRef(threadsList[i])) != NULL)) return NSK_FALSE; } @@ -226,14 +222,10 @@ static int suspendThreadsList(int suspend) { /* suspend or resume threads list */ if (suspend) { - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(SuspendThreadList, jvmti, THREADS_COUNT, - threadsList, results))) + if (!NSK_JVMTI_VERIFY(jvmti->SuspendThreadList(THREADS_COUNT, threadsList, results))) nsk_jvmti_setFailStatus(); } else { - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(ResumeThreadList, jvmti, THREADS_COUNT, - threadsList, results))) + if (!NSK_JVMTI_VERIFY(jvmti->ResumeThreadList(THREADS_COUNT, threadsList, results))) nsk_jvmti_setFailStatus(); } @@ -273,8 +265,7 @@ static int checkThreads(int suspended, const char* kind, jlong timeout) { /* wait for WAITTIME for thread to reach expected state */ do { /* get thread status */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetThreadState, jvmti, threadsList[i], &state))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetThreadState(threadsList[i], &state))) { nsk_jvmti_setFailStatus(); return NSK_TRUE; } @@ -384,7 +375,7 @@ static int clean() { /* dispose global references to threads */ for (i = 0; i < THREADS_COUNT; i++) { - NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, threadsList[i])); + NSK_TRACE(jni->DeleteGlobalRef(threadsList[i])); } return NSK_TRUE; @@ -462,8 +453,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { jvmtiCapabilities suspendCaps; memset(&suspendCaps, 0, sizeof(suspendCaps)); suspendCaps.can_suspend = 1; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, &suspendCaps))) + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&suspendCaps))) return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP02/sp02t001/sp02t001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP02/sp02t001/sp02t001.cpp index b2e1572fc17..9c926d38cea 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP02/sp02t001/sp02t001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP02/sp02t001/sp02t001.cpp @@ -136,8 +136,7 @@ static int prepare() { } /* get all live threads */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetAllThreads, jvmti, &allThreadsCount, &allThreadsList))) + if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&allThreadsCount, &allThreadsList))) return NSK_FALSE; if (!NSK_VERIFY(allThreadsCount > 0 && allThreadsList != NULL)) @@ -151,8 +150,7 @@ static int prepare() { return NSK_FALSE; /* get thread name (info) */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetThreadInfo, jvmti, allThreadsList[i], &threadInfo))) + if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(allThreadsList[i], &threadInfo))) return NSK_FALSE; /* find by name */ @@ -170,8 +168,7 @@ static int prepare() { } /* deallocate all threads list */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)allThreadsList))) + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)allThreadsList))) return NSK_FALSE; /* check if all tested threads found */ @@ -190,7 +187,7 @@ static int prepare() { /* make global refs */ for (i = 0; i < THREADS_COUNT; i++) { if (!NSK_JNI_VERIFY(jni, (threadsDesc[i].thread = (jthread) - NSK_CPP_STUB2(NewGlobalRef, jni, threadsDesc[i].thread)) != NULL)) + jni->NewGlobalRef(threadsDesc[i].thread)) != NULL)) return NSK_FALSE; } @@ -206,13 +203,11 @@ static int suspendThreadsIndividually(int suspend) { for (i = 0; i < THREADS_COUNT; i++) { if (suspend) { NSK_DISPLAY2(" suspend thread #%d (%s)\n", i, threadsDesc[i].threadName); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(SuspendThread, jvmti, threadsDesc[i].thread))) + if (!NSK_JVMTI_VERIFY(jvmti->SuspendThread(threadsDesc[i].thread))) nsk_jvmti_setFailStatus(); } else { NSK_DISPLAY2(" resume thread #%d (%s)\n", i, threadsDesc[i].threadName); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(ResumeThread, jvmti, threadsDesc[i].thread))) + if (!NSK_JVMTI_VERIFY(jvmti->ResumeThread(threadsDesc[i].thread))) nsk_jvmti_setFailStatus(); } } @@ -241,9 +236,7 @@ static int checkSuspendedThreads() { NSK_DISPLAY2(" thread #%d (%s):\n", i, threadsDesc[i].threadName); /* get frame count */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetFrameCount, jvmti, - threadsDesc[i].thread, &frameCount))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetFrameCount(threadsDesc[i].thread, &frameCount))) { nsk_jvmti_setFailStatus(); return NSK_TRUE; } @@ -252,8 +245,7 @@ static int checkSuspendedThreads() { /* get stack trace */ if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB6(GetStackTrace, jvmti, threadsDesc[i].thread, - 0, MAX_STACK_SIZE, frameStack, &frameStackSize))) { + jvmti->GetStackTrace(threadsDesc[i].thread, 0, MAX_STACK_SIZE, frameStack, &frameStackSize))) { nsk_jvmti_setFailStatus(); return NSK_TRUE; } @@ -294,7 +286,7 @@ static int clean() { /* dispose global references to threads */ for (i = 0; i < THREADS_COUNT; i++) { - NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, threadsDesc[i].thread)); + NSK_TRACE(jni->DeleteGlobalRef(threadsDesc[i].thread)); } return NSK_TRUE; @@ -372,8 +364,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { jvmtiCapabilities suspendCaps; memset(&suspendCaps, 0, sizeof(suspendCaps)); suspendCaps.can_suspend = 1; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, &suspendCaps))) + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&suspendCaps))) return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP02/sp02t002/sp02t002.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP02/sp02t002/sp02t002.cpp index bab083b29c1..f296d9c5908 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP02/sp02t002/sp02t002.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP02/sp02t002/sp02t002.cpp @@ -158,8 +158,7 @@ static int prepare() { } /* get all live threads */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetAllThreads, jvmti, &allThreadsCount, &allThreadsList))) + if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&allThreadsCount, &allThreadsList))) return NSK_FALSE; if (!NSK_VERIFY(allThreadsCount > 0 && allThreadsList != NULL)) @@ -173,8 +172,7 @@ static int prepare() { return NSK_FALSE; /* get thread name (info) */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetThreadInfo, jvmti, allThreadsList[i], &threadInfo))) + if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(allThreadsList[i], &threadInfo))) return NSK_FALSE; /* find by name */ @@ -192,8 +190,7 @@ static int prepare() { } /* deallocate all threads list */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)allThreadsList))) + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)allThreadsList))) return NSK_FALSE; /* check if all tested threads found */ @@ -214,12 +211,11 @@ static int prepare() { for (i = 0; i < THREADS_COUNT; i++) { /* get thread class */ if (!NSK_JNI_VERIFY(jni, (threadsDesc[i].cls = - NSK_CPP_STUB2(GetObjectClass, jni, threadsDesc[i].thread)) != NULL)) + jni->GetObjectClass(threadsDesc[i].thread)) != NULL)) return NSK_FALSE; /* get frame method */ if (!NSK_JNI_VERIFY(jni, (threadsDesc[i].method = - NSK_CPP_STUB4(GetMethodID, jni, threadsDesc[i].cls, - threadsDesc[i].methodName, threadsDesc[i].methodSig)) != NULL)) + jni->GetMethodID(threadsDesc[i].cls, threadsDesc[i].methodName, threadsDesc[i].methodSig)) != NULL)) return NSK_FALSE; NSK_DISPLAY4(" thread #%d (%s): %p (%s)\n", @@ -231,10 +227,10 @@ static int prepare() { /* make global refs */ for (i = 0; i < THREADS_COUNT; i++) { if (!NSK_JNI_VERIFY(jni, (threadsDesc[i].thread = (jthread) - NSK_CPP_STUB2(NewGlobalRef, jni, threadsDesc[i].thread)) != NULL)) + jni->NewGlobalRef(threadsDesc[i].thread)) != NULL)) return NSK_FALSE; if (!NSK_JNI_VERIFY(jni, (threadsDesc[i].cls = (jclass) - NSK_CPP_STUB2(NewGlobalRef, jni, threadsDesc[i].cls)) != NULL)) + jni->NewGlobalRef(threadsDesc[i].cls)) != NULL)) return NSK_FALSE; } @@ -250,13 +246,11 @@ static int suspendThreadsIndividually(int suspend) { for (i = 0; i < THREADS_COUNT; i++) { if (suspend) { NSK_DISPLAY2(" suspend thread #%d (%s)\n", i, threadsDesc[i].threadName); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(SuspendThread, jvmti, threadsDesc[i].thread))) + if (!NSK_JVMTI_VERIFY(jvmti->SuspendThread(threadsDesc[i].thread))) nsk_jvmti_setFailStatus(); } else { NSK_DISPLAY2(" resume thread #%d (%s)\n", i, threadsDesc[i].threadName); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(ResumeThread, jvmti, threadsDesc[i].thread))) + if (!NSK_JVMTI_VERIFY(jvmti->ResumeThread(threadsDesc[i].thread))) nsk_jvmti_setFailStatus(); } } @@ -285,9 +279,7 @@ static int checkThreads(int suspended, const char* kind) { NSK_DISPLAY2(" thread #%d (%s):\n", i, threadsDesc[i].threadName); /* get frame count */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetFrameCount, jvmti, - threadsDesc[i].thread, &frameCount))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetFrameCount(threadsDesc[i].thread, &frameCount))) { nsk_jvmti_setFailStatus(); return NSK_TRUE; } @@ -296,8 +288,7 @@ static int checkThreads(int suspended, const char* kind) { /* get stack trace */ if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB6(GetStackTrace, jvmti, threadsDesc[i].thread, - 0, MAX_STACK_SIZE, frameStack, &frameStackSize))) { + jvmti->GetStackTrace(threadsDesc[i].thread, 0, MAX_STACK_SIZE, frameStack, &frameStackSize))) { nsk_jvmti_setFailStatus(); return NSK_TRUE; } @@ -357,8 +348,8 @@ static int clean() { /* dispose global references to threads */ for (i = 0; i < THREADS_COUNT; i++) { - NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, threadsDesc[i].thread)); - NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, threadsDesc[i].cls)); + NSK_TRACE(jni->DeleteGlobalRef(threadsDesc[i].thread)); + NSK_TRACE(jni->DeleteGlobalRef(threadsDesc[i].cls)); } return NSK_TRUE; @@ -436,8 +427,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { jvmtiCapabilities suspendCaps; memset(&suspendCaps, 0, sizeof(suspendCaps)); suspendCaps.can_suspend = 1; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, &suspendCaps))) + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&suspendCaps))) return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP02/sp02t003/sp02t003.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP02/sp02t003/sp02t003.cpp index 34a62a6df41..363594d72a5 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP02/sp02t003/sp02t003.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP02/sp02t003/sp02t003.cpp @@ -159,8 +159,7 @@ static int prepare() { } /* get all live threads */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetAllThreads, jvmti, &allThreadsCount, &allThreadsList))) + if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&allThreadsCount, &allThreadsList))) return NSK_FALSE; if (!NSK_VERIFY(allThreadsCount > 0 && allThreadsList != NULL)) @@ -174,8 +173,7 @@ static int prepare() { return NSK_FALSE; /* get thread name (info) */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetThreadInfo, jvmti, allThreadsList[i], &threadInfo))) + if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(allThreadsList[i], &threadInfo))) return NSK_FALSE; /* find by name */ @@ -193,8 +191,7 @@ static int prepare() { } /* deallocate all threads list */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)allThreadsList))) + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)allThreadsList))) return NSK_FALSE; /* check if all tested threads found */ @@ -215,12 +212,11 @@ static int prepare() { for (i = 0; i < THREADS_COUNT; i++) { /* get thread class */ if (!NSK_JNI_VERIFY(jni, (threadsDesc[i].cls = - NSK_CPP_STUB2(GetObjectClass, jni, threadsDesc[i].thread)) != NULL)) + jni->GetObjectClass(threadsDesc[i].thread)) != NULL)) return NSK_FALSE; /* get frame method */ if (!NSK_JNI_VERIFY(jni, (threadsDesc[i].method = - NSK_CPP_STUB4(GetMethodID, jni, threadsDesc[i].cls, - threadsDesc[i].methodName, threadsDesc[i].methodSig)) != NULL)) + jni->GetMethodID(threadsDesc[i].cls, threadsDesc[i].methodName, threadsDesc[i].methodSig)) != NULL)) return NSK_FALSE; NSK_DISPLAY4(" thread #%d (%s): %p (%s)\n", @@ -232,10 +228,10 @@ static int prepare() { /* make global refs */ for (i = 0; i < THREADS_COUNT; i++) { if (!NSK_JNI_VERIFY(jni, (threadsDesc[i].thread = (jthread) - NSK_CPP_STUB2(NewGlobalRef, jni, threadsDesc[i].thread)) != NULL)) + jni->NewGlobalRef(threadsDesc[i].thread)) != NULL)) return NSK_FALSE; if (!NSK_JNI_VERIFY(jni, (threadsDesc[i].cls = (jclass) - NSK_CPP_STUB2(NewGlobalRef, jni, threadsDesc[i].cls)) != NULL)) + jni->NewGlobalRef(threadsDesc[i].cls)) != NULL)) return NSK_FALSE; } @@ -251,13 +247,11 @@ static int suspendThreadsIndividually(int suspend) { for (i = 0; i < THREADS_COUNT; i++) { if (suspend) { NSK_DISPLAY2(" suspend thread #%d (%s)\n", i, threadsDesc[i].threadName); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(SuspendThread, jvmti, threadsDesc[i].thread))) + if (!NSK_JVMTI_VERIFY(jvmti->SuspendThread(threadsDesc[i].thread))) nsk_jvmti_setFailStatus(); } else { NSK_DISPLAY2(" resume thread #%d (%s)\n", i, threadsDesc[i].threadName); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(ResumeThread, jvmti, threadsDesc[i].thread))) + if (!NSK_JVMTI_VERIFY(jvmti->ResumeThread(threadsDesc[i].thread))) nsk_jvmti_setFailStatus(); } } @@ -288,9 +282,7 @@ static int checkThreads(int suspended, const char* kind) { NSK_DISPLAY2(" thread #%d (%s):\n", i, threadsDesc[i].threadName); /* get frame count */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetFrameCount, jvmti, - threadsDesc[i].thread, &frameCount))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetFrameCount(threadsDesc[i].thread, &frameCount))) { nsk_jvmti_setFailStatus(); return NSK_TRUE; } @@ -298,8 +290,7 @@ static int checkThreads(int suspended, const char* kind) { /* get stack trace */ if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB6(GetStackTrace, jvmti, threadsDesc[i].thread, - 0, MAX_STACK_SIZE, frameStack, &frameStackSize))) { + jvmti->GetStackTrace(threadsDesc[i].thread, 0, MAX_STACK_SIZE, frameStack, &frameStackSize))) { nsk_jvmti_setFailStatus(); return NSK_TRUE; } @@ -319,8 +310,7 @@ static int checkThreads(int suspended, const char* kind) { (long)frameStack[j].location); /* query frame location */ if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB5(GetFrameLocation, jvmti, threadsDesc[i].thread, - j, &qMethod, &qLocation))) { + jvmti->GetFrameLocation(threadsDesc[i].thread, j, &qMethod, &qLocation))) { nsk_jvmti_setFailStatus(); continue; } @@ -375,8 +365,8 @@ static int clean() { /* dispose global references to threads */ for (i = 0; i < THREADS_COUNT; i++) { - NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, threadsDesc[i].thread)); - NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, threadsDesc[i].cls)); + NSK_TRACE(jni->DeleteGlobalRef(threadsDesc[i].thread)); + NSK_TRACE(jni->DeleteGlobalRef(threadsDesc[i].cls)); } return NSK_TRUE; @@ -453,8 +443,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { jvmtiCapabilities suspendCaps; memset(&suspendCaps, 0, sizeof(suspendCaps)); suspendCaps.can_suspend = 1; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, &suspendCaps))) + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&suspendCaps))) return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP03/sp03t001/sp03t001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP03/sp03t001/sp03t001.cpp index b46d106433d..b0560a13a1f 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP03/sp03t001/sp03t001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP03/sp03t001/sp03t001.cpp @@ -158,9 +158,8 @@ static int prepare() { threadsCounts[i] = 0; threadsList[i] = NULL; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(Allocate, jvmti, (threadsCount * sizeof(jthread)), - (unsigned char**)&threadsList[i]))) + if (!NSK_JVMTI_VERIFY(jvmti->Allocate(threadsCount * sizeof(jthread), + (unsigned char**)&threadsList[i]))) return NSK_FALSE; for (j = 0; j < threadsCount; j++) { @@ -169,8 +168,7 @@ static int prepare() { } /* get all live threads */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetAllThreads, jvmti, &allThreadsCount, &allThreadsList))) + if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&allThreadsCount, &allThreadsList))) return NSK_FALSE; if (!NSK_VERIFY(allThreadsCount > 0 && allThreadsList != NULL)) @@ -184,8 +182,7 @@ static int prepare() { return NSK_FALSE; /* get thread name (info) */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetThreadInfo, jvmti, allThreadsList[i], &threadInfo))) + if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(allThreadsList[i], &threadInfo))) return NSK_FALSE; /* find by name */ @@ -202,8 +199,7 @@ static int prepare() { } /* deallocate all threads list */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)allThreadsList))) + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)allThreadsList))) return NSK_FALSE; /* check if all tested threads found */ @@ -226,7 +222,7 @@ static int prepare() { for (i = 0; i < THREADS_KINDS; i++) { for (j = 0; j < threadsCount; j++) { if (!NSK_JNI_VERIFY(jni, (threadsList[i][j] = - NSK_CPP_STUB2(NewGlobalRef, jni, threadsList[i][j])) != NULL)) + jni->NewGlobalRef(threadsList[i][j])) != NULL)) return NSK_FALSE; } } @@ -244,8 +240,7 @@ static int suspendThreadsList(int suspend) { int i, j; /* allocate results array */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(Allocate, jvmti, resultsSize, (unsigned char**)&results))) { + if (!NSK_JVMTI_VERIFY(jvmti->Allocate(resultsSize, (unsigned char**)&results))) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -253,14 +248,10 @@ static int suspendThreadsList(int suspend) { for (i = 0; i < THREADS_KINDS; i++) { /* suspend or resume threads list */ if (suspend) { - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(SuspendThreadList, jvmti, threadsCount, - threadsList[i], results))) + if (!NSK_JVMTI_VERIFY(jvmti->SuspendThreadList(threadsCount, threadsList[i], results))) nsk_jvmti_setFailStatus(); } else { - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(ResumeThreadList, jvmti, threadsCount, - threadsList[i], results))) + if (!NSK_JVMTI_VERIFY(jvmti->ResumeThreadList(threadsCount, threadsList[i], results))) nsk_jvmti_setFailStatus(); } @@ -277,8 +268,7 @@ static int suspendThreadsList(int suspend) { } /* deallocate results array */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)results))) { + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)results))) { nsk_jvmti_setFailStatus(); } @@ -295,13 +285,11 @@ static int suspendThreadsIndividually(int suspend) { for (j = 0; j < threadsCount; j++) { if (suspend) { NSK_DISPLAY2(" suspend thread #%d (%s)\n", j, threadsName[i]); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(SuspendThread, jvmti, threadsList[i][j]))) + if (!NSK_JVMTI_VERIFY(jvmti->SuspendThread(threadsList[i][j]))) nsk_jvmti_setFailStatus(); } else { NSK_DISPLAY2(" resume thread #%d (%s)\n", j, threadsName[i]); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(ResumeThread, jvmti, threadsList[i][j]))) + if (!NSK_JVMTI_VERIFY(jvmti->ResumeThread(threadsList[i][j]))) nsk_jvmti_setFailStatus(); } } @@ -329,8 +317,7 @@ static int checkThreads(int suspended, const char* kind, jlong timeout) { NSK_DISPLAY2(" thread #%d (%s):\n", j, threadsName[i]); /* get thread state */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetThreadState, jvmti, threadsList[i][j], &state))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetThreadState(threadsList[i][j], &state))) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -373,14 +360,13 @@ static int clean() { /* dispose global references to threads */ for (i = 0; i < THREADS_KINDS; i++) { for (j = 0; j < threadsCount; j++) { - NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, threadsList[i][j])); + NSK_TRACE(jni->DeleteGlobalRef(threadsList[i][j])); } } /* deallocate memory */ for (i = 0; i < THREADS_KINDS; i++) { - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threadsList[i]))) + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threadsList[i]))) return NSK_FALSE; threadsList[i] = NULL; } @@ -465,8 +451,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { jvmtiCapabilities suspendCaps; memset(&suspendCaps, 0, sizeof(suspendCaps)); suspendCaps.can_suspend = 1; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, &suspendCaps))) + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&suspendCaps))) return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP03/sp03t002/sp03t002.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP03/sp03t002/sp03t002.cpp index 9262797640f..986d1113fc6 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP03/sp03t002/sp03t002.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP03/sp03t002/sp03t002.cpp @@ -161,9 +161,8 @@ static int prepare() { threadsCounts[i] = 0; threadsList[i] = NULL; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(Allocate, jvmti, (threadsCount * sizeof(jthread)), - (unsigned char**)&threadsList[i]))) + if (!NSK_JVMTI_VERIFY(jvmti->Allocate(threadsCount * sizeof(jthread), + (unsigned char**)&threadsList[i]))) return NSK_FALSE; for (j = 0; j < threadsCount; j++) { @@ -172,8 +171,7 @@ static int prepare() { } /* get all live threads */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetAllThreads, jvmti, &allThreadsCount, &allThreadsList))) + if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&allThreadsCount, &allThreadsList))) return NSK_FALSE; if (!NSK_VERIFY(allThreadsCount > 0 && allThreadsList != NULL)) @@ -187,8 +185,7 @@ static int prepare() { return NSK_FALSE; /* get thread name (info) */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetThreadInfo, jvmti, allThreadsList[i], &threadInfo))) + if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(allThreadsList[i], &threadInfo))) return NSK_FALSE; /* find by name */ @@ -205,8 +202,7 @@ static int prepare() { } /* deallocate all threads list */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)allThreadsList))) + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)allThreadsList))) return NSK_FALSE; /* check if all tested threads found */ @@ -229,7 +225,7 @@ static int prepare() { for (i = 0; i < THREADS_KINDS; i++) { for (j = 0; j < threadsCount; j++) { if (!NSK_JNI_VERIFY(jni, (threadsList[i][j] = - NSK_CPP_STUB2(NewGlobalRef, jni, threadsList[i][j])) != NULL)) + jni->NewGlobalRef(threadsList[i][j])) != NULL)) return NSK_FALSE; } } @@ -247,8 +243,7 @@ static int suspendThreadsList(int suspend) { int i, j; /* allocate results array */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(Allocate, jvmti, resultsSize, (unsigned char**)&results))) { + if (!NSK_JVMTI_VERIFY(jvmti->Allocate(resultsSize, (unsigned char**)&results))) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -256,14 +251,10 @@ static int suspendThreadsList(int suspend) { for (i = 0; i < THREADS_KINDS; i++) { /* suspend or resume threads list */ if (suspend) { - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(SuspendThreadList, jvmti, threadsCount, - threadsList[i], results))) + if (!NSK_JVMTI_VERIFY(jvmti->SuspendThreadList(threadsCount, threadsList[i], results))) nsk_jvmti_setFailStatus(); } else { - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(ResumeThreadList, jvmti, threadsCount, - threadsList[i], results))) + if (!NSK_JVMTI_VERIFY(jvmti->ResumeThreadList(threadsCount, threadsList[i], results))) nsk_jvmti_setFailStatus(); } @@ -280,8 +271,7 @@ static int suspendThreadsList(int suspend) { } /* deallocate results array */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)results))) { + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)results))) { nsk_jvmti_setFailStatus(); } @@ -298,13 +288,11 @@ static int suspendThreadsIndividually(int suspend) { for (j = 0; j < threadsCount; j++) { if (suspend) { NSK_DISPLAY2(" suspend thread #%d (%s)\n", j, threadsName[i]); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(SuspendThread, jvmti, threadsList[i][j]))) + if (!NSK_JVMTI_VERIFY(jvmti->SuspendThread(threadsList[i][j]))) nsk_jvmti_setFailStatus(); } else { NSK_DISPLAY2(" resume thread #%d (%s)\n", j, threadsName[i]); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(ResumeThread, jvmti, threadsList[i][j]))) + if (!NSK_JVMTI_VERIFY(jvmti->ResumeThread(threadsList[i][j]))) nsk_jvmti_setFailStatus(); } } @@ -332,8 +320,7 @@ static int checkThreads(int suspended, const char* kind, jlong timeout) { NSK_DISPLAY2(" thread #%d (%s):\n", j, threadsName[i]); /* get thread state */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetThreadState, jvmti, threadsList[i][j], &state))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetThreadState(threadsList[i][j], &state))) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -376,14 +363,13 @@ static int clean() { /* dispose global references to threads */ for (i = 0; i < THREADS_KINDS; i++) { for (j = 0; j < threadsCount; j++) { - NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, threadsList[i][j])); + NSK_TRACE(jni->DeleteGlobalRef(threadsList[i][j])); } } /* deallocate memory */ for (i = 0; i < THREADS_KINDS; i++) { - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threadsList[i]))) + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threadsList[i]))) return NSK_FALSE; threadsList[i] = NULL; } @@ -468,8 +454,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { jvmtiCapabilities suspendCaps; memset(&suspendCaps, 0, sizeof(suspendCaps)); suspendCaps.can_suspend = 1; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, &suspendCaps))) + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&suspendCaps))) return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP04/sp04t001/sp04t001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP04/sp04t001/sp04t001.cpp index fe0d389f459..45657600f9e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP04/sp04t001/sp04t001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP04/sp04t001/sp04t001.cpp @@ -158,9 +158,8 @@ static int prepare() { threadsCounts[i] = 0; threadsList[i] = NULL; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(Allocate, jvmti, (threadsCount * sizeof(jthread)), - (unsigned char**)&threadsList[i]))) + if (!NSK_JVMTI_VERIFY(jvmti->Allocate(threadsCount * sizeof(jthread), + (unsigned char**)&threadsList[i]))) return NSK_FALSE; for (j = 0; j < threadsCount; j++) { @@ -169,8 +168,7 @@ static int prepare() { } /* get all live threads */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetAllThreads, jvmti, &allThreadsCount, &allThreadsList))) + if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&allThreadsCount, &allThreadsList))) return NSK_FALSE; if (!NSK_VERIFY(allThreadsCount > 0 && allThreadsList != NULL)) @@ -184,8 +182,7 @@ static int prepare() { return NSK_FALSE; /* get thread name (info) */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetThreadInfo, jvmti, allThreadsList[i], &threadInfo))) + if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(allThreadsList[i], &threadInfo))) return NSK_FALSE; /* find by name */ @@ -202,8 +199,7 @@ static int prepare() { } /* deallocate all threads list */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)allThreadsList))) + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)allThreadsList))) return NSK_FALSE; /* check if all tested threads found */ @@ -226,7 +222,7 @@ static int prepare() { for (i = 0; i < THREADS_KINDS; i++) { for (j = 0; j < threadsCount; j++) { if (!NSK_JNI_VERIFY(jni, (threadsList[i][j] = - NSK_CPP_STUB2(NewGlobalRef, jni, threadsList[i][j])) != NULL)) + jni->NewGlobalRef(threadsList[i][j])) != NULL)) return NSK_FALSE; } } @@ -244,8 +240,7 @@ static int suspendThreadsList(int suspend) { int i, j; /* allocate results array */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(Allocate, jvmti, resultsSize, (unsigned char**)&results))) { + if (!NSK_JVMTI_VERIFY(jvmti->Allocate(resultsSize, (unsigned char**)&results))) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -253,14 +248,10 @@ static int suspendThreadsList(int suspend) { for (i = 0; i < THREADS_KINDS; i++) { /* suspend or resume threads list */ if (suspend) { - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(SuspendThreadList, jvmti, threadsCount, - threadsList[i], results))) + if (!NSK_JVMTI_VERIFY(jvmti->SuspendThreadList(threadsCount, threadsList[i], results))) nsk_jvmti_setFailStatus(); } else { - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(ResumeThreadList, jvmti, threadsCount, - threadsList[i], results))) + if (!NSK_JVMTI_VERIFY(jvmti->ResumeThreadList(threadsCount, threadsList[i], results))) nsk_jvmti_setFailStatus(); } @@ -277,8 +268,7 @@ static int suspendThreadsList(int suspend) { } /* deallocate results array */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)results))) { + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)results))) { nsk_jvmti_setFailStatus(); } @@ -295,13 +285,11 @@ static int suspendThreadsIndividually(int suspend) { for (j = 0; j < threadsCount; j++) { if (suspend) { NSK_DISPLAY2(" suspend thread #%d (%s)\n", j, threadsName[i]); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(SuspendThread, jvmti, threadsList[i][j]))) + if (!NSK_JVMTI_VERIFY(jvmti->SuspendThread(threadsList[i][j]))) nsk_jvmti_setFailStatus(); } else { NSK_DISPLAY2(" resume thread #%d (%s)\n", j, threadsName[i]); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(ResumeThread, jvmti, threadsList[i][j]))) + if (!NSK_JVMTI_VERIFY(jvmti->ResumeThread(threadsList[i][j]))) nsk_jvmti_setFailStatus(); } } @@ -329,8 +317,7 @@ static int checkThreads(int suspended, const char* kind, jlong timeout) { NSK_DISPLAY2(" thread #%d (%s):\n", j, threadsName[i]); /* get thread state */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetThreadState, jvmti, threadsList[i][j], &state))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetThreadState(threadsList[i][j], &state))) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -373,14 +360,13 @@ static int clean() { /* dispose global references to threads */ for (i = 0; i < THREADS_KINDS; i++) { for (j = 0; j < threadsCount; j++) { - NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, threadsList[i][j])); + NSK_TRACE(jni->DeleteGlobalRef(threadsList[i][j])); } } /* deallocate memory */ for (i = 0; i < THREADS_KINDS; i++) { - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threadsList[i]))) + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threadsList[i]))) return NSK_FALSE; threadsList[i] = NULL; } @@ -465,8 +451,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { jvmtiCapabilities suspendCaps; memset(&suspendCaps, 0, sizeof(suspendCaps)); suspendCaps.can_suspend = 1; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, &suspendCaps))) + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&suspendCaps))) return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP04/sp04t002/sp04t002.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP04/sp04t002/sp04t002.cpp index 8fda6746c76..5122bd4fe55 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP04/sp04t002/sp04t002.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP04/sp04t002/sp04t002.cpp @@ -158,9 +158,8 @@ static int prepare() { threadsCounts[i] = 0; threadsList[i] = NULL; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(Allocate, jvmti, (threadsCount * sizeof(jthread)), - (unsigned char**)&threadsList[i]))) + if (!NSK_JVMTI_VERIFY(jvmti->Allocate(threadsCount * sizeof(jthread), + (unsigned char**)&threadsList[i]))) return NSK_FALSE; for (j = 0; j < threadsCount; j++) { @@ -169,8 +168,7 @@ static int prepare() { } /* get all live threads */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetAllThreads, jvmti, &allThreadsCount, &allThreadsList))) + if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&allThreadsCount, &allThreadsList))) return NSK_FALSE; if (!NSK_VERIFY(allThreadsCount > 0 && allThreadsList != NULL)) @@ -184,8 +182,7 @@ static int prepare() { return NSK_FALSE; /* get thread name (info) */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetThreadInfo, jvmti, allThreadsList[i], &threadInfo))) + if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(allThreadsList[i], &threadInfo))) return NSK_FALSE; /* find by name */ @@ -202,8 +199,7 @@ static int prepare() { } /* deallocate all threads list */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)allThreadsList))) + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)allThreadsList))) return NSK_FALSE; /* check if all tested threads found */ @@ -226,7 +222,7 @@ static int prepare() { for (i = 0; i < THREADS_KINDS; i++) { for (j = 0; j < threadsCount; j++) { if (!NSK_JNI_VERIFY(jni, (threadsList[i][j] = - NSK_CPP_STUB2(NewGlobalRef, jni, threadsList[i][j])) != NULL)) + jni->NewGlobalRef(threadsList[i][j])) != NULL)) return NSK_FALSE; } } @@ -244,8 +240,7 @@ static int suspendThreadsList(int suspend) { int i, j; /* allocate results array */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(Allocate, jvmti, resultsSize, (unsigned char**)&results))) { + if (!NSK_JVMTI_VERIFY(jvmti->Allocate(resultsSize, (unsigned char**)&results))) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -253,14 +248,10 @@ static int suspendThreadsList(int suspend) { for (i = 0; i < THREADS_KINDS; i++) { /* suspend or resume threads list */ if (suspend) { - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(SuspendThreadList, jvmti, threadsCount, - threadsList[i], results))) + if (!NSK_JVMTI_VERIFY(jvmti->SuspendThreadList(threadsCount, threadsList[i], results))) nsk_jvmti_setFailStatus(); } else { - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(ResumeThreadList, jvmti, threadsCount, - threadsList[i], results))) + if (!NSK_JVMTI_VERIFY(jvmti->ResumeThreadList(threadsCount, threadsList[i], results))) nsk_jvmti_setFailStatus(); } @@ -277,8 +268,7 @@ static int suspendThreadsList(int suspend) { } /* deallocate results array */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)results))) { + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)results))) { nsk_jvmti_setFailStatus(); } @@ -295,13 +285,11 @@ static int suspendThreadsIndividually(int suspend) { for (j = 0; j < threadsCount; j++) { if (suspend) { NSK_DISPLAY2(" suspend thread #%d (%s)\n", j, threadsName[i]); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(SuspendThread, jvmti, threadsList[i][j]))) + if (!NSK_JVMTI_VERIFY(jvmti->SuspendThread(threadsList[i][j]))) nsk_jvmti_setFailStatus(); } else { NSK_DISPLAY2(" resume thread #%d (%s)\n", j, threadsName[i]); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(ResumeThread, jvmti, threadsList[i][j]))) + if (!NSK_JVMTI_VERIFY(jvmti->ResumeThread(threadsList[i][j]))) nsk_jvmti_setFailStatus(); } } @@ -329,8 +317,7 @@ static int checkThreads(int suspended, const char* kind, jlong timeout) { NSK_DISPLAY2(" thread #%d (%s):\n", j, threadsName[i]); /* get thread state */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetThreadState, jvmti, threadsList[i][j], &state))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetThreadState(threadsList[i][j], &state))) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -373,14 +360,13 @@ static int clean() { /* dispose global references to threads */ for (i = 0; i < THREADS_KINDS; i++) { for (j = 0; j < threadsCount; j++) { - NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, threadsList[i][j])); + NSK_TRACE(jni->DeleteGlobalRef(threadsList[i][j])); } } /* deallocate memory */ for (i = 0; i < THREADS_KINDS; i++) { - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threadsList[i]))) + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threadsList[i]))) return NSK_FALSE; threadsList[i] = NULL; } @@ -465,8 +451,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { jvmtiCapabilities suspendCaps; memset(&suspendCaps, 0, sizeof(suspendCaps)); suspendCaps.can_suspend = 1; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, &suspendCaps))) + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&suspendCaps))) return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP05/sp05t002/sp05t002.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP05/sp05t002/sp05t002.cpp index 1dcfe907c30..04a3b498e3f 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP05/sp05t002/sp05t002.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP05/sp05t002/sp05t002.cpp @@ -143,9 +143,7 @@ static int enableEvents(jvmtiEventMode enable) { int i; for (i = 0; i < EVENTS_COUNT; i++) { - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(SetEventNotificationMode, jvmti, enable, - eventsList[i], NULL))) { + if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(enable, eventsList[i], NULL))) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -168,37 +166,35 @@ static int prepare() { jsize i; /* find debugee class */ - if (!NSK_JNI_VERIFY(jni, (debugeeClass = - NSK_CPP_STUB2(FindClass, jni, DEBUGEE_CLASS_NAME)) != NULL)) + if (!NSK_JNI_VERIFY(jni, (debugeeClass = jni->FindClass(DEBUGEE_CLASS_NAME)) != NULL)) return NSK_FALSE; /* find static field with threads array */ if (!NSK_JNI_VERIFY(jni, (threadsFieldID = - NSK_CPP_STUB4(GetStaticFieldID, jni, debugeeClass, - THREADS_FIELD_NAME, THREADS_FIELD_SIG)) != NULL)) + jni->GetStaticFieldID(debugeeClass, THREADS_FIELD_NAME, THREADS_FIELD_SIG)) != NULL)) return NSK_FALSE; /* get threads array from static field */ if (!NSK_JNI_VERIFY(jni, (threadsArray = (jobjectArray) - NSK_CPP_STUB3(GetStaticObjectField, jni, debugeeClass, threadsFieldID)) != NULL)) + jni->GetStaticObjectField(debugeeClass, threadsFieldID)) != NULL)) return NSK_FALSE; /* check array length */ if (!NSK_JNI_VERIFY(jni, (threadsArrayLength = - NSK_CPP_STUB2(GetArrayLength, jni, threadsArray)) == THREADS_COUNT)) + jni->GetArrayLength(threadsArray)) == THREADS_COUNT)) return NSK_FALSE; /* get each thread from array */ for (i = 0; i < THREADS_COUNT; i++) { if (!NSK_JNI_VERIFY(jni, (threadsList[i] = (jthread) - NSK_CPP_STUB3(GetObjectArrayElement, jni, threadsArray, i)) != NULL)) + jni->GetObjectArrayElement(threadsArray, i)) != NULL)) return NSK_FALSE; } /* make global references to threads */ for (i = 0; i < THREADS_COUNT; i++) { if (!NSK_JNI_VERIFY(jni, (threadsList[i] = (jthread) - NSK_CPP_STUB2(NewGlobalRef, jni, threadsList[i])) != NULL)) + jni->NewGlobalRef(threadsList[i])) != NULL)) return NSK_FALSE; } @@ -218,8 +214,7 @@ static int checkThread(jthread thread, int i, const char* kind) { NSK_DISPLAY3(" thread #%d (%s): %p\n", i, threadsName[i], (void*)thread); /* get frames count */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetFrameCount, jvmti, thread, &framesCount))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetFrameCount(thread, &framesCount))) { nsk_jvmti_setFailStatus(); return NSK_TRUE; } @@ -227,8 +222,7 @@ static int checkThread(jthread thread, int i, const char* kind) { /* get stack frames */ if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB6(GetStackTrace, jvmti, thread, 0, MAX_STACK_DEPTH, - stackFrames, &stackDepth))) { + jvmti->GetStackTrace(thread, 0, MAX_STACK_DEPTH, stackFrames, &stackDepth))) { nsk_jvmti_setFailStatus(); return NSK_TRUE; } @@ -269,7 +263,7 @@ static int clean() { /* dispose global references to threads */ for (i = 0; i < THREADS_COUNT; i++) { - NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, threadsList[i])); + NSK_TRACE(jni->DeleteGlobalRef(threadsList[i])); } return NSK_TRUE; @@ -293,7 +287,7 @@ callbackThreadStart(jvmtiEnv* jvmti, JNIEnv* jni, jthread thread) { /* check if event is for tested thread */ for (i = 0; i < THREADS_COUNT; i++) { - if (NSK_CPP_STUB3(IsSameObject, jni, threadsList[i], thread)) { + if (jni->IsSameObject(threadsList[i], thread)) { NSK_DISPLAY0("SUCCESS: expected THREAD_START event\n"); eventsStart++; @@ -320,7 +314,7 @@ callbackThreadEnd(jvmtiEnv* jvmti, JNIEnv* jni, jthread thread) { /* check if event is for tested thread */ for (i = 0; i < THREADS_COUNT; i++) { - if (NSK_CPP_STUB3(IsSameObject, jni, threadsList[i], thread)) { + if (jni->IsSameObject(threadsList[i], thread)) { NSK_DISPLAY0("SUCCESS: expected THREAD_START event\n"); eventsEnd++; @@ -403,9 +397,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&eventCallbacks, 0, sizeof(eventCallbacks)); eventCallbacks.ThreadStart = callbackThreadStart; eventCallbacks.ThreadEnd = callbackThreadEnd; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, - &eventCallbacks, sizeof(eventCallbacks)))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks)))) return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP05/sp05t003/sp05t003.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP05/sp05t003/sp05t003.cpp index a796d53b9f7..ca166b6f85d 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP05/sp05t003/sp05t003.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP05/sp05t003/sp05t003.cpp @@ -100,8 +100,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* agentJNI, void* arg) { { eventsStart = 0; if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(SetEventNotificationMode, jvmti, JVMTI_ENABLE, - JVMTI_EVENT_THREAD_START, NULL))) { + jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_THREAD_START, NULL))) { nsk_jvmti_setFailStatus(); return; } @@ -122,8 +121,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* agentJNI, void* arg) { } if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(SetEventNotificationMode, jvmti, JVMTI_DISABLE, - JVMTI_EVENT_THREAD_START, NULL))) { + jvmti->SetEventNotificationMode(JVMTI_DISABLE, JVMTI_EVENT_THREAD_START, NULL))) { nsk_jvmti_setFailStatus(); } @@ -152,8 +150,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* agentJNI, void* arg) { { eventsEnd = 0; if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(SetEventNotificationMode, jvmti, JVMTI_ENABLE, - JVMTI_EVENT_THREAD_END, NULL))) { + jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_THREAD_END, NULL))) { nsk_jvmti_setFailStatus(); return; } @@ -174,8 +171,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* agentJNI, void* arg) { } if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB4(SetEventNotificationMode, jvmti, JVMTI_DISABLE, - JVMTI_EVENT_THREAD_END, NULL))) { + jvmti->SetEventNotificationMode(JVMTI_DISABLE, JVMTI_EVENT_THREAD_END, NULL))) { nsk_jvmti_setFailStatus(); } @@ -221,8 +217,7 @@ static int resumeThreads(const char* kind) { int i; for (i = 0; i < THREADS_COUNT; i++) { - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(ResumeThread, jvmti, threadsList[i]))) { + if (!NSK_JVMTI_VERIFY(jvmti->ResumeThread(threadsList[i]))) { nsk_jvmti_setFailStatus(); } } @@ -243,37 +238,35 @@ static int prepare() { jsize i; /* find debugee class */ - if (!NSK_JNI_VERIFY(jni, (debugeeClass = - NSK_CPP_STUB2(FindClass, jni, DEBUGEE_CLASS_NAME)) != NULL)) + if (!NSK_JNI_VERIFY(jni, (debugeeClass = jni->FindClass(DEBUGEE_CLASS_NAME)) != NULL)) return NSK_FALSE; /* find static field with threads array */ if (!NSK_JNI_VERIFY(jni, (threadsFieldID = - NSK_CPP_STUB4(GetStaticFieldID, jni, debugeeClass, - THREADS_FIELD_NAME, THREADS_FIELD_SIG)) != NULL)) + jni->GetStaticFieldID(debugeeClass, THREADS_FIELD_NAME, THREADS_FIELD_SIG)) != NULL)) return NSK_FALSE; /* get threads array from static field */ if (!NSK_JNI_VERIFY(jni, (threadsArray = (jobjectArray) - NSK_CPP_STUB3(GetStaticObjectField, jni, debugeeClass, threadsFieldID)) != NULL)) + jni->GetStaticObjectField(debugeeClass, threadsFieldID)) != NULL)) return NSK_FALSE; /* check array length */ if (!NSK_JNI_VERIFY(jni, (threadsArrayLength = - NSK_CPP_STUB2(GetArrayLength, jni, threadsArray)) == THREADS_COUNT)) + jni->GetArrayLength(threadsArray)) == THREADS_COUNT)) return NSK_FALSE; /* get each thread from array */ for (i = 0; i < THREADS_COUNT; i++) { if (!NSK_JNI_VERIFY(jni, (threadsList[i] = (jthread) - NSK_CPP_STUB3(GetObjectArrayElement, jni, threadsArray, i)) != NULL)) + jni->GetObjectArrayElement(threadsArray, i)) != NULL)) return NSK_FALSE; } /* make global references to threads */ for (i = 0; i < THREADS_COUNT; i++) { if (!NSK_JNI_VERIFY(jni, (threadsList[i] = (jthread) - NSK_CPP_STUB2(NewGlobalRef, jni, threadsList[i])) != NULL)) + jni->NewGlobalRef(threadsList[i])) != NULL)) return NSK_FALSE; } @@ -293,8 +286,7 @@ static int checkThread(jthread thread, int i, const char* kind) { NSK_DISPLAY3(" thread #%d (%s): %p\n", i, threadsName[i], (void*)thread); /* get frames count */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetFrameCount, jvmti, thread, &framesCount))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetFrameCount(thread, &framesCount))) { nsk_jvmti_setFailStatus(); return NSK_TRUE; } @@ -302,8 +294,7 @@ static int checkThread(jthread thread, int i, const char* kind) { /* get stack frames */ if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB6(GetStackTrace, jvmti, thread, 0, MAX_STACK_DEPTH, - stackFrames, &stackDepth))) { + jvmti->GetStackTrace(thread, 0, MAX_STACK_DEPTH, stackFrames, &stackDepth))) { nsk_jvmti_setFailStatus(); return NSK_TRUE; } @@ -355,7 +346,7 @@ static int clean() { /* dispose global references to threads */ for (i = 0; i < THREADS_COUNT; i++) { - NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, threadsList[i])); + NSK_TRACE(jni->DeleteGlobalRef(threadsList[i])); } return NSK_TRUE; @@ -379,15 +370,14 @@ callbackThreadStart(jvmtiEnv* jvmti, JNIEnv* jni, jthread thread) { /* check if event is for tested thread */ for (i = 0; i < THREADS_COUNT; i++) { - if (NSK_CPP_STUB3(IsSameObject, jni, threadsList[i], thread)) { + if (jni->IsSameObject(threadsList[i], thread)) { NSK_DISPLAY0("SUCCESS: expected THREAD_START event\n"); /* suspend thread */ NSK_DISPLAY3(" suspend starting thread #%d (%s): %p\n", i, threadsName[i], (void*)thread); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(SuspendThread, jvmti, thread))) { + if (!NSK_JVMTI_VERIFY(jvmti->SuspendThread(thread))) { nsk_jvmti_setFailStatus(); return; } @@ -414,15 +404,14 @@ callbackThreadEnd(jvmtiEnv* jvmti, JNIEnv* jni, jthread thread) { /* check if event is for tested thread */ for (i = 0; i < THREADS_COUNT; i++) { - if (NSK_CPP_STUB3(IsSameObject, jni, threadsList[i], thread)) { + if (jni->IsSameObject(threadsList[i], thread)) { NSK_DISPLAY0("SUCCESS: expected THREAD_END event\n"); /* suspend thread */ NSK_DISPLAY3(" suspend finishing thread #%d (%s): %p\n", i, threadsName[i], (void*)thread); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(SuspendThread, jvmti, thread))) { + if (!NSK_JVMTI_VERIFY(jvmti->SuspendThread(thread))) { nsk_jvmti_setFailStatus(); return; } @@ -504,8 +493,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { jvmtiCapabilities suspendCaps; memset(&suspendCaps, 0, sizeof(suspendCaps)); suspendCaps.can_suspend = 1; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, &suspendCaps))) + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&suspendCaps))) return JNI_ERR; } @@ -515,9 +503,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&eventCallbacks, 0, sizeof(eventCallbacks)); eventCallbacks.ThreadStart = callbackThreadStart; eventCallbacks.ThreadEnd = callbackThreadEnd; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, - &eventCallbacks, sizeof(eventCallbacks)))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks)))) return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP06/sp06t001/sp06t001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP06/sp06t001/sp06t001.cpp index 21f8757ed52..f7a5ed7b8fe 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP06/sp06t001/sp06t001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP06/sp06t001/sp06t001.cpp @@ -135,8 +135,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* agentJNI, void* arg) { * Generate missed events (COMPILED_METHOD_LOAD only). */ static int generateEvents() { - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GenerateEvents, jvmti, JVMTI_EVENT_COMPILED_METHOD_LOAD))) { + if (!NSK_JVMTI_VERIFY(jvmti->GenerateEvents(JVMTI_EVENT_COMPILED_METHOD_LOAD))) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -168,8 +167,7 @@ static int prepare() { } /* get all live threads */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetAllThreads, jvmti, &allThreadsCount, &allThreadsList))) + if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&allThreadsCount, &allThreadsList))) return NSK_FALSE; if (!NSK_VERIFY(allThreadsCount > 0 && allThreadsList != NULL)) @@ -182,8 +180,7 @@ static int prepare() { if (!NSK_VERIFY(allThreadsList[i] != NULL)) return NSK_FALSE; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetThreadInfo, jvmti, allThreadsList[i], &threadInfo))) + if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(allThreadsList[i], &threadInfo))) return NSK_FALSE; if (threadInfo.name != NULL) { @@ -200,8 +197,7 @@ static int prepare() { } /* deallocate all threads list */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)allThreadsList))) + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)allThreadsList))) return NSK_FALSE; /* check if all tested threads found */ @@ -222,12 +218,11 @@ static int prepare() { for (i = 0; i < THREADS_COUNT; i++) { if (!NSK_JNI_VERIFY(jni, (threadsDesc[i].cls = - NSK_CPP_STUB2(GetObjectClass, jni, threadsDesc[i].thread)) != NULL)) + jni->GetObjectClass(threadsDesc[i].thread)) != NULL)) return NSK_FALSE; if (!NSK_JNI_VERIFY(jni, (threadsDesc[i].method = - NSK_CPP_STUB4(GetMethodID, jni, threadsDesc[i].cls, - threadsDesc[i].methodName, threadsDesc[i].methodSig)) != NULL)) + jni->GetMethodID(threadsDesc[i].cls, threadsDesc[i].methodName, threadsDesc[i].methodSig)) != NULL)) return NSK_FALSE; NSK_DISPLAY4(" thread #%d (%s): 0x%p (%s)\n", @@ -239,10 +234,10 @@ static int prepare() { /* make global refs */ for (i = 0; i < THREADS_COUNT; i++) { if (!NSK_JNI_VERIFY(jni, (threadsDesc[i].thread = (jthread) - NSK_CPP_STUB2(NewGlobalRef, jni, threadsDesc[i].thread)) != NULL)) + jni->NewGlobalRef(threadsDesc[i].thread)) != NULL)) return NSK_FALSE; if (!NSK_JNI_VERIFY(jni, (threadsDesc[i].cls = (jclass) - NSK_CPP_STUB2(NewGlobalRef, jni, threadsDesc[i].cls)) != NULL)) + jni->NewGlobalRef(threadsDesc[i].cls)) != NULL)) return NSK_FALSE; } @@ -262,13 +257,11 @@ static int suspendThreadsIndividually(int suspend) { for (i = 0; i < THREADS_COUNT; i++) { if (suspend) { NSK_DISPLAY2(" suspend thread #%d (%s)\n", i, threadsDesc[i].threadName); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(SuspendThread, jvmti, threadsDesc[i].thread))) + if (!NSK_JVMTI_VERIFY(jvmti->SuspendThread(threadsDesc[i].thread))) nsk_jvmti_setFailStatus(); } else { NSK_DISPLAY2(" resume thread #%d (%s)\n", i, threadsDesc[i].threadName); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(ResumeThread, jvmti, threadsDesc[i].thread))) + if (!NSK_JVMTI_VERIFY(jvmti->ResumeThread(threadsDesc[i].thread))) nsk_jvmti_setFailStatus(); } } @@ -300,9 +293,7 @@ static int checkSuspendedThreads() { NSK_DISPLAY2(" thread #%d (%s):\n", i, threadsDesc[i].threadName); /* get frame count */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetFrameCount, jvmti, - threadsDesc[i].thread, &frameCount))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetFrameCount(threadsDesc[i].thread, &frameCount))) { nsk_jvmti_setFailStatus(); return NSK_TRUE; } @@ -311,8 +302,7 @@ static int checkSuspendedThreads() { /* get stack trace */ if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB6(GetStackTrace, jvmti, threadsDesc[i].thread, - 0, MAX_STACK_SIZE, frameStack, &frameStackSize))) { + jvmti->GetStackTrace(threadsDesc[i].thread, 0, MAX_STACK_SIZE, frameStack, &frameStackSize))) { nsk_jvmti_setFailStatus(); return NSK_TRUE; } @@ -358,8 +348,8 @@ static int clean() { NSK_DISPLAY0("Dispose global references to threads\n"); for (i = 0; i < THREADS_COUNT; i++) { - NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, threadsDesc[i].thread)); - NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, threadsDesc[i].cls)); + NSK_TRACE(jni->DeleteGlobalRef(threadsDesc[i].thread)); + NSK_TRACE(jni->DeleteGlobalRef(threadsDesc[i].cls)); } return NSK_TRUE; @@ -492,8 +482,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(caps)); caps.can_suspend = 1; caps.can_generate_compiled_method_load_events = 1; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) return JNI_ERR; } @@ -502,9 +491,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&eventCallbacks, 0, sizeof(eventCallbacks)); eventCallbacks.CompiledMethodLoad = callbackCompiledMethodLoad; eventCallbacks.CompiledMethodUnload = callbackCompiledMethodUnload; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, - &eventCallbacks, sizeof(eventCallbacks)))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks)))) return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP06/sp06t002/sp06t002.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP06/sp06t002/sp06t002.cpp index 68ca0efed6b..23b3b0b7489 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP06/sp06t002/sp06t002.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP06/sp06t002/sp06t002.cpp @@ -143,8 +143,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* agentJNI, void* arg) { * Generate missed events (COMPILED_METHOD_LOAD only). */ static int generateEvents() { - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GenerateEvents, jvmti, JVMTI_EVENT_COMPILED_METHOD_LOAD))) { + if (!NSK_JVMTI_VERIFY(jvmti->GenerateEvents(JVMTI_EVENT_COMPILED_METHOD_LOAD))) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -177,8 +176,7 @@ static int prepare() { } /* get all live threads */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetAllThreads, jvmti, &allThreadsCount, &allThreadsList))) + if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&allThreadsCount, &allThreadsList))) return NSK_FALSE; if (!NSK_VERIFY(allThreadsCount > 0 && allThreadsList != NULL)) @@ -191,8 +189,7 @@ static int prepare() { if (!NSK_VERIFY(allThreadsList[i] != NULL)) return NSK_FALSE; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetThreadInfo, jvmti, allThreadsList[i], &threadInfo))) + if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(allThreadsList[i], &threadInfo))) return NSK_FALSE; if (threadInfo.name != NULL) { @@ -209,8 +206,7 @@ static int prepare() { } /* deallocate all threads list */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)allThreadsList))) + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)allThreadsList))) return NSK_FALSE; /* check if all tested threads found */ @@ -231,12 +227,11 @@ static int prepare() { for (i = 0; i < THREADS_COUNT; i++) { if (!NSK_JNI_VERIFY(jni, (threadsDesc[i].cls = - NSK_CPP_STUB2(GetObjectClass, jni, threadsDesc[i].thread)) != NULL)) + jni->GetObjectClass(threadsDesc[i].thread)) != NULL)) return NSK_FALSE; if (!NSK_JNI_VERIFY(jni, (threadsDesc[i].method = - NSK_CPP_STUB4(GetMethodID, jni, threadsDesc[i].cls, - threadsDesc[i].methodName, threadsDesc[i].methodSig)) != NULL)) + jni->GetMethodID(threadsDesc[i].cls, threadsDesc[i].methodName, threadsDesc[i].methodSig)) != NULL)) return NSK_FALSE; NSK_DISPLAY4(" thread #%d (%s): 0x%p (%s)\n", @@ -248,10 +243,10 @@ static int prepare() { /* make global refs */ for (i = 0; i < THREADS_COUNT; i++) { if (!NSK_JNI_VERIFY(jni, (threadsDesc[i].thread = (jthread) - NSK_CPP_STUB2(NewGlobalRef, jni, threadsDesc[i].thread)) != NULL)) + jni->NewGlobalRef(threadsDesc[i].thread)) != NULL)) return NSK_FALSE; if (!NSK_JNI_VERIFY(jni, (threadsDesc[i].cls = (jclass) - NSK_CPP_STUB2(NewGlobalRef, jni, threadsDesc[i].cls)) != NULL)) + jni->NewGlobalRef(threadsDesc[i].cls)) != NULL)) return NSK_FALSE; } @@ -271,13 +266,11 @@ static int suspendThreadsIndividually(int suspend) { for (i = 0; i < THREADS_COUNT; i++) { if (suspend) { NSK_DISPLAY2(" suspend thread #%d (%s)\n", i, threadsDesc[i].threadName); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(SuspendThread, jvmti, threadsDesc[i].thread))) + if (!NSK_JVMTI_VERIFY(jvmti->SuspendThread(threadsDesc[i].thread))) nsk_jvmti_setFailStatus(); } else { NSK_DISPLAY2(" resume thread #%d (%s)\n", i, threadsDesc[i].threadName); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(ResumeThread, jvmti, threadsDesc[i].thread))) + if (!NSK_JVMTI_VERIFY(jvmti->ResumeThread(threadsDesc[i].thread))) nsk_jvmti_setFailStatus(); } } @@ -310,9 +303,7 @@ static int checkThreads(int suspended, const char* kind0) { NSK_DISPLAY2(" thread #%d (%s):\n", i, threadsDesc[i].threadName); /* get frame count */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetFrameCount, jvmti, - threadsDesc[i].thread, &frameCount))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetFrameCount(threadsDesc[i].thread, &frameCount))) { nsk_jvmti_setFailStatus(); return NSK_TRUE; } @@ -321,8 +312,7 @@ static int checkThreads(int suspended, const char* kind0) { /* get stack trace */ if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB6(GetStackTrace, jvmti, threadsDesc[i].thread, - 0, MAX_STACK_SIZE, frameStack, &frameStackSize))) { + jvmti->GetStackTrace(threadsDesc[i].thread, 0, MAX_STACK_SIZE, frameStack, &frameStackSize))) { nsk_jvmti_setFailStatus(); return NSK_TRUE; } @@ -387,8 +377,8 @@ static int clean() { NSK_DISPLAY0("Dispose global references to threads\n"); for (i = 0; i < THREADS_COUNT; i++) { - NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, threadsDesc[i].thread)); - NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, threadsDesc[i].cls)); + NSK_TRACE(jni->DeleteGlobalRef(threadsDesc[i].thread)); + NSK_TRACE(jni->DeleteGlobalRef(threadsDesc[i].cls)); } return NSK_TRUE; @@ -521,8 +511,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(caps)); caps.can_suspend = 1; caps.can_generate_compiled_method_load_events = 1; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) return JNI_ERR; } @@ -531,9 +520,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&eventCallbacks, 0, sizeof(eventCallbacks)); eventCallbacks.CompiledMethodLoad = callbackCompiledMethodLoad; eventCallbacks.CompiledMethodUnload = callbackCompiledMethodUnload; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, - &eventCallbacks, sizeof(eventCallbacks)))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks)))) return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP06/sp06t003/sp06t003.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP06/sp06t003/sp06t003.cpp index 1ce63c38bfc..94350229313 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP06/sp06t003/sp06t003.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP06/sp06t003/sp06t003.cpp @@ -143,8 +143,7 @@ agentProc(jvmtiEnv* jvmti, JNIEnv* agentJNI, void* arg) { * Generate missed events (COMPILED_METHOD_LOAD only). */ static int generateEvents() { - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(GenerateEvents, jvmti, JVMTI_EVENT_COMPILED_METHOD_LOAD))) { + if (!NSK_JVMTI_VERIFY(jvmti->GenerateEvents(JVMTI_EVENT_COMPILED_METHOD_LOAD))) { nsk_jvmti_setFailStatus(); return NSK_FALSE; } @@ -177,8 +176,7 @@ static int prepare() { } /* get all live threads */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetAllThreads, jvmti, &allThreadsCount, &allThreadsList))) + if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&allThreadsCount, &allThreadsList))) return NSK_FALSE; if (!NSK_VERIFY(allThreadsCount > 0 && allThreadsList != NULL)) @@ -191,8 +189,7 @@ static int prepare() { if (!NSK_VERIFY(allThreadsList[i] != NULL)) return NSK_FALSE; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetThreadInfo, jvmti, allThreadsList[i], &threadInfo))) + if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(allThreadsList[i], &threadInfo))) return NSK_FALSE; if (threadInfo.name != NULL) { @@ -209,8 +206,7 @@ static int prepare() { } /* deallocate all threads list */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)allThreadsList))) + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)allThreadsList))) return NSK_FALSE; /* check if all tested threads found */ @@ -231,12 +227,11 @@ static int prepare() { for (i = 0; i < THREADS_COUNT; i++) { if (!NSK_JNI_VERIFY(jni, (threadsDesc[i].cls = - NSK_CPP_STUB2(GetObjectClass, jni, threadsDesc[i].thread)) != NULL)) + jni->GetObjectClass(threadsDesc[i].thread)) != NULL)) return NSK_FALSE; if (!NSK_JNI_VERIFY(jni, (threadsDesc[i].method = - NSK_CPP_STUB4(GetMethodID, jni, threadsDesc[i].cls, - threadsDesc[i].methodName, threadsDesc[i].methodSig)) != NULL)) + jni->GetMethodID(threadsDesc[i].cls, threadsDesc[i].methodName, threadsDesc[i].methodSig)) != NULL)) return NSK_FALSE; NSK_DISPLAY4(" thread #%d (%s): 0x%p (%s)\n", @@ -248,10 +243,10 @@ static int prepare() { /* make global refs */ for (i = 0; i < THREADS_COUNT; i++) { if (!NSK_JNI_VERIFY(jni, (threadsDesc[i].thread = (jthread) - NSK_CPP_STUB2(NewGlobalRef, jni, threadsDesc[i].thread)) != NULL)) + jni->NewGlobalRef(threadsDesc[i].thread)) != NULL)) return NSK_FALSE; if (!NSK_JNI_VERIFY(jni, (threadsDesc[i].cls = (jclass) - NSK_CPP_STUB2(NewGlobalRef, jni, threadsDesc[i].cls)) != NULL)) + jni->NewGlobalRef(threadsDesc[i].cls)) != NULL)) return NSK_FALSE; } @@ -271,13 +266,11 @@ static int suspendThreadsIndividually(int suspend) { for (i = 0; i < THREADS_COUNT; i++) { if (suspend) { NSK_DISPLAY2(" suspend thread #%d (%s)\n", i, threadsDesc[i].threadName); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(SuspendThread, jvmti, threadsDesc[i].thread))) + if (!NSK_JVMTI_VERIFY(jvmti->SuspendThread(threadsDesc[i].thread))) nsk_jvmti_setFailStatus(); } else { NSK_DISPLAY2(" resume thread #%d (%s)\n", i, threadsDesc[i].threadName); - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(ResumeThread, jvmti, threadsDesc[i].thread))) + if (!NSK_JVMTI_VERIFY(jvmti->ResumeThread(threadsDesc[i].thread))) nsk_jvmti_setFailStatus(); } } @@ -312,9 +305,7 @@ static int checkThreads(int suspended, const char* kind0) { NSK_DISPLAY2(" thread #%d (%s):\n", i, threadsDesc[i].threadName); /* get frame count */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetFrameCount, jvmti, - threadsDesc[i].thread, &frameCount))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetFrameCount(threadsDesc[i].thread, &frameCount))) { nsk_jvmti_setFailStatus(); return NSK_TRUE; } @@ -322,8 +313,7 @@ static int checkThreads(int suspended, const char* kind0) { /* get stack trace */ if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB6(GetStackTrace, jvmti, threadsDesc[i].thread, - 0, MAX_STACK_SIZE, frameStack, &frameStackSize))) { + jvmti->GetStackTrace(threadsDesc[i].thread, 0, MAX_STACK_SIZE, frameStack, &frameStackSize))) { nsk_jvmti_setFailStatus(); return NSK_TRUE; } @@ -343,8 +333,7 @@ static int checkThreads(int suspended, const char* kind0) { (long)frameStack[j].location); /* query frame location */ if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB5(GetFrameLocation, jvmti, threadsDesc[i].thread, - j, &qMethod, &qLocation))) { + jvmti->GetFrameLocation(threadsDesc[i].thread, j, &qMethod, &qLocation))) { nsk_jvmti_setFailStatus(); continue; } @@ -404,8 +393,8 @@ static int clean() { NSK_DISPLAY0("Dispose global references to threads\n"); for (i = 0; i < THREADS_COUNT; i++) { - NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, threadsDesc[i].thread)); - NSK_TRACE(NSK_CPP_STUB2(DeleteGlobalRef, jni, threadsDesc[i].cls)); + NSK_TRACE(jni->DeleteGlobalRef(threadsDesc[i].thread)); + NSK_TRACE(jni->DeleteGlobalRef(threadsDesc[i].cls)); } return NSK_TRUE; @@ -538,8 +527,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(caps)); caps.can_suspend = 1; caps.can_generate_compiled_method_load_events = 1; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) return JNI_ERR; } @@ -548,9 +536,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&eventCallbacks, 0, sizeof(eventCallbacks)); eventCallbacks.CompiledMethodLoad = callbackCompiledMethodLoad; eventCallbacks.CompiledMethodUnload = callbackCompiledMethodUnload; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(SetEventCallbacks, jvmti, - &eventCallbacks, sizeof(eventCallbacks)))) + if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks)))) return JNI_ERR; } diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP07/sp07t001/sp07t001.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP07/sp07t001/sp07t001.cpp index 1e825069eac..0a9125332e0 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP07/sp07t001/sp07t001.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP07/sp07t001/sp07t001.cpp @@ -62,8 +62,7 @@ static int prepare(jvmtiEnv* jvmti, JNIEnv* jni) { NSK_DISPLAY0("Prepare: find tested thread\n"); /* get all live threads */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads))) + if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads))) return NSK_FALSE; if (!NSK_VERIFY(threads_count > 0 && threads != NULL)) @@ -75,8 +74,7 @@ static int prepare(jvmtiEnv* jvmti, JNIEnv* jni) { return NSK_FALSE; /* get thread information */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info))) + if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info))) return NSK_FALSE; NSK_DISPLAY3(" thread #%d (%s): %p\n", i, info.name, threads[i]); @@ -87,15 +85,13 @@ static int prepare(jvmtiEnv* jvmti, JNIEnv* jni) { } if (info.name != NULL) { - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2( - Deallocate, jvmti, (unsigned char*)info.name))) + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)info.name))) return NSK_FALSE; } } /* deallocate threads list */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads))) + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads))) return NSK_FALSE; if (thread == NULL) { @@ -103,8 +99,7 @@ static int prepare(jvmtiEnv* jvmti, JNIEnv* jni) { return NSK_FALSE; } - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(CreateRawMonitor, jvmti, "waitLock", &waitLock))) + if (!NSK_JVMTI_VERIFY(jvmti->CreateRawMonitor("waitLock", &waitLock))) return NSK_FALSE; return NSK_TRUE; @@ -114,14 +109,13 @@ static int prepare(jvmtiEnv* jvmti, JNIEnv* jni) { static int wait_for(jvmtiEnv* jvmti, jlong millis) { - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorEnter, jvmti, waitLock))) + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorEnter(waitLock))) return NSK_FALSE; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(RawMonitorWait, jvmti, waitLock, millis))) + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorWait(waitLock, millis))) nsk_jvmti_setFailStatus(); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorExit, jvmti, waitLock))) + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorExit(waitLock))) return NSK_FALSE; return NSK_TRUE; @@ -132,27 +126,25 @@ static int displayFrameInfo(jvmtiEnv* jvmti, jint i) { char *name = NULL; char *signature = NULL; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(GetMethodName, jvmti, - frameBuffer[frameCount-1-i].method, &name, &signature, NULL))) + if (!NSK_JVMTI_VERIFY(jvmti->GetMethodName(frameBuffer[frameCount-1-i].method, &name, &signature, NULL))) return NSK_FALSE; NSK_DISPLAY4(" got[%d] method: %s%s, location: %s\n", i, name, signature, jlong_to_string(frameBuffer[frameCount-1-i].location, buffer)); if (name != NULL) - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)name); + jvmti->Deallocate((unsigned char*)name); if (signature != NULL) - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)signature); + jvmti->Deallocate((unsigned char*)signature); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(GetMethodName, jvmti, - sampleStack[i].method, &name, &signature, NULL))) + if (!NSK_JVMTI_VERIFY(jvmti->GetMethodName(sampleStack[i].method, &name, &signature, NULL))) return NSK_FALSE; NSK_DISPLAY4(" exp[%d] method: %s%s, location: %s\n", i, name, signature, jlong_to_string(sampleStack[i].location, buffer)); if (name != NULL) - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)name); + jvmti->Deallocate((unsigned char*)name); if (signature != NULL) - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)signature); + jvmti->Deallocate((unsigned char*)signature); return NSK_TRUE; } @@ -162,27 +154,25 @@ static int complainFrameInfo(jvmtiEnv* jvmti, jint i) { char *name = NULL; char *signature = NULL; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(GetMethodName, jvmti, - frameBuffer[frameCount-1-i].method, &name, &signature, NULL))) + if (!NSK_JVMTI_VERIFY(jvmti->GetMethodName(frameBuffer[frameCount-1-i].method, &name, &signature, NULL))) return NSK_FALSE; NSK_COMPLAIN3(" got: method=%s%s, location=%s\n", name, signature, jlong_to_string(frameBuffer[frameCount-1-i].location, buffer)); if (name != NULL) - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)name); + jvmti->Deallocate((unsigned char*)name); if (signature != NULL) - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)signature); + jvmti->Deallocate((unsigned char*)signature); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(GetMethodName, jvmti, - sampleStack[i].method, &name, &signature, NULL))) + if (!NSK_JVMTI_VERIFY(jvmti->GetMethodName(sampleStack[i].method, &name, &signature, NULL))) return NSK_FALSE; NSK_COMPLAIN3(" expected: method=%s%s, location=%s\n", name, signature, jlong_to_string(sampleStack[i].location, buffer)); if (name != NULL) - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)name); + jvmti->Deallocate((unsigned char*)name); if (signature != NULL) - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)signature); + jvmti->Deallocate((unsigned char*)signature); return NSK_TRUE; } @@ -193,13 +183,11 @@ static int checkStackTrace(jvmtiEnv* jvmti, JNIEnv* jni) { int displayFlag = (nsk_getVerboseMode() && (sampleCount % DISPLAYING_FREQUENCY) == 0); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorEnter, jvmti, frameLock))) + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorEnter(frameLock))) return NSK_FALSE; /* get stack trace */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB6(GetStackTrace, jvmti, thread, - 0, MAX_DEPTH, frameBuffer, &frameCount))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetStackTrace(thread, 0, MAX_DEPTH, frameBuffer, &frameCount))) { res = NSK_FALSE; } else { if (displayFlag) { @@ -228,7 +216,7 @@ static int checkStackTrace(jvmtiEnv* jvmti, JNIEnv* jni) { } } - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorExit, jvmti, frameLock))) + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorExit(frameLock))) return NSK_FALSE; return res; @@ -278,49 +266,45 @@ Java_nsk_jvmti_scenarios_sampling_SP07_sp07t001Thread_wrapper(JNIEnv* jni, return 0; } - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorEnter, jvmti, frameLock))) + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorEnter(frameLock))) return NSK_FALSE; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(GetFrameLocation, jvmti, NULL, 1, - &sampleStack[depth].method, &sampleStack[depth].location))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetFrameLocation(NULL, 1, &sampleStack[depth].method, &sampleStack[depth].location))) { nsk_jvmti_setFailStatus(); return 0; } depth++; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(GetFrameLocation, jvmti, NULL, 0, - &sampleStack[depth].method, &sampleStack[depth].location))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetFrameLocation(NULL, 0, &sampleStack[depth].method, &sampleStack[depth].location))) { nsk_jvmti_setFailStatus(); return 0; } depth++; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorExit, jvmti, frameLock))) + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorExit(frameLock))) return NSK_FALSE; - if (!NSK_JNI_VERIFY(jni, (klass = NSK_CPP_STUB2(GetObjectClass, - jni, obj)) != NULL)) { + if (!NSK_JNI_VERIFY(jni, (klass = jni->GetObjectClass(obj)) != NULL)) { nsk_jvmti_setFailStatus(); return 0; } - if (!NSK_JNI_VERIFY(jni, (method = NSK_CPP_STUB4(GetMethodID, - jni, klass, "fibonacci", "(I)I")) != NULL)) { + if (!NSK_JNI_VERIFY(jni, (method = jni->GetMethodID(klass, "fibonacci", "(I)I")) != NULL)) { nsk_jvmti_setFailStatus(); return 0; } - result = NSK_CPP_STUB4(CallIntMethod, jni, obj, method, i); + result = jni->CallIntMethod(obj, method, i); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorEnter, jvmti, frameLock))) + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorEnter(frameLock))) return NSK_FALSE; depth--; depth--; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorExit, jvmti, frameLock))) + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorExit(frameLock))) return NSK_FALSE; return result; @@ -355,8 +339,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { nsk_jvmti_createJVMTIEnv(jvm, reserved)) != NULL)) return JNI_ERR; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(CreateRawMonitor, jvmti, "frameLock", &frameLock))) + if (!NSK_JVMTI_VERIFY(jvmti->CreateRawMonitor("frameLock", &frameLock))) return NSK_FALSE; /* register agent proc and arg */ diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP07/sp07t002/sp07t002.cpp b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP07/sp07t002/sp07t002.cpp index d723ef5656e..a83af49dc47 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP07/sp07t002/sp07t002.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP07/sp07t002/sp07t002.cpp @@ -66,8 +66,7 @@ static int prepare(jvmtiEnv* jvmti, JNIEnv* jni) { NSK_DISPLAY0("Prepare: find tested thread\n"); /* get all live threads */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetAllThreads, jvmti, &threads_count, &threads))) + if (!NSK_JVMTI_VERIFY(jvmti->GetAllThreads(&threads_count, &threads))) return NSK_FALSE; if (!NSK_VERIFY(threads_count > 0 && threads != NULL)) @@ -79,8 +78,7 @@ static int prepare(jvmtiEnv* jvmti, JNIEnv* jni) { return NSK_FALSE; /* get thread information */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(GetThreadInfo, jvmti, threads[i], &info))) + if (!NSK_JVMTI_VERIFY(jvmti->GetThreadInfo(threads[i], &info))) return NSK_FALSE; NSK_DISPLAY3(" thread #%d (%s): %p\n", i, info.name, threads[i]); @@ -91,15 +89,13 @@ static int prepare(jvmtiEnv* jvmti, JNIEnv* jni) { } if (info.name != NULL) { - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2( - Deallocate, jvmti, (unsigned char*)info.name))) + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)info.name))) return NSK_FALSE; } } /* deallocate threads list */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)threads))) + if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned char*)threads))) return NSK_FALSE; if (thread == NULL) { @@ -108,41 +104,34 @@ static int prepare(jvmtiEnv* jvmti, JNIEnv* jni) { } /* get tested thread class */ - if (!NSK_JNI_VERIFY(jni, (klass = - NSK_CPP_STUB2(GetObjectClass, jni, thread)) != NULL)) + if (!NSK_JNI_VERIFY(jni, (klass = jni->GetObjectClass(thread)) != NULL)) return NSK_FALSE; /* get tested thread field 'MAX_LADDER' */ - if (!NSK_JNI_VERIFY(jni, (fid = - NSK_CPP_STUB4(GetStaticFieldID, jni, klass, - "MAX_LADDER", "I")) != NULL)) + if (!NSK_JNI_VERIFY(jni, (fid = jni->GetStaticFieldID(klass, "MAX_LADDER", "I")) != NULL)) return NSK_FALSE; - MAX_LADDER = NSK_CPP_STUB3(GetStaticIntField, jni, klass, fid); + MAX_LADDER = jni->GetStaticIntField(klass, fid); NSK_DISPLAY1("MAX_LADDER: %d\n", MAX_LADDER); /* get tested thread field 'depth' */ - if (!NSK_JNI_VERIFY(jni, (field = - NSK_CPP_STUB4(GetFieldID, jni, klass, "depth", "I")) != NULL)) + if (!NSK_JNI_VERIFY(jni, (field = jni->GetFieldID(klass, "depth", "I")) != NULL)) return NSK_FALSE; /* get tested thread method 'run' */ - if (!NSK_JNI_VERIFY(jni, (methodRun = - NSK_CPP_STUB4(GetMethodID, jni, klass, "run", "()V")) != NULL)) + if (!NSK_JNI_VERIFY(jni, (methodRun = jni->GetMethodID(klass, "run", "()V")) != NULL)) return NSK_FALSE; /* get tested thread method 'catcher' */ if (!NSK_JNI_VERIFY(jni, (methodCatcher = - NSK_CPP_STUB4(GetMethodID, jni, klass, "catcher", "(II)V")) != NULL)) + jni->GetMethodID(klass, "catcher", "(II)V")) != NULL)) return NSK_FALSE; /* get tested thread method 'thrower' */ - if (!NSK_JNI_VERIFY(jni, (methodThrower= - NSK_CPP_STUB4(GetMethodID, jni, klass, "thrower", "(I)V")) != NULL)) + if (!NSK_JNI_VERIFY(jni, (methodThrower= jni->GetMethodID(klass, "thrower", "(I)V")) != NULL)) return NSK_FALSE; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(CreateRawMonitor, jvmti, "waitLock", &waitLock))) + if (!NSK_JVMTI_VERIFY(jvmti->CreateRawMonitor("waitLock", &waitLock))) return NSK_FALSE; return NSK_TRUE; @@ -152,14 +141,13 @@ static int prepare(jvmtiEnv* jvmti, JNIEnv* jni) { static int wait_for(jvmtiEnv* jvmti, jlong millis) { - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorEnter, jvmti, waitLock))) + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorEnter(waitLock))) return NSK_FALSE; - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB3(RawMonitorWait, jvmti, waitLock, millis))) + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorWait(waitLock, millis))) nsk_jvmti_setFailStatus(); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorExit, jvmti, waitLock))) + if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorExit(waitLock))) return NSK_FALSE; return NSK_TRUE; @@ -170,16 +158,15 @@ static int displayFrameInfo(jvmtiEnv* jvmti, jint i) { char *name = NULL; char *signature = NULL; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(GetMethodName, jvmti, - frameBuffer[frameCount-1-i].method, &name, &signature, NULL))) + if (!NSK_JVMTI_VERIFY(jvmti->GetMethodName(frameBuffer[frameCount-1-i].method, &name, &signature, NULL))) return NSK_FALSE; NSK_DISPLAY4(" [%d] method: %s%s, location: %s\n", i, name, signature, jlong_to_string(frameBuffer[frameCount-1-i].location, buffer)); if (name != NULL) - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)name); + jvmti->Deallocate((unsigned char*)name); if (signature != NULL) - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)signature); + jvmti->Deallocate((unsigned char*)signature); return NSK_TRUE; } @@ -189,19 +176,17 @@ static int complainFrameInfo(jvmtiEnv* jvmti, jint i, jmethodID method) { char *name = NULL; char *signature = NULL; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(GetMethodName, jvmti, - frameBuffer[frameCount-1-i].method, &name, &signature, NULL))) + if (!NSK_JVMTI_VERIFY(jvmti->GetMethodName(frameBuffer[frameCount-1-i].method, &name, &signature, NULL))) return NSK_FALSE; NSK_COMPLAIN3(" got method: %s%s, location: %s\n", name, signature, jlong_to_string(frameBuffer[frameCount-1-i].location, buffer)); if (name != NULL) - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)name); + jvmti->Deallocate((unsigned char*)name); if (signature != NULL) - NSK_CPP_STUB2(Deallocate, jvmti, (unsigned char*)signature); + jvmti->Deallocate((unsigned char*)signature); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB5(GetMethodName, jvmti, - method, &name, &signature, NULL))) + if (!NSK_JVMTI_VERIFY(jvmti->GetMethodName(method, &name, &signature, NULL))) return NSK_FALSE; NSK_COMPLAIN2(" expected method: %s%s\n", name, signature); @@ -217,19 +202,17 @@ static int checkStackTrace(jvmtiEnv* jvmti, JNIEnv* jni) { int displayFlag = (nsk_getVerboseMode() && (sampleCount % DISPLAYING_FREQUENCY) == 0); - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(SuspendThread, jvmti, thread))) + if (!NSK_JVMTI_VERIFY(jvmti->SuspendThread(thread))) return NSK_FALSE; - depth = NSK_CPP_STUB3(GetIntField, jni, thread, field); + depth = jni->GetIntField(thread, field); /* get stack trace */ - if (!NSK_JVMTI_VERIFY( - NSK_CPP_STUB6(GetStackTrace, jvmti, thread, - 0, MAX_DEPTH, frameBuffer, &frameCount))) { + if (!NSK_JVMTI_VERIFY(jvmti->GetStackTrace(thread, 0, MAX_DEPTH, frameBuffer, &frameCount))) { res = NSK_FALSE; } - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(ResumeThread, jvmti, thread))) + if (!NSK_JVMTI_VERIFY(jvmti->ResumeThread(thread))) res = NSK_FALSE; if (res) { @@ -322,7 +305,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { memset(&caps, 0, sizeof(caps)); caps.can_suspend = 1; - if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(AddCapabilities, jvmti, &caps))) + if (!NSK_JVMTI_VERIFY(jvmti->AddCapabilities(&caps))) return JNI_ERR; /* register agent proc and arg */ From e790d1166646eb8a5a378c9512377202d7197785 Mon Sep 17 00:00:00 2001 From: Martin Doerr Date: Mon, 15 Oct 2018 08:08:02 +0200 Subject: [PATCH 107/124] 8211852: inspect stack during error reporting Reviewed-by: dholmes, goetz --- src/hotspot/share/runtime/os.cpp | 6 +++++- src/hotspot/share/utilities/vmError.cpp | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/src/hotspot/share/runtime/os.cpp b/src/hotspot/share/runtime/os.cpp index d703c7297e1..b60c0c87413 100644 --- a/src/hotspot/share/runtime/os.cpp +++ b/src/hotspot/share/runtime/os.cpp @@ -1153,7 +1153,11 @@ void os::print_location(outputStream* st, intptr_t x, bool verbose) { } if (accessible) { - st->print_cr(INTPTR_FORMAT " points into unknown readable memory", p2i(addr)); + st->print(INTPTR_FORMAT " points into unknown readable memory:", p2i(addr)); + for (address p = addr; p < align_up(addr + 1, sizeof(intptr_t)); ++p) { + st->print(" %02x", *(u1*)p); + } + st->cr(); return; } diff --git a/src/hotspot/share/utilities/vmError.cpp b/src/hotspot/share/utilities/vmError.cpp index 693a1caf20a..aee76fd228f 100644 --- a/src/hotspot/share/utilities/vmError.cpp +++ b/src/hotspot/share/utilities/vmError.cpp @@ -756,6 +756,24 @@ void VMError::report(outputStream* st, bool _verbose) { st->cr(); } + STEP("inspecting top of stack") + + // decode stack contents if possible + if (_verbose && _context && Universe::is_fully_initialized()) { + frame fr = os::fetch_frame_from_context(_context); + const int slots = 8; + const intptr_t *start = fr.sp(); + const intptr_t *end = start + slots; + if (is_aligned(start, sizeof(intptr_t)) && os::is_readable_range(start, end)) { + st->print_cr("Stack slot to memory mapping:"); + for (int i = 0; i < slots; ++i) { + st->print("stack at sp + %d slots: ", i); + os::print_location(st, *(start + i)); + } + } + st->cr(); + } + STEP("printing code blob if possible") if (_verbose && _context) { From ce05c7751d863f21bfc26380f1eaf575577114b9 Mon Sep 17 00:00:00 2001 From: Priya Lakshmi Muthuswamy Date: Mon, 15 Oct 2018 17:52:42 +0530 Subject: [PATCH 108/124] 8211957: Broken links to stylesheet in java.base/doc-files Reviewed-by: alanb --- src/java.base/share/classes/java/lang/doc-files/ValueBased.html | 2 +- .../classes/java/lang/doc-files/threadPrimitiveDeprecation.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/java.base/share/classes/java/lang/doc-files/ValueBased.html b/src/java.base/share/classes/java/lang/doc-files/ValueBased.html index 4c2c8158708..d5f31be7098 100644 --- a/src/java.base/share/classes/java/lang/doc-files/ValueBased.html +++ b/src/java.base/share/classes/java/lang/doc-files/ValueBased.html @@ -2,7 +2,7 @@ Value-based Classes - +

    Value-based Classes

    diff --git a/src/java.base/share/classes/java/lang/doc-files/threadPrimitiveDeprecation.html b/src/java.base/share/classes/java/lang/doc-files/threadPrimitiveDeprecation.html index df87e8e9be6..37123b3cade 100644 --- a/src/java.base/share/classes/java/lang/doc-files/threadPrimitiveDeprecation.html +++ b/src/java.base/share/classes/java/lang/doc-files/threadPrimitiveDeprecation.html @@ -26,7 +26,7 @@ Java Thread Primitive Deprecation - +

    Java Thread Primitive Deprecation

    From 4bc903d17a1aa08e25d8a4f911645220a9fd80f9 Mon Sep 17 00:00:00 2001 From: Leo Korinth Date: Fri, 12 Oct 2018 12:10:34 +0200 Subject: [PATCH 109/124] 8201436: Replace oop_ps_push_contents with oop_iterate and closure Reviewed-by: sjohanss, tschatzl --- src/hotspot/share/gc/parallel/psCardTable.cpp | 2 +- .../share/gc/parallel/psClosure.inline.hpp | 121 ++++++++++++++++++ .../share/gc/parallel/psPromotionManager.cpp | 102 --------------- .../gc/parallel/psPromotionManager.inline.hpp | 45 ++++++- src/hotspot/share/gc/parallel/psScavenge.cpp | 2 + .../share/gc/parallel/psScavenge.inline.hpp | 90 ------------- src/hotspot/share/gc/parallel/psTasks.cpp | 1 + .../share/oops/instanceClassLoaderKlass.hpp | 4 +- src/hotspot/share/oops/instanceKlass.hpp | 2 - .../share/oops/instanceMirrorKlass.hpp | 2 - src/hotspot/share/oops/instanceRefKlass.hpp | 4 +- src/hotspot/share/oops/klass.hpp | 2 - src/hotspot/share/oops/objArrayKlass.hpp | 2 - src/hotspot/share/oops/oop.hpp | 2 - src/hotspot/share/oops/oop.inline.hpp | 9 -- src/hotspot/share/oops/typeArrayKlass.hpp | 3 +- 16 files changed, 171 insertions(+), 222 deletions(-) create mode 100644 src/hotspot/share/gc/parallel/psClosure.inline.hpp diff --git a/src/hotspot/share/gc/parallel/psCardTable.cpp b/src/hotspot/share/gc/parallel/psCardTable.cpp index 908e2ee89e8..e949408df56 100644 --- a/src/hotspot/share/gc/parallel/psCardTable.cpp +++ b/src/hotspot/share/gc/parallel/psCardTable.cpp @@ -28,7 +28,7 @@ #include "gc/parallel/parallelScavengeHeap.inline.hpp" #include "gc/parallel/psCardTable.hpp" #include "gc/parallel/psPromotionManager.inline.hpp" -#include "gc/parallel/psScavenge.hpp" +#include "gc/parallel/psScavenge.inline.hpp" #include "gc/parallel/psTasks.hpp" #include "gc/parallel/psYoungGen.hpp" #include "memory/iterator.inline.hpp" diff --git a/src/hotspot/share/gc/parallel/psClosure.inline.hpp b/src/hotspot/share/gc/parallel/psClosure.inline.hpp new file mode 100644 index 00000000000..67708779c4a --- /dev/null +++ b/src/hotspot/share/gc/parallel/psClosure.inline.hpp @@ -0,0 +1,121 @@ +/* + * Copyright (c) 2018, 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. + * + * 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. + * + */ + +#ifndef SHARE_VM_GC_PARALLEL_PSCLOSURE_INLINE_HPP +#define SHARE_VM_GC_PARALLEL_PSCLOSURE_INLINE_HPP + +#include "gc/parallel/psPromotionManager.inline.hpp" +#include "gc/parallel/psScavenge.inline.hpp" +#include "memory/iterator.hpp" +#include "oops/access.inline.hpp" +#include "oops/oop.inline.hpp" +#include "utilities/globalDefinitions.hpp" + +template +class PSRootsClosure: public OopClosure { +private: + PSPromotionManager* _promotion_manager; + + template void do_oop_work(T *p) { + if (PSScavenge::should_scavenge(p)) { + // We never card mark roots, maybe call a func without test? + _promotion_manager->copy_and_push_safe_barrier(p); + } + } +public: + PSRootsClosure(PSPromotionManager* pm) : _promotion_manager(pm) { } + void do_oop(oop* p) { PSRootsClosure::do_oop_work(p); } + void do_oop(narrowOop* p) { PSRootsClosure::do_oop_work(p); } +}; + +typedef PSRootsClosure PSScavengeRootsClosure; +typedef PSRootsClosure PSPromoteRootsClosure; + +// Scavenges a single oop in a ClassLoaderData. +class PSScavengeFromCLDClosure: public OopClosure { +private: + PSPromotionManager* _pm; + // Used to redirty a scanned cld if it has oops + // pointing to the young generation after being scanned. + ClassLoaderData* _scanned_cld; +public: + PSScavengeFromCLDClosure(PSPromotionManager* pm) : _pm(pm), _scanned_cld(NULL) { } + void do_oop(narrowOop* p) { ShouldNotReachHere(); } + void do_oop(oop* p) { + ParallelScavengeHeap* psh = ParallelScavengeHeap::heap(); + assert(!psh->is_in_reserved(p), "GC barrier needed"); + if (PSScavenge::should_scavenge(p)) { + assert(PSScavenge::should_scavenge(p, true), "revisiting object?"); + + oop o = *p; + oop new_obj; + if (o->is_forwarded()) { + new_obj = o->forwardee(); + } else { + new_obj = _pm->copy_to_survivor_space(o); + } + RawAccess::oop_store(p, new_obj); + + if (PSScavenge::is_obj_in_young(new_obj)) { + do_cld_barrier(); + } + } + } + + void set_scanned_cld(ClassLoaderData* cld) { + assert(_scanned_cld == NULL || cld == NULL, "Should always only handling one cld at a time"); + _scanned_cld = cld; + } + +private: + void do_cld_barrier() { + assert(_scanned_cld != NULL, "Should not be called without having a scanned cld"); + _scanned_cld->record_modified_oops(); + } +}; + +// Scavenges the oop in a ClassLoaderData. +class PSScavengeCLDClosure: public CLDClosure { +private: + PSScavengeFromCLDClosure _oop_closure; +public: + PSScavengeCLDClosure(PSPromotionManager* pm) : _oop_closure(pm) { } + void do_cld(ClassLoaderData* cld) { + // If the cld has not been dirtied we know that there's + // no references into the young gen and we can skip it. + + if (cld->has_modified_oops()) { + // Setup the promotion manager to redirty this cld + // if references are left in the young gen. + _oop_closure.set_scanned_cld(cld); + + // Clean the cld since we're going to scavenge all the metadata. + cld->oops_do(&_oop_closure, false, /*clear_modified_oops*/true); + + _oop_closure.set_scanned_cld(NULL); + } + } +}; + +#endif diff --git a/src/hotspot/share/gc/parallel/psPromotionManager.cpp b/src/hotspot/share/gc/parallel/psPromotionManager.cpp index 58337c068c3..70d0a7f918a 100644 --- a/src/hotspot/share/gc/parallel/psPromotionManager.cpp +++ b/src/hotspot/share/gc/parallel/psPromotionManager.cpp @@ -41,14 +41,7 @@ #include "memory/padded.inline.hpp" #include "memory/resourceArea.hpp" #include "oops/access.inline.hpp" -#include "oops/arrayOop.inline.hpp" #include "oops/compressedOops.inline.hpp" -#include "oops/instanceClassLoaderKlass.inline.hpp" -#include "oops/instanceKlass.inline.hpp" -#include "oops/instanceMirrorKlass.inline.hpp" -#include "oops/objArrayKlass.inline.hpp" -#include "oops/objArrayOop.inline.hpp" -#include "oops/oop.inline.hpp" PaddedEnd* PSPromotionManager::_manager_array = NULL; OopStarTaskQueueSet* PSPromotionManager::_stack_array_depth = NULL; @@ -397,101 +390,6 @@ void PSPromotionManager::process_array_chunk(oop old) { } } -class PushContentsClosure : public BasicOopIterateClosure { - PSPromotionManager* _pm; - public: - PushContentsClosure(PSPromotionManager* pm) : _pm(pm) {} - - template void do_oop_work(T* p) { - if (PSScavenge::should_scavenge(p)) { - _pm->claim_or_forward_depth(p); - } - } - - virtual void do_oop(oop* p) { do_oop_work(p); } - virtual void do_oop(narrowOop* p) { do_oop_work(p); } - - // Don't use the oop verification code in the oop_oop_iterate framework. - debug_only(virtual bool should_verify_oops() { return false; }) -}; - -void InstanceKlass::oop_ps_push_contents(oop obj, PSPromotionManager* pm) { - PushContentsClosure cl(pm); - if (UseCompressedOops) { - oop_oop_iterate_oop_maps_reverse(obj, &cl); - } else { - oop_oop_iterate_oop_maps_reverse(obj, &cl); - } -} - -void InstanceMirrorKlass::oop_ps_push_contents(oop obj, PSPromotionManager* pm) { - // Note that we don't have to follow the mirror -> klass pointer, since all - // klasses that are dirty will be scavenged when we iterate over the - // ClassLoaderData objects. - - InstanceKlass::oop_ps_push_contents(obj, pm); - - PushContentsClosure cl(pm); - if (UseCompressedOops) { - oop_oop_iterate_statics(obj, &cl); - } else { - oop_oop_iterate_statics(obj, &cl); - } -} - -void InstanceClassLoaderKlass::oop_ps_push_contents(oop obj, PSPromotionManager* pm) { - InstanceKlass::oop_ps_push_contents(obj, pm); - - // This is called by the young collector. It will already have taken care of - // all class loader data. So, we don't have to follow the class loader -> - // class loader data link. -} - -template -static void oop_ps_push_contents_specialized(oop obj, InstanceRefKlass *klass, PSPromotionManager* pm) { - T* referent_addr = (T*)java_lang_ref_Reference::referent_addr_raw(obj); - if (PSScavenge::should_scavenge(referent_addr)) { - ReferenceProcessor* rp = PSScavenge::reference_processor(); - if (rp->discover_reference(obj, klass->reference_type())) { - // reference discovered, referent will be traversed later. - klass->InstanceKlass::oop_ps_push_contents(obj, pm); - return; - } else { - // treat referent as normal oop - pm->claim_or_forward_depth(referent_addr); - } - } - // Treat discovered as normal oop - T* discovered_addr = (T*)java_lang_ref_Reference::discovered_addr_raw(obj); - if (PSScavenge::should_scavenge(discovered_addr)) { - pm->claim_or_forward_depth(discovered_addr); - } - klass->InstanceKlass::oop_ps_push_contents(obj, pm); -} - -void InstanceRefKlass::oop_ps_push_contents(oop obj, PSPromotionManager* pm) { - if (UseCompressedOops) { - oop_ps_push_contents_specialized(obj, this, pm); - } else { - oop_ps_push_contents_specialized(obj, this, pm); - } -} - -void ObjArrayKlass::oop_ps_push_contents(oop obj, PSPromotionManager* pm) { - assert(obj->is_objArray(), "obj must be obj array"); - PushContentsClosure cl(pm); - if (UseCompressedOops) { - oop_oop_iterate_elements(objArrayOop(obj), &cl); - } else { - oop_oop_iterate_elements(objArrayOop(obj), &cl); - } -} - -void TypeArrayKlass::oop_ps_push_contents(oop obj, PSPromotionManager* pm) { - assert(obj->is_typeArray(),"must be a type array"); - ShouldNotReachHere(); -} - oop PSPromotionManager::oop_promotion_failed(oop obj, markOop obj_mark) { assert(_old_gen_is_full || PromotionFailureALot, "Sanity"); diff --git a/src/hotspot/share/gc/parallel/psPromotionManager.inline.hpp b/src/hotspot/share/gc/parallel/psPromotionManager.inline.hpp index 8c590e080ad..91abae6de27 100644 --- a/src/hotspot/share/gc/parallel/psPromotionManager.inline.hpp +++ b/src/hotspot/share/gc/parallel/psPromotionManager.inline.hpp @@ -30,9 +30,10 @@ #include "gc/parallel/psOldGen.hpp" #include "gc/parallel/psPromotionLAB.inline.hpp" #include "gc/parallel/psPromotionManager.hpp" -#include "gc/parallel/psScavenge.hpp" +#include "gc/parallel/psScavenge.inline.hpp" #include "gc/shared/taskqueue.inline.hpp" #include "logging/log.hpp" +#include "memory/iterator.inline.hpp" #include "oops/access.inline.hpp" #include "oops/oop.inline.hpp" @@ -99,8 +100,48 @@ inline void PSPromotionManager::promotion_trace_event(oop new_obj, oop old_obj, } } +class PSPushContentsClosure: public BasicOopIterateClosure { + PSPromotionManager* _pm; + public: + PSPushContentsClosure(PSPromotionManager* pm) : BasicOopIterateClosure(PSScavenge::reference_processor()), _pm(pm) {} + + template void do_oop_nv(T* p) { + if (PSScavenge::should_scavenge(p)) { + _pm->claim_or_forward_depth(p); + } + } + + virtual void do_oop(oop* p) { do_oop_nv(p); } + virtual void do_oop(narrowOop* p) { do_oop_nv(p); } + + // Don't use the oop verification code in the oop_oop_iterate framework. + debug_only(virtual bool should_verify_oops() { return false; }) +}; + +// +// This closure specialization will override the one that is defined in +// instanceRefKlass.inline.cpp. It swaps the order of oop_oop_iterate and +// oop_oop_iterate_ref_processing. Unfortunately G1 and Parallel behaves +// significantly better (especially in the Derby benchmark) using opposite +// order of these function calls. +// +template <> +inline void InstanceRefKlass::oop_oop_iterate_reverse(oop obj, PSPushContentsClosure* closure) { + oop_oop_iterate_ref_processing(obj, closure); + InstanceKlass::oop_oop_iterate_reverse(obj, closure); +} + +template <> +inline void InstanceRefKlass::oop_oop_iterate_reverse(oop obj, PSPushContentsClosure* closure) { + oop_oop_iterate_ref_processing(obj, closure); + InstanceKlass::oop_oop_iterate_reverse(obj, closure); +} + inline void PSPromotionManager::push_contents(oop obj) { - obj->ps_push_contents(this); + if (!obj->klass()->is_typeArray_klass()) { + PSPushContentsClosure pcc(this); + obj->oop_iterate_backwards(&pcc); + } } // // This method is pretty bulky. It would be nice to split it up diff --git a/src/hotspot/share/gc/parallel/psScavenge.cpp b/src/hotspot/share/gc/parallel/psScavenge.cpp index e19da59c8e4..3d982bc4c59 100644 --- a/src/hotspot/share/gc/parallel/psScavenge.cpp +++ b/src/hotspot/share/gc/parallel/psScavenge.cpp @@ -28,8 +28,10 @@ #include "gc/parallel/gcTaskManager.hpp" #include "gc/parallel/parallelScavengeHeap.hpp" #include "gc/parallel/psAdaptiveSizePolicy.hpp" +#include "gc/parallel/psClosure.inline.hpp" #include "gc/parallel/psMarkSweepProxy.hpp" #include "gc/parallel/psParallelCompact.inline.hpp" +#include "gc/parallel/psPromotionManager.inline.hpp" #include "gc/parallel/psScavenge.inline.hpp" #include "gc/parallel/psTasks.hpp" #include "gc/shared/collectorPolicy.hpp" diff --git a/src/hotspot/share/gc/parallel/psScavenge.inline.hpp b/src/hotspot/share/gc/parallel/psScavenge.inline.hpp index 0c58fd4b3f7..40d51f6a770 100644 --- a/src/hotspot/share/gc/parallel/psScavenge.inline.hpp +++ b/src/hotspot/share/gc/parallel/psScavenge.inline.hpp @@ -26,7 +26,6 @@ #define SHARE_VM_GC_PARALLEL_PSSCAVENGE_INLINE_HPP #include "gc/parallel/parallelScavengeHeap.hpp" -#include "gc/parallel/psPromotionManager.inline.hpp" #include "gc/parallel/psScavenge.hpp" #include "logging/log.hpp" #include "memory/iterator.hpp" @@ -65,93 +64,4 @@ inline bool PSScavenge::should_scavenge(T* p, bool check_to_space) { return should_scavenge(p); } -template -class PSRootsClosure: public OopClosure { - private: - PSPromotionManager* _promotion_manager; - - protected: - template void do_oop_work(T *p) { - if (PSScavenge::should_scavenge(p)) { - // We never card mark roots, maybe call a func without test? - _promotion_manager->copy_and_push_safe_barrier(p); - } - } - public: - PSRootsClosure(PSPromotionManager* pm) : _promotion_manager(pm) { } - void do_oop(oop* p) { PSRootsClosure::do_oop_work(p); } - void do_oop(narrowOop* p) { PSRootsClosure::do_oop_work(p); } -}; - -typedef PSRootsClosure PSScavengeRootsClosure; -typedef PSRootsClosure PSPromoteRootsClosure; - -// Scavenges a single oop in a ClassLoaderData. -class PSScavengeFromCLDClosure: public OopClosure { - private: - PSPromotionManager* _pm; - // Used to redirty a scanned cld if it has oops - // pointing to the young generation after being scanned. - ClassLoaderData* _scanned_cld; - public: - PSScavengeFromCLDClosure(PSPromotionManager* pm) : _pm(pm), _scanned_cld(NULL) { } - void do_oop(narrowOop* p) { ShouldNotReachHere(); } - void do_oop(oop* p) { - ParallelScavengeHeap* psh = ParallelScavengeHeap::heap(); - assert(!psh->is_in_reserved(p), "GC barrier needed"); - if (PSScavenge::should_scavenge(p)) { - assert(PSScavenge::should_scavenge(p, true), "revisiting object?"); - - oop o = *p; - oop new_obj; - if (o->is_forwarded()) { - new_obj = o->forwardee(); - } else { - new_obj = _pm->copy_to_survivor_space(o); - } - RawAccess::oop_store(p, new_obj); - - if (PSScavenge::is_obj_in_young(new_obj)) { - do_cld_barrier(); - } - } - } - - void set_scanned_cld(ClassLoaderData* cld) { - assert(_scanned_cld == NULL || cld == NULL, "Should always only handling one cld at a time"); - _scanned_cld = cld; - } - - private: - void do_cld_barrier() { - assert(_scanned_cld != NULL, "Should not be called without having a scanned cld"); - _scanned_cld->record_modified_oops(); - } -}; - -// Scavenges the oop in a ClassLoaderData. -class PSScavengeCLDClosure: public CLDClosure { - private: - PSScavengeFromCLDClosure _oop_closure; - protected: - public: - PSScavengeCLDClosure(PSPromotionManager* pm) : _oop_closure(pm) { } - void do_cld(ClassLoaderData* cld) { - // If the cld has not been dirtied we know that there's - // no references into the young gen and we can skip it. - - if (cld->has_modified_oops()) { - // Setup the promotion manager to redirty this cld - // if references are left in the young gen. - _oop_closure.set_scanned_cld(cld); - - // Clean the cld since we're going to scavenge all the metadata. - cld->oops_do(&_oop_closure, false, /*clear_modified_oops*/true); - - _oop_closure.set_scanned_cld(NULL); - } - } -}; - - #endif // SHARE_VM_GC_PARALLEL_PSSCAVENGE_INLINE_HPP diff --git a/src/hotspot/share/gc/parallel/psTasks.cpp b/src/hotspot/share/gc/parallel/psTasks.cpp index fbf52308b2b..fd3ffb77bda 100644 --- a/src/hotspot/share/gc/parallel/psTasks.cpp +++ b/src/hotspot/share/gc/parallel/psTasks.cpp @@ -29,6 +29,7 @@ #include "code/codeCache.hpp" #include "gc/parallel/gcTaskManager.hpp" #include "gc/parallel/psCardTable.hpp" +#include "gc/parallel/psClosure.inline.hpp" #include "gc/parallel/psPromotionManager.hpp" #include "gc/parallel/psPromotionManager.inline.hpp" #include "gc/parallel/psScavenge.inline.hpp" diff --git a/src/hotspot/share/oops/instanceClassLoaderKlass.hpp b/src/hotspot/share/oops/instanceClassLoaderKlass.hpp index 00a116ee793..365c36a0344 100644 --- a/src/hotspot/share/oops/instanceClassLoaderKlass.hpp +++ b/src/hotspot/share/oops/instanceClassLoaderKlass.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2018, 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 @@ -51,8 +51,6 @@ public: // GC specific object visitors // #if INCLUDE_PARALLELGC - // Parallel Scavenge - void oop_ps_push_contents( oop obj, PSPromotionManager* pm); // Parallel Compact void oop_pc_follow_contents(oop obj, ParCompactionManager* cm); void oop_pc_update_pointers(oop obj, ParCompactionManager* cm); diff --git a/src/hotspot/share/oops/instanceKlass.hpp b/src/hotspot/share/oops/instanceKlass.hpp index 41accd4a624..acc9a6b1e7f 100644 --- a/src/hotspot/share/oops/instanceKlass.hpp +++ b/src/hotspot/share/oops/instanceKlass.hpp @@ -1186,8 +1186,6 @@ public: // GC specific object visitors // #if INCLUDE_PARALLELGC - // Parallel Scavenge - void oop_ps_push_contents( oop obj, PSPromotionManager* pm); // Parallel Compact void oop_pc_follow_contents(oop obj, ParCompactionManager* cm); void oop_pc_update_pointers(oop obj, ParCompactionManager* cm); diff --git a/src/hotspot/share/oops/instanceMirrorKlass.hpp b/src/hotspot/share/oops/instanceMirrorKlass.hpp index 31916cf1650..ccfb7f6dfac 100644 --- a/src/hotspot/share/oops/instanceMirrorKlass.hpp +++ b/src/hotspot/share/oops/instanceMirrorKlass.hpp @@ -92,8 +92,6 @@ class InstanceMirrorKlass: public InstanceKlass { // GC specific object visitors // #if INCLUDE_PARALLELGC - // Parallel Scavenge - void oop_ps_push_contents( oop obj, PSPromotionManager* pm); // Parallel Compact void oop_pc_follow_contents(oop obj, ParCompactionManager* cm); void oop_pc_update_pointers(oop obj, ParCompactionManager* cm); diff --git a/src/hotspot/share/oops/instanceRefKlass.hpp b/src/hotspot/share/oops/instanceRefKlass.hpp index 8c331139b60..725d53c7e84 100644 --- a/src/hotspot/share/oops/instanceRefKlass.hpp +++ b/src/hotspot/share/oops/instanceRefKlass.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2018, 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,8 +61,6 @@ class InstanceRefKlass: public InstanceKlass { // GC specific object visitors // #if INCLUDE_PARALLELGC - // Parallel Scavenge - void oop_ps_push_contents( oop obj, PSPromotionManager* pm); // Parallel Compact void oop_pc_follow_contents(oop obj, ParCompactionManager* cm); void oop_pc_update_pointers(oop obj, ParCompactionManager* cm); diff --git a/src/hotspot/share/oops/klass.hpp b/src/hotspot/share/oops/klass.hpp index aabde977082..4838b5cb84a 100644 --- a/src/hotspot/share/oops/klass.hpp +++ b/src/hotspot/share/oops/klass.hpp @@ -676,8 +676,6 @@ protected: // GC specific object visitors // #if INCLUDE_PARALLELGC - // Parallel Scavenge - virtual void oop_ps_push_contents( oop obj, PSPromotionManager* pm) = 0; // Parallel Compact virtual void oop_pc_follow_contents(oop obj, ParCompactionManager* cm) = 0; virtual void oop_pc_update_pointers(oop obj, ParCompactionManager* cm) = 0; diff --git a/src/hotspot/share/oops/objArrayKlass.hpp b/src/hotspot/share/oops/objArrayKlass.hpp index ca02f29d961..25633341346 100644 --- a/src/hotspot/share/oops/objArrayKlass.hpp +++ b/src/hotspot/share/oops/objArrayKlass.hpp @@ -123,8 +123,6 @@ class ObjArrayKlass : public ArrayKlass { // GC specific object visitors // #if INCLUDE_PARALLELGC - // Parallel Scavenge - void oop_ps_push_contents( oop obj, PSPromotionManager* pm); // Parallel Compact void oop_pc_follow_contents(oop obj, ParCompactionManager* cm); void oop_pc_update_pointers(oop obj, ParCompactionManager* cm); diff --git a/src/hotspot/share/oops/oop.hpp b/src/hotspot/share/oops/oop.hpp index fb3cd7ae63f..ff1f0b09500 100644 --- a/src/hotspot/share/oops/oop.hpp +++ b/src/hotspot/share/oops/oop.hpp @@ -291,8 +291,6 @@ class oopDesc { // Parallel Compact inline void pc_follow_contents(ParCompactionManager* cm); inline void pc_update_contents(ParCompactionManager* cm); - // Parallel Scavenge - inline void ps_push_contents(PSPromotionManager* pm); #endif template diff --git a/src/hotspot/share/oops/oop.inline.hpp b/src/hotspot/share/oops/oop.inline.hpp index bcc44b24eb3..6732f62ed1b 100644 --- a/src/hotspot/share/oops/oop.inline.hpp +++ b/src/hotspot/share/oops/oop.inline.hpp @@ -439,15 +439,6 @@ void oopDesc::pc_update_contents(ParCompactionManager* cm) { } // Else skip it. The TypeArrayKlass in the header never needs scavenging. } - -void oopDesc::ps_push_contents(PSPromotionManager* pm) { - Klass* k = klass(); - if (!k->is_typeArray_klass()) { - // It might contain oops beyond the header, so take the virtual call. - k->oop_ps_push_contents(this, pm); - } - // Else skip it. The TypeArrayKlass in the header never needs scavenging. -} #endif // INCLUDE_PARALLELGC template diff --git a/src/hotspot/share/oops/typeArrayKlass.hpp b/src/hotspot/share/oops/typeArrayKlass.hpp index bc356f704a8..c267855fca3 100644 --- a/src/hotspot/share/oops/typeArrayKlass.hpp +++ b/src/hotspot/share/oops/typeArrayKlass.hpp @@ -76,9 +76,8 @@ class TypeArrayKlass : public ArrayKlass { // GC specific object visitors // + #if INCLUDE_PARALLELGC - // Parallel Scavenge - void oop_ps_push_contents( oop obj, PSPromotionManager* pm); // Parallel Compact void oop_pc_follow_contents(oop obj, ParCompactionManager* cm); void oop_pc_update_pointers(oop obj, ParCompactionManager* cm); From 78fe66c3bb2c53091f22db2a7f13756e9edf4a27 Mon Sep 17 00:00:00 2001 From: Leo Korinth Date: Fri, 12 Oct 2018 12:13:06 +0200 Subject: [PATCH 110/124] 8211446: Replace oop_pc_follow_contents with oop_iterate and closure Reviewed-by: sjohanss, tschatzl --- src/hotspot/share/gc/parallel/pcTasks.cpp | 10 +- .../share/gc/parallel/psCompactionManager.cpp | 109 +----------------- .../share/gc/parallel/psCompactionManager.hpp | 18 +-- .../parallel/psCompactionManager.inline.hpp | 76 ++++++++---- .../share/gc/parallel/psParallelCompact.cpp | 43 +++++-- .../share/oops/instanceClassLoaderKlass.hpp | 1 - src/hotspot/share/oops/instanceKlass.hpp | 1 - .../share/oops/instanceMirrorKlass.hpp | 1 - src/hotspot/share/oops/instanceRefKlass.hpp | 1 - src/hotspot/share/oops/klass.hpp | 1 - src/hotspot/share/oops/objArrayKlass.hpp | 1 - src/hotspot/share/oops/oop.hpp | 1 - src/hotspot/share/oops/oop.inline.hpp | 3 - src/hotspot/share/oops/typeArrayKlass.hpp | 1 - 14 files changed, 94 insertions(+), 173 deletions(-) diff --git a/src/hotspot/share/gc/parallel/pcTasks.cpp b/src/hotspot/share/gc/parallel/pcTasks.cpp index 5807bb48edf..66d69dd74f6 100644 --- a/src/hotspot/share/gc/parallel/pcTasks.cpp +++ b/src/hotspot/share/gc/parallel/pcTasks.cpp @@ -35,6 +35,7 @@ #include "gc/shared/gcTimer.hpp" #include "gc/shared/gcTraceTime.inline.hpp" #include "logging/log.hpp" +#include "memory/iterator.inline.hpp" #include "memory/resourceArea.hpp" #include "memory/universe.hpp" #include "oops/objArrayKlass.inline.hpp" @@ -58,7 +59,7 @@ void ThreadRootsMarkingTask::do_it(GCTaskManager* manager, uint which) { ParCompactionManager* cm = ParCompactionManager::gc_thread_compaction_manager(which); - ParCompactionManager::MarkAndPushClosure mark_and_push_closure(cm); + PCMarkAndPushClosure mark_and_push_closure(cm); MarkingCodeBlobClosure mark_and_push_in_blobs(&mark_and_push_closure, !CodeBlobToOopClosure::FixRelocations); _thread->oops_do(&mark_and_push_closure, &mark_and_push_in_blobs); @@ -73,7 +74,7 @@ void MarkFromRootsTask::do_it(GCTaskManager* manager, uint which) { ParCompactionManager* cm = ParCompactionManager::gc_thread_compaction_manager(which); - ParCompactionManager::MarkAndPushClosure mark_and_push_closure(cm); + PCMarkAndPushClosure mark_and_push_closure(cm); switch (_root_type) { case universe: @@ -139,7 +140,7 @@ void RefProcTaskProxy::do_it(GCTaskManager* manager, uint which) ParCompactionManager* cm = ParCompactionManager::gc_thread_compaction_manager(which); - ParCompactionManager::MarkAndPushClosure mark_and_push_closure(cm); + PCMarkAndPushClosure mark_and_push_closure(cm); ParCompactionManager::FollowStackClosure follow_stack_closure(cm); _rp_task.work(_work_id, *PSParallelCompact::is_alive_closure(), mark_and_push_closure, follow_stack_closure); @@ -182,13 +183,12 @@ void StealMarkingTask::do_it(GCTaskManager* manager, uint which) { ParCompactionManager* cm = ParCompactionManager::gc_thread_compaction_manager(which); - ParCompactionManager::MarkAndPushClosure mark_and_push_closure(cm); oop obj = NULL; ObjArrayTask task; do { while (ParCompactionManager::steal_objarray(which, task)) { - cm->follow_contents((objArrayOop)task.obj(), task.index()); + cm->follow_array((objArrayOop)task.obj(), task.index()); cm->follow_marking_stacks(); } while (ParCompactionManager::steal(which, obj)) { diff --git a/src/hotspot/share/gc/parallel/psCompactionManager.cpp b/src/hotspot/share/gc/parallel/psCompactionManager.cpp index 1a82dae92a3..6bd34f6b878 100644 --- a/src/hotspot/share/gc/parallel/psCompactionManager.cpp +++ b/src/hotspot/share/gc/parallel/psCompactionManager.cpp @@ -132,113 +132,6 @@ ParCompactionManager::gc_thread_compaction_manager(uint index) { return _manager_array[index]; } -void InstanceKlass::oop_pc_follow_contents(oop obj, ParCompactionManager* cm) { - assert(obj != NULL, "can't follow the content of NULL object"); - - cm->follow_klass(this); - // Only mark the header and let the scan of the meta-data mark - // everything else. - - ParCompactionManager::MarkAndPushClosure cl(cm); - if (UseCompressedOops) { - InstanceKlass::oop_oop_iterate_oop_maps(obj, &cl); - } else { - InstanceKlass::oop_oop_iterate_oop_maps(obj, &cl); - } -} - -void InstanceMirrorKlass::oop_pc_follow_contents(oop obj, ParCompactionManager* cm) { - InstanceKlass::oop_pc_follow_contents(obj, cm); - - // Follow the klass field in the mirror. - Klass* klass = java_lang_Class::as_Klass(obj); - if (klass != NULL) { - // An unsafe anonymous class doesn't have its own class loader, - // so the call to follow_klass will mark and push its java mirror instead of the - // class loader. When handling the java mirror for an unsafe anonymous - // class we need to make sure its class loader data is claimed, this is done - // by calling follow_class_loader explicitly. For non-anonymous classes the - // call to follow_class_loader is made when the class loader itself is handled. - if (klass->is_instance_klass() && - InstanceKlass::cast(klass)->is_unsafe_anonymous()) { - cm->follow_class_loader(klass->class_loader_data()); - } else { - cm->follow_klass(klass); - } - } else { - // If klass is NULL then this a mirror for a primitive type. - // We don't have to follow them, since they are handled as strong - // roots in Universe::oops_do. - assert(java_lang_Class::is_primitive(obj), "Sanity check"); - } - - ParCompactionManager::MarkAndPushClosure cl(cm); - if (UseCompressedOops) { - oop_oop_iterate_statics(obj, &cl); - } else { - oop_oop_iterate_statics(obj, &cl); - } -} - -void InstanceClassLoaderKlass::oop_pc_follow_contents(oop obj, ParCompactionManager* cm) { - InstanceKlass::oop_pc_follow_contents(obj, cm); - - ClassLoaderData * const loader_data = java_lang_ClassLoader::loader_data_acquire(obj); - if (loader_data != NULL) { - cm->follow_class_loader(loader_data); - } -} - -template -static void oop_pc_follow_contents_specialized(InstanceRefKlass* klass, oop obj, ParCompactionManager* cm) { - T* referent_addr = (T*)java_lang_ref_Reference::referent_addr_raw(obj); - T heap_oop = RawAccess<>::oop_load(referent_addr); - log_develop_trace(gc, ref)("InstanceRefKlass::oop_pc_follow_contents " PTR_FORMAT, p2i(obj)); - if (!CompressedOops::is_null(heap_oop)) { - oop referent = CompressedOops::decode_not_null(heap_oop); - if (PSParallelCompact::mark_bitmap()->is_unmarked(referent) && - PSParallelCompact::ref_processor()->discover_reference(obj, klass->reference_type())) { - // reference already enqueued, referent will be traversed later - klass->InstanceKlass::oop_pc_follow_contents(obj, cm); - log_develop_trace(gc, ref)(" Non NULL enqueued " PTR_FORMAT, p2i(obj)); - return; - } else { - // treat referent as normal oop - log_develop_trace(gc, ref)(" Non NULL normal " PTR_FORMAT, p2i(obj)); - cm->mark_and_push(referent_addr); - } - } - // Treat discovered as normal oop. - T* discovered_addr = (T*)java_lang_ref_Reference::discovered_addr_raw(obj); - cm->mark_and_push(discovered_addr); - klass->InstanceKlass::oop_pc_follow_contents(obj, cm); -} - - -void InstanceRefKlass::oop_pc_follow_contents(oop obj, ParCompactionManager* cm) { - if (UseCompressedOops) { - oop_pc_follow_contents_specialized(this, obj, cm); - } else { - oop_pc_follow_contents_specialized(this, obj, cm); - } -} - -void ObjArrayKlass::oop_pc_follow_contents(oop obj, ParCompactionManager* cm) { - cm->follow_klass(this); - - if (UseCompressedOops) { - oop_pc_follow_contents_specialized(objArrayOop(obj), 0, cm); - } else { - oop_pc_follow_contents_specialized(objArrayOop(obj), 0, cm); - } -} - -void TypeArrayKlass::oop_pc_follow_contents(oop obj, ParCompactionManager* cm) { - assert(obj->is_typeArray(),"must be a type array"); - // Performance tweak: We skip iterating over the klass pointer since we - // know that Universe::TypeArrayKlass never moves. -} - void ParCompactionManager::follow_marking_stacks() { do { // Drain the overflow stack first, to allow stealing from the marking stack. @@ -253,7 +146,7 @@ void ParCompactionManager::follow_marking_stacks() { // Process ObjArrays one at a time to avoid marking stack bloat. ObjArrayTask task; if (_objarray_stack.pop_overflow(task) || _objarray_stack.pop_local(task)) { - follow_contents((objArrayOop)task.obj(), task.index()); + follow_array((objArrayOop)task.obj(), task.index()); } } while (!marking_stacks_empty()); diff --git a/src/hotspot/share/gc/parallel/psCompactionManager.hpp b/src/hotspot/share/gc/parallel/psCompactionManager.hpp index a79c360124c..782f26d813d 100644 --- a/src/hotspot/share/gc/parallel/psCompactionManager.hpp +++ b/src/hotspot/share/gc/parallel/psCompactionManager.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2018, 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 @@ -171,24 +171,10 @@ private: void drain_region_stacks(); void follow_contents(oop obj); - void follow_contents(objArrayOop array, int index); + void follow_array(objArrayOop array, int index); void update_contents(oop obj); - class MarkAndPushClosure: public BasicOopIterateClosure { - private: - ParCompactionManager* _compaction_manager; - public: - MarkAndPushClosure(ParCompactionManager* cm) : _compaction_manager(cm) { } - - template void do_oop_work(T* p); - virtual void do_oop(oop* p); - virtual void do_oop(narrowOop* p); - - // This closure provides its own oop verification code. - debug_only(virtual bool should_verify_oops() { return false; }) - }; - class FollowStackClosure: public VoidClosure { private: ParCompactionManager* _compaction_manager; diff --git a/src/hotspot/share/gc/parallel/psCompactionManager.inline.hpp b/src/hotspot/share/gc/parallel/psCompactionManager.inline.hpp index dbac5a06571..e2ad1f460eb 100644 --- a/src/hotspot/share/gc/parallel/psCompactionManager.inline.hpp +++ b/src/hotspot/share/gc/parallel/psCompactionManager.inline.hpp @@ -25,6 +25,7 @@ #ifndef SHARE_VM_GC_PARALLEL_PSCOMPACTIONMANAGER_INLINE_HPP #define SHARE_VM_GC_PARALLEL_PSCOMPACTIONMANAGER_INLINE_HPP +#include "classfile/javaClasses.inline.hpp" #include "gc/parallel/parMarkBitMap.hpp" #include "gc/parallel/psCompactionManager.hpp" #include "gc/parallel/psParallelCompact.inline.hpp" @@ -37,6 +38,37 @@ #include "utilities/debug.hpp" #include "utilities/globalDefinitions.hpp" +class PCMarkAndPushClosure: public OopClosure { +private: + ParCompactionManager* _compaction_manager; +public: + PCMarkAndPushClosure(ParCompactionManager* cm) : _compaction_manager(cm) { } + + template void do_oop_nv(T* p) { _compaction_manager->mark_and_push(p); } + virtual void do_oop(oop* p) { do_oop_nv(p); } + virtual void do_oop(narrowOop* p) { do_oop_nv(p); } + + // This closure provides its own oop verification code. + debug_only(virtual bool should_verify_oops() { return false; }) +}; + +class PCIterateMarkAndPushClosure: public MetadataVisitingOopIterateClosure { +private: + ParCompactionManager* _compaction_manager; +public: + PCIterateMarkAndPushClosure(ParCompactionManager* cm, ReferenceProcessor* rp) : MetadataVisitingOopIterateClosure(rp), _compaction_manager(cm) { } + + template void do_oop_nv(T* p) { _compaction_manager->mark_and_push(p); } + virtual void do_oop(oop* p) { do_oop_nv(p); } + virtual void do_oop(narrowOop* p) { do_oop_nv(p); } + + void do_klass_nv(Klass* k) { _compaction_manager->follow_klass(k); } + void do_cld_nv(ClassLoaderData* cld) { _compaction_manager->follow_class_loader(cld); } + + // This closure provides its own oop verification code. + debug_only(virtual bool should_verify_oops() { return false; }) +}; + inline bool ParCompactionManager::steal(int queue_num, oop& t) { return stack_array()->steal(queue_num, t); } @@ -84,14 +116,6 @@ inline void ParCompactionManager::mark_and_push(T* p) { } } -template -inline void ParCompactionManager::MarkAndPushClosure::do_oop_work(T* p) { - _compaction_manager->mark_and_push(p); -} - -inline void ParCompactionManager::MarkAndPushClosure::do_oop(oop* p) { do_oop_work(p); } -inline void ParCompactionManager::MarkAndPushClosure::do_oop(narrowOop* p) { do_oop_work(p); } - inline void ParCompactionManager::follow_klass(Klass* klass) { oop holder = klass->klass_holder(); mark_and_push(&holder); @@ -101,19 +125,8 @@ inline void ParCompactionManager::FollowStackClosure::do_void() { _compaction_manager->follow_marking_stacks(); } -inline void ParCompactionManager::follow_class_loader(ClassLoaderData* cld) { - MarkAndPushClosure mark_and_push_closure(this); - - cld->oops_do(&mark_and_push_closure, true); -} - -inline void ParCompactionManager::follow_contents(oop obj) { - assert(PSParallelCompact::mark_bitmap()->is_marked(obj), "should be marked"); - obj->pc_follow_contents(this); -} - -template -inline void oop_pc_follow_contents_specialized(objArrayOop obj, int index, ParCompactionManager* cm) { +template +inline void follow_array_specialized(objArrayOop obj, int index, ParCompactionManager* cm) { const size_t len = size_t(obj->length()); const size_t beg_index = size_t(index); assert(beg_index < len || len == 0, "index too large"); @@ -134,11 +147,11 @@ inline void oop_pc_follow_contents_specialized(objArrayOop obj, int index, ParCo } } -inline void ParCompactionManager::follow_contents(objArrayOop obj, int index) { +inline void ParCompactionManager::follow_array(objArrayOop obj, int index) { if (UseCompressedOops) { - oop_pc_follow_contents_specialized(obj, index, this); + follow_array_specialized(obj, index, this); } else { - oop_pc_follow_contents_specialized(obj, index, this); + follow_array_specialized(obj, index, this); } } @@ -146,4 +159,19 @@ inline void ParCompactionManager::update_contents(oop obj) { obj->pc_update_contents(this); } +inline void ParCompactionManager::follow_class_loader(ClassLoaderData* cld) { + PCMarkAndPushClosure mark_and_push_closure(this); + cld->oops_do(&mark_and_push_closure, true); +} + +inline void ParCompactionManager::follow_contents(oop obj) { + assert(PSParallelCompact::mark_bitmap()->is_marked(obj), "should be marked"); + if (obj->is_objArray()) { + follow_array(objArrayOop(obj), 0); + } else { + PCIterateMarkAndPushClosure cl(this, PSParallelCompact::ref_processor()); + obj->oop_iterate(&cl); + } +} + #endif // SHARE_VM_GC_PARALLEL_PSCOMPACTIONMANAGER_INLINE_HPP diff --git a/src/hotspot/share/gc/parallel/psParallelCompact.cpp b/src/hotspot/share/gc/parallel/psParallelCompact.cpp index c897eb0e2c3..a1ba62a9f51 100644 --- a/src/hotspot/share/gc/parallel/psParallelCompact.cpp +++ b/src/hotspot/share/gc/parallel/psParallelCompact.cpp @@ -846,18 +846,43 @@ PSParallelCompact::IsAliveClosure PSParallelCompact::_is_alive_closure; bool PSParallelCompact::IsAliveClosure::do_object_b(oop p) { return mark_bitmap()->is_marked(p); } +class PCReferenceProcessor: public ReferenceProcessor { +public: + PCReferenceProcessor( + BoolObjectClosure* is_subject_to_discovery, + BoolObjectClosure* is_alive_non_header) : + ReferenceProcessor(is_subject_to_discovery, + ParallelRefProcEnabled && (ParallelGCThreads > 1), // mt processing + ParallelGCThreads, // mt processing degree + true, // mt discovery + ParallelGCThreads, // mt discovery degree + true, // atomic_discovery + is_alive_non_header) { + } + + template bool discover(oop obj, ReferenceType type) { + T* referent_addr = (T*) java_lang_ref_Reference::referent_addr_raw(obj); + T heap_oop = RawAccess<>::oop_load(referent_addr); + oop referent = CompressedOops::decode_not_null(heap_oop); + return PSParallelCompact::mark_bitmap()->is_unmarked(referent) + && ReferenceProcessor::discover_reference(obj, type); + } + virtual bool discover_reference(oop obj, ReferenceType type) { + if (UseCompressedOops) { + return discover(obj, type); + } else { + return discover(obj, type); + } + } +}; + void PSParallelCompact::post_initialize() { ParallelScavengeHeap* heap = ParallelScavengeHeap::heap(); _span_based_discoverer.set_span(heap->reserved_region()); _ref_processor = - new ReferenceProcessor(&_span_based_discoverer, - ParallelRefProcEnabled && (ParallelGCThreads > 1), // mt processing - ParallelGCThreads, // mt processing degree - true, // mt discovery - ParallelGCThreads, // mt discovery degree - true, // atomic_discovery - &_is_alive_closure, // non-header is alive closure - false); // disable adjusting number of processing threads + new PCReferenceProcessor(&_span_based_discoverer, + &_is_alive_closure); // non-header is alive closure + _counters = new CollectorCounters("PSParallelCompact", 1); // Initialize static fields in ParCompactionManager. @@ -2077,7 +2102,7 @@ void PSParallelCompact::marking_phase(ParCompactionManager* cm, TaskQueueSetSuper* qset = ParCompactionManager::stack_array(); ParallelTaskTerminator terminator(active_gc_threads, qset); - ParCompactionManager::MarkAndPushClosure mark_and_push_closure(cm); + PCMarkAndPushClosure mark_and_push_closure(cm); ParCompactionManager::FollowStackClosure follow_stack_closure(cm); // Need new claim bits before marking starts. diff --git a/src/hotspot/share/oops/instanceClassLoaderKlass.hpp b/src/hotspot/share/oops/instanceClassLoaderKlass.hpp index 365c36a0344..3f4ded2f6c6 100644 --- a/src/hotspot/share/oops/instanceClassLoaderKlass.hpp +++ b/src/hotspot/share/oops/instanceClassLoaderKlass.hpp @@ -52,7 +52,6 @@ public: // #if INCLUDE_PARALLELGC // Parallel Compact - void oop_pc_follow_contents(oop obj, ParCompactionManager* cm); void oop_pc_update_pointers(oop obj, ParCompactionManager* cm); #endif diff --git a/src/hotspot/share/oops/instanceKlass.hpp b/src/hotspot/share/oops/instanceKlass.hpp index acc9a6b1e7f..efa4dce7372 100644 --- a/src/hotspot/share/oops/instanceKlass.hpp +++ b/src/hotspot/share/oops/instanceKlass.hpp @@ -1187,7 +1187,6 @@ public: // #if INCLUDE_PARALLELGC // Parallel Compact - void oop_pc_follow_contents(oop obj, ParCompactionManager* cm); void oop_pc_update_pointers(oop obj, ParCompactionManager* cm); #endif diff --git a/src/hotspot/share/oops/instanceMirrorKlass.hpp b/src/hotspot/share/oops/instanceMirrorKlass.hpp index ccfb7f6dfac..e197b94b7e8 100644 --- a/src/hotspot/share/oops/instanceMirrorKlass.hpp +++ b/src/hotspot/share/oops/instanceMirrorKlass.hpp @@ -93,7 +93,6 @@ class InstanceMirrorKlass: public InstanceKlass { // #if INCLUDE_PARALLELGC // Parallel Compact - void oop_pc_follow_contents(oop obj, ParCompactionManager* cm); void oop_pc_update_pointers(oop obj, ParCompactionManager* cm); #endif diff --git a/src/hotspot/share/oops/instanceRefKlass.hpp b/src/hotspot/share/oops/instanceRefKlass.hpp index 725d53c7e84..2966c04443f 100644 --- a/src/hotspot/share/oops/instanceRefKlass.hpp +++ b/src/hotspot/share/oops/instanceRefKlass.hpp @@ -62,7 +62,6 @@ class InstanceRefKlass: public InstanceKlass { // #if INCLUDE_PARALLELGC // Parallel Compact - void oop_pc_follow_contents(oop obj, ParCompactionManager* cm); void oop_pc_update_pointers(oop obj, ParCompactionManager* cm); #endif diff --git a/src/hotspot/share/oops/klass.hpp b/src/hotspot/share/oops/klass.hpp index 4838b5cb84a..fd753228cb0 100644 --- a/src/hotspot/share/oops/klass.hpp +++ b/src/hotspot/share/oops/klass.hpp @@ -677,7 +677,6 @@ protected: // #if INCLUDE_PARALLELGC // Parallel Compact - virtual void oop_pc_follow_contents(oop obj, ParCompactionManager* cm) = 0; virtual void oop_pc_update_pointers(oop obj, ParCompactionManager* cm) = 0; #endif diff --git a/src/hotspot/share/oops/objArrayKlass.hpp b/src/hotspot/share/oops/objArrayKlass.hpp index 25633341346..42958b39232 100644 --- a/src/hotspot/share/oops/objArrayKlass.hpp +++ b/src/hotspot/share/oops/objArrayKlass.hpp @@ -124,7 +124,6 @@ class ObjArrayKlass : public ArrayKlass { // #if INCLUDE_PARALLELGC // Parallel Compact - void oop_pc_follow_contents(oop obj, ParCompactionManager* cm); void oop_pc_update_pointers(oop obj, ParCompactionManager* cm); #endif diff --git a/src/hotspot/share/oops/oop.hpp b/src/hotspot/share/oops/oop.hpp index ff1f0b09500..15efce0dbb7 100644 --- a/src/hotspot/share/oops/oop.hpp +++ b/src/hotspot/share/oops/oop.hpp @@ -289,7 +289,6 @@ class oopDesc { #if INCLUDE_PARALLELGC // Parallel Compact - inline void pc_follow_contents(ParCompactionManager* cm); inline void pc_update_contents(ParCompactionManager* cm); #endif diff --git a/src/hotspot/share/oops/oop.inline.hpp b/src/hotspot/share/oops/oop.inline.hpp index 6732f62ed1b..e95f60d8c3a 100644 --- a/src/hotspot/share/oops/oop.inline.hpp +++ b/src/hotspot/share/oops/oop.inline.hpp @@ -427,9 +427,6 @@ void oopDesc::incr_age() { } #if INCLUDE_PARALLELGC -void oopDesc::pc_follow_contents(ParCompactionManager* cm) { - klass()->oop_pc_follow_contents(this, cm); -} void oopDesc::pc_update_contents(ParCompactionManager* cm) { Klass* k = klass(); diff --git a/src/hotspot/share/oops/typeArrayKlass.hpp b/src/hotspot/share/oops/typeArrayKlass.hpp index c267855fca3..bc2da542a20 100644 --- a/src/hotspot/share/oops/typeArrayKlass.hpp +++ b/src/hotspot/share/oops/typeArrayKlass.hpp @@ -79,7 +79,6 @@ class TypeArrayKlass : public ArrayKlass { #if INCLUDE_PARALLELGC // Parallel Compact - void oop_pc_follow_contents(oop obj, ParCompactionManager* cm); void oop_pc_update_pointers(oop obj, ParCompactionManager* cm); #endif From e898052f3b63e9bc332566872ea53661084dfdfb Mon Sep 17 00:00:00 2001 From: Leo Korinth Date: Fri, 12 Oct 2018 12:14:01 +0200 Subject: [PATCH 111/124] 8211447: Replace oop_pc_update_pointers with oop_iterate and closure Reviewed-by: sjohanss, tschatzl --- .../parallel/psCompactionManager.inline.hpp | 5 +- .../share/gc/parallel/psParallelCompact.cpp | 72 +------------------ .../share/gc/parallel/psParallelCompact.hpp | 17 ----- .../gc/parallel/psParallelCompact.inline.hpp | 21 ++++-- .../share/oops/instanceClassLoaderKlass.hpp | 10 +-- src/hotspot/share/oops/instanceKlass.hpp | 7 -- .../share/oops/instanceMirrorKlass.hpp | 7 -- src/hotspot/share/oops/instanceRefKlass.hpp | 7 -- src/hotspot/share/oops/klass.hpp | 7 -- src/hotspot/share/oops/objArrayKlass.hpp | 7 -- src/hotspot/share/oops/oop.hpp | 7 -- src/hotspot/share/oops/oop.inline.hpp | 12 ---- src/hotspot/share/oops/typeArrayKlass.hpp | 8 --- 13 files changed, 21 insertions(+), 166 deletions(-) diff --git a/src/hotspot/share/gc/parallel/psCompactionManager.inline.hpp b/src/hotspot/share/gc/parallel/psCompactionManager.inline.hpp index e2ad1f460eb..8160b31be22 100644 --- a/src/hotspot/share/gc/parallel/psCompactionManager.inline.hpp +++ b/src/hotspot/share/gc/parallel/psCompactionManager.inline.hpp @@ -156,7 +156,10 @@ inline void ParCompactionManager::follow_array(objArrayOop obj, int index) { } inline void ParCompactionManager::update_contents(oop obj) { - obj->pc_update_contents(this); + if (!obj->klass()->is_typeArray_klass()) { + PCAdjustPointerClosure apc(this); + obj->oop_iterate(&apc); + } } inline void ParCompactionManager::follow_class_loader(ClassLoaderData* cld) { diff --git a/src/hotspot/share/gc/parallel/psParallelCompact.cpp b/src/hotspot/share/gc/parallel/psParallelCompact.cpp index a1ba62a9f51..e98e572c4e3 100644 --- a/src/hotspot/share/gc/parallel/psParallelCompact.cpp +++ b/src/hotspot/share/gc/parallel/psParallelCompact.cpp @@ -2203,7 +2203,7 @@ void PSParallelCompact::adjust_roots(ParCompactionManager* cm) { // Need new claim bits when tracing through and adjusting pointers. ClassLoaderDataGraph::clear_claimed_marks(); - PSParallelCompact::AdjustPointerClosure oop_closure(cm); + PCAdjustPointerClosure oop_closure(cm); // General strong roots. Universe::oops_do(&oop_closure); @@ -3096,76 +3096,6 @@ void MoveAndUpdateClosure::copy_partial_obj() update_state(words); } -void InstanceKlass::oop_pc_update_pointers(oop obj, ParCompactionManager* cm) { - PSParallelCompact::AdjustPointerClosure closure(cm); - if (UseCompressedOops) { - oop_oop_iterate_oop_maps(obj, &closure); - } else { - oop_oop_iterate_oop_maps(obj, &closure); - } -} - -void InstanceMirrorKlass::oop_pc_update_pointers(oop obj, ParCompactionManager* cm) { - InstanceKlass::oop_pc_update_pointers(obj, cm); - - PSParallelCompact::AdjustPointerClosure closure(cm); - if (UseCompressedOops) { - oop_oop_iterate_statics(obj, &closure); - } else { - oop_oop_iterate_statics(obj, &closure); - } -} - -void InstanceClassLoaderKlass::oop_pc_update_pointers(oop obj, ParCompactionManager* cm) { - InstanceKlass::oop_pc_update_pointers(obj, cm); -} - -#ifdef ASSERT -template static void trace_reference_gc(const char *s, oop obj, - T* referent_addr, - T* discovered_addr) { - log_develop_trace(gc, ref)("%s obj " PTR_FORMAT, s, p2i(obj)); - log_develop_trace(gc, ref)(" referent_addr/* " PTR_FORMAT " / " PTR_FORMAT, - p2i(referent_addr), referent_addr ? p2i((oop)RawAccess<>::oop_load(referent_addr)) : NULL); - log_develop_trace(gc, ref)(" discovered_addr/* " PTR_FORMAT " / " PTR_FORMAT, - p2i(discovered_addr), discovered_addr ? p2i((oop)RawAccess<>::oop_load(discovered_addr)) : NULL); -} -#endif - -template -static void oop_pc_update_pointers_specialized(oop obj, ParCompactionManager* cm) { - T* referent_addr = (T*)java_lang_ref_Reference::referent_addr_raw(obj); - PSParallelCompact::adjust_pointer(referent_addr, cm); - T* discovered_addr = (T*)java_lang_ref_Reference::discovered_addr_raw(obj); - PSParallelCompact::adjust_pointer(discovered_addr, cm); - debug_only(trace_reference_gc("InstanceRefKlass::oop_update_ptrs", obj, - referent_addr, discovered_addr);) -} - -void InstanceRefKlass::oop_pc_update_pointers(oop obj, ParCompactionManager* cm) { - InstanceKlass::oop_pc_update_pointers(obj, cm); - - if (UseCompressedOops) { - oop_pc_update_pointers_specialized(obj, cm); - } else { - oop_pc_update_pointers_specialized(obj, cm); - } -} - -void ObjArrayKlass::oop_pc_update_pointers(oop obj, ParCompactionManager* cm) { - assert(obj->is_objArray(), "obj must be obj array"); - PSParallelCompact::AdjustPointerClosure closure(cm); - if (UseCompressedOops) { - oop_oop_iterate_elements(objArrayOop(obj), &closure); - } else { - oop_oop_iterate_elements(objArrayOop(obj), &closure); - } -} - -void TypeArrayKlass::oop_pc_update_pointers(oop obj, ParCompactionManager* cm) { - assert(obj->is_typeArray(),"must be a type array"); -} - ParMarkBitMapClosure::IterationStatus MoveAndUpdateClosure::do_addr(HeapWord* addr, size_t words) { assert(destination() != NULL, "sanity"); diff --git a/src/hotspot/share/gc/parallel/psParallelCompact.hpp b/src/hotspot/share/gc/parallel/psParallelCompact.hpp index 9c752d12cca..6477c68983c 100644 --- a/src/hotspot/share/gc/parallel/psParallelCompact.hpp +++ b/src/hotspot/share/gc/parallel/psParallelCompact.hpp @@ -934,23 +934,6 @@ class PSParallelCompact : AllStatic { virtual bool do_object_b(oop p); }; - class AdjustPointerClosure: public BasicOopIterateClosure { - public: - AdjustPointerClosure(ParCompactionManager* cm) { - assert(cm != NULL, "associate ParCompactionManage should not be NULL"); - _cm = cm; - } - template void do_oop_work(T* p); - virtual void do_oop(oop* p); - virtual void do_oop(narrowOop* p); - - // This closure provides its own oop verification code. - debug_only(virtual bool should_verify_oops() { return false; }) - private: - ParCompactionManager* _cm; - }; - - friend class AdjustPointerClosure; friend class RefProcTaskProxy; friend class PSParallelCompactTest; diff --git a/src/hotspot/share/gc/parallel/psParallelCompact.inline.hpp b/src/hotspot/share/gc/parallel/psParallelCompact.inline.hpp index 0633d5e5368..c1949e2de0d 100644 --- a/src/hotspot/share/gc/parallel/psParallelCompact.inline.hpp +++ b/src/hotspot/share/gc/parallel/psParallelCompact.inline.hpp @@ -124,12 +124,21 @@ inline void PSParallelCompact::adjust_pointer(T* p, ParCompactionManager* cm) { } } -template -void PSParallelCompact::AdjustPointerClosure::do_oop_work(T* p) { - adjust_pointer(p, _cm); -} +class PCAdjustPointerClosure: public BasicOopIterateClosure { +public: + PCAdjustPointerClosure(ParCompactionManager* cm) { + assert(cm != NULL, "associate ParCompactionManage should not be NULL"); + _cm = cm; + } + template void do_oop_nv(T* p) { PSParallelCompact::adjust_pointer(p, _cm); } + virtual void do_oop(oop* p) { do_oop_nv(p); } + virtual void do_oop(narrowOop* p) { do_oop_nv(p); } -inline void PSParallelCompact::AdjustPointerClosure::do_oop(oop* p) { do_oop_work(p); } -inline void PSParallelCompact::AdjustPointerClosure::do_oop(narrowOop* p) { do_oop_work(p); } + // This closure provides its own oop verification code. + debug_only(virtual bool should_verify_oops() { return false; }) + virtual ReferenceIterationMode reference_iteration_mode() { return DO_FIELDS; } +private: + ParCompactionManager* _cm; +}; #endif // SHARE_VM_GC_PARALLEL_PSPARALLELCOMPACT_INLINE_HPP diff --git a/src/hotspot/share/oops/instanceClassLoaderKlass.hpp b/src/hotspot/share/oops/instanceClassLoaderKlass.hpp index 3f4ded2f6c6..c8dac589d2d 100644 --- a/src/hotspot/share/oops/instanceClassLoaderKlass.hpp +++ b/src/hotspot/share/oops/instanceClassLoaderKlass.hpp @@ -33,7 +33,7 @@ class ClassFileParser; // An InstanceClassLoaderKlass is a specialization of the InstanceKlass. It does // not add any field. It is added to walk the dependencies for the class loader // key that this class loader points to. This is how the loader_data graph is -// walked and dependant class loaders are kept alive. I thought we walked +// walked and dependent class loaders are kept alive. I thought we walked // the list later? class InstanceClassLoaderKlass: public InstanceKlass { @@ -48,18 +48,10 @@ private: public: InstanceClassLoaderKlass() { assert(DumpSharedSpaces || UseSharedSpaces, "only for CDS"); } - // GC specific object visitors - // -#if INCLUDE_PARALLELGC - // Parallel Compact - void oop_pc_update_pointers(oop obj, ParCompactionManager* cm); -#endif - // Oop fields (and metadata) iterators // // The InstanceClassLoaderKlass iterators also visit the CLD pointer (or mirror of anonymous klasses.) - public: // Forward iteration // Iterate over the oop fields and metadata. template diff --git a/src/hotspot/share/oops/instanceKlass.hpp b/src/hotspot/share/oops/instanceKlass.hpp index efa4dce7372..f207d4b7728 100644 --- a/src/hotspot/share/oops/instanceKlass.hpp +++ b/src/hotspot/share/oops/instanceKlass.hpp @@ -1183,13 +1183,6 @@ public: const char* signature_name() const; static Symbol* package_from_name(const Symbol* name, TRAPS); - // GC specific object visitors - // -#if INCLUDE_PARALLELGC - // Parallel Compact - void oop_pc_update_pointers(oop obj, ParCompactionManager* cm); -#endif - // Oop fields (and metadata) iterators // // The InstanceKlass iterators also visits the Object's klass. diff --git a/src/hotspot/share/oops/instanceMirrorKlass.hpp b/src/hotspot/share/oops/instanceMirrorKlass.hpp index e197b94b7e8..c2e905d6770 100644 --- a/src/hotspot/share/oops/instanceMirrorKlass.hpp +++ b/src/hotspot/share/oops/instanceMirrorKlass.hpp @@ -89,13 +89,6 @@ class InstanceMirrorKlass: public InstanceKlass { // allocation instanceOop allocate_instance(Klass* k, TRAPS); - // GC specific object visitors - // -#if INCLUDE_PARALLELGC - // Parallel Compact - void oop_pc_update_pointers(oop obj, ParCompactionManager* cm); -#endif - static void serialize_offsets(class SerializeClosure* f) NOT_CDS_RETURN; // Oop fields (and metadata) iterators diff --git a/src/hotspot/share/oops/instanceRefKlass.hpp b/src/hotspot/share/oops/instanceRefKlass.hpp index 2966c04443f..66086bc1248 100644 --- a/src/hotspot/share/oops/instanceRefKlass.hpp +++ b/src/hotspot/share/oops/instanceRefKlass.hpp @@ -58,13 +58,6 @@ class InstanceRefKlass: public InstanceKlass { public: InstanceRefKlass() { assert(DumpSharedSpaces || UseSharedSpaces, "only for CDS"); } - // GC specific object visitors - // -#if INCLUDE_PARALLELGC - // Parallel Compact - void oop_pc_update_pointers(oop obj, ParCompactionManager* cm); -#endif - // Oop fields (and metadata) iterators // // The InstanceRefKlass iterators also support reference processing. diff --git a/src/hotspot/share/oops/klass.hpp b/src/hotspot/share/oops/klass.hpp index fd753228cb0..35ea1367832 100644 --- a/src/hotspot/share/oops/klass.hpp +++ b/src/hotspot/share/oops/klass.hpp @@ -673,13 +673,6 @@ protected: clean_weak_klass_links(/*unloading_occurred*/ true , /* clean_alive_klasses */ false); } - // GC specific object visitors - // -#if INCLUDE_PARALLELGC - // Parallel Compact - virtual void oop_pc_update_pointers(oop obj, ParCompactionManager* cm) = 0; -#endif - virtual void array_klasses_do(void f(Klass* k)) {} // Return self, except for abstract classes with exactly 1 diff --git a/src/hotspot/share/oops/objArrayKlass.hpp b/src/hotspot/share/oops/objArrayKlass.hpp index 42958b39232..10ae0cf95c9 100644 --- a/src/hotspot/share/oops/objArrayKlass.hpp +++ b/src/hotspot/share/oops/objArrayKlass.hpp @@ -120,13 +120,6 @@ class ObjArrayKlass : public ArrayKlass { // Initialization (virtual from Klass) void initialize(TRAPS); - // GC specific object visitors - // -#if INCLUDE_PARALLELGC - // Parallel Compact - void oop_pc_update_pointers(oop obj, ParCompactionManager* cm); -#endif - // Oop fields (and metadata) iterators // // The ObjArrayKlass iterators also visits the Object's klass. diff --git a/src/hotspot/share/oops/oop.hpp b/src/hotspot/share/oops/oop.hpp index 15efce0dbb7..9002037aa84 100644 --- a/src/hotspot/share/oops/oop.hpp +++ b/src/hotspot/share/oops/oop.hpp @@ -285,13 +285,6 @@ class oopDesc { // mark-sweep support void follow_body(int begin, int end); - // Garbage Collection support - -#if INCLUDE_PARALLELGC - // Parallel Compact - inline void pc_update_contents(ParCompactionManager* cm); -#endif - template inline void oop_iterate(OopClosureType* cl); diff --git a/src/hotspot/share/oops/oop.inline.hpp b/src/hotspot/share/oops/oop.inline.hpp index e95f60d8c3a..93dbe9e9b2a 100644 --- a/src/hotspot/share/oops/oop.inline.hpp +++ b/src/hotspot/share/oops/oop.inline.hpp @@ -426,18 +426,6 @@ void oopDesc::incr_age() { } } -#if INCLUDE_PARALLELGC - -void oopDesc::pc_update_contents(ParCompactionManager* cm) { - Klass* k = klass(); - if (!k->is_typeArray_klass()) { - // It might contain oops beyond the header, so take the virtual call. - k->oop_pc_update_pointers(this, cm); - } - // Else skip it. The TypeArrayKlass in the header never needs scavenging. -} -#endif // INCLUDE_PARALLELGC - template void oopDesc::oop_iterate(OopClosureType* cl) { OopIteratorClosureDispatch::oop_oop_iterate(cl, this, klass()); diff --git a/src/hotspot/share/oops/typeArrayKlass.hpp b/src/hotspot/share/oops/typeArrayKlass.hpp index bc2da542a20..a237be1cca3 100644 --- a/src/hotspot/share/oops/typeArrayKlass.hpp +++ b/src/hotspot/share/oops/typeArrayKlass.hpp @@ -74,14 +74,6 @@ class TypeArrayKlass : public ArrayKlass { // Copying void copy_array(arrayOop s, int src_pos, arrayOop d, int dst_pos, int length, TRAPS); - // GC specific object visitors - // - -#if INCLUDE_PARALLELGC - // Parallel Compact - void oop_pc_update_pointers(oop obj, ParCompactionManager* cm); -#endif - // Oop iterators. Since there are no oops in TypeArrayKlasses, // these functions only return the size of the object. From 497de20391725e39f71b1d47feb34059cf45677b Mon Sep 17 00:00:00 2001 From: Sean Coffey Date: Mon, 15 Oct 2018 14:42:31 +0100 Subject: [PATCH 112/124] 8209862: CipherCore performance improvement Co-authored-by: Sergey Kuksenko Reviewed-by: apetcher, ascarpino --- .../com/sun/crypto/provider/CipherCore.java | 212 +++++++++++------- 1 file changed, 126 insertions(+), 86 deletions(-) diff --git a/src/java.base/share/classes/com/sun/crypto/provider/CipherCore.java b/src/java.base/share/classes/com/sun/crypto/provider/CipherCore.java index 81027aab8dc..f641eaa320f 100644 --- a/src/java.base/share/classes/com/sun/crypto/provider/CipherCore.java +++ b/src/java.base/share/classes/com/sun/crypto/provider/CipherCore.java @@ -253,11 +253,10 @@ final class CipherCore { return result; } - /** * Sets the padding mechanism of this cipher. * - * @param padding the padding mechanism + * @param paddingScheme the padding mechanism * * @exception NoSuchPaddingException if the requested padding mechanism * does not exist @@ -660,10 +659,7 @@ final class CipherCore { * (e.g., has not been initialized) */ byte[] update(byte[] input, int inputOffset, int inputLen) { - if (requireReinit) { - throw new IllegalStateException - ("Must use either different key or iv for GCM encryption"); - } + checkReinit(); byte[] output = null; try { @@ -711,10 +707,7 @@ final class CipherCore { */ int update(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset) throws ShortBufferException { - if (requireReinit) { - throw new IllegalStateException - ("Must use either different key or iv for GCM encryption"); - } + checkReinit(); // figure out how much can be sent to crypto function int len = Math.addExact(buffered, inputLen); @@ -849,12 +842,20 @@ final class CipherCore { */ byte[] doFinal(byte[] input, int inputOffset, int inputLen) throws IllegalBlockSizeException, BadPaddingException { - byte[] output = null; try { - output = new byte[getOutputSizeByOperation(inputLen, true)]; - int len = doFinal(input, inputOffset, inputLen, output, 0); - if (len < output.length) { - byte[] copy = Arrays.copyOf(output, len); + checkReinit(); + byte[] output = new byte[getOutputSizeByOperation(inputLen, true)]; + byte[] finalBuf = prepareInputBuffer(input, inputOffset, + inputLen, output, 0); + int finalOffset = (finalBuf == input) ? inputOffset : 0; + int finalBufLen = (finalBuf == input) ? inputLen : finalBuf.length; + + int outLen = fillOutputBuffer(finalBuf, finalOffset, output, 0, + finalBufLen, input); + + endDoFinal(); + if (outLen < output.length) { + byte[] copy = Arrays.copyOf(output, outLen); if (decrypting) { // Zero out internal (ouput) array Arrays.fill(output, (byte) 0x00); @@ -909,26 +910,81 @@ final class CipherCore { int outputOffset) throws IllegalBlockSizeException, ShortBufferException, BadPaddingException { - if (requireReinit) { - throw new IllegalStateException - ("Must use either different key or iv for GCM encryption"); - } + checkReinit(); int estOutSize = getOutputSizeByOperation(inputLen, true); - // check output buffer capacity. - // if we are decrypting with padding applied, we can perform this - // check only after we have determined how many padding bytes there - // are. - int outputCapacity = output.length - outputOffset; - int minOutSize = (decrypting? (estOutSize - blockSize):estOutSize); - if ((output == null) || (outputCapacity < minOutSize)) { - throw new ShortBufferException("Output buffer must be " - + "(at least) " + minOutSize + " bytes long"); - } + int outputCapacity = checkOutputCapacity(output, outputOffset, + estOutSize); + int offset = decrypting ? 0 : outputOffset; // 0 for decrypting + byte[] finalBuf = prepareInputBuffer(input, inputOffset, + inputLen, output, outputOffset); + byte[] outWithPadding = null; // for decrypting only + int finalOffset = (finalBuf == input) ? inputOffset : 0; + int finalBufLen = (finalBuf == input) ? inputLen : finalBuf.length; + + if (decrypting) { + // if the size of specified output buffer is less than + // the length of the cipher text, then the current + // content of cipher has to be preserved in order for + // users to retry the call with a larger buffer in the + // case of ShortBufferException. + if (outputCapacity < estOutSize) { + cipher.save(); + } + // create temporary output buffer so that only "real" + // data bytes are passed to user's output buffer. + outWithPadding = new byte[estOutSize]; + } + byte[] outBuffer = decrypting ? outWithPadding : output; + + int outLen = fillOutputBuffer(finalBuf, finalOffset, outBuffer, + offset, finalBufLen, input); + + if (decrypting) { + + if (outputCapacity < outLen) { + // restore so users can retry with a larger buffer + cipher.restore(); + throw new ShortBufferException("Output buffer too short: " + + (outputCapacity) + + " bytes given, " + outLen + + " bytes needed"); + } + // copy the result into user-supplied output buffer + System.arraycopy(outWithPadding, 0, output, outputOffset, outLen); + // decrypt mode. Zero out output data that's not required + Arrays.fill(outWithPadding, (byte) 0x00); + } + endDoFinal(); + return outLen; + } + + private void endDoFinal() { + buffered = 0; + diffBlocksize = blockSize; + if (cipherMode != ECB_MODE) { + cipher.reset(); + } + } + + private int unpad(int outLen, byte[] outWithPadding) + throws BadPaddingException { + int padStart = padding.unpad(outWithPadding, 0, outLen); + if (padStart < 0) { + throw new BadPaddingException("Given final block not " + + "properly padded. Such issues can arise if a bad key " + + "is used during decryption."); + } + outLen = padStart; + return outLen; + } + + private byte[] prepareInputBuffer(byte[] input, int inputOffset, + int inputLen, byte[] output, int outputOffset) + throws IllegalBlockSizeException, ShortBufferException { // calculate total input length int len = Math.addExact(buffered, inputLen); - // calculate padding length int totalLen = Math.addExact(len, cipher.getBufferedLength()); int paddingLen = 0; @@ -958,18 +1014,15 @@ final class CipherCore { * - there are internally buffered bytes * - doing encryption and padding is needed */ - byte[] finalBuf = input; - int finalOffset = inputOffset; - int finalBufLen = inputLen; if ((buffered != 0) || (!decrypting && padding != null) || ((input == output) && (outputOffset - inputOffset < inputLen) && (inputOffset - outputOffset < buffer.length))) { + byte[] finalBuf; if (decrypting || padding == null) { paddingLen = 0; } finalBuf = new byte[Math.addExact(len, paddingLen)]; - finalOffset = 0; if (buffered != 0) { System.arraycopy(buffer, 0, finalBuf, 0, buffered); if (!decrypting) { @@ -980,56 +1033,31 @@ final class CipherCore { } if (inputLen != 0) { System.arraycopy(input, inputOffset, finalBuf, - buffered, inputLen); + buffered, inputLen); } if (paddingLen != 0) { padding.padWithLen(finalBuf, Math.addExact(buffered, inputLen), paddingLen); } - finalBufLen = finalBuf.length; + return finalBuf; } - int outLen = 0; - if (decrypting) { - // if the size of specified output buffer is less than - // the length of the cipher text, then the current - // content of cipher has to be preserved in order for - // users to retry the call with a larger buffer in the - // case of ShortBufferException. - if (outputCapacity < estOutSize) { - cipher.save(); - } - // create temporary output buffer so that only "real" - // data bytes are passed to user's output buffer. - byte[] outWithPadding = new byte[estOutSize]; - outLen = finalNoPadding(finalBuf, finalOffset, outWithPadding, - 0, finalBufLen); + return input; + } - if (padding != null) { - int padStart = padding.unpad(outWithPadding, 0, outLen); - if (padStart < 0) { - throw new BadPaddingException("Given final block not " + - "properly padded. Such issues can arise if a bad key " + - "is used during decryption."); - } - outLen = padStart; + private int fillOutputBuffer(byte[] finalBuf, int finalOffset, + byte[] output, int outOfs, int finalBufLen, + byte[] input) + throws ShortBufferException, BadPaddingException, + IllegalBlockSizeException { + int len; + try { + len = finalNoPadding(finalBuf, finalOffset, output, + outOfs, finalBufLen); + if (decrypting && padding != null) { + len = unpad(len, output); } - - if (outputCapacity < outLen) { - // restore so users can retry with a larger buffer - cipher.restore(); - throw new ShortBufferException("Output buffer too short: " - + (outputCapacity) - + " bytes given, " + outLen - + " bytes needed"); - } - // copy the result into user-supplied output buffer - System.arraycopy(outWithPadding, 0, output, outputOffset, outLen); - // decrypt mode. Zero out output data that's not required - Arrays.fill(outWithPadding, (byte) 0x00); - } else { // encrypting - try { - outLen = finalNoPadding(finalBuf, finalOffset, output, - outputOffset, finalBufLen); - } finally { + return len; + } finally { + if (!decrypting) { // reset after doFinal() for GCM encryption requireReinit = (cipherMode == GCM_MODE); if (finalBuf != input) { @@ -1038,13 +1066,28 @@ final class CipherCore { } } } + } - buffered = 0; - diffBlocksize = blockSize; - if (cipherMode != ECB_MODE) { - cipher.reset(); + private int checkOutputCapacity(byte[] output, int outputOffset, + int estOutSize) throws ShortBufferException { + // check output buffer capacity. + // if we are decrypting with padding applied, we can perform this + // check only after we have determined how many padding bytes there + // are. + int outputCapacity = output.length - outputOffset; + int minOutSize = decrypting ? (estOutSize - blockSize) : estOutSize; + if ((output == null) || (outputCapacity < minOutSize)) { + throw new ShortBufferException("Output buffer must be " + + "(at least) " + minOutSize + " bytes long"); + } + return outputCapacity; + } + + private void checkReinit() { + if (requireReinit) { + throw new IllegalStateException + ("Must use either different key or iv for GCM encryption"); } - return outLen; } private int finalNoPadding(byte[] in, int inOfs, byte[] out, int outOfs, @@ -1177,10 +1220,7 @@ final class CipherCore { * @since 1.8 */ void updateAAD(byte[] src, int offset, int len) { - if (requireReinit) { - throw new IllegalStateException - ("Must use either different key or iv for GCM encryption"); - } + checkReinit(); cipher.updateAAD(src, offset, len); } } From 4fe2edae5948e95f1940a64a3e9d4379e8362d8c Mon Sep 17 00:00:00 2001 From: John Jiang Date: Mon, 15 Oct 2018 22:47:03 +0800 Subject: [PATCH 113/124] 8211978: Move testlibrary/jdk/testlibrary/SimpleSSLContext.java and testkeys to network testlibrary Move SimpleSSLContext.java and testkeys to test/lib/jdk/test/lib/net Reviewed-by: chegar --- .../com/sun/net/httpserver/SelCacheTest.java | 8 +- test/jdk/com/sun/net/httpserver/Test1.java | 8 +- test/jdk/com/sun/net/httpserver/Test12.java | 10 +- test/jdk/com/sun/net/httpserver/Test13.java | 10 +- test/jdk/com/sun/net/httpserver/Test6a.java | 10 +- test/jdk/com/sun/net/httpserver/Test7a.java | 10 +- test/jdk/com/sun/net/httpserver/Test8a.java | 10 +- test/jdk/com/sun/net/httpserver/Test9.java | 10 +- test/jdk/com/sun/net/httpserver/Test9a.java | 10 +- .../HTTPSetAuthenticatorTest.java | 6 +- .../SetAuthenticator/HTTPTest.java | 8 +- test/jdk/java/net/URLPermission/URLTest.java | 8 +- .../java/net/httpclient/AbstractNoBody.java | 2 +- .../AbstractThrowingPublishers.java | 2 +- .../AbstractThrowingPushPromises.java | 6 +- .../AbstractThrowingSubscribers.java | 2 +- .../net/httpclient/AsFileDownloadTest.java | 6 +- .../net/httpclient/AsFileDownloadTest.policy | 6 +- .../net/httpclient/BasicRedirectTest.java | 6 +- .../net/httpclient/CancelledResponse.java | 6 +- .../net/httpclient/ConcurrentResponses.java | 6 +- .../java/net/httpclient/CookieHeaderTest.java | 6 +- .../httpclient/CustomRequestPublisher.java | 6 +- .../httpclient/CustomResponseSubscriber.java | 6 +- .../net/httpclient/DependentActionsTest.java | 6 +- .../DependentPromiseActionsTest.java | 6 +- .../java/net/httpclient/DigestEchoClient.java | 6 +- .../net/httpclient/DigestEchoClientSSL.java | 4 +- test/jdk/java/net/httpclient/EchoHandler.java | 2 +- .../net/httpclient/EncodedCharsInURI.java | 6 +- .../net/httpclient/EscapedOctetsInURI.java | 6 +- .../java/net/httpclient/ExpectContinue.java | 6 +- .../httpclient/FlowAdapterPublisherTest.java | 6 +- .../httpclient/FlowAdapterSubscriberTest.java | 8 +- test/jdk/java/net/httpclient/HeadTest.java | 6 +- .../net/httpclient/HttpClientBuilderTest.java | 6 +- .../java/net/httpclient/HttpEchoHandler.java | 2 +- .../java/net/httpclient/HttpsTunnelTest.java | 6 +- .../net/httpclient/ImmutableFlowItems.java | 6 +- ...InvalidInputStreamSubscriptionRequest.java | 6 +- .../net/httpclient/InvalidSSLContextTest.java | 6 +- .../InvalidSubscriptionRequest.java | 6 +- .../net/httpclient/LightWeightHttpServer.java | 6 +- .../net/httpclient/LineBodyHandlerTest.java | 6 +- .../jdk/java/net/httpclient/ManyRequests.java | 6 +- .../java/net/httpclient/ManyRequests2.java | 13 +- .../net/httpclient/ManyRequestsLegacy.java | 13 +- .../httpclient/MappingResponseSubscriber.java | 6 +- test/jdk/java/net/httpclient/MaxStreams.java | 6 +- .../java/net/httpclient/NoBodyPartOne.java | 4 +- .../java/net/httpclient/NoBodyPartTwo.java | 4 +- .../net/httpclient/NonAsciiCharsInURI.java | 6 +- .../httpclient/ProxyAuthDisabledSchemes.java | 4 +- .../ProxyAuthDisabledSchemesSSL.java | 4 +- test/jdk/java/net/httpclient/ProxyTest.java | 8 +- .../net/httpclient/RedirectMethodChange.java | 6 +- .../net/httpclient/RedirectWithCookie.java | 6 +- .../java/net/httpclient/RequestBodyTest.java | 4 +- .../net/httpclient/RequestBodyTest.policy | 6 +- .../httpclient/ResponseBodyBeforeError.java | 6 +- .../net/httpclient/ResponsePublisher.java | 6 +- .../java/net/httpclient/RetryWithCookie.java | 6 +- .../java/net/httpclient/ServerCloseTest.java | 6 +- .../net/httpclient/ShortResponseBody.java | 6 +- .../ShortResponseBodyWithRetry.java | 4 +- test/jdk/java/net/httpclient/SmokeTest.java | 6 +- .../net/httpclient/SpecialHeadersTest.java | 6 +- .../java/net/httpclient/SplitResponse.java | 6 +- .../net/httpclient/SplitResponseAsync.java | 6 +- .../httpclient/SplitResponseKeepAlive.java | 6 +- .../SplitResponseKeepAliveAsync.java | 6 +- .../java/net/httpclient/SplitResponseSSL.java | 6 +- .../net/httpclient/SplitResponseSSLAsync.java | 6 +- .../httpclient/SplitResponseSSLKeepAlive.java | 6 +- .../SplitResponseSSLKeepAliveAsync.java | 6 +- .../java/net/httpclient/StreamingBody.java | 6 +- .../ThrowingPublishersCustomAfterCancel.java | 4 +- .../ThrowingPublishersCustomBeforeCancel.java | 4 +- .../ThrowingPublishersIOAfterCancel.java | 4 +- .../ThrowingPublishersIOBeforeCancel.java | 4 +- .../ThrowingPublishersInNextRequest.java | 4 +- .../ThrowingPublishersInRequest.java | 4 +- .../ThrowingPublishersInSubscribe.java | 4 +- .../httpclient/ThrowingPublishersSanity.java | 4 +- ...rowingPushPromisesAsInputStreamCustom.java | 4 +- .../ThrowingPushPromisesAsInputStreamIO.java | 4 +- .../ThrowingPushPromisesAsLinesCustom.java | 4 +- .../ThrowingPushPromisesAsLinesIO.java | 4 +- .../ThrowingPushPromisesAsStringCustom.java | 4 +- .../ThrowingPushPromisesAsStringIO.java | 4 +- .../ThrowingPushPromisesSanity.java | 4 +- .../ThrowingSubscribersAsInputStream.java | 4 +- ...ThrowingSubscribersAsInputStreamAsync.java | 4 +- .../ThrowingSubscribersAsLines.java | 4 +- .../ThrowingSubscribersAsLinesAsync.java | 4 +- .../ThrowingSubscribersAsString.java | 4 +- .../ThrowingSubscribersAsStringAsync.java | 4 +- .../httpclient/ThrowingSubscribersSanity.java | 4 +- .../jdk/java/net/httpclient/TimeoutBasic.java | 6 +- .../java/net/httpclient/UnauthorizedTest.java | 6 +- .../net/httpclient/UnknownBodyLengthTest.java | 6 +- test/jdk/java/net/httpclient/dependent.policy | 6 +- .../net/httpclient/http2/BadHeadersTest.java | 6 +- .../java/net/httpclient/http2/BasicTest.java | 6 +- .../http2/ContinuationFrameTest.java | 6 +- .../java/net/httpclient/http2/ErrorTest.java | 6 +- .../httpclient/http2/FixedThreadPoolTest.java | 6 +- .../httpclient/http2/ImplicitPushCancel.java | 4 +- .../java/net/httpclient/http2/ProxyTest2.java | 8 +- .../net/httpclient/http2/RedirectTest.java | 4 +- .../java/net/httpclient/http2/ServerPush.java | 4 +- .../http2/ServerPushWithDiffTypes.java | 4 +- .../java/net/httpclient/security/Driver.java | 3 +- .../net/httpclient/security/Security.java | 4 +- .../websocket/WSHandshakeExceptionTest.java | 6 +- .../net/http/AbstractSSLTubeTest.java | 83 +------------ .../jdk/internal/net/http/FlowTest.java | 86 +------------- .../internal/net/http/SimpleSSLContext.java | 112 ++++++++++++++++++ .../net/ssl/HttpsURLConnection/Equals.java | 8 +- .../net/www/protocol/http/RedirectOnPost.java | 8 +- .../jdk/test/lib/net}/SimpleSSLContext.java | 31 ++--- .../jdk/test/lib/net}/testkeys | Bin 122 files changed, 463 insertions(+), 520 deletions(-) create mode 100644 test/jdk/java/net/httpclient/whitebox/java.net.http/jdk/internal/net/http/SimpleSSLContext.java rename test/{jdk/lib/testlibrary/jdk/testlibrary => lib/jdk/test/lib/net}/SimpleSSLContext.java (82%) rename test/{jdk/lib/testlibrary/jdk/testlibrary => lib/jdk/test/lib/net}/testkeys (100%) diff --git a/test/jdk/com/sun/net/httpserver/SelCacheTest.java b/test/jdk/com/sun/net/httpserver/SelCacheTest.java index 8c644bccfa5..9100401af27 100644 --- a/test/jdk/com/sun/net/httpserver/SelCacheTest.java +++ b/test/jdk/com/sun/net/httpserver/SelCacheTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2018, 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 @@ -24,14 +24,14 @@ /** * @test * @bug 6270015 - * @library /lib/testlibrary/ - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext * @run main/othervm -Dsun.net.httpserver.selCacheTimeout=2 SelCacheTest * @summary Light weight HTTP server */ import com.sun.net.httpserver.*; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import java.util.*; import java.util.concurrent.*; diff --git a/test/jdk/com/sun/net/httpserver/Test1.java b/test/jdk/com/sun/net/httpserver/Test1.java index 55d278fe1ae..f79b204f995 100644 --- a/test/jdk/com/sun/net/httpserver/Test1.java +++ b/test/jdk/com/sun/net/httpserver/Test1.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2018, 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 @@ -24,8 +24,8 @@ /** * @test * @bug 6270015 - * @library /lib/testlibrary/ - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext * @run main/othervm Test1 * @run main/othervm -Dsun.net.httpserver.maxReqTime=10 Test1 * @run main/othervm -Dsun.net.httpserver.nodelay=true Test1 @@ -38,7 +38,7 @@ import java.util.concurrent.*; import java.io.*; import java.net.*; import javax.net.ssl.*; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; /* basic http/s connectivity test * Tests: diff --git a/test/jdk/com/sun/net/httpserver/Test12.java b/test/jdk/com/sun/net/httpserver/Test12.java index 910ec385a9c..dd724c267ce 100644 --- a/test/jdk/com/sun/net/httpserver/Test12.java +++ b/test/jdk/com/sun/net/httpserver/Test12.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2018, 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 @@ -24,10 +24,10 @@ /** * @test * @bug 6270015 - * @library /lib/testlibrary/ - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext * @run main/othervm Test12 - * @summary Light weight HTTP server + * @summary Light weight HTTP server */ import com.sun.net.httpserver.*; @@ -36,7 +36,7 @@ import java.util.concurrent.*; import java.io.*; import java.net.*; import javax.net.ssl.*; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; /* basic http/s connectivity test * Tests: diff --git a/test/jdk/com/sun/net/httpserver/Test13.java b/test/jdk/com/sun/net/httpserver/Test13.java index 0436f8b0643..6061cc0776c 100644 --- a/test/jdk/com/sun/net/httpserver/Test13.java +++ b/test/jdk/com/sun/net/httpserver/Test13.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2018, 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 @@ -24,10 +24,10 @@ /** * @test * @bug 6270015 - * @library /lib/testlibrary/ - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext * @run main/othervm Test13 - * @summary Light weight HTTP server + * @summary Light weight HTTP server */ import com.sun.net.httpserver.*; @@ -37,7 +37,7 @@ import java.util.logging.*; import java.io.*; import java.net.*; import javax.net.ssl.*; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; /* basic http/s connectivity test * Tests: diff --git a/test/jdk/com/sun/net/httpserver/Test6a.java b/test/jdk/com/sun/net/httpserver/Test6a.java index fd5a48ee730..18b5dfe3953 100644 --- a/test/jdk/com/sun/net/httpserver/Test6a.java +++ b/test/jdk/com/sun/net/httpserver/Test6a.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2018, 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 @@ -24,10 +24,10 @@ /** * @test * @bug 6270015 - * @library /lib/testlibrary/ - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext * @run main/othervm Test6a - * @summary Light weight HTTP server + * @summary Light weight HTTP server */ import com.sun.net.httpserver.*; @@ -36,7 +36,7 @@ import java.util.concurrent.*; import java.io.*; import java.net.*; import javax.net.ssl.*; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; /** * Test https POST large file via chunked encoding (unusually small chunks) diff --git a/test/jdk/com/sun/net/httpserver/Test7a.java b/test/jdk/com/sun/net/httpserver/Test7a.java index 3599edf2030..b170cded2aa 100644 --- a/test/jdk/com/sun/net/httpserver/Test7a.java +++ b/test/jdk/com/sun/net/httpserver/Test7a.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2018, 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 @@ -24,10 +24,10 @@ /** * @test * @bug 6270015 - * @library /lib/testlibrary/ - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext * @run main/othervm Test7a - * @summary Light weight HTTP server + * @summary Light weight HTTP server */ import com.sun.net.httpserver.*; @@ -36,7 +36,7 @@ import java.util.concurrent.*; import java.io.*; import java.net.*; import javax.net.ssl.*; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; /** * Test POST large file via chunked encoding (large chunks) diff --git a/test/jdk/com/sun/net/httpserver/Test8a.java b/test/jdk/com/sun/net/httpserver/Test8a.java index ac11931cacd..daf65e21fa7 100644 --- a/test/jdk/com/sun/net/httpserver/Test8a.java +++ b/test/jdk/com/sun/net/httpserver/Test8a.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2018, 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 @@ -24,10 +24,10 @@ /** * @test * @bug 6270015 - * @library /lib/testlibrary/ - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext * @run main/othervm Test8a - * @summary Light weight HTTP server + * @summary Light weight HTTP server */ import com.sun.net.httpserver.*; @@ -36,7 +36,7 @@ import java.util.concurrent.*; import java.io.*; import java.net.*; import javax.net.ssl.*; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; /** * Test POST large file via fixed len encoding diff --git a/test/jdk/com/sun/net/httpserver/Test9.java b/test/jdk/com/sun/net/httpserver/Test9.java index 581b9e54c9f..fa0588a91fc 100644 --- a/test/jdk/com/sun/net/httpserver/Test9.java +++ b/test/jdk/com/sun/net/httpserver/Test9.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2018, 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 @@ -24,10 +24,10 @@ /** * @test * @bug 6270015 - * @library /lib/testlibrary/ - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext * @run main/othervm Test9 - * @summary Light weight HTTP server + * @summary Light weight HTTP server */ import com.sun.net.httpserver.*; @@ -36,7 +36,7 @@ import java.util.concurrent.*; import java.io.*; import java.net.*; import javax.net.ssl.*; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; /* Same as Test1 but requests run in parallel. */ diff --git a/test/jdk/com/sun/net/httpserver/Test9a.java b/test/jdk/com/sun/net/httpserver/Test9a.java index 6fd3f16562a..ff5be52be0b 100644 --- a/test/jdk/com/sun/net/httpserver/Test9a.java +++ b/test/jdk/com/sun/net/httpserver/Test9a.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2018, 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 @@ -24,10 +24,10 @@ /** * @test * @bug 6270015 - * @library /lib/testlibrary/ - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext * @run main/othervm Test9a - * @summary Light weight HTTP server + * @summary Light weight HTTP server */ import com.sun.net.httpserver.*; @@ -36,7 +36,7 @@ import java.util.concurrent.*; import java.io.*; import java.net.*; import javax.net.ssl.*; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; /* Same as Test1 but requests run in parallel. */ diff --git a/test/jdk/java/net/HttpURLConnection/SetAuthenticator/HTTPSetAuthenticatorTest.java b/test/jdk/java/net/HttpURLConnection/SetAuthenticator/HTTPSetAuthenticatorTest.java index 144236e1f64..c916b13db43 100644 --- a/test/jdk/java/net/HttpURLConnection/SetAuthenticator/HTTPSetAuthenticatorTest.java +++ b/test/jdk/java/net/HttpURLConnection/SetAuthenticator/HTTPSetAuthenticatorTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2018, 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 @@ -35,12 +35,12 @@ import java.util.stream.Stream; /* * @test * @bug 8169415 - * @library /lib/testlibrary/ + * @library /test/lib * @modules java.logging * java.base/sun.net.www * java.base/sun.net.www.protocol.http * jdk.httpserver/sun.net.httpserver - * @build jdk.testlibrary.SimpleSSLContext HTTPTest HTTPTestServer HTTPTestClient HTTPSetAuthenticatorTest + * @build jdk.test.lib.net.SimpleSSLContext HTTPTest HTTPTestServer HTTPTestClient HTTPSetAuthenticatorTest * @summary A simple HTTP test that starts an echo server supporting the given * authentication scheme, then starts a regular HTTP client to invoke it. * The client first does a GET request on "/", then follows on diff --git a/test/jdk/java/net/HttpURLConnection/SetAuthenticator/HTTPTest.java b/test/jdk/java/net/HttpURLConnection/SetAuthenticator/HTTPTest.java index ba7d729dc27..9a6cd93dd00 100644 --- a/test/jdk/java/net/HttpURLConnection/SetAuthenticator/HTTPTest.java +++ b/test/jdk/java/net/HttpURLConnection/SetAuthenticator/HTTPTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2018, 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,16 +41,16 @@ import javax.net.ssl.HostnameVerifier; import javax.net.ssl.HttpsURLConnection; import javax.net.ssl.SSLContext; import javax.net.ssl.SSLSession; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; /* * @test * @bug 8169415 - * @library /lib/testlibrary/ + * @library /test/lib * @modules java.logging * java.base/sun.net.www * jdk.httpserver/sun.net.httpserver - * @build jdk.testlibrary.SimpleSSLContext HTTPTest HTTPTestServer HTTPTestClient + * @build jdk.test.lib.net.SimpleSSLContext HTTPTest HTTPTestServer HTTPTestClient * @summary A simple HTTP test that starts an echo server supporting Digest * authentication, then starts a regular HTTP client to invoke it. * The client first does a GET request on "/", then follows on diff --git a/test/jdk/java/net/URLPermission/URLTest.java b/test/jdk/java/net/URLPermission/URLTest.java index 1923eb681f4..763738db46c 100644 --- a/test/jdk/java/net/URLPermission/URLTest.java +++ b/test/jdk/java/net/URLPermission/URLTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2018, 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 @@ -26,8 +26,8 @@ import java.net.URLPermission; * @test * @bug 8010464 * @modules jdk.httpserver - * @library /lib/testlibrary/ - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext * @run main/othervm URLTest * @summary check URLPermission with Http(s)URLConnection */ @@ -38,7 +38,7 @@ import java.security.*; import java.util.concurrent.*; import com.sun.net.httpserver.*; import javax.net.ssl.*; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; public class URLTest { diff --git a/test/jdk/java/net/httpclient/AbstractNoBody.java b/test/jdk/java/net/httpclient/AbstractNoBody.java index afe4865d060..38ae9b758f6 100644 --- a/test/jdk/java/net/httpclient/AbstractNoBody.java +++ b/test/jdk/java/net/httpclient/AbstractNoBody.java @@ -35,7 +35,7 @@ import com.sun.net.httpserver.HttpsConfigurator; import com.sun.net.httpserver.HttpsServer; import java.net.http.HttpClient; import javax.net.ssl.SSLContext; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.DataProvider; diff --git a/test/jdk/java/net/httpclient/AbstractThrowingPublishers.java b/test/jdk/java/net/httpclient/AbstractThrowingPublishers.java index 35d1a68f02f..38c5208cf55 100644 --- a/test/jdk/java/net/httpclient/AbstractThrowingPublishers.java +++ b/test/jdk/java/net/httpclient/AbstractThrowingPublishers.java @@ -24,7 +24,7 @@ import com.sun.net.httpserver.HttpServer; import com.sun.net.httpserver.HttpsConfigurator; import com.sun.net.httpserver.HttpsServer; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterClass; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; diff --git a/test/jdk/java/net/httpclient/AbstractThrowingPushPromises.java b/test/jdk/java/net/httpclient/AbstractThrowingPushPromises.java index e829a617f60..ed324a6e5a9 100644 --- a/test/jdk/java/net/httpclient/AbstractThrowingPushPromises.java +++ b/test/jdk/java/net/httpclient/AbstractThrowingPushPromises.java @@ -25,8 +25,8 @@ * @test * @summary Tests what happens when push promise handlers and their * response body handlers and subscribers throw unexpected exceptions. - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * ReferenceTracker AbstractThrowingPushPromises * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common @@ -35,7 +35,7 @@ * @run testng/othervm -Djdk.internal.httpclient.debug=true AbstractThrowingPushPromises */ -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeTest; diff --git a/test/jdk/java/net/httpclient/AbstractThrowingSubscribers.java b/test/jdk/java/net/httpclient/AbstractThrowingSubscribers.java index 6e9759086dc..72ec7bb05c5 100644 --- a/test/jdk/java/net/httpclient/AbstractThrowingSubscribers.java +++ b/test/jdk/java/net/httpclient/AbstractThrowingSubscribers.java @@ -24,7 +24,7 @@ import com.sun.net.httpserver.HttpServer; import com.sun.net.httpserver.HttpsConfigurator; import com.sun.net.httpserver.HttpsServer; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeTest; diff --git a/test/jdk/java/net/httpclient/AsFileDownloadTest.java b/test/jdk/java/net/httpclient/AsFileDownloadTest.java index 52b5a1f90d0..2d22a1a841f 100644 --- a/test/jdk/java/net/httpclient/AsFileDownloadTest.java +++ b/test/jdk/java/net/httpclient/AsFileDownloadTest.java @@ -31,9 +31,9 @@ * java.net.http/jdk.internal.net.http.hpack * java.logging * jdk.httpserver - * @library /lib/testlibrary /test/lib http2/server + * @library /test/lib http2/server * @build Http2TestServer - * @build jdk.testlibrary.SimpleSSLContext + * @build jdk.test.lib.net.SimpleSSLContext * @build jdk.test.lib.Platform * @build jdk.test.lib.util.FileUtils * @run testng/othervm AsFileDownloadTest @@ -67,7 +67,7 @@ import java.util.List; import java.util.Locale; import java.util.Map; import javax.net.ssl.SSLContext; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import jdk.test.lib.util.FileUtils; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; diff --git a/test/jdk/java/net/httpclient/AsFileDownloadTest.policy b/test/jdk/java/net/httpclient/AsFileDownloadTest.policy index a8454c470e2..0f38171503d 100644 --- a/test/jdk/java/net/httpclient/AsFileDownloadTest.policy +++ b/test/jdk/java/net/httpclient/AsFileDownloadTest.policy @@ -21,10 +21,10 @@ // questions. // -// for JTwork/classes/0/lib/testlibrary/jdk/testlibrary/SimpleSSLContext.class -grant codeBase "file:${test.classes}/../../../../lib/testlibrary/-" { +// for JTwork/classes/0/test/lib/jdk/test/lib/net/SimpleSSLContext.class +grant codeBase "file:${test.classes}/../../../../test/lib/-" { permission java.util.PropertyPermission "test.src.path", "read"; - permission java.io.FilePermission "${test.src}/../../../lib/testlibrary/jdk/testlibrary/testkeys", "read"; + permission java.io.FilePermission "${test.src}/../../../../lib/jdk/test/lib/net/testkeys", "read"; }; // for JTwork//classes/0/java/net/httpclient/http2/server/* diff --git a/test/jdk/java/net/httpclient/BasicRedirectTest.java b/test/jdk/java/net/httpclient/BasicRedirectTest.java index f446e1bb7a6..8fb36b7454b 100644 --- a/test/jdk/java/net/httpclient/BasicRedirectTest.java +++ b/test/jdk/java/net/httpclient/BasicRedirectTest.java @@ -30,9 +30,9 @@ * java.net.http/jdk.internal.net.http.hpack * java.logging * jdk.httpserver - * @library /lib/testlibrary /test/lib http2/server + * @library /test/lib http2/server * @build Http2TestServer - * @build jdk.testlibrary.SimpleSSLContext + * @build jdk.test.lib.net.SimpleSSLContext * @run testng/othervm * -Djdk.httpclient.HttpClient.log=trace,headers,requests * BasicRedirectTest @@ -53,7 +53,7 @@ import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.net.http.HttpResponse.BodyHandlers; import javax.net.ssl.SSLContext; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.DataProvider; diff --git a/test/jdk/java/net/httpclient/CancelledResponse.java b/test/jdk/java/net/httpclient/CancelledResponse.java index 528c8991e3f..f69bf066ba2 100644 --- a/test/jdk/java/net/httpclient/CancelledResponse.java +++ b/test/jdk/java/net/httpclient/CancelledResponse.java @@ -26,7 +26,7 @@ import java.net.http.HttpClient.Version; import java.net.http.HttpHeaders; import java.net.http.HttpRequest; import java.net.http.HttpResponse; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import javax.net.ServerSocketFactory; import javax.net.ssl.SSLContext; @@ -55,9 +55,9 @@ import static java.nio.charset.StandardCharsets.ISO_8859_1; /** * @test * @bug 8087112 - * @library /lib/testlibrary + * @library /test/lib * @modules java.net.http/jdk.internal.net.http.common - * @build jdk.testlibrary.SimpleSSLContext + * @build jdk.test.lib.net.SimpleSSLContext * @build MockServer ReferenceTracker * @run main/othervm CancelledResponse * @run main/othervm CancelledResponse SSL diff --git a/test/jdk/java/net/httpclient/ConcurrentResponses.java b/test/jdk/java/net/httpclient/ConcurrentResponses.java index 2a61b17b79d..718a1b6aee6 100644 --- a/test/jdk/java/net/httpclient/ConcurrentResponses.java +++ b/test/jdk/java/net/httpclient/ConcurrentResponses.java @@ -32,9 +32,9 @@ * java.net.http/jdk.internal.net.http.hpack * java.logging * jdk.httpserver - * @library /lib/testlibrary http2/server + * @library /test/lib http2/server * @build Http2TestServer - * @build jdk.testlibrary.SimpleSSLContext + * @build jdk.test.lib.net.SimpleSSLContext * @run testng/othervm * -Djdk.httpclient.HttpClient.log=headers,errors,channel * ConcurrentResponses @@ -67,7 +67,7 @@ import java.net.http.HttpResponse.BodyHandler; import java.net.http.HttpResponse.BodyHandlers; import java.net.http.HttpResponse.BodySubscriber; import java.net.http.HttpResponse.BodySubscribers; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.DataProvider; diff --git a/test/jdk/java/net/httpclient/CookieHeaderTest.java b/test/jdk/java/net/httpclient/CookieHeaderTest.java index 4c770ad337e..f5c9b57d376 100644 --- a/test/jdk/java/net/httpclient/CookieHeaderTest.java +++ b/test/jdk/java/net/httpclient/CookieHeaderTest.java @@ -31,9 +31,9 @@ * java.net.http/jdk.internal.net.http.hpack * java.logging * jdk.httpserver - * @library /lib/testlibrary /test/lib http2/server + * @library /test/lib http2/server * @build Http2TestServer - * @build jdk.testlibrary.SimpleSSLContext + * @build jdk.test.lib.net.SimpleSSLContext * @run testng/othervm * -Djdk.tls.acknowledgeCloseNotify=true * -Djdk.httpclient.HttpClient.log=trace,headers,requests @@ -43,7 +43,7 @@ import com.sun.net.httpserver.HttpServer; import com.sun.net.httpserver.HttpsConfigurator; import com.sun.net.httpserver.HttpsServer; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.DataProvider; diff --git a/test/jdk/java/net/httpclient/CustomRequestPublisher.java b/test/jdk/java/net/httpclient/CustomRequestPublisher.java index 0aeb398b0e9..34c7f8611ac 100644 --- a/test/jdk/java/net/httpclient/CustomRequestPublisher.java +++ b/test/jdk/java/net/httpclient/CustomRequestPublisher.java @@ -30,9 +30,9 @@ * java.net.http/jdk.internal.net.http.hpack * java.logging * jdk.httpserver - * @library /lib/testlibrary http2/server + * @library /test/lib http2/server * @build Http2TestServer - * @build jdk.testlibrary.SimpleSSLContext + * @build jdk.test.lib.net.SimpleSSLContext * @run testng/othervm CustomRequestPublisher */ @@ -62,7 +62,7 @@ import javax.net.ssl.SSLSession; import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.DataProvider; diff --git a/test/jdk/java/net/httpclient/CustomResponseSubscriber.java b/test/jdk/java/net/httpclient/CustomResponseSubscriber.java index c91f1052192..ff7460ec4d5 100644 --- a/test/jdk/java/net/httpclient/CustomResponseSubscriber.java +++ b/test/jdk/java/net/httpclient/CustomResponseSubscriber.java @@ -24,8 +24,8 @@ /* * @test * @summary Tests response body subscribers's onComplete is not invoked before onSubscribe - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common * java.net.http/jdk.internal.net.http.frame @@ -57,7 +57,7 @@ import java.net.http.HttpResponse.BodyHandler; import java.net.http.HttpResponse.BodySubscriber; import java.net.http.HttpResponse.BodySubscribers; import javax.net.ssl.SSLContext; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.DataProvider; diff --git a/test/jdk/java/net/httpclient/DependentActionsTest.java b/test/jdk/java/net/httpclient/DependentActionsTest.java index 72563ecd482..ea715a1832b 100644 --- a/test/jdk/java/net/httpclient/DependentActionsTest.java +++ b/test/jdk/java/net/httpclient/DependentActionsTest.java @@ -26,8 +26,8 @@ * @summary Verify that dependent synchronous actions added before the CF * completes are executed either asynchronously in an executor when the * CF later completes, or in the user thread that joins. - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters DependentActionsTest + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters DependentActionsTest * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common * java.net.http/jdk.internal.net.http.frame @@ -43,7 +43,7 @@ import java.lang.StackWalker.StackFrame; import com.sun.net.httpserver.HttpServer; import com.sun.net.httpserver.HttpsConfigurator; import com.sun.net.httpserver.HttpsServer; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeTest; diff --git a/test/jdk/java/net/httpclient/DependentPromiseActionsTest.java b/test/jdk/java/net/httpclient/DependentPromiseActionsTest.java index 65843f046e0..94e7d39e5c8 100644 --- a/test/jdk/java/net/httpclient/DependentPromiseActionsTest.java +++ b/test/jdk/java/net/httpclient/DependentPromiseActionsTest.java @@ -26,8 +26,8 @@ * @summary Verify that dependent synchronous actions added before the promise CF * completes are executed either asynchronously in an executor when the * CF later completes, or in the user thread that joins. - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters DependentPromiseActionsTest + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters DependentPromiseActionsTest * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common * java.net.http/jdk.internal.net.http.frame @@ -40,7 +40,7 @@ import java.io.BufferedReader; import java.io.InputStreamReader; import java.lang.StackWalker.StackFrame; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeTest; diff --git a/test/jdk/java/net/httpclient/DigestEchoClient.java b/test/jdk/java/net/httpclient/DigestEchoClient.java index 0a51ede7843..a3321dc3b3c 100644 --- a/test/jdk/java/net/httpclient/DigestEchoClient.java +++ b/test/jdk/java/net/httpclient/DigestEchoClient.java @@ -51,7 +51,7 @@ import java.util.concurrent.atomic.AtomicLong; import java.util.stream.Collectors; import java.util.stream.Stream; import javax.net.ssl.SSLContext; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import sun.net.NetProperties; import sun.net.www.HeaderParser; import static java.lang.System.out; @@ -62,8 +62,8 @@ import static java.lang.String.format; * @summary this test verifies that a client may provides authorization * headers directly when connecting with a server. * @bug 8087112 - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters DigestEchoServer + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters DigestEchoServer * ReferenceTracker DigestEchoClient * @modules java.net.http/jdk.internal.net.http.common * java.net.http/jdk.internal.net.http.frame diff --git a/test/jdk/java/net/httpclient/DigestEchoClientSSL.java b/test/jdk/java/net/httpclient/DigestEchoClientSSL.java index f2d3b1b07c2..63e86912a5c 100644 --- a/test/jdk/java/net/httpclient/DigestEchoClientSSL.java +++ b/test/jdk/java/net/httpclient/DigestEchoClientSSL.java @@ -26,8 +26,8 @@ * @bug 8087112 * @summary this test verifies that a client may provides authorization * headers directly when connecting with a server over SSL. - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext DigestEchoServer + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext DigestEchoServer * DigestEchoClient ReferenceTracker DigestEchoClientSSL * @modules java.net.http/jdk.internal.net.http.common * java.net.http/jdk.internal.net.http.frame diff --git a/test/jdk/java/net/httpclient/EchoHandler.java b/test/jdk/java/net/httpclient/EchoHandler.java index 64c9b0851b9..9fd86083801 100644 --- a/test/jdk/java/net/httpclient/EchoHandler.java +++ b/test/jdk/java/net/httpclient/EchoHandler.java @@ -32,7 +32,7 @@ import java.util.HashSet; import java.util.LinkedList; import java.util.List; import java.util.Random; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import static java.net.http.HttpRequest.*; import static java.net.http.HttpResponse.*; import java.util.logging.ConsoleHandler; diff --git a/test/jdk/java/net/httpclient/EncodedCharsInURI.java b/test/jdk/java/net/httpclient/EncodedCharsInURI.java index 94f68096d21..6d7a42e8532 100644 --- a/test/jdk/java/net/httpclient/EncodedCharsInURI.java +++ b/test/jdk/java/net/httpclient/EncodedCharsInURI.java @@ -26,8 +26,8 @@ * @bug 8199683 * @summary Tests that escaped characters in URI are correctly * handled (not re-escaped and not unescaped) - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters EncodedCharsInURI + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters EncodedCharsInURI * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common * java.net.http/jdk.internal.net.http.frame @@ -42,7 +42,7 @@ import com.sun.net.httpserver.HttpServer; import com.sun.net.httpserver.HttpsConfigurator; import com.sun.net.httpserver.HttpsServer; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterClass; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; diff --git a/test/jdk/java/net/httpclient/EscapedOctetsInURI.java b/test/jdk/java/net/httpclient/EscapedOctetsInURI.java index 5e509c1d2a6..9e44f6aac97 100644 --- a/test/jdk/java/net/httpclient/EscapedOctetsInURI.java +++ b/test/jdk/java/net/httpclient/EscapedOctetsInURI.java @@ -31,9 +31,9 @@ * java.net.http/jdk.internal.net.http.hpack * java.logging * jdk.httpserver - * @library /lib/testlibrary http2/server + * @library /test/lib http2/server * @build Http2TestServer - * @build jdk.testlibrary.SimpleSSLContext + * @build jdk.test.lib.net.SimpleSSLContext * @run testng/othervm * -Djdk.httpclient.HttpClient.log=reqeusts,headers * EscapedOctetsInURI @@ -58,7 +58,7 @@ import java.net.http.HttpResponse.BodyHandlers; import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.DataProvider; diff --git a/test/jdk/java/net/httpclient/ExpectContinue.java b/test/jdk/java/net/httpclient/ExpectContinue.java index 8715b4b10fe..f3bed36c75c 100644 --- a/test/jdk/java/net/httpclient/ExpectContinue.java +++ b/test/jdk/java/net/httpclient/ExpectContinue.java @@ -26,8 +26,8 @@ * @summary Basic test for Expect 100-Continue ( HTTP/1.1 only ) * @modules java.net.http * jdk.httpserver - * @library /lib/testlibrary - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext * @run testng/othervm ExpectContinue */ @@ -49,7 +49,7 @@ import java.net.http.HttpResponse; import java.net.http.HttpResponse.BodyHandlers; import java.util.List; import javax.net.ssl.SSLContext; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.DataProvider; diff --git a/test/jdk/java/net/httpclient/FlowAdapterPublisherTest.java b/test/jdk/java/net/httpclient/FlowAdapterPublisherTest.java index fb1ad779bba..73dea64edfd 100644 --- a/test/jdk/java/net/httpclient/FlowAdapterPublisherTest.java +++ b/test/jdk/java/net/httpclient/FlowAdapterPublisherTest.java @@ -43,7 +43,7 @@ import com.sun.net.httpserver.HttpsServer; import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.DataProvider; @@ -67,9 +67,9 @@ import static org.testng.Assert.fail; * java.net.http/jdk.internal.net.http.hpack * java.logging * jdk.httpserver - * @library /lib/testlibrary http2/server + * @library /test/lib http2/server * @build Http2TestServer - * @build jdk.testlibrary.SimpleSSLContext + * @build jdk.test.lib.net.SimpleSSLContext * @run testng/othervm FlowAdapterPublisherTest */ diff --git a/test/jdk/java/net/httpclient/FlowAdapterSubscriberTest.java b/test/jdk/java/net/httpclient/FlowAdapterSubscriberTest.java index 9d5b0848134..8a2796c991f 100644 --- a/test/jdk/java/net/httpclient/FlowAdapterSubscriberTest.java +++ b/test/jdk/java/net/httpclient/FlowAdapterSubscriberTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2018, 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 @@ -48,7 +48,7 @@ import java.net.http.HttpRequest.BodyPublishers; import java.net.http.HttpResponse; import java.net.http.HttpResponse.BodyHandlers; import java.net.http.HttpResponse.BodySubscribers; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.DataProvider; @@ -68,9 +68,9 @@ import static org.testng.Assert.assertTrue; * java.net.http/jdk.internal.net.http.hpack * java.logging * jdk.httpserver - * @library /lib/testlibrary http2/server + * @library /test/lib http2/server * @build Http2TestServer - * @build jdk.testlibrary.SimpleSSLContext + * @build jdk.test.lib.net.SimpleSSLContext * @run testng/othervm -Djdk.internal.httpclient.debug=true FlowAdapterSubscriberTest */ diff --git a/test/jdk/java/net/httpclient/HeadTest.java b/test/jdk/java/net/httpclient/HeadTest.java index 8910f4b33bd..30fb5741d5d 100644 --- a/test/jdk/java/net/httpclient/HeadTest.java +++ b/test/jdk/java/net/httpclient/HeadTest.java @@ -31,9 +31,9 @@ * java.net.http/jdk.internal.net.http.hpack * java.logging * jdk.httpserver - * @library /lib/testlibrary /test/lib http2/server + * @library /test/lib http2/server * @build Http2TestServer - * @build jdk.testlibrary.SimpleSSLContext + * @build jdk.test.lib.net.SimpleSSLContext * @run testng/othervm * -Djdk.httpclient.HttpClient.log=trace,headers,requests * HeadTest @@ -42,7 +42,7 @@ import com.sun.net.httpserver.HttpServer; import com.sun.net.httpserver.HttpsConfigurator; import com.sun.net.httpserver.HttpsServer; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.DataProvider; diff --git a/test/jdk/java/net/httpclient/HttpClientBuilderTest.java b/test/jdk/java/net/httpclient/HttpClientBuilderTest.java index c041f3108be..121793014db 100644 --- a/test/jdk/java/net/httpclient/HttpClientBuilderTest.java +++ b/test/jdk/java/net/httpclient/HttpClientBuilderTest.java @@ -48,7 +48,7 @@ import javax.net.ssl.SSLParameters; import java.net.http.HttpClient; import java.net.http.HttpClient.Redirect; import java.net.http.HttpClient.Version; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.Test; import static java.time.Duration.*; import static org.testng.Assert.*; @@ -56,8 +56,8 @@ import static org.testng.Assert.*; /* * @test * @summary HttpClient[.Builder] API and behaviour checks - * @library /lib/testlibrary/ - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext * @run testng HttpClientBuilderTest */ diff --git a/test/jdk/java/net/httpclient/HttpEchoHandler.java b/test/jdk/java/net/httpclient/HttpEchoHandler.java index e375cca2d95..319a5b901f9 100644 --- a/test/jdk/java/net/httpclient/HttpEchoHandler.java +++ b/test/jdk/java/net/httpclient/HttpEchoHandler.java @@ -32,7 +32,7 @@ import java.util.HashSet; import java.util.LinkedList; import java.util.List; import java.util.Random; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import static java.net.http.HttpRequest.*; import static java.net.http.HttpResponse.*; import java.util.logging.ConsoleHandler; diff --git a/test/jdk/java/net/httpclient/HttpsTunnelTest.java b/test/jdk/java/net/httpclient/HttpsTunnelTest.java index d582e41745f..14f509d4f4e 100644 --- a/test/jdk/java/net/httpclient/HttpsTunnelTest.java +++ b/test/jdk/java/net/httpclient/HttpsTunnelTest.java @@ -23,7 +23,7 @@ import com.sun.net.httpserver.HttpsConfigurator; import com.sun.net.httpserver.HttpsServer; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import javax.net.ssl.SSLContext; import java.net.InetAddress; import java.net.InetSocketAddress; @@ -49,8 +49,8 @@ import static java.lang.System.out; * be preemptively downgraded. That, is the stack should attempt * a new h2 connection to the new host. * @bug 8196967 - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters DigestEchoServer HttpsTunnelTest + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters DigestEchoServer HttpsTunnelTest * @modules java.net.http/jdk.internal.net.http.common * java.net.http/jdk.internal.net.http.frame * java.net.http/jdk.internal.net.http.hpack diff --git a/test/jdk/java/net/httpclient/ImmutableFlowItems.java b/test/jdk/java/net/httpclient/ImmutableFlowItems.java index a9bfe032aa4..9a22a34bfe0 100644 --- a/test/jdk/java/net/httpclient/ImmutableFlowItems.java +++ b/test/jdk/java/net/httpclient/ImmutableFlowItems.java @@ -25,8 +25,8 @@ * @test * @summary Tests response body subscribers's onNext's Lists are unmodifiable, * and that the buffers are read-only - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common * java.net.http/jdk.internal.net.http.frame @@ -57,7 +57,7 @@ import java.net.http.HttpResponse.BodyHandler; import java.net.http.HttpResponse.BodySubscriber; import java.net.http.HttpResponse.BodySubscribers; import javax.net.ssl.SSLContext; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.DataProvider; diff --git a/test/jdk/java/net/httpclient/InvalidInputStreamSubscriptionRequest.java b/test/jdk/java/net/httpclient/InvalidInputStreamSubscriptionRequest.java index 02815e8ddfb..1a7791f336a 100644 --- a/test/jdk/java/net/httpclient/InvalidInputStreamSubscriptionRequest.java +++ b/test/jdk/java/net/httpclient/InvalidInputStreamSubscriptionRequest.java @@ -26,8 +26,8 @@ * @summary Tests an asynchronous BodySubscriber that completes * immediately with an InputStream which issues bad * requests - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext ReferenceTracker + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext ReferenceTracker * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common * java.net.http/jdk.internal.net.http.frame @@ -38,7 +38,7 @@ import com.sun.net.httpserver.HttpServer; import com.sun.net.httpserver.HttpsConfigurator; import com.sun.net.httpserver.HttpsServer; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterClass; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; diff --git a/test/jdk/java/net/httpclient/InvalidSSLContextTest.java b/test/jdk/java/net/httpclient/InvalidSSLContextTest.java index 49e1d8b060c..8f5dceb5706 100644 --- a/test/jdk/java/net/httpclient/InvalidSSLContextTest.java +++ b/test/jdk/java/net/httpclient/InvalidSSLContextTest.java @@ -25,8 +25,8 @@ * @test * @summary Test to ensure the HTTP client throws an appropriate SSL exception * when SSL context is not valid. - * @library /lib/testlibrary - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext * @run testng/othervm -Djdk.internal.httpclient.debug=true InvalidSSLContextTest */ @@ -47,7 +47,7 @@ import java.net.http.HttpClient.Version; import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.net.http.HttpResponse.BodyHandlers; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.Assert; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; diff --git a/test/jdk/java/net/httpclient/InvalidSubscriptionRequest.java b/test/jdk/java/net/httpclient/InvalidSubscriptionRequest.java index da2b5cf1d48..adcf169730c 100644 --- a/test/jdk/java/net/httpclient/InvalidSubscriptionRequest.java +++ b/test/jdk/java/net/httpclient/InvalidSubscriptionRequest.java @@ -27,8 +27,8 @@ * @summary Tests an asynchronous BodySubscriber that completes * immediately with a Publisher> whose * subscriber issues bad requests - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext ReferenceTracker + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext ReferenceTracker * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common * java.net.http/jdk.internal.net.http.frame @@ -39,7 +39,7 @@ import com.sun.net.httpserver.HttpServer; import com.sun.net.httpserver.HttpsConfigurator; import com.sun.net.httpserver.HttpsServer; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.DataProvider; diff --git a/test/jdk/java/net/httpclient/LightWeightHttpServer.java b/test/jdk/java/net/httpclient/LightWeightHttpServer.java index 39d2990c748..54fa174296f 100644 --- a/test/jdk/java/net/httpclient/LightWeightHttpServer.java +++ b/test/jdk/java/net/httpclient/LightWeightHttpServer.java @@ -22,8 +22,8 @@ */ /** - * library /lib/testlibrary/ / - * build jdk.testlibrary.SimpleSSLContext ProxyServer + * library /test/lib / + * build jdk.test.lib.net.SimpleSSLContext ProxyServer * compile ../../../com/sun/net/httpserver/LogFilter.java * compile ../../../com/sun/net/httpserver/EchoHandler.java * compile ../../../com/sun/net/httpserver/FileServerHandler.java @@ -50,7 +50,7 @@ import java.util.logging.ConsoleHandler; import java.util.logging.Level; import java.util.logging.Logger; import javax.net.ssl.SSLContext; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; public class LightWeightHttpServer { diff --git a/test/jdk/java/net/httpclient/LineBodyHandlerTest.java b/test/jdk/java/net/httpclient/LineBodyHandlerTest.java index cf02292867a..039bc9c8cd8 100644 --- a/test/jdk/java/net/httpclient/LineBodyHandlerTest.java +++ b/test/jdk/java/net/httpclient/LineBodyHandlerTest.java @@ -52,7 +52,7 @@ import javax.net.ssl.SSLContext; import com.sun.net.httpserver.HttpServer; import com.sun.net.httpserver.HttpsConfigurator; import com.sun.net.httpserver.HttpsServer; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.DataProvider; @@ -77,9 +77,9 @@ import static org.testng.Assert.assertTrue; * java.net.http/jdk.internal.net.http.hpack * java.logging * jdk.httpserver - * @library /lib/testlibrary http2/server + * @library /test/lib http2/server * @build Http2TestServer LineBodyHandlerTest HttpServerAdapters - * @build jdk.testlibrary.SimpleSSLContext + * @build jdk.test.lib.net.SimpleSSLContext * @run testng/othervm LineBodyHandlerTest */ diff --git a/test/jdk/java/net/httpclient/ManyRequests.java b/test/jdk/java/net/httpclient/ManyRequests.java index 55c96c36532..97435d768c6 100644 --- a/test/jdk/java/net/httpclient/ManyRequests.java +++ b/test/jdk/java/net/httpclient/ManyRequests.java @@ -27,8 +27,8 @@ * @modules java.net.http * java.logging * jdk.httpserver - * @library /lib/testlibrary/ / - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext * @compile ../../../com/sun/net/httpserver/LogFilter.java * @compile ../../../com/sun/net/httpserver/EchoHandler.java * @compile ../../../com/sun/net/httpserver/FileServerHandler.java @@ -63,7 +63,7 @@ import java.util.logging.Logger; import java.util.logging.Level; import java.util.concurrent.CompletableFuture; import javax.net.ssl.SSLContext; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; public class ManyRequests { diff --git a/test/jdk/java/net/httpclient/ManyRequests2.java b/test/jdk/java/net/httpclient/ManyRequests2.java index dcbe1f42a5e..f600b00c348 100644 --- a/test/jdk/java/net/httpclient/ManyRequests2.java +++ b/test/jdk/java/net/httpclient/ManyRequests2.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2018, 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 @@ -27,8 +27,8 @@ * @modules java.net.http * java.logging * jdk.httpserver - * @library /lib/testlibrary/ / - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext * @compile ../../../com/sun/net/httpserver/LogFilter.java * @compile ../../../com/sun/net/httpserver/EchoHandler.java * @compile ../../../com/sun/net/httpserver/FileServerHandler.java @@ -36,8 +36,11 @@ * @run main/othervm/timeout=40 -Dtest.XFixed=true ManyRequests2 * @run main/othervm/timeout=40 -Dtest.XFixed=true -Dtest.insertDelay=true ManyRequests2 * @run main/othervm/timeout=40 -Dtest.XFixed=true -Dtest.chunkSize=64 ManyRequests2 - * @run main/othervm/timeout=40 -Djdk.internal.httpclient.debug=true -Dtest.XFixed=true -Dtest.insertDelay=true -Dtest.chunkSize=64 ManyRequests2 - * @summary Send a large number of requests asynchronously. The server echoes back using known content length. + * @run main/othervm/timeout=40 -Djdk.internal.httpclient.debug=true + * -Dtest.XFixed=true -Dtest.insertDelay=true + * -Dtest.chunkSize=64 ManyRequests2 + * @summary Send a large number of requests asynchronously. + * The server echoes back using known content length. */ // * @run main/othervm/timeout=40 -Djdk.httpclient.HttpClient.log=ssl ManyRequests diff --git a/test/jdk/java/net/httpclient/ManyRequestsLegacy.java b/test/jdk/java/net/httpclient/ManyRequestsLegacy.java index 01fe8d8c31f..e0d245bca77 100644 --- a/test/jdk/java/net/httpclient/ManyRequestsLegacy.java +++ b/test/jdk/java/net/httpclient/ManyRequestsLegacy.java @@ -26,16 +26,19 @@ * @modules java.net.http * java.logging * jdk.httpserver - * @library /lib/testlibrary/ / - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext * @compile ../../../com/sun/net/httpserver/LogFilter.java * @compile ../../../com/sun/net/httpserver/EchoHandler.java * @compile ../../../com/sun/net/httpserver/FileServerHandler.java * @run main/othervm/timeout=40 ManyRequestsLegacy * @run main/othervm/timeout=40 -Dtest.insertDelay=true ManyRequestsLegacy * @run main/othervm/timeout=40 -Dtest.chunkSize=64 ManyRequestsLegacy - * @run main/othervm/timeout=40 -Dtest.insertDelay=true -Dtest.chunkSize=64 ManyRequestsLegacy - * @summary Send a large number of requests asynchronously using the legacy URL.openConnection(), to help sanitize results of the test ManyRequest.java. + * @run main/othervm/timeout=40 -Dtest.insertDelay=true + * -Dtest.chunkSize=64 ManyRequestsLegacy + * @summary Send a large number of requests asynchronously using the legacy + * URL.openConnection(), to help sanitize results of the test + * ManyRequest.java. */ import javax.net.ssl.HttpsURLConnection; @@ -70,7 +73,7 @@ import java.util.LinkedList; import java.util.Random; import java.util.logging.Logger; import java.util.logging.Level; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; public class ManyRequestsLegacy { diff --git a/test/jdk/java/net/httpclient/MappingResponseSubscriber.java b/test/jdk/java/net/httpclient/MappingResponseSubscriber.java index 026fcbbabde..cbe936afe93 100644 --- a/test/jdk/java/net/httpclient/MappingResponseSubscriber.java +++ b/test/jdk/java/net/httpclient/MappingResponseSubscriber.java @@ -24,8 +24,8 @@ /* * @test * @summary Tests mapped response subscriber - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common * java.net.http/jdk.internal.net.http.frame @@ -62,7 +62,7 @@ import java.net.http.HttpResponse.BodySubscribers; import java.net.http.HttpResponse.BodySubscriber; import java.util.function.Function; import javax.net.ssl.SSLContext; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.DataProvider; diff --git a/test/jdk/java/net/httpclient/MaxStreams.java b/test/jdk/java/net/httpclient/MaxStreams.java index c1b86487b07..07ae0b4d5bc 100644 --- a/test/jdk/java/net/httpclient/MaxStreams.java +++ b/test/jdk/java/net/httpclient/MaxStreams.java @@ -32,9 +32,9 @@ * java.net.http/jdk.internal.net.http.hpack * java.logging * jdk.httpserver - * @library /lib/testlibrary http2/server + * @library /test/lib http2/server * @build Http2TestServer - * @build jdk.testlibrary.SimpleSSLContext + * @build jdk.test.lib.net.SimpleSSLContext * @run testng/othervm -ea -esa MaxStreams */ @@ -60,7 +60,7 @@ import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.net.http.HttpResponse.BodyHandler; import java.net.http.HttpResponse.BodyHandlers; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.DataProvider; diff --git a/test/jdk/java/net/httpclient/NoBodyPartOne.java b/test/jdk/java/net/httpclient/NoBodyPartOne.java index e71225df70b..66aaa2fc0e0 100644 --- a/test/jdk/java/net/httpclient/NoBodyPartOne.java +++ b/test/jdk/java/net/httpclient/NoBodyPartOne.java @@ -25,8 +25,8 @@ * @test * @bug 8161157 * @summary Test response body handlers/subscribers when there is no body - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common * java.net.http/jdk.internal.net.http.frame diff --git a/test/jdk/java/net/httpclient/NoBodyPartTwo.java b/test/jdk/java/net/httpclient/NoBodyPartTwo.java index e612695b513..ba4843e2901 100644 --- a/test/jdk/java/net/httpclient/NoBodyPartTwo.java +++ b/test/jdk/java/net/httpclient/NoBodyPartTwo.java @@ -25,8 +25,8 @@ * @test * @bug 8161157 * @summary Test response body handlers/subscribers when there is no body - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common * java.net.http/jdk.internal.net.http.frame diff --git a/test/jdk/java/net/httpclient/NonAsciiCharsInURI.java b/test/jdk/java/net/httpclient/NonAsciiCharsInURI.java index 2ce05ac40b9..e3701a826f2 100644 --- a/test/jdk/java/net/httpclient/NonAsciiCharsInURI.java +++ b/test/jdk/java/net/httpclient/NonAsciiCharsInURI.java @@ -32,9 +32,9 @@ * java.net.http/jdk.internal.net.http.hpack * java.logging * jdk.httpserver - * @library /lib/testlibrary http2/server + * @library /test/lib http2/server * @build Http2TestServer - * @build jdk.testlibrary.SimpleSSLContext + * @build jdk.test.lib.net.SimpleSSLContext * @compile -encoding utf-8 NonAsciiCharsInURI.java * @run testng/othervm * -Djdk.httpclient.HttpClient.log=reqeusts,headers @@ -58,7 +58,7 @@ import java.net.http.HttpResponse.BodyHandlers; import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.DataProvider; diff --git a/test/jdk/java/net/httpclient/ProxyAuthDisabledSchemes.java b/test/jdk/java/net/httpclient/ProxyAuthDisabledSchemes.java index 2827aca8721..4de6a295a96 100644 --- a/test/jdk/java/net/httpclient/ProxyAuthDisabledSchemes.java +++ b/test/jdk/java/net/httpclient/ProxyAuthDisabledSchemes.java @@ -28,8 +28,8 @@ * it verifies that the client honor the jdk.http.auth.*.disabledSchemes * net properties. * @bug 8087112 - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext DigestEchoServer DigestEchoClient + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext DigestEchoServer DigestEchoClient * ReferenceTracker ProxyAuthDisabledSchemes * @modules java.net.http/jdk.internal.net.http.common * java.net.http/jdk.internal.net.http.frame diff --git a/test/jdk/java/net/httpclient/ProxyAuthDisabledSchemesSSL.java b/test/jdk/java/net/httpclient/ProxyAuthDisabledSchemesSSL.java index f3541bce7f9..a5642d43c33 100644 --- a/test/jdk/java/net/httpclient/ProxyAuthDisabledSchemesSSL.java +++ b/test/jdk/java/net/httpclient/ProxyAuthDisabledSchemesSSL.java @@ -28,8 +28,8 @@ * headers directly when connecting with a server over SSL, and * it verifies that the client honor the jdk.http.auth.*.disabledSchemes * net properties. - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext DigestEchoServer DigestEchoClient + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext DigestEchoServer DigestEchoClient * ReferenceTracker ProxyAuthDisabledSchemesSSL * @modules java.net.http/jdk.internal.net.http.common * java.net.http/jdk.internal.net.http.frame diff --git a/test/jdk/java/net/httpclient/ProxyTest.java b/test/jdk/java/net/httpclient/ProxyTest.java index 06091818cfe..1c7a8f89459 100644 --- a/test/jdk/java/net/httpclient/ProxyTest.java +++ b/test/jdk/java/net/httpclient/ProxyTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2018, 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 @@ -56,7 +56,7 @@ import javax.net.ssl.SSLSession; import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; /** * @test @@ -67,8 +67,8 @@ import jdk.testlibrary.SimpleSSLContext; * an SSL Tunnel connection when the client is HTTP/2 and the server * and proxy are HTTP/1.1 * @modules java.net.http - * @library /lib/testlibrary/ - * @build jdk.testlibrary.SimpleSSLContext ProxyTest + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext ProxyTest * @run main/othervm ProxyTest * @author danielfuchs */ diff --git a/test/jdk/java/net/httpclient/RedirectMethodChange.java b/test/jdk/java/net/httpclient/RedirectMethodChange.java index eb445ebac47..c5d4aef8676 100644 --- a/test/jdk/java/net/httpclient/RedirectMethodChange.java +++ b/test/jdk/java/net/httpclient/RedirectMethodChange.java @@ -29,9 +29,9 @@ * java.net.http/jdk.internal.net.http.frame * java.net.http/jdk.internal.net.http.hpack * jdk.httpserver - * @library /lib/testlibrary /test/lib http2/server + * @library /test/lib http2/server * @build Http2TestServer - * @build jdk.testlibrary.SimpleSSLContext + * @build jdk.test.lib.net.SimpleSSLContext * @run testng/othervm RedirectMethodChange */ @@ -50,7 +50,7 @@ import java.net.http.HttpResponse.BodyHandlers; import com.sun.net.httpserver.HttpServer; import com.sun.net.httpserver.HttpsConfigurator; import com.sun.net.httpserver.HttpsServer; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.DataProvider; diff --git a/test/jdk/java/net/httpclient/RedirectWithCookie.java b/test/jdk/java/net/httpclient/RedirectWithCookie.java index dc6d5aa4f95..14d971b9165 100644 --- a/test/jdk/java/net/httpclient/RedirectWithCookie.java +++ b/test/jdk/java/net/httpclient/RedirectWithCookie.java @@ -30,9 +30,9 @@ * java.net.http/jdk.internal.net.http.hpack * java.logging * jdk.httpserver - * @library /lib/testlibrary /test/lib http2/server + * @library /test/lib http2/server * @build Http2TestServer - * @build jdk.testlibrary.SimpleSSLContext + * @build jdk.test.lib.net.SimpleSSLContext * @run testng/othervm * -Djdk.httpclient.HttpClient.log=trace,headers,requests * RedirectWithCookie @@ -55,7 +55,7 @@ import java.net.http.HttpResponse; import java.net.http.HttpResponse.BodyHandlers; import java.util.List; import javax.net.ssl.SSLContext; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.DataProvider; diff --git a/test/jdk/java/net/httpclient/RequestBodyTest.java b/test/jdk/java/net/httpclient/RequestBodyTest.java index 12238b8dd2c..b323efd86e5 100644 --- a/test/jdk/java/net/httpclient/RequestBodyTest.java +++ b/test/jdk/java/net/httpclient/RequestBodyTest.java @@ -27,11 +27,11 @@ * @modules java.net.http * java.logging * jdk.httpserver - * @library /lib/testlibrary/ /test/lib + * @library /test/lib * @compile ../../../com/sun/net/httpserver/LogFilter.java * @compile ../../../com/sun/net/httpserver/EchoHandler.java * @compile ../../../com/sun/net/httpserver/FileServerHandler.java - * @build jdk.testlibrary.SimpleSSLContext + * @build jdk.test.lib.net.SimpleSSLContext * @build LightWeightHttpServer * @build jdk.test.lib.Platform * @build jdk.test.lib.util.FileUtils diff --git a/test/jdk/java/net/httpclient/RequestBodyTest.policy b/test/jdk/java/net/httpclient/RequestBodyTest.policy index f2f57e6f6d4..d3797cf472d 100644 --- a/test/jdk/java/net/httpclient/RequestBodyTest.policy +++ b/test/jdk/java/net/httpclient/RequestBodyTest.policy @@ -27,10 +27,10 @@ grant codeBase "file:${test.classes}/../../../../test/lib/-" { permission java.io.FilePermission "RequestBodyTest.tmp", "read,delete"; }; -// for JTwork/classes/0/lib/testlibrary/jdk/testlibrary/SimpleSSLContext.class -grant codeBase "file:${test.classes}/../../../../lib/testlibrary/-" { +// for JTwork/classes/0/test/lib/jdk/test/lib/net/SimpleSSLContext.class +grant codeBase "file:${test.classes}/../../../../test/lib/-" { permission java.util.PropertyPermission "test.src.path", "read"; - permission java.io.FilePermission "${test.src}/../../../lib/testlibrary/jdk/testlibrary/testkeys", "read"; + permission java.io.FilePermission "${test.src}/../../../../lib/jdk/test/lib/net/testkeys", "read"; }; grant codeBase "file:${test.classes}/*" { diff --git a/test/jdk/java/net/httpclient/ResponseBodyBeforeError.java b/test/jdk/java/net/httpclient/ResponseBodyBeforeError.java index 4a9aa49f118..7f990138e79 100644 --- a/test/jdk/java/net/httpclient/ResponseBodyBeforeError.java +++ b/test/jdk/java/net/httpclient/ResponseBodyBeforeError.java @@ -25,8 +25,8 @@ * @test * @summary Tests that all response body is delivered to the BodySubscriber * before an abortive error terminates the flow - * @library /lib/testlibrary - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext * @run testng/othervm ResponseBodyBeforeError */ @@ -52,7 +52,7 @@ import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletionStage; import java.util.concurrent.ExecutionException; import java.util.concurrent.Flow; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.DataProvider; diff --git a/test/jdk/java/net/httpclient/ResponsePublisher.java b/test/jdk/java/net/httpclient/ResponsePublisher.java index 44e7240ed8e..862b6c18043 100644 --- a/test/jdk/java/net/httpclient/ResponsePublisher.java +++ b/test/jdk/java/net/httpclient/ResponsePublisher.java @@ -26,8 +26,8 @@ * @bug 8201186 * @summary Tests an asynchronous BodySubscriber that completes * immediately with a Publisher> - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common * java.net.http/jdk.internal.net.http.frame @@ -40,7 +40,7 @@ import com.sun.net.httpserver.HttpHandler; import com.sun.net.httpserver.HttpServer; import com.sun.net.httpserver.HttpsConfigurator; import com.sun.net.httpserver.HttpsServer; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.DataProvider; diff --git a/test/jdk/java/net/httpclient/RetryWithCookie.java b/test/jdk/java/net/httpclient/RetryWithCookie.java index 6f85f6ac704..9e7442412b7 100644 --- a/test/jdk/java/net/httpclient/RetryWithCookie.java +++ b/test/jdk/java/net/httpclient/RetryWithCookie.java @@ -31,9 +31,9 @@ * java.net.http/jdk.internal.net.http.hpack * java.logging * jdk.httpserver - * @library /lib/testlibrary /test/lib http2/server + * @library /test/lib http2/server * @build Http2TestServer - * @build jdk.testlibrary.SimpleSSLContext ReferenceTracker + * @build jdk.test.lib.net.SimpleSSLContext ReferenceTracker * @run testng/othervm * -Djdk.httpclient.HttpClient.log=trace,headers,requests * RetryWithCookie @@ -42,7 +42,7 @@ import com.sun.net.httpserver.HttpServer; import com.sun.net.httpserver.HttpsConfigurator; import com.sun.net.httpserver.HttpsServer; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.DataProvider; diff --git a/test/jdk/java/net/httpclient/ServerCloseTest.java b/test/jdk/java/net/httpclient/ServerCloseTest.java index aa1ca9dcaad..d7fa39aa56a 100644 --- a/test/jdk/java/net/httpclient/ServerCloseTest.java +++ b/test/jdk/java/net/httpclient/ServerCloseTest.java @@ -25,8 +25,8 @@ * @test * @summary Tests that our client deals correctly with servers that * close the connection right after sending the last byte. - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters EncodedCharsInURI + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters EncodedCharsInURI * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common * java.net.http/jdk.internal.net.http.frame @@ -35,7 +35,7 @@ */ //* -Djdk.internal.httpclient.debug=true -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterClass; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; diff --git a/test/jdk/java/net/httpclient/ShortResponseBody.java b/test/jdk/java/net/httpclient/ShortResponseBody.java index ab9e3683d9a..69c77898ee2 100644 --- a/test/jdk/java/net/httpclient/ShortResponseBody.java +++ b/test/jdk/java/net/httpclient/ShortResponseBody.java @@ -25,8 +25,8 @@ * @test * @summary Tests Exception detail message when too few response bytes are * received before a socket exception or eof. - * @library /lib/testlibrary - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext * @run testng/othervm * -Djdk.httpclient.HttpClient.log=headers,errors,channel * ShortResponseBody @@ -55,7 +55,7 @@ import java.util.concurrent.Executors; import java.util.concurrent.ThreadFactory; import java.util.concurrent.atomic.AtomicLong; import java.util.stream.Stream; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.DataProvider; diff --git a/test/jdk/java/net/httpclient/ShortResponseBodyWithRetry.java b/test/jdk/java/net/httpclient/ShortResponseBodyWithRetry.java index c6aaca978d2..00446fb91b6 100644 --- a/test/jdk/java/net/httpclient/ShortResponseBodyWithRetry.java +++ b/test/jdk/java/net/httpclient/ShortResponseBodyWithRetry.java @@ -24,8 +24,8 @@ /* * @test * @summary Run of ShortResponseBody with -Djdk.httpclient.enableAllMethodRetry - * @library /lib/testlibrary - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext * @build ShortResponseBody * @run testng/othervm * -Djdk.httpclient.HttpClient.log=headers,errors,channel diff --git a/test/jdk/java/net/httpclient/SmokeTest.java b/test/jdk/java/net/httpclient/SmokeTest.java index 7bc41bbd656..51626cc0b81 100644 --- a/test/jdk/java/net/httpclient/SmokeTest.java +++ b/test/jdk/java/net/httpclient/SmokeTest.java @@ -27,8 +27,8 @@ * @modules java.net.http * java.logging * jdk.httpserver - * @library /lib/testlibrary/ / - * @build jdk.testlibrary.SimpleSSLContext ProxyServer + * @library /test/lib / + * @build jdk.test.lib.net.SimpleSSLContext ProxyServer * @compile ../../../com/sun/net/httpserver/LogFilter.java * @compile ../../../com/sun/net/httpserver/EchoHandler.java * @compile ../../../com/sun/net/httpserver/FileServerHandler.java @@ -88,7 +88,7 @@ import java.util.HashSet; import java.util.LinkedList; import java.util.List; import java.util.Random; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import static java.nio.file.StandardOpenOption.TRUNCATE_EXISTING; import static java.nio.file.StandardOpenOption.WRITE; diff --git a/test/jdk/java/net/httpclient/SpecialHeadersTest.java b/test/jdk/java/net/httpclient/SpecialHeadersTest.java index ddf054f3aea..29fca738058 100644 --- a/test/jdk/java/net/httpclient/SpecialHeadersTest.java +++ b/test/jdk/java/net/httpclient/SpecialHeadersTest.java @@ -32,9 +32,9 @@ * java.net.http/jdk.internal.net.http.hpack * java.logging * jdk.httpserver - * @library /lib/testlibrary http2/server + * @library /test/lib http2/server * @build Http2TestServer HttpServerAdapters SpecialHeadersTest - * @build jdk.testlibrary.SimpleSSLContext + * @build jdk.test.lib.net.SimpleSSLContext * @run testng/othervm * -Djdk.httpclient.HttpClient.log=requests,headers,errors * SpecialHeadersTest @@ -43,7 +43,7 @@ import com.sun.net.httpserver.HttpServer; import com.sun.net.httpserver.HttpsConfigurator; import com.sun.net.httpserver.HttpsServer; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.DataProvider; diff --git a/test/jdk/java/net/httpclient/SplitResponse.java b/test/jdk/java/net/httpclient/SplitResponse.java index b0fcfaf724a..48f958047b7 100644 --- a/test/jdk/java/net/httpclient/SplitResponse.java +++ b/test/jdk/java/net/httpclient/SplitResponse.java @@ -40,7 +40,7 @@ import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.util.stream.Stream; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import static java.lang.System.out; import static java.lang.String.format; import static java.nio.charset.StandardCharsets.ISO_8859_1; @@ -49,8 +49,8 @@ import static java.net.http.HttpResponse.BodyHandlers.ofString; /** * @test * @bug 8087112 - * @library /lib/testlibrary - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext * @build MockServer * @run main/othervm * -Djdk.internal.httpclient.debug=true diff --git a/test/jdk/java/net/httpclient/SplitResponseAsync.java b/test/jdk/java/net/httpclient/SplitResponseAsync.java index e148e6a05be..caed3dc8d67 100644 --- a/test/jdk/java/net/httpclient/SplitResponseAsync.java +++ b/test/jdk/java/net/httpclient/SplitResponseAsync.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2018, 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 @@ -24,8 +24,8 @@ /** * @test * @bug 8087112 - * @library /lib/testlibrary - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext * @build MockServer SplitResponse * @run main/othervm * -Djdk.internal.httpclient.debug=true diff --git a/test/jdk/java/net/httpclient/SplitResponseKeepAlive.java b/test/jdk/java/net/httpclient/SplitResponseKeepAlive.java index 7cc4696e3f5..f805f26a1e4 100644 --- a/test/jdk/java/net/httpclient/SplitResponseKeepAlive.java +++ b/test/jdk/java/net/httpclient/SplitResponseKeepAlive.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2018, 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 @@ -24,8 +24,8 @@ /** * @test * @bug 8087112 - * @library /lib/testlibrary - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext * @build MockServer SplitResponse * @run main/othervm * -Djdk.internal.httpclient.debug=true diff --git a/test/jdk/java/net/httpclient/SplitResponseKeepAliveAsync.java b/test/jdk/java/net/httpclient/SplitResponseKeepAliveAsync.java index 8dba0339385..c8d034444b6 100644 --- a/test/jdk/java/net/httpclient/SplitResponseKeepAliveAsync.java +++ b/test/jdk/java/net/httpclient/SplitResponseKeepAliveAsync.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2018, 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 @@ -24,8 +24,8 @@ /** * @test * @bug 8087112 - * @library /lib/testlibrary - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext * @build MockServer SplitResponse * @run main/othervm * -Djdk.internal.httpclient.debug=true diff --git a/test/jdk/java/net/httpclient/SplitResponseSSL.java b/test/jdk/java/net/httpclient/SplitResponseSSL.java index 1c7f8522172..ba030d74efa 100644 --- a/test/jdk/java/net/httpclient/SplitResponseSSL.java +++ b/test/jdk/java/net/httpclient/SplitResponseSSL.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2018, 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 @@ -24,8 +24,8 @@ /** * @test * @bug 8087112 - * @library /lib/testlibrary - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext * @build MockServer SplitResponse * @run main/othervm * -Djdk.internal.httpclient.debug=true diff --git a/test/jdk/java/net/httpclient/SplitResponseSSLAsync.java b/test/jdk/java/net/httpclient/SplitResponseSSLAsync.java index 09d2d059d4a..e78b6703d59 100644 --- a/test/jdk/java/net/httpclient/SplitResponseSSLAsync.java +++ b/test/jdk/java/net/httpclient/SplitResponseSSLAsync.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2018, 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 @@ -24,8 +24,8 @@ /** * @test * @bug 8087112 - * @library /lib/testlibrary - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext * @build MockServer SplitResponse * @run main/othervm * -Djdk.internal.httpclient.debug=true diff --git a/test/jdk/java/net/httpclient/SplitResponseSSLKeepAlive.java b/test/jdk/java/net/httpclient/SplitResponseSSLKeepAlive.java index 43080a0eba3..9892370cdef 100644 --- a/test/jdk/java/net/httpclient/SplitResponseSSLKeepAlive.java +++ b/test/jdk/java/net/httpclient/SplitResponseSSLKeepAlive.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2018, 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 @@ -24,8 +24,8 @@ /** * @test * @bug 8087112 - * @library /lib/testlibrary - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext * @build MockServer SplitResponse * @run main/othervm * -Djdk.internal.httpclient.debug=true diff --git a/test/jdk/java/net/httpclient/SplitResponseSSLKeepAliveAsync.java b/test/jdk/java/net/httpclient/SplitResponseSSLKeepAliveAsync.java index d1fccdc37f7..96dbb5f5bc0 100644 --- a/test/jdk/java/net/httpclient/SplitResponseSSLKeepAliveAsync.java +++ b/test/jdk/java/net/httpclient/SplitResponseSSLKeepAliveAsync.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2018, 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 @@ -24,8 +24,8 @@ /** * @test * @bug 8087112 - * @library /lib/testlibrary - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext * @build MockServer SplitResponse * @run main/othervm * -Djdk.internal.httpclient.debug=true diff --git a/test/jdk/java/net/httpclient/StreamingBody.java b/test/jdk/java/net/httpclient/StreamingBody.java index 5079bf69ae0..9572d14a81c 100644 --- a/test/jdk/java/net/httpclient/StreamingBody.java +++ b/test/jdk/java/net/httpclient/StreamingBody.java @@ -31,9 +31,9 @@ * java.net.http/jdk.internal.net.http.hpack * java.logging * jdk.httpserver - * @library /lib/testlibrary /test/lib http2/server + * @library /test/lib http2/server * @build Http2TestServer - * @build jdk.testlibrary.SimpleSSLContext + * @build jdk.test.lib.net.SimpleSSLContext * @run testng/othervm * -Djdk.httpclient.HttpClient.log=trace,headers,requests * StreamingBody @@ -53,7 +53,7 @@ import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.net.http.HttpResponse.BodyHandlers; import javax.net.ssl.SSLContext; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.DataProvider; diff --git a/test/jdk/java/net/httpclient/ThrowingPublishersCustomAfterCancel.java b/test/jdk/java/net/httpclient/ThrowingPublishersCustomAfterCancel.java index 5a1f56c30e4..318b4622b50 100644 --- a/test/jdk/java/net/httpclient/ThrowingPublishersCustomAfterCancel.java +++ b/test/jdk/java/net/httpclient/ThrowingPublishersCustomAfterCancel.java @@ -25,8 +25,8 @@ * @test * @summary Tests what happens when request publishers * throw unexpected exceptions. - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * ReferenceTracker AbstractThrowingPublishers ThrowingPublishersCustomAfterCancel * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common diff --git a/test/jdk/java/net/httpclient/ThrowingPublishersCustomBeforeCancel.java b/test/jdk/java/net/httpclient/ThrowingPublishersCustomBeforeCancel.java index 99ef419dfe7..aaf05ee2a55 100644 --- a/test/jdk/java/net/httpclient/ThrowingPublishersCustomBeforeCancel.java +++ b/test/jdk/java/net/httpclient/ThrowingPublishersCustomBeforeCancel.java @@ -25,8 +25,8 @@ * @test * @summary Tests what happens when request publishers * throw unexpected exceptions. - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * ReferenceTracker AbstractThrowingPublishers ThrowingPublishersCustomBeforeCancel * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common diff --git a/test/jdk/java/net/httpclient/ThrowingPublishersIOAfterCancel.java b/test/jdk/java/net/httpclient/ThrowingPublishersIOAfterCancel.java index 4aff72f126b..4af4827bdd3 100644 --- a/test/jdk/java/net/httpclient/ThrowingPublishersIOAfterCancel.java +++ b/test/jdk/java/net/httpclient/ThrowingPublishersIOAfterCancel.java @@ -25,8 +25,8 @@ * @test * @summary Tests what happens when request publishers * throw unexpected exceptions. - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * ReferenceTracker AbstractThrowingPublishers ThrowingPublishersIOAfterCancel * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common diff --git a/test/jdk/java/net/httpclient/ThrowingPublishersIOBeforeCancel.java b/test/jdk/java/net/httpclient/ThrowingPublishersIOBeforeCancel.java index 9da7bb33fd1..63c36072509 100644 --- a/test/jdk/java/net/httpclient/ThrowingPublishersIOBeforeCancel.java +++ b/test/jdk/java/net/httpclient/ThrowingPublishersIOBeforeCancel.java @@ -25,8 +25,8 @@ * @test * @summary Tests what happens when request publishers * throw unexpected exceptions. - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * ReferenceTracker AbstractThrowingPublishers ThrowingPublishersIOBeforeCancel * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common diff --git a/test/jdk/java/net/httpclient/ThrowingPublishersInNextRequest.java b/test/jdk/java/net/httpclient/ThrowingPublishersInNextRequest.java index bae0a6a6099..7ffc09da042 100644 --- a/test/jdk/java/net/httpclient/ThrowingPublishersInNextRequest.java +++ b/test/jdk/java/net/httpclient/ThrowingPublishersInNextRequest.java @@ -25,8 +25,8 @@ * @test * @summary Tests what happens when request publishers * throw unexpected exceptions. - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * ReferenceTracker AbstractThrowingPublishers ThrowingPublishersInNextRequest * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common diff --git a/test/jdk/java/net/httpclient/ThrowingPublishersInRequest.java b/test/jdk/java/net/httpclient/ThrowingPublishersInRequest.java index 27c0749379e..60e0e2aa147 100644 --- a/test/jdk/java/net/httpclient/ThrowingPublishersInRequest.java +++ b/test/jdk/java/net/httpclient/ThrowingPublishersInRequest.java @@ -25,8 +25,8 @@ * @test * @summary Tests what happens when request publishers * throw unexpected exceptions. - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * ReferenceTracker AbstractThrowingPublishers ThrowingPublishersInRequest * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common diff --git a/test/jdk/java/net/httpclient/ThrowingPublishersInSubscribe.java b/test/jdk/java/net/httpclient/ThrowingPublishersInSubscribe.java index 7c626adae31..5b1dd9d36ff 100644 --- a/test/jdk/java/net/httpclient/ThrowingPublishersInSubscribe.java +++ b/test/jdk/java/net/httpclient/ThrowingPublishersInSubscribe.java @@ -25,8 +25,8 @@ * @test * @summary Tests what happens when request publishers * throw unexpected exceptions. - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * ReferenceTracker AbstractThrowingPublishers ThrowingPublishersInSubscribe * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common diff --git a/test/jdk/java/net/httpclient/ThrowingPublishersSanity.java b/test/jdk/java/net/httpclient/ThrowingPublishersSanity.java index eeec40fc20a..48f6fc913d3 100644 --- a/test/jdk/java/net/httpclient/ThrowingPublishersSanity.java +++ b/test/jdk/java/net/httpclient/ThrowingPublishersSanity.java @@ -25,8 +25,8 @@ * @test * @summary Tests what happens when request publishers * throw unexpected exceptions. - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * ReferenceTracker AbstractThrowingPublishers ThrowingPublishersSanity * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common diff --git a/test/jdk/java/net/httpclient/ThrowingPushPromisesAsInputStreamCustom.java b/test/jdk/java/net/httpclient/ThrowingPushPromisesAsInputStreamCustom.java index 1f4fac2910a..c3801a0c429 100644 --- a/test/jdk/java/net/httpclient/ThrowingPushPromisesAsInputStreamCustom.java +++ b/test/jdk/java/net/httpclient/ThrowingPushPromisesAsInputStreamCustom.java @@ -25,8 +25,8 @@ * @test * @summary Tests what happens when push promise handlers and their * response body handlers and subscribers throw unexpected exceptions. - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * ReferenceTracker AbstractThrowingPushPromises ThrowingPushPromisesAsInputStreamCustom * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common diff --git a/test/jdk/java/net/httpclient/ThrowingPushPromisesAsInputStreamIO.java b/test/jdk/java/net/httpclient/ThrowingPushPromisesAsInputStreamIO.java index e4955648d8f..f11c31421a1 100644 --- a/test/jdk/java/net/httpclient/ThrowingPushPromisesAsInputStreamIO.java +++ b/test/jdk/java/net/httpclient/ThrowingPushPromisesAsInputStreamIO.java @@ -25,8 +25,8 @@ * @test * @summary Tests what happens when push promise handlers and their * response body handlers and subscribers throw unexpected exceptions. - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * ReferenceTracker AbstractThrowingPushPromises ThrowingPushPromisesAsInputStreamIO * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common diff --git a/test/jdk/java/net/httpclient/ThrowingPushPromisesAsLinesCustom.java b/test/jdk/java/net/httpclient/ThrowingPushPromisesAsLinesCustom.java index 1e9b596a79f..847bc382838 100644 --- a/test/jdk/java/net/httpclient/ThrowingPushPromisesAsLinesCustom.java +++ b/test/jdk/java/net/httpclient/ThrowingPushPromisesAsLinesCustom.java @@ -25,8 +25,8 @@ * @test * @summary Tests what happens when push promise handlers and their * response body handlers and subscribers throw unexpected exceptions. - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * ReferenceTracker AbstractThrowingPushPromises ThrowingPushPromisesAsLinesCustom * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common diff --git a/test/jdk/java/net/httpclient/ThrowingPushPromisesAsLinesIO.java b/test/jdk/java/net/httpclient/ThrowingPushPromisesAsLinesIO.java index e860039980f..7b7ffab49a2 100644 --- a/test/jdk/java/net/httpclient/ThrowingPushPromisesAsLinesIO.java +++ b/test/jdk/java/net/httpclient/ThrowingPushPromisesAsLinesIO.java @@ -25,8 +25,8 @@ * @test * @summary Tests what happens when push promise handlers and their * response body handlers and subscribers throw unexpected exceptions. - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * ReferenceTracker AbstractThrowingPushPromises ThrowingPushPromisesAsLinesIO * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common diff --git a/test/jdk/java/net/httpclient/ThrowingPushPromisesAsStringCustom.java b/test/jdk/java/net/httpclient/ThrowingPushPromisesAsStringCustom.java index 75decf5bb1e..eb6f2a7c8f9 100644 --- a/test/jdk/java/net/httpclient/ThrowingPushPromisesAsStringCustom.java +++ b/test/jdk/java/net/httpclient/ThrowingPushPromisesAsStringCustom.java @@ -25,8 +25,8 @@ * @test * @summary Tests what happens when push promise handlers and their * response body handlers and subscribers throw unexpected exceptions. - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * ReferenceTracker AbstractThrowingPushPromises ThrowingPushPromisesAsStringCustom * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common diff --git a/test/jdk/java/net/httpclient/ThrowingPushPromisesAsStringIO.java b/test/jdk/java/net/httpclient/ThrowingPushPromisesAsStringIO.java index 8e070469a1b..24d38f1a6df 100644 --- a/test/jdk/java/net/httpclient/ThrowingPushPromisesAsStringIO.java +++ b/test/jdk/java/net/httpclient/ThrowingPushPromisesAsStringIO.java @@ -25,8 +25,8 @@ * @test * @summary Tests what happens when push promise handlers and their * response body handlers and subscribers throw unexpected exceptions. - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * ReferenceTracker AbstractThrowingPushPromises ThrowingPushPromisesAsStringIO * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common diff --git a/test/jdk/java/net/httpclient/ThrowingPushPromisesSanity.java b/test/jdk/java/net/httpclient/ThrowingPushPromisesSanity.java index c6a70418369..b2ffd374d2e 100644 --- a/test/jdk/java/net/httpclient/ThrowingPushPromisesSanity.java +++ b/test/jdk/java/net/httpclient/ThrowingPushPromisesSanity.java @@ -25,8 +25,8 @@ * @test * @summary Tests what happens when push promise handlers and their * response body handlers and subscribers throw unexpected exceptions. - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * ReferenceTracker AbstractThrowingPushPromises ThrowingPushPromisesSanity * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common diff --git a/test/jdk/java/net/httpclient/ThrowingSubscribersAsInputStream.java b/test/jdk/java/net/httpclient/ThrowingSubscribersAsInputStream.java index 7a79abab723..eb2636f3159 100644 --- a/test/jdk/java/net/httpclient/ThrowingSubscribersAsInputStream.java +++ b/test/jdk/java/net/httpclient/ThrowingSubscribersAsInputStream.java @@ -25,8 +25,8 @@ * @test * @summary Tests what happens when response body handlers and subscribers * throw unexpected exceptions. - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * ReferenceTracker ThrowingSubscribersAsInputStream AbstractThrowingSubscribers * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common diff --git a/test/jdk/java/net/httpclient/ThrowingSubscribersAsInputStreamAsync.java b/test/jdk/java/net/httpclient/ThrowingSubscribersAsInputStreamAsync.java index 1a52bc1d3c2..98baae29ec2 100644 --- a/test/jdk/java/net/httpclient/ThrowingSubscribersAsInputStreamAsync.java +++ b/test/jdk/java/net/httpclient/ThrowingSubscribersAsInputStreamAsync.java @@ -25,8 +25,8 @@ * @test * @summary Tests what happens when response body handlers and subscribers * throw unexpected exceptions. - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * ReferenceTracker ThrowingSubscribersAsInputStreamAsync AbstractThrowingSubscribers * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common diff --git a/test/jdk/java/net/httpclient/ThrowingSubscribersAsLines.java b/test/jdk/java/net/httpclient/ThrowingSubscribersAsLines.java index 30d00493f6c..eccdf54f398 100644 --- a/test/jdk/java/net/httpclient/ThrowingSubscribersAsLines.java +++ b/test/jdk/java/net/httpclient/ThrowingSubscribersAsLines.java @@ -25,8 +25,8 @@ * @test * @summary Tests what happens when response body handlers and subscribers * throw unexpected exceptions. - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * ReferenceTracker ThrowingSubscribersAsLines AbstractThrowingSubscribers * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common diff --git a/test/jdk/java/net/httpclient/ThrowingSubscribersAsLinesAsync.java b/test/jdk/java/net/httpclient/ThrowingSubscribersAsLinesAsync.java index 3506745d1b6..ba3583244b6 100644 --- a/test/jdk/java/net/httpclient/ThrowingSubscribersAsLinesAsync.java +++ b/test/jdk/java/net/httpclient/ThrowingSubscribersAsLinesAsync.java @@ -25,8 +25,8 @@ * @test * @summary Tests what happens when response body handlers and subscribers * throw unexpected exceptions. - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * ReferenceTracker ThrowingSubscribersAsLinesAsync AbstractThrowingSubscribers * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common diff --git a/test/jdk/java/net/httpclient/ThrowingSubscribersAsString.java b/test/jdk/java/net/httpclient/ThrowingSubscribersAsString.java index 909e5e0c045..43ec0756842 100644 --- a/test/jdk/java/net/httpclient/ThrowingSubscribersAsString.java +++ b/test/jdk/java/net/httpclient/ThrowingSubscribersAsString.java @@ -25,8 +25,8 @@ * @test * @summary Tests what happens when response body handlers and subscribers * throw unexpected exceptions. - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * ReferenceTracker ThrowingSubscribersAsString AbstractThrowingSubscribers * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common diff --git a/test/jdk/java/net/httpclient/ThrowingSubscribersAsStringAsync.java b/test/jdk/java/net/httpclient/ThrowingSubscribersAsStringAsync.java index 9944e9b6fd8..9620bf20f52 100644 --- a/test/jdk/java/net/httpclient/ThrowingSubscribersAsStringAsync.java +++ b/test/jdk/java/net/httpclient/ThrowingSubscribersAsStringAsync.java @@ -25,8 +25,8 @@ * @test * @summary Tests what happens when response body handlers and subscribers * throw unexpected exceptions. - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * ReferenceTracker ThrowingSubscribersAsStringAsync AbstractThrowingSubscribers * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common diff --git a/test/jdk/java/net/httpclient/ThrowingSubscribersSanity.java b/test/jdk/java/net/httpclient/ThrowingSubscribersSanity.java index a78d330b425..7e4d600f0fc 100644 --- a/test/jdk/java/net/httpclient/ThrowingSubscribersSanity.java +++ b/test/jdk/java/net/httpclient/ThrowingSubscribersSanity.java @@ -25,8 +25,8 @@ * @test * @summary Tests what happens when response body handlers and subscribers * throw unexpected exceptions. - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * ReferenceTracker ThrowingSubscribersSanity AbstractThrowingSubscribers * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common diff --git a/test/jdk/java/net/httpclient/TimeoutBasic.java b/test/jdk/java/net/httpclient/TimeoutBasic.java index e1f7fa48075..cdaedf06219 100644 --- a/test/jdk/java/net/httpclient/TimeoutBasic.java +++ b/test/jdk/java/net/httpclient/TimeoutBasic.java @@ -31,7 +31,7 @@ import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.net.http.HttpResponse.BodyHandlers; import java.net.http.HttpTimeoutException; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import javax.net.ServerSocketFactory; import javax.net.ssl.SSLContext; @@ -46,8 +46,8 @@ import static java.lang.System.out; /** * @test - * @library /lib/testlibrary - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext * @summary Basic tests for response timeouts * @run main/othervm TimeoutBasic */ diff --git a/test/jdk/java/net/httpclient/UnauthorizedTest.java b/test/jdk/java/net/httpclient/UnauthorizedTest.java index 5dfccc4f6b2..7f183620de2 100644 --- a/test/jdk/java/net/httpclient/UnauthorizedTest.java +++ b/test/jdk/java/net/httpclient/UnauthorizedTest.java @@ -35,9 +35,9 @@ * java.net.http/jdk.internal.net.http.hpack * java.logging * jdk.httpserver - * @library /lib/testlibrary /test/lib http2/server + * @library /test/lib http2/server * @build Http2TestServer - * @build jdk.testlibrary.SimpleSSLContext + * @build jdk.test.lib.net.SimpleSSLContext * @run testng/othervm * -Djdk.httpclient.HttpClient.log=headers * UnauthorizedTest @@ -46,7 +46,7 @@ import com.sun.net.httpserver.HttpServer; import com.sun.net.httpserver.HttpsConfigurator; import com.sun.net.httpserver.HttpsServer; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.DataProvider; diff --git a/test/jdk/java/net/httpclient/UnknownBodyLengthTest.java b/test/jdk/java/net/httpclient/UnknownBodyLengthTest.java index 8962024d24b..fd97843131e 100644 --- a/test/jdk/java/net/httpclient/UnknownBodyLengthTest.java +++ b/test/jdk/java/net/httpclient/UnknownBodyLengthTest.java @@ -35,13 +35,13 @@ import javax.net.ssl.SSLParameters; import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; /** * @test * @bug 8207966 - * @library /lib/testlibrary - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext * @run main/othervm -Djdk.tls.acknowledgeCloseNotify=true UnknownBodyLengthTest plain false * @run main/othervm -Djdk.tls.acknowledgeCloseNotify=true UnknownBodyLengthTest SSL false * @run main/othervm -Djdk.tls.acknowledgeCloseNotify=true UnknownBodyLengthTest plain true diff --git a/test/jdk/java/net/httpclient/dependent.policy b/test/jdk/java/net/httpclient/dependent.policy index 6a618eee712..2396a118b20 100644 --- a/test/jdk/java/net/httpclient/dependent.policy +++ b/test/jdk/java/net/httpclient/dependent.policy @@ -21,10 +21,10 @@ // questions. // -// for JTwork/classes/0/lib/testlibrary/jdk/testlibrary/SimpleSSLContext.class -grant codeBase "file:${test.classes}/../../../../lib/testlibrary/-" { +// for JTwork/classes/0/test/lib/jdk/test/lib/net/SimpleSSLContext.class +grant codeBase "file:${test.classes}/../../../../test/lib/-" { permission java.util.PropertyPermission "test.src.path", "read"; - permission java.io.FilePermission "${test.src}/../../../lib/testlibrary/jdk/testlibrary/testkeys", "read"; + permission java.io.FilePermission "${test.src}/../../../../lib/jdk/test/lib/net/testkeys", "read"; }; // for JTwork//classes/0/java/net/httpclient/http2/server/* diff --git a/test/jdk/java/net/httpclient/http2/BadHeadersTest.java b/test/jdk/java/net/httpclient/http2/BadHeadersTest.java index 01d00926956..2e4765fdf1b 100644 --- a/test/jdk/java/net/httpclient/http2/BadHeadersTest.java +++ b/test/jdk/java/net/httpclient/http2/BadHeadersTest.java @@ -27,9 +27,9 @@ * java.net.http/jdk.internal.net.http.common * java.net.http/jdk.internal.net.http.frame * java.net.http/jdk.internal.net.http.hpack - * @library /lib/testlibrary server + * @library /test/lib server * @build Http2TestServer - * @build jdk.testlibrary.SimpleSSLContext + * @build jdk.test.lib.net.SimpleSSLContext * @run testng/othervm -Djdk.internal.httpclient.debug=true BadHeadersTest */ @@ -38,7 +38,7 @@ import jdk.internal.net.http.frame.ContinuationFrame; import jdk.internal.net.http.frame.HeaderFrame; import jdk.internal.net.http.frame.HeadersFrame; import jdk.internal.net.http.frame.Http2Frame; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.DataProvider; diff --git a/test/jdk/java/net/httpclient/http2/BasicTest.java b/test/jdk/java/net/httpclient/http2/BasicTest.java index 04f8ba9456c..00e4d80c12d 100644 --- a/test/jdk/java/net/httpclient/http2/BasicTest.java +++ b/test/jdk/java/net/httpclient/http2/BasicTest.java @@ -24,8 +24,8 @@ /* * @test * @bug 8087112 - * @library /lib/testlibrary server - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib server + * @build jdk.test.lib.net.SimpleSSLContext * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common * java.net.http/jdk.internal.net.http.frame @@ -47,7 +47,7 @@ import java.util.concurrent.*; import java.util.Collections; import java.util.LinkedList; import java.util.List; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.Test; import static java.net.http.HttpClient.Version.HTTP_2; diff --git a/test/jdk/java/net/httpclient/http2/ContinuationFrameTest.java b/test/jdk/java/net/httpclient/http2/ContinuationFrameTest.java index ef13067f53b..ac692f478c8 100644 --- a/test/jdk/java/net/httpclient/http2/ContinuationFrameTest.java +++ b/test/jdk/java/net/httpclient/http2/ContinuationFrameTest.java @@ -28,9 +28,9 @@ * java.net.http/jdk.internal.net.http.common * java.net.http/jdk.internal.net.http.frame * java.net.http/jdk.internal.net.http.hpack - * @library /lib/testlibrary server + * @library /test/lib server * @build Http2TestServer - * @build jdk.testlibrary.SimpleSSLContext + * @build jdk.test.lib.net.SimpleSSLContext * @run testng/othervm ContinuationFrameTest */ @@ -55,7 +55,7 @@ import jdk.internal.net.http.frame.ContinuationFrame; import jdk.internal.net.http.frame.HeaderFrame; import jdk.internal.net.http.frame.HeadersFrame; import jdk.internal.net.http.frame.Http2Frame; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.DataProvider; diff --git a/test/jdk/java/net/httpclient/http2/ErrorTest.java b/test/jdk/java/net/httpclient/http2/ErrorTest.java index 11ddc662614..54143e91bbc 100644 --- a/test/jdk/java/net/httpclient/http2/ErrorTest.java +++ b/test/jdk/java/net/httpclient/http2/ErrorTest.java @@ -24,8 +24,8 @@ /* * @test * @bug 8157105 - * @library /lib/testlibrary server - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib server + * @build jdk.test.lib.net.SimpleSSLContext * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common * java.net.http/jdk.internal.net.http.frame @@ -46,7 +46,7 @@ import javax.net.ssl.SSLContext; import javax.net.ssl.SSLParameters; import java.util.concurrent.Executors; import java.util.concurrent.ExecutorService; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import static java.net.http.HttpClient.Version.HTTP_2; import org.testng.annotations.Test; diff --git a/test/jdk/java/net/httpclient/http2/FixedThreadPoolTest.java b/test/jdk/java/net/httpclient/http2/FixedThreadPoolTest.java index f154241a5b8..1db21bf7805 100644 --- a/test/jdk/java/net/httpclient/http2/FixedThreadPoolTest.java +++ b/test/jdk/java/net/httpclient/http2/FixedThreadPoolTest.java @@ -24,8 +24,8 @@ /* * @test * @bug 8087112 8177935 - * @library /lib/testlibrary server - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib server + * @build jdk.test.lib.net.SimpleSSLContext * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common * java.net.http/jdk.internal.net.http.frame @@ -40,7 +40,7 @@ import java.net.http.HttpResponse.BodyHandlers; import javax.net.ssl.*; import java.nio.file.*; import java.util.concurrent.*; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import static java.net.http.HttpClient.Version.HTTP_2; import org.testng.annotations.Test; diff --git a/test/jdk/java/net/httpclient/http2/ImplicitPushCancel.java b/test/jdk/java/net/httpclient/http2/ImplicitPushCancel.java index d0783461c83..69d9123203d 100644 --- a/test/jdk/java/net/httpclient/http2/ImplicitPushCancel.java +++ b/test/jdk/java/net/httpclient/http2/ImplicitPushCancel.java @@ -23,8 +23,8 @@ /* * @test - * @library /lib/testlibrary server - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib server + * @build jdk.test.lib.net.SimpleSSLContext * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common * java.net.http/jdk.internal.net.http.frame diff --git a/test/jdk/java/net/httpclient/http2/ProxyTest2.java b/test/jdk/java/net/httpclient/http2/ProxyTest2.java index 1c6a3f03072..41ab317d4c9 100644 --- a/test/jdk/java/net/httpclient/http2/ProxyTest2.java +++ b/test/jdk/java/net/httpclient/http2/ProxyTest2.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2018, 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 @@ -52,7 +52,7 @@ import javax.net.ssl.SSLSession; import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import java.util.concurrent.*; /** @@ -61,12 +61,12 @@ import java.util.concurrent.*; * @summary Verifies that you can access an HTTP/2 server over HTTPS by * tunnelling through an HTTP/1.1 proxy. * @modules java.net.http - * @library /lib/testlibrary server + * @library /test/lib server * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common * java.net.http/jdk.internal.net.http.frame * java.net.http/jdk.internal.net.http.hpack - * @build jdk.testlibrary.SimpleSSLContext ProxyTest2 + * @build jdk.test.lib.net.SimpleSSLContext ProxyTest2 * @run main/othervm ProxyTest2 * @author danielfuchs */ diff --git a/test/jdk/java/net/httpclient/http2/RedirectTest.java b/test/jdk/java/net/httpclient/http2/RedirectTest.java index 41b08008baf..bf886502954 100644 --- a/test/jdk/java/net/httpclient/http2/RedirectTest.java +++ b/test/jdk/java/net/httpclient/http2/RedirectTest.java @@ -24,8 +24,8 @@ /* * @test * @bug 8156514 - * @library /lib/testlibrary server - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib server + * @build jdk.test.lib.net.SimpleSSLContext * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common * java.net.http/jdk.internal.net.http.frame diff --git a/test/jdk/java/net/httpclient/http2/ServerPush.java b/test/jdk/java/net/httpclient/http2/ServerPush.java index 5b44dbf718f..5652dae79c5 100644 --- a/test/jdk/java/net/httpclient/http2/ServerPush.java +++ b/test/jdk/java/net/httpclient/http2/ServerPush.java @@ -24,8 +24,8 @@ /* * @test * @bug 8087112 8159814 - * @library /lib/testlibrary server - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib server + * @build jdk.test.lib.net.SimpleSSLContext * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common * java.net.http/jdk.internal.net.http.frame diff --git a/test/jdk/java/net/httpclient/http2/ServerPushWithDiffTypes.java b/test/jdk/java/net/httpclient/http2/ServerPushWithDiffTypes.java index 165ad825f63..8b5426d70d6 100644 --- a/test/jdk/java/net/httpclient/http2/ServerPushWithDiffTypes.java +++ b/test/jdk/java/net/httpclient/http2/ServerPushWithDiffTypes.java @@ -23,8 +23,8 @@ /* * @test - * @library /lib/testlibrary server - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib server + * @build jdk.test.lib.net.SimpleSSLContext * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common * java.net.http/jdk.internal.net.http.frame diff --git a/test/jdk/java/net/httpclient/security/Driver.java b/test/jdk/java/net/httpclient/security/Driver.java index e09612361fb..29a8f7d222d 100644 --- a/test/jdk/java/net/httpclient/security/Driver.java +++ b/test/jdk/java/net/httpclient/security/Driver.java @@ -24,12 +24,11 @@ /* * @test * @bug 8087112 - * @library /lib/testlibrary/ * @library /test/lib * @modules java.net.http * java.logging * jdk.httpserver - * @build jdk.testlibrary.SimpleSSLContext jdk.test.lib.Utils + * @build jdk.test.lib.net.SimpleSSLContext jdk.test.lib.Utils * @compile ../../../../com/sun/net/httpserver/LogFilter.java * @compile ../../../../com/sun/net/httpserver/FileServerHandler.java * @compile ../ProxyServer.java diff --git a/test/jdk/java/net/httpclient/security/Security.java b/test/jdk/java/net/httpclient/security/Security.java index be23f10bc86..58594b55688 100644 --- a/test/jdk/java/net/httpclient/security/Security.java +++ b/test/jdk/java/net/httpclient/security/Security.java @@ -27,8 +27,8 @@ * @modules java.net.http * java.logging * jdk.httpserver - * @library /lib/testlibrary/ - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext * @compile ../../../../com/sun/net/httpserver/LogFilter.java * @compile ../../../../com/sun/net/httpserver/FileServerHandler.java * @compile ../ProxyServer.java diff --git a/test/jdk/java/net/httpclient/websocket/WSHandshakeExceptionTest.java b/test/jdk/java/net/httpclient/websocket/WSHandshakeExceptionTest.java index 2feac502b93..8702a49549f 100644 --- a/test/jdk/java/net/httpclient/websocket/WSHandshakeExceptionTest.java +++ b/test/jdk/java/net/httpclient/websocket/WSHandshakeExceptionTest.java @@ -24,8 +24,8 @@ /* * @test * @summary Basic test for WebSocketHandshakeException - * @library /lib/testlibrary - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext * @modules java.net.http * jdk.httpserver * @run testng/othervm -Djdk.internal.httpclient.debug=true WSHandshakeExceptionTest @@ -39,7 +39,7 @@ import java.net.InetAddress; import java.net.http.HttpClient; import java.net.http.WebSocket; import java.net.http.WebSocketHandshakeException; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.DataProvider; diff --git a/test/jdk/java/net/httpclient/whitebox/java.net.http/jdk/internal/net/http/AbstractSSLTubeTest.java b/test/jdk/java/net/httpclient/whitebox/java.net.http/jdk/internal/net/http/AbstractSSLTubeTest.java index 6eb6f2c2313..9b69588ce3f 100644 --- a/test/jdk/java/net/httpclient/whitebox/java.net.http/jdk/internal/net/http/AbstractSSLTubeTest.java +++ b/test/jdk/java/net/httpclient/whitebox/java.net.http/jdk/internal/net/http/AbstractSSLTubeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2018, 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 @@ -28,22 +28,13 @@ import jdk.internal.net.http.common.SSLTube; import jdk.internal.net.http.common.Utils; import org.testng.annotations.Test; -import javax.net.ssl.KeyManagerFactory; import javax.net.ssl.SSLContext; import javax.net.ssl.SSLEngine; import javax.net.ssl.SSLParameters; -import javax.net.ssl.TrustManagerFactory; -import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.nio.ByteBuffer; -import java.security.KeyManagementException; -import java.security.KeyStore; -import java.security.KeyStoreException; -import java.security.NoSuchAlgorithmException; -import java.security.UnrecoverableKeyException; -import java.security.cert.CertificateException; import java.util.List; import java.util.StringTokenizer; import java.util.concurrent.CompletableFuture; @@ -244,76 +235,4 @@ public class AbstractSSLTubeTest extends AbstractRandomTest { engine.setUseClientMode(client); return engine; } - - /** - * Creates a simple usable SSLContext for SSLSocketFactory or a HttpsServer - * using either a given keystore or a default one in the test tree. - * - * Using this class with a security manager requires the following - * permissions to be granted: - * - * permission "java.util.PropertyPermission" "test.src.path", "read"; - * permission java.io.FilePermission "${test.src}/../../../../lib/testlibrary/jdk/testlibrary/testkeys", - * "read"; The exact path above depends on the location of the test. - */ - protected static class SimpleSSLContext { - - private final SSLContext ssl; - - /** - * Loads default keystore from SimpleSSLContext source directory - */ - public SimpleSSLContext() throws IOException { - String paths = System.getProperty("test.src.path"); - StringTokenizer st = new StringTokenizer(paths, File.pathSeparator); - boolean securityExceptions = false; - SSLContext sslContext = null; - while (st.hasMoreTokens()) { - String path = st.nextToken(); - try { - File f = new File(path, "../../../../lib/testlibrary/jdk/testlibrary/testkeys"); - if (f.exists()) { - try (FileInputStream fis = new FileInputStream(f)) { - sslContext = init(fis); - break; - } - } - } catch (SecurityException e) { - // catch and ignore because permission only required - // for one entry on path (at most) - securityExceptions = true; - } - } - if (securityExceptions) { - System.err.println("SecurityExceptions thrown on loading testkeys"); - } - ssl = sslContext; - } - - private SSLContext init(InputStream i) throws IOException { - try { - char[] passphrase = "passphrase".toCharArray(); - KeyStore ks = KeyStore.getInstance("JKS"); - ks.load(i, passphrase); - - KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509"); - kmf.init(ks, passphrase); - - TrustManagerFactory tmf = TrustManagerFactory.getInstance("SunX509"); - tmf.init(ks); - - SSLContext ssl = SSLContext.getInstance("TLS"); - ssl.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null); - return ssl; - } catch (KeyManagementException | KeyStoreException | - UnrecoverableKeyException | CertificateException | - NoSuchAlgorithmException e) { - throw new RuntimeException(e.getMessage()); - } - } - - public SSLContext get() { - return ssl; - } - } } diff --git a/test/jdk/java/net/httpclient/whitebox/java.net.http/jdk/internal/net/http/FlowTest.java b/test/jdk/java/net/httpclient/whitebox/java.net.http/jdk/internal/net/http/FlowTest.java index e34a75229e1..e6188bf4bb8 100644 --- a/test/jdk/java/net/httpclient/whitebox/java.net.http/jdk/internal/net/http/FlowTest.java +++ b/test/jdk/java/net/httpclient/whitebox/java.net.http/jdk/internal/net/http/FlowTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2018, 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 @@ -24,8 +24,6 @@ package jdk.internal.net.http; import java.io.BufferedOutputStream; -import java.io.File; -import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; @@ -33,12 +31,6 @@ import java.net.InetAddress; import java.net.InetSocketAddress; import java.net.Socket; import java.nio.ByteBuffer; -import java.security.KeyManagementException; -import java.security.KeyStore; -import java.security.KeyStoreException; -import java.security.NoSuchAlgorithmException; -import java.security.UnrecoverableKeyException; -import java.security.cert.CertificateException; import java.util.List; import java.util.Random; import java.util.StringTokenizer; @@ -53,9 +45,7 @@ import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.SubmissionPublisher; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicLong; -import javax.net.ssl.KeyManagerFactory; import javax.net.ssl.*; -import javax.net.ssl.TrustManagerFactory; import jdk.internal.net.http.common.Utils; import org.testng.annotations.Test; import jdk.internal.net.http.common.SSLFlowDelegate; @@ -467,80 +457,6 @@ public class FlowTest extends AbstractRandomTest { } } - /** - * Creates a simple usable SSLContext for SSLSocketFactory - * or a HttpsServer using either a given keystore or a default - * one in the test tree. - *

    - * Using this class with a security manager requires the following - * permissions to be granted: - *

    - * permission "java.util.PropertyPermission" "test.src.path", "read"; - * permission java.io.FilePermission - * "${test.src}/../../../../lib/testlibrary/jdk/testlibrary/testkeys", "read"; - * The exact path above depends on the location of the test. - */ - static class SimpleSSLContext { - - private final SSLContext ssl; - - /** - * Loads default keystore from SimpleSSLContext source directory - */ - public SimpleSSLContext() throws IOException { - String paths = System.getProperty("test.src.path"); - StringTokenizer st = new StringTokenizer(paths, File.pathSeparator); - boolean securityExceptions = false; - SSLContext sslContext = null; - while (st.hasMoreTokens()) { - String path = st.nextToken(); - try { - File f = new File(path, "../../../../lib/testlibrary/jdk/testlibrary/testkeys"); - if (f.exists()) { - try (FileInputStream fis = new FileInputStream(f)) { - sslContext = init(fis); - break; - } - } - } catch (SecurityException e) { - // catch and ignore because permission only required - // for one entry on path (at most) - securityExceptions = true; - } - } - if (securityExceptions) { - System.out.println("SecurityExceptions thrown on loading testkeys"); - } - ssl = sslContext; - } - - private SSLContext init(InputStream i) throws IOException { - try { - char[] passphrase = "passphrase".toCharArray(); - KeyStore ks = KeyStore.getInstance("JKS"); - ks.load(i, passphrase); - - KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509"); - kmf.init(ks, passphrase); - - TrustManagerFactory tmf = TrustManagerFactory.getInstance("SunX509"); - tmf.init(ks); - - SSLContext ssl = SSLContext.getInstance("TLS"); - ssl.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null); - return ssl; - } catch (KeyManagementException | KeyStoreException | - UnrecoverableKeyException | CertificateException | - NoSuchAlgorithmException e) { - throw new RuntimeException(e.getMessage()); - } - } - - public SSLContext get() { - return ssl; - } - } - private static void sleep(int millis) { try { Thread.sleep(millis); diff --git a/test/jdk/java/net/httpclient/whitebox/java.net.http/jdk/internal/net/http/SimpleSSLContext.java b/test/jdk/java/net/httpclient/whitebox/java.net.http/jdk/internal/net/http/SimpleSSLContext.java new file mode 100644 index 00000000000..00ae3a0fa7d --- /dev/null +++ b/test/jdk/java/net/httpclient/whitebox/java.net.http/jdk/internal/net/http/SimpleSSLContext.java @@ -0,0 +1,112 @@ +/* + * Copyright (c) 2018, 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. + * + * 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. + */ + +package jdk.internal.net.http; + +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.security.KeyManagementException; +import java.security.KeyStore; +import java.security.KeyStoreException; +import java.security.NoSuchAlgorithmException; +import java.security.UnrecoverableKeyException; +import java.security.cert.CertificateException; +import java.util.StringTokenizer; + +import javax.net.ssl.KeyManagerFactory; +import javax.net.ssl.SSLContext; +import javax.net.ssl.TrustManagerFactory; + +/** + * Creates a simple usable SSLContext for SSLSocketFactory + * or a HttpsServer using a default keystore in the test tree. + *

    + * Using this class with a security manager requires the following + * permissions to be granted: + *

    + * permission "java.util.PropertyPermission" "test.src.path", "read"; + * permission java.io.FilePermission "/path/to/test/lib/jdk/test/lib/testkeys", "read"; + * The exact path above depends on the location of the test. + */ +public class SimpleSSLContext { + + private final SSLContext ssl; + + /** + * Loads default keystore from SimpleSSLContext source directory + */ + public SimpleSSLContext() throws IOException { + String paths = System.getProperty("test.src.path"); + StringTokenizer st = new StringTokenizer(paths, File.pathSeparator); + boolean securityExceptions = false; + SSLContext sslContext = null; + while (st.hasMoreTokens()) { + String path = st.nextToken(); + try { + File f = new File(path, "../../../../../lib/jdk/test/lib/net/testkeys"); + if (f.exists()) { + try (FileInputStream fis = new FileInputStream(f)) { + sslContext = init(fis); + break; + } + } + } catch (SecurityException e) { + // catch and ignore because permission only required + // for one entry on path (at most) + securityExceptions = true; + } + } + if (securityExceptions) { + System.out.println("SecurityExceptions thrown on loading testkeys"); + } + ssl = sslContext; + } + + private SSLContext init(InputStream i) throws IOException { + try { + char[] passphrase = "passphrase".toCharArray(); + KeyStore ks = KeyStore.getInstance("PKCS12"); + ks.load(i, passphrase); + + KeyManagerFactory kmf = KeyManagerFactory.getInstance("PKIX"); + kmf.init(ks, passphrase); + + TrustManagerFactory tmf = TrustManagerFactory.getInstance("PKIX"); + tmf.init(ks); + + SSLContext ssl = SSLContext.getInstance("TLS"); + ssl.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null); + return ssl; + } catch (KeyManagementException | KeyStoreException | + UnrecoverableKeyException | CertificateException | + NoSuchAlgorithmException e) { + throw new RuntimeException(e.getMessage()); + } + } + + public SSLContext get() { + return ssl; + } +} \ No newline at end of file diff --git a/test/jdk/javax/net/ssl/HttpsURLConnection/Equals.java b/test/jdk/javax/net/ssl/HttpsURLConnection/Equals.java index 38ee581bdbc..d36dfb2630e 100644 --- a/test/jdk/javax/net/ssl/HttpsURLConnection/Equals.java +++ b/test/jdk/javax/net/ssl/HttpsURLConnection/Equals.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2018, 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 @@ -24,9 +24,9 @@ /** * @test * @bug 8055299 - * @library /lib/testlibrary + * @library /test/lib * @modules jdk.httpserver - * @build jdk.testlibrary.SimpleSSLContext + * @build jdk.test.lib.net.SimpleSSLContext * @run main/othervm -Djavax.net.debug=ssl,handshake,record Equals */ import com.sun.net.httpserver.*; @@ -34,7 +34,7 @@ import java.net.*; import java.io.*; import javax.net.ssl.*; import java.util.concurrent.*; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; public class Equals { diff --git a/test/jdk/sun/net/www/protocol/http/RedirectOnPost.java b/test/jdk/sun/net/www/protocol/http/RedirectOnPost.java index 8c485af01ac..2923c4807f5 100644 --- a/test/jdk/sun/net/www/protocol/http/RedirectOnPost.java +++ b/test/jdk/sun/net/www/protocol/http/RedirectOnPost.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2018, 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 @@ -23,9 +23,9 @@ /** * @test - * @library /lib/testlibrary/ + * @library /test/lib * @modules jdk.httpserver - * @build jdk.testlibrary.SimpleSSLContext + * @build jdk.test.lib.net.SimpleSSLContext * @compile RedirectOnPost.java * @run main/othervm RedirectOnPost * @bug 8029127 @@ -38,7 +38,7 @@ import java.util.*; import com.sun.net.httpserver.*; import java.util.concurrent.*; import javax.net.ssl.*; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; public class RedirectOnPost { diff --git a/test/jdk/lib/testlibrary/jdk/testlibrary/SimpleSSLContext.java b/test/lib/jdk/test/lib/net/SimpleSSLContext.java similarity index 82% rename from test/jdk/lib/testlibrary/jdk/testlibrary/SimpleSSLContext.java rename to test/lib/jdk/test/lib/net/SimpleSSLContext.java index 47143dc3b2b..0bfbb5fdc34 100644 --- a/test/jdk/lib/testlibrary/jdk/testlibrary/SimpleSSLContext.java +++ b/test/lib/jdk/test/lib/net/SimpleSSLContext.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2018, 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 @@ -21,12 +21,10 @@ * questions. */ -package jdk.testlibrary; +package jdk.test.lib.net; import java.util.*; -import java.util.concurrent.*; import java.io.*; -import java.net.*; import java.security.*; import java.security.cert.*; import javax.net.ssl.*; @@ -40,8 +38,7 @@ import javax.net.ssl.*; * permissions to be granted: * * permission "java.util.PropertyPermission" "test.src.path", "read"; - * permission java.io.FilePermission - * "${test.src}/../../../lib/testlibrary/jdk/testlibrary/testkeys", "read"; + * permission java.io.FilePermission "/path/to/test/lib/jdk/test/lib/testkeys", "read"; * The exact path above depends on the location of the test. */ public class SimpleSSLContext { @@ -63,7 +60,7 @@ public class SimpleSSLContext { while (st.hasMoreTokens()) { String path = st.nextToken(); try { - File f = new File(path, "jdk/testlibrary/testkeys"); + File f = new File(path, "jdk/test/lib/net/testkeys"); if (f.exists()) { try (FileInputStream fis = new FileInputStream(f)) { init(fis); @@ -98,7 +95,7 @@ public class SimpleSSLContext { * loads default keystore from given directory */ public SimpleSSLContext(String dir) throws IOException { - String file = dir+"/testkeys"; + String file = dir + "/testkeys"; try (FileInputStream fis = new FileInputStream(file)) { init(fis); } @@ -107,26 +104,20 @@ public class SimpleSSLContext { private void init(InputStream i) throws IOException { try { char[] passphrase = "passphrase".toCharArray(); - KeyStore ks = KeyStore.getInstance("JKS"); + KeyStore ks = KeyStore.getInstance("PKCS12"); ks.load(i, passphrase); - KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509"); + KeyManagerFactory kmf = KeyManagerFactory.getInstance("PKIX"); kmf.init(ks, passphrase); - TrustManagerFactory tmf = TrustManagerFactory.getInstance("SunX509"); + TrustManagerFactory tmf = TrustManagerFactory.getInstance("PKIX"); tmf.init(ks); ssl = SSLContext.getInstance("TLS"); ssl.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null); - } catch (KeyManagementException e) { - throw new RuntimeException(e.getMessage()); - } catch (KeyStoreException e) { - throw new RuntimeException(e.getMessage()); - } catch (UnrecoverableKeyException e) { - throw new RuntimeException(e.getMessage()); - } catch (CertificateException e) { - throw new RuntimeException(e.getMessage()); - } catch (NoSuchAlgorithmException e) { + } catch (KeyManagementException | KeyStoreException | + UnrecoverableKeyException | CertificateException | + NoSuchAlgorithmException e) { throw new RuntimeException(e.getMessage()); } } diff --git a/test/jdk/lib/testlibrary/jdk/testlibrary/testkeys b/test/lib/jdk/test/lib/net/testkeys similarity index 100% rename from test/jdk/lib/testlibrary/jdk/testlibrary/testkeys rename to test/lib/jdk/test/lib/net/testkeys From a0ce3d3f18e455a5fc8a587d4f37233152510764 Mon Sep 17 00:00:00 2001 From: Zhengyu Gu Date: Mon, 15 Oct 2018 11:53:15 -0400 Subject: [PATCH 114/124] 8212074: Add method to peek the remaining tasks in task queues Add methods for implementing new task termination protocol Reviewed-by: tschatzl, shade, rkennke --- src/hotspot/share/gc/shared/taskqueue.hpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/hotspot/share/gc/shared/taskqueue.hpp b/src/hotspot/share/gc/shared/taskqueue.hpp index 7b9f47a65d1..0c1f9beec43 100644 --- a/src/hotspot/share/gc/shared/taskqueue.hpp +++ b/src/hotspot/share/gc/shared/taskqueue.hpp @@ -370,6 +370,8 @@ class TaskQueueSetSuper { public: // Returns "true" if some TaskQueue in the set contains a task. virtual bool peek() = 0; + // Tasks in queue + virtual uint tasks() const = 0; }; template class TaskQueueSetSuperImpl: public CHeapObj, public TaskQueueSetSuper { @@ -399,6 +401,7 @@ public: bool steal(uint queue_num, E& t); bool peek(); + uint tasks() const; uint size() const { return _n; } }; @@ -424,6 +427,15 @@ bool GenericTaskQueueSet::peek() { return false; } +template +uint GenericTaskQueueSet::tasks() const { + uint n = 0; + for (uint j = 0; j < _n; j++) { + n += _queues[j]->size(); + } + return n; +} + // When to terminate from the termination protocol. class TerminatorTerminator: public CHeapObj { public: From 56847065afc6644acede196dc8d6973b67b4a2e0 Mon Sep 17 00:00:00 2001 From: Abdul Kolarkunnu Date: Thu, 11 Oct 2018 07:22:53 -0700 Subject: [PATCH 115/124] 8211139: Increase timeout value in all tests under jdk/sanity/client/SwingSet/src Reviewed-by: serb --- .../SwingSet/src/ButtonDemoScreenshotTest.java | 2 +- .../sanity/client/SwingSet/src/ButtonDemoTest.java | 2 +- .../client/SwingSet/src/ComboBoxDemoTest.java | 2 +- .../sanity/client/SwingSet/src/DialogDemoTest.java | 2 +- .../sanity/client/SwingSet/src/FrameDemoTest.java | 4 ++-- .../client/SwingSet/src/GridBagLayoutDemoTest.java | 2 +- .../sanity/client/SwingSet/src/ListDemoTest.java | 2 +- .../client/SwingSet/src/OptionPaneDemoTest.java | 2 +- .../client/SwingSet/src/ProgressBarDemoTest.java | 2 +- .../client/SwingSet/src/ScrollPaneDemoTest.java | 2 +- .../client/SwingSet/src/SpinnerDemoTest.java | 2 +- .../client/SwingSet/src/TabbedPaneDemoTest.java | 2 +- .../sanity/client/SwingSet/src/TableDemoTest.java | 2 +- .../client/SwingSet/src/TextFieldDemoTest.java | 2 +- .../client/SwingSet/src/ToggleButtonDemoTest.java | 2 +- .../client/SwingSet/src/ToolTipDemoTest.java | 2 +- .../sanity/client/SwingSet/src/TreeDemoTest.java | 2 +- .../sanity/client/SwingSet/src/WindowDemoTest.java | 2 +- .../lib/Extensions/src/org/jemmy2ext/JemmyExt.java | 14 +++++++++----- 19 files changed, 28 insertions(+), 24 deletions(-) diff --git a/test/jdk/sanity/client/SwingSet/src/ButtonDemoScreenshotTest.java b/test/jdk/sanity/client/SwingSet/src/ButtonDemoScreenshotTest.java index 545603aaf3e..5106b7be0df 100644 --- a/test/jdk/sanity/client/SwingSet/src/ButtonDemoScreenshotTest.java +++ b/test/jdk/sanity/client/SwingSet/src/ButtonDemoScreenshotTest.java @@ -54,7 +54,7 @@ import static org.jemmy2ext.JemmyExt.*; * java.logging * @build org.jemmy2ext.JemmyExt * @build com.sun.swingset3.demos.button.ButtonDemo - * @run testng ButtonDemoScreenshotTest + * @run testng/timeout=600 ButtonDemoScreenshotTest */ @Listeners(GuiTestListener.class) public class ButtonDemoScreenshotTest { diff --git a/test/jdk/sanity/client/SwingSet/src/ButtonDemoTest.java b/test/jdk/sanity/client/SwingSet/src/ButtonDemoTest.java index 7154037ca90..fd27a8d972b 100644 --- a/test/jdk/sanity/client/SwingSet/src/ButtonDemoTest.java +++ b/test/jdk/sanity/client/SwingSet/src/ButtonDemoTest.java @@ -56,7 +56,7 @@ import org.testng.annotations.Listeners; * java.logging * @build org.jemmy2ext.JemmyExt * @build com.sun.swingset3.demos.button.ButtonDemo - * @run testng ButtonDemoTest + * @run testng/timeout=600 ButtonDemoTest */ @Listeners(GuiTestListener.class) public class ButtonDemoTest { diff --git a/test/jdk/sanity/client/SwingSet/src/ComboBoxDemoTest.java b/test/jdk/sanity/client/SwingSet/src/ComboBoxDemoTest.java index 3a52bcf3b1b..d3ed7697df3 100644 --- a/test/jdk/sanity/client/SwingSet/src/ComboBoxDemoTest.java +++ b/test/jdk/sanity/client/SwingSet/src/ComboBoxDemoTest.java @@ -45,7 +45,7 @@ import org.testng.annotations.Listeners; * java.logging * @build org.jemmy2ext.JemmyExt * @build com.sun.swingset3.demos.combobox.ComboBoxDemo - * @run testng ComboBoxDemoTest + * @run testng/timeout=600 ComboBoxDemoTest */ @Listeners(GuiTestListener.class) public class ComboBoxDemoTest { diff --git a/test/jdk/sanity/client/SwingSet/src/DialogDemoTest.java b/test/jdk/sanity/client/SwingSet/src/DialogDemoTest.java index 1d92414509f..6377259bdf1 100644 --- a/test/jdk/sanity/client/SwingSet/src/DialogDemoTest.java +++ b/test/jdk/sanity/client/SwingSet/src/DialogDemoTest.java @@ -55,7 +55,7 @@ import org.testng.annotations.Listeners; * java.logging * @build org.jemmy2ext.JemmyExt * @build com.sun.swingset3.demos.dialog.DialogDemo - * @run testng DialogDemoTest + * @run testng/timeout=600 DialogDemoTest */ @Listeners(GuiTestListener.class) public class DialogDemoTest { diff --git a/test/jdk/sanity/client/SwingSet/src/FrameDemoTest.java b/test/jdk/sanity/client/SwingSet/src/FrameDemoTest.java index f820cb2b77d..aaa0a624980 100644 --- a/test/jdk/sanity/client/SwingSet/src/FrameDemoTest.java +++ b/test/jdk/sanity/client/SwingSet/src/FrameDemoTest.java @@ -86,7 +86,7 @@ import com.sun.swingset3.demos.frame.FrameDemo; * java.logging * @build org.jemmy2ext.JemmyExt * @build com.sun.swingset3.demos.frame.FrameDemo - * @run testng FrameDemoTest + * @run testng/timeout=600 FrameDemoTest */ @Listeners(GuiTestListener.class) public class FrameDemoTest { @@ -293,4 +293,4 @@ public class FrameDemoTest { }); } -} \ No newline at end of file +} diff --git a/test/jdk/sanity/client/SwingSet/src/GridBagLayoutDemoTest.java b/test/jdk/sanity/client/SwingSet/src/GridBagLayoutDemoTest.java index ca4a4f33d32..e833db90685 100644 --- a/test/jdk/sanity/client/SwingSet/src/GridBagLayoutDemoTest.java +++ b/test/jdk/sanity/client/SwingSet/src/GridBagLayoutDemoTest.java @@ -51,7 +51,7 @@ import static org.jemmy2ext.JemmyExt.getUIValue; * @modules java.desktop * java.logging * @build com.sun.swingset3.demos.gridbaglayout.GridBagLayoutDemo - * @run testng GridBagLayoutDemoTest + * @run testng/timeout=600 GridBagLayoutDemoTest */ @Listeners(GuiTestListener.class) diff --git a/test/jdk/sanity/client/SwingSet/src/ListDemoTest.java b/test/jdk/sanity/client/SwingSet/src/ListDemoTest.java index 6925416efe0..fda5f3fe72d 100644 --- a/test/jdk/sanity/client/SwingSet/src/ListDemoTest.java +++ b/test/jdk/sanity/client/SwingSet/src/ListDemoTest.java @@ -56,7 +56,7 @@ import static org.testng.AssertJUnit.*; * java.logging * @build org.jemmy2ext.JemmyExt * @build com.sun.swingset3.demos.list.ListDemo - * @run testng ListDemoTest + * @run testng/timeout=600 ListDemoTest */ @Listeners(GuiTestListener.class) public class ListDemoTest { diff --git a/test/jdk/sanity/client/SwingSet/src/OptionPaneDemoTest.java b/test/jdk/sanity/client/SwingSet/src/OptionPaneDemoTest.java index 0b20dcdf93c..bf4d11fe997 100644 --- a/test/jdk/sanity/client/SwingSet/src/OptionPaneDemoTest.java +++ b/test/jdk/sanity/client/SwingSet/src/OptionPaneDemoTest.java @@ -55,7 +55,7 @@ import static org.testng.AssertJUnit.*; * java.logging * @build org.jemmy2ext.JemmyExt * @build com.sun.swingset3.demos.optionpane.OptionPaneDemo - * @run testng OptionPaneDemoTest + * @run testng/timeout=600 OptionPaneDemoTest */ @Listeners(GuiTestListener.class) public class OptionPaneDemoTest { diff --git a/test/jdk/sanity/client/SwingSet/src/ProgressBarDemoTest.java b/test/jdk/sanity/client/SwingSet/src/ProgressBarDemoTest.java index 33aa7af9104..1afb02c634b 100644 --- a/test/jdk/sanity/client/SwingSet/src/ProgressBarDemoTest.java +++ b/test/jdk/sanity/client/SwingSet/src/ProgressBarDemoTest.java @@ -49,7 +49,7 @@ import org.testng.annotations.Listeners; * java.logging * @build org.jemmy2ext.JemmyExt * @build com.sun.swingset3.demos.progressbar.ProgressBarDemo - * @run testng/timeout=240 ProgressBarDemoTest + * @run testng/timeout=1200 ProgressBarDemoTest */ @Listeners(GuiTestListener.class) public class ProgressBarDemoTest { diff --git a/test/jdk/sanity/client/SwingSet/src/ScrollPaneDemoTest.java b/test/jdk/sanity/client/SwingSet/src/ScrollPaneDemoTest.java index 80b534ad562..e2aca591932 100644 --- a/test/jdk/sanity/client/SwingSet/src/ScrollPaneDemoTest.java +++ b/test/jdk/sanity/client/SwingSet/src/ScrollPaneDemoTest.java @@ -45,7 +45,7 @@ import org.testng.annotations.Listeners; * java.logging * @build org.jemmy2ext.JemmyExt * @build com.sun.swingset3.demos.scrollpane.ScrollPaneDemo - * @run testng ScrollPaneDemoTest + * @run testng/timeout=600 ScrollPaneDemoTest */ @Listeners(GuiTestListener.class) public class ScrollPaneDemoTest { diff --git a/test/jdk/sanity/client/SwingSet/src/SpinnerDemoTest.java b/test/jdk/sanity/client/SwingSet/src/SpinnerDemoTest.java index e71df060103..c547162fec6 100644 --- a/test/jdk/sanity/client/SwingSet/src/SpinnerDemoTest.java +++ b/test/jdk/sanity/client/SwingSet/src/SpinnerDemoTest.java @@ -47,7 +47,7 @@ import org.testng.annotations.Listeners; * java.logging * @build org.jemmy2ext.JemmyExt * @build com.sun.swingset3.demos.spinner.SpinnerDemo - * @run testng SpinnerDemoTest + * @run testng/timeout=600 SpinnerDemoTest */ @Listeners(GuiTestListener.class) public class SpinnerDemoTest { diff --git a/test/jdk/sanity/client/SwingSet/src/TabbedPaneDemoTest.java b/test/jdk/sanity/client/SwingSet/src/TabbedPaneDemoTest.java index 3abda73049c..6b7b270173f 100644 --- a/test/jdk/sanity/client/SwingSet/src/TabbedPaneDemoTest.java +++ b/test/jdk/sanity/client/SwingSet/src/TabbedPaneDemoTest.java @@ -48,7 +48,7 @@ import org.testng.annotations.Listeners; * java.logging * @build org.jemmy2ext.JemmyExt * @build com.sun.swingset3.demos.tabbedpane.TabbedPaneDemo - * @run testng TabbedPaneDemoTest + * @run testng/timeout=600 TabbedPaneDemoTest */ @Listeners(GuiTestListener.class) public class TabbedPaneDemoTest { diff --git a/test/jdk/sanity/client/SwingSet/src/TableDemoTest.java b/test/jdk/sanity/client/SwingSet/src/TableDemoTest.java index de824e7c0a9..da77e1cffd9 100644 --- a/test/jdk/sanity/client/SwingSet/src/TableDemoTest.java +++ b/test/jdk/sanity/client/SwingSet/src/TableDemoTest.java @@ -64,7 +64,7 @@ import com.sun.swingset3.demos.table.TableDemo; * java.logging * @build org.jemmy2ext.JemmyExt * @build com.sun.swingset3.demos.table.TableDemo - * @run testng TableDemoTest + * @run testng/timeout=600 TableDemoTest */ @Listeners(GuiTestListener.class) public class TableDemoTest { diff --git a/test/jdk/sanity/client/SwingSet/src/TextFieldDemoTest.java b/test/jdk/sanity/client/SwingSet/src/TextFieldDemoTest.java index b94bdb0b8a1..4a8eab0177d 100644 --- a/test/jdk/sanity/client/SwingSet/src/TextFieldDemoTest.java +++ b/test/jdk/sanity/client/SwingSet/src/TextFieldDemoTest.java @@ -65,7 +65,7 @@ import static org.testng.AssertJUnit.*; * java.logging * @build org.jemmy2ext.JemmyExt * @build com.sun.swingset3.demos.textfield.TextFieldDemo - * @run testng TextFieldDemoTest + * @run testng/timeout=600 TextFieldDemoTest */ @Listeners(GuiTestListener.class) public class TextFieldDemoTest { diff --git a/test/jdk/sanity/client/SwingSet/src/ToggleButtonDemoTest.java b/test/jdk/sanity/client/SwingSet/src/ToggleButtonDemoTest.java index 49da775491a..dfaf8c9c329 100644 --- a/test/jdk/sanity/client/SwingSet/src/ToggleButtonDemoTest.java +++ b/test/jdk/sanity/client/SwingSet/src/ToggleButtonDemoTest.java @@ -61,7 +61,7 @@ import org.testng.annotations.Listeners; * java.logging * @build org.jemmy2ext.JemmyExt * @build com.sun.swingset3.demos.togglebutton.ToggleButtonDemo - * @run testng ToggleButtonDemoTest + * @run testng/timeout=600 ToggleButtonDemoTest */ @Listeners(GuiTestListener.class) public class ToggleButtonDemoTest { diff --git a/test/jdk/sanity/client/SwingSet/src/ToolTipDemoTest.java b/test/jdk/sanity/client/SwingSet/src/ToolTipDemoTest.java index 7d30383a34f..9a6d7e1ccc7 100644 --- a/test/jdk/sanity/client/SwingSet/src/ToolTipDemoTest.java +++ b/test/jdk/sanity/client/SwingSet/src/ToolTipDemoTest.java @@ -61,7 +61,7 @@ import com.sun.swingset3.demos.tooltip.ToolTipDemo; * java.logging * @build org.jemmy2ext.JemmyExt * @build com.sun.swingset3.demos.tooltip.ToolTipDemo - * @run testng ToolTipDemoTest + * @run testng/timeout=600 ToolTipDemoTest */ @Listeners(GuiTestListener.class) public class ToolTipDemoTest { diff --git a/test/jdk/sanity/client/SwingSet/src/TreeDemoTest.java b/test/jdk/sanity/client/SwingSet/src/TreeDemoTest.java index c454c54739d..ab541c35c66 100644 --- a/test/jdk/sanity/client/SwingSet/src/TreeDemoTest.java +++ b/test/jdk/sanity/client/SwingSet/src/TreeDemoTest.java @@ -56,7 +56,7 @@ import static org.testng.AssertJUnit.*; * java.logging * @build org.jemmy2ext.JemmyExt * @build com.sun.swingset3.demos.tree.TreeDemo - * @run testng TreeDemoTest + * @run testng/timeout=600 TreeDemoTest */ @Listeners(GuiTestListener.class) public class TreeDemoTest { diff --git a/test/jdk/sanity/client/SwingSet/src/WindowDemoTest.java b/test/jdk/sanity/client/SwingSet/src/WindowDemoTest.java index e9fc06f2ac3..1b15153c239 100644 --- a/test/jdk/sanity/client/SwingSet/src/WindowDemoTest.java +++ b/test/jdk/sanity/client/SwingSet/src/WindowDemoTest.java @@ -49,7 +49,7 @@ import org.testng.annotations.Listeners; * java.logging * @build org.jemmy2ext.JemmyExt * @build com.sun.swingset3.demos.window.WindowDemo - * @run testng WindowDemoTest + * @run testng/timeout=600 WindowDemoTest */ @Listeners(GuiTestListener.class) public class WindowDemoTest { diff --git a/test/jdk/sanity/client/lib/Extensions/src/org/jemmy2ext/JemmyExt.java b/test/jdk/sanity/client/lib/Extensions/src/org/jemmy2ext/JemmyExt.java index 2c3b23677ac..8063c60c986 100644 --- a/test/jdk/sanity/client/lib/Extensions/src/org/jemmy2ext/JemmyExt.java +++ b/test/jdk/sanity/client/lib/Extensions/src/org/jemmy2ext/JemmyExt.java @@ -48,6 +48,7 @@ import javax.swing.JButton; import javax.swing.JComponent; import javax.swing.JPanel; import javax.swing.JWindow; +import javax.swing.UIManager; import javax.swing.border.Border; import javax.swing.border.CompoundBorder; import javax.swing.border.TitledBorder; @@ -340,19 +341,21 @@ public class JemmyExt { * full dump and a screenshot of the whole screen. */ public static void captureAll() { - PNGEncoder.captureScreen("failure.png", PNGEncoder.COLOR_MODE); + String lookAndFeelClassName = UIManager.getLookAndFeel().getClass().getSimpleName(); + PNGEncoder.captureScreen("failure_" + lookAndFeelClassName + ".png", PNGEncoder.COLOR_MODE); try { - Dumper.dumpAll("dumpAll.xml"); + Dumper.dumpAll("dumpAll_" + lookAndFeelClassName + ".xml"); } catch (FileNotFoundException ex) { Logger.getLogger(JemmyExt.class.getName()).log(Level.SEVERE, null, ex); } - captureWindows(); + captureWindows(lookAndFeelClassName); } /** * Captures each showing window image using Window.paint() method. + * @param lookAndFeelClassName */ - private static void captureWindows() { + private static void captureWindows(String lookAndFeelClassName) { try { EventQueue.invokeAndWait(() -> { Window[] windows = Window.getWindows(); @@ -367,7 +370,8 @@ public class JemmyExt { g.dispose(); try { - ImageIO.write(img, "png", new File("window" + index++ + ".png")); + ImageIO.write(img, "png", new File("window_" + lookAndFeelClassName + + "_" + index++ + ".png")); } catch (IOException e) { e.printStackTrace(); } From 232912a6cabba7a80eb10415cf96e9760abd4ec8 Mon Sep 17 00:00:00 2001 From: Erik Joelsson Date: Mon, 15 Oct 2018 11:36:20 -0700 Subject: [PATCH 116/124] 8212028: Use run-test makefile framework for testing in Oracle's Mach5 Reviewed-by: ihse --- make/Help.gmk | 2 +- make/RunTests.gmk | 113 ++++++++++++------ make/RunTestsPrebuilt.gmk | 43 ++++--- make/RunTestsPrebuiltSpec.gmk | 12 +- make/common/MakeBase.gmk | 8 +- make/conf/jib-profiles.js | 38 ++++-- .../escapeAnalysis/TestArrayCopy.java | 2 +- .../compiler/graalunit/JttLangMathALTest.java | 3 +- .../compiler/graalunit/JttLangMathMZTest.java | 3 +- .../ContinuousCallSiteTargetChange.java | 2 +- .../appcds/jvmti/InstrumentationApp.java | 8 +- .../appcds/jvmti/InstrumentationTest.java | 4 +- .../correctBootstrap/TestDescription.java | 2 +- .../incorrectBootstrap/TestDescription.java | 2 +- .../stress/classfmt/mh/TestDescription.java | 2 +- .../stress/classfmt/mt/TestDescription.java | 2 +- .../stress/gc/createLotsOfMHConsts/Test.java | 2 +- test/jdk/tools/jimage/JImageExtractTest.java | 2 +- 18 files changed, 164 insertions(+), 86 deletions(-) diff --git a/make/Help.gmk b/make/Help.gmk index 461d3431a62..e58f54862af 100644 --- a/make/Help.gmk +++ b/make/Help.gmk @@ -119,7 +119,7 @@ print-configurations: run-test-prebuilt: @( cd $(topdir) && \ $(MAKE) --no-print-directory -r -R -I make/common/ -f make/RunTestsPrebuilt.gmk \ - run-test-prebuilt TEST="$(TEST)" ) + run-test-prebuilt CUSTOM_MAKE_DIR=$(CUSTOM_MAKE_DIR) TEST="$(TEST)" ) ALL_GLOBAL_TARGETS := help print-configurations run-test-prebuilt diff --git a/make/RunTests.gmk b/make/RunTests.gmk index 3f72b3c0329..a252d2c0987 100644 --- a/make/RunTests.gmk +++ b/make/RunTests.gmk @@ -45,8 +45,8 @@ ifneq ($(TEST_VM_OPTS), ) endif $(eval $(call ParseKeywordVariable, TEST_OPTS, \ - KEYWORDS := JOBS TIMEOUT, \ - STRING_KEYWORDS := VM_OPTIONS, \ + SINGLE_KEYWORDS := JOBS TIMEOUT_FACTOR, \ + STRING_KEYWORDS := VM_OPTIONS JAVA_OPTIONS, \ )) # Helper function to propagate TEST_OPTS values. @@ -103,6 +103,31 @@ endif GTEST_LAUNCHER_DIRS := $(patsubst %/gtestLauncher, %, $(wildcard $(TEST_IMAGE_DIR)/hotspot/gtest/*/gtestLauncher)) GTEST_VARIANTS := $(strip $(patsubst $(TEST_IMAGE_DIR)/hotspot/gtest/%, %, $(GTEST_LAUNCHER_DIRS))) +################################################################################ +# Setup global test running parameters +################################################################################ + +# Each factor variable comes in 3 variants. The first one is reserved for users +# to use on command line. The other two are for predifined configurations in JDL +# and for machine specific configurations respectively. +TEST_JOBS_FACTOR ?= 1 +TEST_JOBS_FACTOR_JDL ?= 1 +TEST_JOBS_FACTOR_MACHINE ?= 1 + +ifeq ($(TEST_JOBS), 0) + # Concurrency based on min(cores / 2, 12) * TEST_JOBS_FACTOR + TEST_JOBS := $(shell $(AWK) \ + 'BEGIN { \ + c = $(NUM_CORES) / 2; \ + if (c > 12) c = 12; \ + c = c * $(TEST_JOBS_FACTOR); \ + c = c * $(TEST_JOBS_FACTOR_JDL); \ + c = c * $(TEST_JOBS_FACTOR_MACHINE); \ + if (c < 1) c = 1; \ + printf "%.0f", c; \ + }') +endif + ################################################################################ # Parse control variables ################################################################################ @@ -110,16 +135,19 @@ GTEST_VARIANTS := $(strip $(patsubst $(TEST_IMAGE_DIR)/hotspot/gtest/%, %, $(GTE ifneq ($(TEST_OPTS), ) # Inform the user $(info Running tests using TEST_OPTS control variable '$(TEST_OPTS)') - - $(eval $(call SetTestOpt,VM_OPTIONS,JTREG)) - $(eval $(call SetTestOpt,VM_OPTIONS,GTEST)) - - $(eval $(call SetTestOpt,JOBS,JTREG)) - $(eval $(call SetTestOpt,TIMEOUT,JTREG)) endif +$(eval $(call SetTestOpt,VM_OPTIONS,JTREG)) +$(eval $(call SetTestOpt,JAVA_OPTIONS,JTREG)) +$(eval $(call SetTestOpt,VM_OPTIONS,GTEST)) +$(eval $(call SetTestOpt,JAVA_OPTIONS,GTEST)) + +$(eval $(call SetTestOpt,JOBS,JTREG)) +$(eval $(call SetTestOpt,TIMEOUT_FACTOR,JTREG)) + $(eval $(call ParseKeywordVariable, JTREG, \ - KEYWORDS := JOBS TIMEOUT TEST_MODE ASSERT VERBOSE RETAIN MAX_MEM, \ + SINGLE_KEYWORDS := JOBS TIMEOUT_FACTOR TEST_MODE ASSERT VERBOSE RETAIN MAX_MEM \ + EXTRA_PROBLEM_LISTS KEYWORDS, \ STRING_KEYWORDS := OPTIONS JAVA_OPTIONS VM_OPTIONS, \ )) @@ -129,8 +157,8 @@ ifneq ($(JTREG), ) endif $(eval $(call ParseKeywordVariable, GTEST, \ - KEYWORDS := REPEAT, \ - STRING_KEYWORDS := OPTIONS VM_OPTIONS, \ + SINGLE_KEYWORDS := REPEAT, \ + STRING_KEYWORDS := OPTIONS VM_OPTIONS JAVA_OPTIONS, \ )) ifneq ($(GTEST), ) @@ -143,17 +171,6 @@ endif # Component-specific Jtreg settings ################################################################################ -ifeq ($(TEST_JOBS), 0) - # If TEST_JOBS is not specified, hotspot fallback default is - # min(num_cores / 2, 12). - hotspot_JTREG_JOBS := $(shell $(EXPR) $(NUM_CORES) / 2) - ifeq ($(hotspot_JTREG_JOBS), 0) - hotspot_JTREG_JOBS := 1 - else ifeq ($(shell $(EXPR) $(hotspot_JTREG_JOBS) \> 12), 1) - hotspot_JTREG_JOBS := 12 - endif -endif - hotspot_JTREG_MAX_MEM := 0 hotspot_JTREG_ASSERT := false hotspot_JTREG_NATIVEPATH := $(TEST_IMAGE_DIR)/hotspot/jtreg/native @@ -165,6 +182,8 @@ langtools_JTREG_PROBLEM_LIST += $(TOPDIR)/test/langtools/ProblemList.txt nashorn_JTREG_PROBLEM_LIST += $(TOPDIR)/test/nashorn/ProblemList.txt hotspot_JTREG_PROBLEM_LIST += $(TOPDIR)/test/hotspot/jtreg/ProblemList.txt +langtools_JTREG_MAX_MEM := 768m + ################################################################################ # Parse test selection # @@ -368,15 +387,16 @@ define SetupRunGtestTestBody $1_GTEST_REPEAT :=--gtest_repeat=$$(GTEST_REPEAT) endif - run-test-$1: + run-test-$1: $(TEST_PREREQS) $$(call LogWarn) $$(call LogWarn, Running test '$$($1_TEST)') $$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR)) $$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/gtest, \ $$(FIXPATH) $$(TEST_IMAGE_DIR)/hotspot/gtest/$$($1_VARIANT)/gtestLauncher \ - -jdk $(JDK_IMAGE_DIR) $$($1_GTEST_FILTER) \ - --gtest_output=xml:$$($1_TEST_RESULTS_DIR)/gtest.xml \ - $$($1_GTEST_REPEAT) $$(GTEST_OPTIONS) $$(GTEST_VM_OPTIONS) \ + -jdk $(JDK_IMAGE_DIR) $$($1_GTEST_FILTER) \ + --gtest_output=xml:$$($1_TEST_RESULTS_DIR)/gtest.xml \ + $$($1_GTEST_REPEAT) $$(GTEST_OPTIONS) $$(GTEST_VM_OPTIONS) \ + $$($1_GTEST_JAVA_OPTIONS) \ > >($(TEE) $$($1_TEST_RESULTS_DIR)/gtest.txt) \ && $$(ECHO) $$$$? > $$($1_EXITCODE) \ || $$(ECHO) $$$$? > $$($1_EXITCODE) \ @@ -447,12 +467,11 @@ define SetupRunJtregTestBody $1_TEST_NAME := $$(strip $$(patsubst jtreg:%, %, $$($1_TEST))) - $1_COMPONENT := \ + $1_TEST_ROOT := \ $$(strip $$(foreach root, $$(JTREG_TESTROOTS), \ - $$(if $$(filter $$(root)%, $$(JTREG_TOPDIR)/$$($1_TEST_NAME)), \ - $$(lastword $$(subst /, $$(SPACE), $$(root))) \ - ) \ + $$(if $$(filter $$(root)%, $$(JTREG_TOPDIR)/$$($1_TEST_NAME)), $$(root)) \ )) + $1_COMPONENT := $$(lastword $$(subst /, $$(SPACE), $$($1_TEST_ROOT))) # This will work only as long as just hotspot has the additional "jtreg" directory ifeq ($$($1_COMPONENT), jtreg) $1_COMPONENT := hotspot @@ -475,11 +494,12 @@ define SetupRunJtregTestBody $$(eval $$(call SetJtregValue,$1,JTREG_BASIC_OPTIONS)) $$(eval $$(call SetJtregValue,$1,JTREG_PROBLEM_LIST)) + # Only the problem list for the current test root should be used. + $1_JTREG_PROBLEM_LIST := $$(filter $$($1_TEST_ROOT)%, $$($1_JTREG_PROBLEM_LIST)) + ifneq ($(TEST_JOBS), 0) - # User has specified TEST_JOBS, use that as fallback default $$(eval $$(call SetJtregValue,$1,JTREG_JOBS,$$(TEST_JOBS))) else - # Use JOBS as default (except for hotspot) $$(eval $$(call SetJtregValue,$1,JTREG_JOBS,$$(JOBS))) endif @@ -487,7 +507,7 @@ define SetupRunJtregTestBody # we may end up with a lot of JVM's $1_JTREG_MAX_RAM_PERCENTAGE := $$(shell $$(EXPR) 25 / $$($1_JTREG_JOBS)) - JTREG_TIMEOUT ?= 4 + JTREG_TIMEOUT_FACTOR ?= 4 JTREG_VERBOSE ?= fail,error,summary JTREG_RETAIN ?= fail,error @@ -498,10 +518,10 @@ define SetupRunJtregTestBody $1_JTREG_BASIC_OPTIONS += -$$($1_JTREG_TEST_MODE) \ -verbose:$$(JTREG_VERBOSE) -retain:$$(JTREG_RETAIN) \ - -concurrency:$$($1_JTREG_JOBS) -timeoutFactor:$$(JTREG_TIMEOUT) \ + -concurrency:$$($1_JTREG_JOBS) -timeoutFactor:$$(JTREG_TIMEOUT_FACTOR) \ -vmoption:-XX:MaxRAMPercentage=$$($1_JTREG_MAX_RAM_PERCENTAGE) - $1_JTREG_BASIC_OPTIONS += -automatic -keywords:\!ignore -ignore:quiet + $1_JTREG_BASIC_OPTIONS += -automatic -ignore:quiet # Make it possible to specify the JIB_DATA_DIR for tests using the # JIB Artifact resolver @@ -531,6 +551,14 @@ define SetupRunJtregTestBody $1_JTREG_BASIC_OPTIONS += $$(addprefix -exclude:, $$($1_JTREG_PROBLEM_LIST)) endif + ifneq ($$(JTREG_EXTRA_PROBLEM_LISTS), ) + # Accept both absolute paths as well as relative to the current test root. + $1_JTREG_BASIC_OPTIONS += $$(addprefix -exclude:, $$(wildcard \ + $$(JTREG_EXTRA_PROBLEM_LISTS) \ + $$(addprefix $$($1_TEST_ROOT)/, $$(JTREG_EXTRA_PROBLEM_LISTS)) \ + )) + endif + ifneq ($$(JIB_HOME), ) $1_JTREG_BASIC_OPTIONS += -e:JIB_HOME=$$(JIB_HOME) endif @@ -541,10 +569,21 @@ define SetupRunJtregTestBody $1_JTREG_LAUNCHER_OPTIONS += -Djava.library.path="$(JTREG_FAILURE_HANDLER_DIR)" endif + ifneq ($$(JTREG_KEYWORDS), ) + # The keywords string may contain problematic characters and may be quoted + # already when it arrives here. Remove any existing quotes and replace them + # with one set of single quotes. + $1_JTREG_KEYWORDS := \ + $$(strip $$(subst $$(SQUOTE),,$$(subst $$(DQUOTE),,$$(JTREG_KEYWORDS)))) + ifneq ($$($1_JTREG_KEYWORDS), ) + $1_JTREG_BASIC_OPTIONS += -k:'$$($1_JTREG_KEYWORDS)' + endif + endif + clean-workdir-$1: $$(RM) -r $$($1_TEST_SUPPORT_DIR) - run-test-$1: clean-workdir-$1 + run-test-$1: clean-workdir-$1 $(TEST_PREREQS) $$(call LogWarn) $$(call LogWarn, Running test '$$($1_TEST)') $$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR)) @@ -631,7 +670,7 @@ define SetupRunSpecialTestBody $$(error Invalid special test specification: $$($1_TEST_NAME)) endif - run-test-$1: + run-test-$1: $(TEST_PREREQS) $$(call LogWarn) $$(call LogWarn, Running test '$$($1_TEST)') $$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR)) diff --git a/make/RunTestsPrebuilt.gmk b/make/RunTestsPrebuilt.gmk index 2660e766e25..ff9e8be1dc7 100644 --- a/make/RunTestsPrebuilt.gmk +++ b/make/RunTestsPrebuilt.gmk @@ -49,10 +49,11 @@ TOPDIR := $(strip $(patsubst %/make/, %, $(dir $(makefile_path)))) # given. # Note: No spaces are allowed around the arguments. # -# $1: The name of the argument +# $1: The name of the variable # $2: The default value, if any, or OPTIONAL (do not provide a default but # do not exit if it is missing) # $3: If NO_CHECK, disable checking for target file/directory existence +# If MKDIR, create the default directory define SetupVariable ifeq ($$($1), ) ifeq ($2, ) @@ -75,10 +76,17 @@ define SetupVariable endif # If $1 has a value (is not optional), and $3 is not set (to NO_CHECK), # and if wildcard is empty, then complain that the file is missing. - ifeq ($$(strip $$(if $$($1), , OPTIONAL) $$(wildcard $$($1)) $3), ) - $$(info Error: Prebuilt variable $1 points to missing file/directory:) - $$(info '$$($1)') - $$(error Cannot continue.) + ifeq ($3, MKDIR) + ifneq ($$(findstring $$(LOG), info debug trace), ) + $$(info Creating directory for $1) + endif + $$(shell mkdir -p $$($1)) + else ifneq ($3, NO_CHECK) + ifeq ($$(strip $$(if $$($1), , OPTIONAL) $$(wildcard $$($1))), ) + $$(info Error: Prebuilt variable $1 points to missing file/directory:) + $$(info '$$($1)') + $$(error Cannot continue.) + endif endif endef @@ -106,14 +114,14 @@ endef # Verify that user has given correct additional input. # These variables are absolutely necessary -$(eval $(call SetupVariable,OUTPUTDIR)) +$(eval $(call SetupVariable,OUTPUTDIR,$(TOPDIR)/build/run-test-prebuilt,MKDIR)) $(eval $(call SetupVariable,BOOT_JDK)) $(eval $(call SetupVariable,JT_HOME)) # These can have default values based on the ones above $(eval $(call SetupVariable,JDK_IMAGE_DIR,$(OUTPUTDIR)/images/jdk)) $(eval $(call SetupVariable,TEST_IMAGE_DIR,$(OUTPUTDIR)/images/test)) -$(eval $(call SetupVariable,SYMBOLS_IMAGE_DIR,$(OUTPUTDIR)/images/symbols)) +$(eval $(call SetupVariable,SYMBOLS_IMAGE_DIR,$(OUTPUTDIR)/images/symbols,NO_CHECK)) # Provide default values for tools that we need $(eval $(call SetupVariable,MAKE,make,NO_CHECK)) @@ -202,8 +210,8 @@ endif ifeq ($(OPENJDK_TARGET_OS), windows) ifeq ($(wildcard $(TEST_IMAGE_DIR)/bin/fixpath.exe), ) - $$(info Error: fixpath is missing from test image '$(TEST_IMAGE_DIR)') - $$(error Cannot continue.) + $(info Error: fixpath is missing from test image '$(TEST_IMAGE_DIR)') + $(error Cannot continue.) endif FIXPATH := $(TEST_IMAGE_DIR)/bin/fixpath.exe -c PATH_SEP:=; @@ -214,15 +222,17 @@ endif # Check number of cores ifeq ($(OPENJDK_TARGET_OS), linux) - NUM_CORES := $(shell $(CAT) /proc/cpuinfo | $(GREP) -c processor) + NUM_CORES := $(shell $(CAT) /proc/cpuinfo | $(GREP) -c processor) else ifeq ($(OPENJDK_TARGET_OS), macosx) - NUM_CORES := $(shell /usr/sbin/sysctl -n hw.ncpu) + NUM_CORES := $(shell /usr/sbin/sysctl -n hw.ncpu) else ifeq ($(OPENJDK_TARGET_OS), solaris) - NUM_CORES := $(shell LC_MESSAGES=C /usr/sbin/psrinfo -v | $(GREP) -c on-line) + NUM_CORES := $(shell LC_MESSAGES=C /usr/sbin/psrinfo -v | $(GREP) -c on-line) else ifeq ($(OPENJDK_TARGET_OS), windows) - NUM_CORES := $(NUMBER_OF_PROCESSORS) -else - NUM_CORES := 1 + NUM_CORES := $(NUMBER_OF_PROCESSORS) +endif +ifeq ($(NUM_CORES), ) + $(warn Could not find number of CPUs, assuming 1) + NUM_CORES := 1 endif ################################################################################ @@ -276,9 +286,6 @@ run-test-prebuilt: @$(RM) -f $(MAKESUPPORT_OUTPUTDIR)/exit-with-error @cd $(TOPDIR) && $(MAKE) $(MAKE_ARGS) -f make/RunTests.gmk run-test \ TEST="$(TEST)" - @if test -f $(MAKESUPPORT_OUTPUTDIR)/exit-with-error ; then \ - exit 1 ; \ - fi all: run-test-prebuilt diff --git a/make/RunTestsPrebuiltSpec.gmk b/make/RunTestsPrebuiltSpec.gmk index fd76562e7e1..200ab32c144 100644 --- a/make/RunTestsPrebuiltSpec.gmk +++ b/make/RunTestsPrebuiltSpec.gmk @@ -124,7 +124,7 @@ JLINK := $(FIXPATH) $(JLINK_CMD) JMOD := $(FIXPATH) $(JMOD_CMD) JARSIGNER := $(FIXPATH) $(JARSIGNER_CMD) -BUILD_JAVA := $(JAVA) +BUILD_JAVA := $(JDK_IMAGE_DIR)/bin/JAVA ################################################################################ # Some common tools. Assume most common name and no path. AWK := awk @@ -172,3 +172,13 @@ UNZIP := unzip EXPR := expr FILE := file HG := hg + +# On Solaris gnu versions of some tools are required. +ifeq ($(OPENJDK_BUILD_OS), solaris) + AWK := gawk + GREP := ggrep + EGREP := ggrep -E + FGREP := grep -F + SED := gsed + TAR := gtar +endif diff --git a/make/common/MakeBase.gmk b/make/common/MakeBase.gmk index d511836f097..170c3ed0da0 100644 --- a/make/common/MakeBase.gmk +++ b/make/common/MakeBase.gmk @@ -842,7 +842,7 @@ endef # Parameter 1 is the name of the rule, and is also the name of the variable. # # Remaining parameters are named arguments. These include: -# KEYWORDS A list of valid keywords +# SINGLE_KEYWORDS A list of valid keywords with single string values # STRING_KEYWORDS A list of valid keywords, processed as string. This means # that '%20' will be replaced by ' ' to allow for multi-word strings. # @@ -856,7 +856,7 @@ define ParseKeywordVariableBody $$(eval mangled_part_eval := $$(call DoubleDollar, $$(mangled_part))) \ $$(eval part := $$$$(subst ||||,$$$$(SPACE),$$$$(mangled_part_eval))) \ $$(eval $1_NO_MATCH := true) \ - $$(foreach keyword, $$($1_KEYWORDS), \ + $$(foreach keyword, $$($1_SINGLE_KEYWORDS), \ $$(eval keyword_eval := $$(call DoubleDollar, $$(keyword))) \ $$(if $$(filter $$(keyword)=%, $$(part)), \ $$(eval $(strip $1)_$$$$(keyword_eval) := $$$$(strip $$$$(patsubst $$$$(keyword_eval)=%, %, $$$$(part)))) \ @@ -871,11 +871,11 @@ define ParseKeywordVariableBody ) \ ) \ $$(if $$($1_NO_MATCH), \ - $$(if $$(filter $$(part), $$($1_KEYWORDS) $$($1_STRING_KEYWORDS)), \ + $$(if $$(filter $$(part), $$($1_SINGLE_KEYWORDS) $$($1_STRING_KEYWORDS)), \ $$(info Keyword $$(part) for $1 needs to be assigned a value.) \ , \ $$(info $$(part) is not a valid keyword for $1.) \ - $$(info Valid keywords: $$($1_KEYWORDS) $$($1_STRING_KEYWORDS).) \ + $$(info Valid keywords: $$($1_SINGLE_KEYWORDS) $$($1_STRING_KEYWORDS).) \ ) \ $$(error Cannot continue) \ ) \ diff --git a/make/conf/jib-profiles.js b/make/conf/jib-profiles.js index a3285c234fb..6e7e1439582 100644 --- a/make/conf/jib-profiles.js +++ b/make/conf/jib-profiles.js @@ -755,16 +755,15 @@ var getJibProfilesProfiles = function (input, common, data) { "run-test-prebuilt": { target_os: input.build_os, target_cpu: input.build_cpu, - src: "src.conf", dependencies: [ "jtreg", "gnumake", "boot_jdk", "jib", testedProfile + ".jdk", - testedProfile + ".test", "src.full" + testedProfile + ".test" ], - work_dir: input.get("src.full", "install_path") + "/test", + src: "src.conf", + make_args: [ "run-test-prebuilt", "LOG_CMDLINES=true" ], environment: { - "JT_JAVA": common.boot_jdk_home, - "PRODUCT_HOME": input.get(testedProfile + ".jdk", "home_path"), - "TEST_IMAGE_DIR": input.get(testedProfile + ".test", "home_path"), - "TEST_OUTPUT_DIR": input.src_top_dir + "BOOT_JDK": common.boot_jdk_home, + "JDK_IMAGE_DIR": input.get(testedProfile + ".jdk", "home_path"), + "TEST_IMAGE_DIR": input.get(testedProfile + ".test", "home_path") }, labels: "test" } @@ -802,13 +801,34 @@ var getJibProfilesProfiles = function (input, common, data) { windowsRunTestPrebuiltExtra = { dependencies: [ testedProfile + ".jdk_symbols" ], environment: { - "PRODUCT_SYMBOLS_HOME": input.get(testedProfile + ".jdk_symbols", "home_path"), + "SYMBOLS_IMAGE_DIR": input.get(testedProfile + ".jdk_symbols", "home_path"), } }; profiles["run-test-prebuilt"] = concatObjects(profiles["run-test-prebuilt"], windowsRunTestPrebuiltExtra); } + // The profile run-test-prebuilt defines src.conf as the src bundle. When + // running in Mach 5, this reduces the time it takes to populate the + // considerably. But with just src.conf, we cannot actually run any tests, + // so if running from a workspace with just src.conf in it, we need to also + // get src.full as a dependency, and define the work_dir (where make gets + // run) to be in the src.full install path. By running in the install path, + // the same cached installation of the full src can be reused for multiple + // test tasks. Care must however be taken not to polute that work dir by + // setting the appropriate make variables to control output directories. + // + // Use the existance of the top level README as indication of if this is + // the full source or just src.conf. + if (!new java.io.File(__DIR__, "../../README").exists()) { + var runTestPrebuiltSrcFullExtra = { + dependencies: "src.full", + work_dir: input.get("src.full", "install_path"), + } + profiles["run-test-prebuilt"] = concatObjects(profiles["run-test-prebuilt"], + runTestPrebuiltSrcFullExtra); + } + // Generate the missing platform attributes profiles = generatePlatformAttributes(profiles); profiles = generateDefaultMakeTargetsConfigureArg(common, profiles); @@ -835,7 +855,7 @@ var getJibProfilesDependencies = function (input, common) { : "gcc7.3.0-Fedora27+1.0"), linux_arm: (input.profile != null && input.profile.indexOf("hflt") >= 0 ? "gcc-linaro-arm-linux-gnueabihf-raspbian-2012.09-20120921_linux+1.0" - : (input.profile.indexOf("arm32") >= 0 + : (input.profile != null && input.profile.indexOf("arm32") >= 0 ? "gcc7.3.0-Fedora27+1.0" : "arm-linaro-4.7+1.0" ) diff --git a/test/hotspot/jtreg/compiler/escapeAnalysis/TestArrayCopy.java b/test/hotspot/jtreg/compiler/escapeAnalysis/TestArrayCopy.java index 91c09a05acb..4ad0ff80c80 100644 --- a/test/hotspot/jtreg/compiler/escapeAnalysis/TestArrayCopy.java +++ b/test/hotspot/jtreg/compiler/escapeAnalysis/TestArrayCopy.java @@ -33,7 +33,7 @@ * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission * - * @run main/othervm + * @run main/othervm/timeout=300 * -Xbootclasspath/a:. * -XX:+UnlockDiagnosticVMOptions * -XX:+WhiteBoxAPI diff --git a/test/hotspot/jtreg/compiler/graalunit/JttLangMathALTest.java b/test/hotspot/jtreg/compiler/graalunit/JttLangMathALTest.java index 3ba1127bb4d..e17fa343021 100644 --- a/test/hotspot/jtreg/compiler/graalunit/JttLangMathALTest.java +++ b/test/hotspot/jtreg/compiler/graalunit/JttLangMathALTest.java @@ -34,5 +34,6 @@ * * @run driver jdk.test.lib.FileInstaller ../../ProblemList-graal.txt ExcludeList.txt * - * @run main/othervm compiler.graalunit.common.GraalUnitTestLauncher -prefix org.graalvm.compiler.jtt.lang.Math_[a-lA-L] -exclude ExcludeList.txt + * @run main/othervm/timeout=300 compiler.graalunit.common.GraalUnitTestLauncher + * -prefix org.graalvm.compiler.jtt.lang.Math_[a-lA-L] -exclude ExcludeList.txt */ diff --git a/test/hotspot/jtreg/compiler/graalunit/JttLangMathMZTest.java b/test/hotspot/jtreg/compiler/graalunit/JttLangMathMZTest.java index 874e697d047..86e09fe10e0 100644 --- a/test/hotspot/jtreg/compiler/graalunit/JttLangMathMZTest.java +++ b/test/hotspot/jtreg/compiler/graalunit/JttLangMathMZTest.java @@ -34,5 +34,6 @@ * * @run driver jdk.test.lib.FileInstaller ../../ProblemList-graal.txt ExcludeList.txt * - * @run main/othervm compiler.graalunit.common.GraalUnitTestLauncher -prefix org.graalvm.compiler.jtt.lang.Math_[m-zM-Z] -exclude ExcludeList.txt + * @run main/othervm/timeout=300 compiler.graalunit.common.GraalUnitTestLauncher + * -prefix org.graalvm.compiler.jtt.lang.Math_[m-zM-Z] -exclude ExcludeList.txt */ diff --git a/test/hotspot/jtreg/compiler/jsr292/ContinuousCallSiteTargetChange.java b/test/hotspot/jtreg/compiler/jsr292/ContinuousCallSiteTargetChange.java index 7fdd282033d..f41f883597f 100644 --- a/test/hotspot/jtreg/compiler/jsr292/ContinuousCallSiteTargetChange.java +++ b/test/hotspot/jtreg/compiler/jsr292/ContinuousCallSiteTargetChange.java @@ -25,7 +25,7 @@ * @test * @library /test/lib / * - * @run driver compiler.jsr292.ContinuousCallSiteTargetChange + * @run driver/timeout=300 compiler.jsr292.ContinuousCallSiteTargetChange */ package compiler.jsr292; diff --git a/test/hotspot/jtreg/runtime/appcds/jvmti/InstrumentationApp.java b/test/hotspot/jtreg/runtime/appcds/jvmti/InstrumentationApp.java index 1328f583031..ecb4da0b137 100644 --- a/test/hotspot/jtreg/runtime/appcds/jvmti/InstrumentationApp.java +++ b/test/hotspot/jtreg/runtime/appcds/jvmti/InstrumentationApp.java @@ -116,10 +116,10 @@ public class InstrumentationApp { System.out.println("INFO: AppCDSv1 " + (wb.isSharedClass(InstrumentationApp.class) ? "enabled" :"disabled")); System.out.println("INFO: AppCDSv2 " + (isAppCDSV2Enabled() ? "enabled" : "disabled")); - File bootJar = new File(args[0]); - File appJar = new File(args[1]); - File custJar = new File(args[2]); - String flagFile = args[3]; + String flagFile = args[0]; + File bootJar = new File(args[1]); + File appJar = new File(args[2]); + File custJar = new File(args[3]); waitAttach(flagFile); instrumentation = InstrumentationRegisterClassFileTransformer.getInstrumentation(); diff --git a/test/hotspot/jtreg/runtime/appcds/jvmti/InstrumentationTest.java b/test/hotspot/jtreg/runtime/appcds/jvmti/InstrumentationTest.java index 8ee5803fd4c..b1ce6dabbd5 100644 --- a/test/hotspot/jtreg/runtime/appcds/jvmti/InstrumentationTest.java +++ b/test/hotspot/jtreg/runtime/appcds/jvmti/InstrumentationTest.java @@ -120,7 +120,7 @@ public class InstrumentationTest { "-XX:+WhiteBoxAPI", "-Xshare:off", agentCmdArg, - "InstrumentationApp", bootJar, appJar, custJar, flagFile); + "InstrumentationApp", flagFile, bootJar, appJar, custJar); TestCommon.executeAndLog(pb, "no-sharing").shouldHaveExitValue(0); checkAttach(t); @@ -155,7 +155,7 @@ public class InstrumentationTest { "-XX:+UnlockDiagnosticVMOptions", "-XX:+WhiteBoxAPI", agentCmdArg, - "InstrumentationApp", bootJar, appJar, custJar, flagFile); + "InstrumentationApp", flagFile, bootJar, appJar, custJar); CDSOptions opts = (new CDSOptions()).setXShareMode("auto"); TestCommon.checkExec(out, opts); diff --git a/test/hotspot/jtreg/vmTestbase/vm/mlvm/cp/stress/classfmt/correctBootstrap/TestDescription.java b/test/hotspot/jtreg/vmTestbase/vm/mlvm/cp/stress/classfmt/correctBootstrap/TestDescription.java index 1d1d23c7ad9..f5fcea91fd9 100644 --- a/test/hotspot/jtreg/vmTestbase/vm/mlvm/cp/stress/classfmt/correctBootstrap/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/vm/mlvm/cp/stress/classfmt/correctBootstrap/TestDescription.java @@ -50,7 +50,7 @@ * @build vm.mlvm.share.ClassfileGeneratorTest * @run driver vm.mlvm.share.IndifiedClassesBuilder * - * @run main/othervm + * @run main/othervm/timeout=300 * vm.mlvm.share.ClassfileGeneratorTest * -generator vm.mlvm.cp.share.GenManyIndyCorrectBootstrap */ diff --git a/test/hotspot/jtreg/vmTestbase/vm/mlvm/cp/stress/classfmt/incorrectBootstrap/TestDescription.java b/test/hotspot/jtreg/vmTestbase/vm/mlvm/cp/stress/classfmt/incorrectBootstrap/TestDescription.java index e82f7881fff..df8f5f83b53 100644 --- a/test/hotspot/jtreg/vmTestbase/vm/mlvm/cp/stress/classfmt/incorrectBootstrap/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/vm/mlvm/cp/stress/classfmt/incorrectBootstrap/TestDescription.java @@ -51,7 +51,7 @@ * @build vm.mlvm.share.ClassfileGeneratorTest * @run driver vm.mlvm.share.IndifiedClassesBuilder * - * @run main/othervm + * @run main/othervm/timeout=300 * vm.mlvm.share.ClassfileGeneratorTest * -generator vm.mlvm.cp.share.GenManyIndyIncorrectBootstrap */ diff --git a/test/hotspot/jtreg/vmTestbase/vm/mlvm/cp/stress/classfmt/mh/TestDescription.java b/test/hotspot/jtreg/vmTestbase/vm/mlvm/cp/stress/classfmt/mh/TestDescription.java index 132267c067f..afbcea913e3 100644 --- a/test/hotspot/jtreg/vmTestbase/vm/mlvm/cp/stress/classfmt/mh/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/vm/mlvm/cp/stress/classfmt/mh/TestDescription.java @@ -50,6 +50,6 @@ * @build vm.mlvm.share.ClassfileGeneratorTest * @run driver vm.mlvm.share.IndifiedClassesBuilder * - * @run main/othervm vm.mlvm.share.ClassfileGeneratorTest -generator vm.mlvm.cp.share.GenCPFullOfMH + * @run main/othervm/timeout=300 vm.mlvm.share.ClassfileGeneratorTest -generator vm.mlvm.cp.share.GenCPFullOfMH */ diff --git a/test/hotspot/jtreg/vmTestbase/vm/mlvm/cp/stress/classfmt/mt/TestDescription.java b/test/hotspot/jtreg/vmTestbase/vm/mlvm/cp/stress/classfmt/mt/TestDescription.java index 18155a3ffd1..b50296fcdea 100644 --- a/test/hotspot/jtreg/vmTestbase/vm/mlvm/cp/stress/classfmt/mt/TestDescription.java +++ b/test/hotspot/jtreg/vmTestbase/vm/mlvm/cp/stress/classfmt/mt/TestDescription.java @@ -50,6 +50,6 @@ * @build vm.mlvm.share.ClassfileGeneratorTest * @run driver vm.mlvm.share.IndifiedClassesBuilder * - * @run main/othervm vm.mlvm.share.ClassfileGeneratorTest -generator vm.mlvm.cp.share.GenCPFullOfMT + * @run main/othervm/timeout=300 vm.mlvm.share.ClassfileGeneratorTest -generator vm.mlvm.cp.share.GenCPFullOfMT */ diff --git a/test/hotspot/jtreg/vmTestbase/vm/mlvm/meth/stress/gc/createLotsOfMHConsts/Test.java b/test/hotspot/jtreg/vmTestbase/vm/mlvm/meth/stress/gc/createLotsOfMHConsts/Test.java index 5d0a916af0d..0630b3b896e 100644 --- a/test/hotspot/jtreg/vmTestbase/vm/mlvm/meth/stress/gc/createLotsOfMHConsts/Test.java +++ b/test/hotspot/jtreg/vmTestbase/vm/mlvm/meth/stress/gc/createLotsOfMHConsts/Test.java @@ -50,7 +50,7 @@ * @build vm.mlvm.meth.stress.gc.createLotsOfMHConsts.Test * @run driver vm.mlvm.share.IndifiedClassesBuilder * - * @run main/othervm + * @run main/othervm/timeout=300 * vm.mlvm.meth.stress.gc.createLotsOfMHConsts.Test * -stressIterationsFactor 100000 * -generator vm.mlvm.cp.share.GenCPFullOfMH diff --git a/test/jdk/tools/jimage/JImageExtractTest.java b/test/jdk/tools/jimage/JImageExtractTest.java index 3b636e698fa..4895fdf218e 100644 --- a/test/jdk/tools/jimage/JImageExtractTest.java +++ b/test/jdk/tools/jimage/JImageExtractTest.java @@ -27,7 +27,7 @@ * @library /test/lib * @modules jdk.jlink/jdk.tools.jimage * @build jdk.test.lib.Asserts - * @run main/othervm JImageExtractTest + * @run main/othervm/timeout=300 JImageExtractTest */ import java.io.IOException; From ace36f9ac36a7aee9f1810cd5337d45dd879ed9b Mon Sep 17 00:00:00 2001 From: Jiangli Zhou Date: Mon, 15 Oct 2018 15:21:54 -0400 Subject: [PATCH 117/124] 8211956: AppCDS crashes for some uses with JRuby Make sure FileMapInfo::verify_mapped_heap_regions only verifies 'num' of spaces. Reviewed-by: iklam --- src/hotspot/share/memory/filemap.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hotspot/share/memory/filemap.cpp b/src/hotspot/share/memory/filemap.cpp index 16eb8c692dd..0381756af19 100644 --- a/src/hotspot/share/memory/filemap.cpp +++ b/src/hotspot/share/memory/filemap.cpp @@ -1088,8 +1088,8 @@ bool FileMapInfo::map_heap_data(MemRegion **heap_mem, int first, } bool FileMapInfo::verify_mapped_heap_regions(int first, int num) { - for (int i = first; - i <= first + num; i++) { + assert(num > 0, "sanity"); + for (int i = first; i < first + num; i++) { if (!verify_region_checksum(i)) { return false; } From a0e02d649c2c4d7a4ce546349d20f77882815553 Mon Sep 17 00:00:00 2001 From: Aleksey Shipilev Date: Mon, 15 Oct 2018 22:30:32 +0200 Subject: [PATCH 118/124] 8212178: Soft reference reclamation race in com.sun.xml.internal.stream.util.ThreadLocalBufferAllocator Reviewed-by: rkennke, kbarrett, joehw --- .../util/ThreadLocalBufferAllocator.java | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/java.xml/share/classes/com/sun/xml/internal/stream/util/ThreadLocalBufferAllocator.java b/src/java.xml/share/classes/com/sun/xml/internal/stream/util/ThreadLocalBufferAllocator.java index a1d71f182c2..5ac6c39d255 100644 --- a/src/java.xml/share/classes/com/sun/xml/internal/stream/util/ThreadLocalBufferAllocator.java +++ b/src/java.xml/share/classes/com/sun/xml/internal/stream/util/ThreadLocalBufferAllocator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2018, 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 @@ -39,15 +39,19 @@ import java.lang.ref.*; * @author Santiago PericasGeertsen */ public class ThreadLocalBufferAllocator { - private static ThreadLocal> tlba = new ThreadLocal<>(); + private static final ThreadLocal> TL = new ThreadLocal<>(); - public static BufferAllocator getBufferAllocator() { - SoftReference bAllocatorRef = tlba.get(); - if (bAllocatorRef == null || bAllocatorRef.get() == null) { - bAllocatorRef = new SoftReference<>(new BufferAllocator()); - tlba.set(bAllocatorRef); + public static BufferAllocator getBufferAllocator() { + BufferAllocator ba = null; + SoftReference sr = TL.get(); + if (sr != null) { + ba = sr.get(); } - - return bAllocatorRef.get(); - } + if (ba == null) { + ba = new BufferAllocator(); + sr = new SoftReference<>(ba); + TL.set(sr); + } + return ba; + } } From 6352b5f64d0c9892ae9b1c109d070d4f40ae8803 Mon Sep 17 00:00:00 2001 From: Abdul Kolarkunnu Date: Wed, 3 Oct 2018 23:00:32 -0700 Subject: [PATCH 119/124] 8209499: Create test for SwingSet EditorPaneDemo Reviewed-by: serb --- .../SwingSet/src/EditorPaneDemoTest.java | 184 ++++++++++++++++++ .../demos/editorpane/EditorPaneDemo.java | 150 ++++++++++++++ .../swingset3/demos/editorpane/book/CREDITS | 2 + .../demos/editorpane/book/Octavo/ant.jpg | Bin 0 -> 41161 bytes .../demos/editorpane/book/Octavo/book.jpg | Bin 0 -> 50766 bytes .../demos/editorpane/book/Octavo/bug.jpg | Bin 0 -> 68393 bytes .../demos/editorpane/book/Octavo/bug2.jpg | Bin 0 -> 50942 bytes .../demos/editorpane/book/Octavo/crest.jpg | Bin 0 -> 42208 bytes .../demos/editorpane/book/Octavo/king.jpg | Bin 0 -> 39225 bytes .../demos/editorpane/book/Octavo/micro.jpg | Bin 0 -> 36282 bytes .../demos/editorpane/book/Octavo/seaweed.jpg | Bin 0 -> 36616 bytes .../swingset3/demos/editorpane/book/ant.html | 121 ++++++++++++ .../swingset3/demos/editorpane/book/bug.html | 128 ++++++++++++ .../demos/editorpane/book/editorpane/back.jpg | Bin 0 -> 7801 bytes .../editorpane/book/editorpane/forward.jpg | Bin 0 -> 8558 bytes .../editorpane/book/editorpane/header.jpg | Bin 0 -> 22281 bytes .../demos/editorpane/book/index.html | 41 ++++ .../swingset3/demos/editorpane/book/king.html | 44 +++++ .../demos/editorpane/book/preface.html | 116 +++++++++++ .../demos/editorpane/book/seaweed.html | 62 ++++++ .../demos/editorpane/book/title.html | 37 ++++ .../resources/EditorPaneDemo.properties | 6 + .../resources/images/EditorPaneDemo.gif | Bin 0 -> 194 bytes 23 files changed, 891 insertions(+) create mode 100644 test/jdk/sanity/client/SwingSet/src/EditorPaneDemoTest.java create mode 100644 test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/EditorPaneDemo.java create mode 100644 test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/book/CREDITS create mode 100644 test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/book/Octavo/ant.jpg create mode 100644 test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/book/Octavo/book.jpg create mode 100644 test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/book/Octavo/bug.jpg create mode 100644 test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/book/Octavo/bug2.jpg create mode 100644 test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/book/Octavo/crest.jpg create mode 100644 test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/book/Octavo/king.jpg create mode 100644 test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/book/Octavo/micro.jpg create mode 100644 test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/book/Octavo/seaweed.jpg create mode 100644 test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/book/ant.html create mode 100644 test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/book/bug.html create mode 100644 test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/book/editorpane/back.jpg create mode 100644 test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/book/editorpane/forward.jpg create mode 100644 test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/book/editorpane/header.jpg create mode 100644 test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/book/index.html create mode 100644 test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/book/king.html create mode 100644 test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/book/preface.html create mode 100644 test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/book/seaweed.html create mode 100644 test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/book/title.html create mode 100644 test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/resources/EditorPaneDemo.properties create mode 100644 test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/resources/images/EditorPaneDemo.gif diff --git a/test/jdk/sanity/client/SwingSet/src/EditorPaneDemoTest.java b/test/jdk/sanity/client/SwingSet/src/EditorPaneDemoTest.java new file mode 100644 index 00000000000..c9013a0bb23 --- /dev/null +++ b/test/jdk/sanity/client/SwingSet/src/EditorPaneDemoTest.java @@ -0,0 +1,184 @@ +/* + * Copyright (c) 2018, 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. + * + * 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. + */ + +import static com.sun.swingset3.demos.editorpane.EditorPaneDemo.DEMO_TITLE; +import static com.sun.swingset3.demos.editorpane.EditorPaneDemo.SOURCE_FILES; +import static org.jemmy2ext.JemmyExt.EXACT_STRING_COMPARATOR; + +import java.awt.Dimension; +import java.awt.Insets; +import java.awt.Point; +import java.awt.Rectangle; +import java.awt.image.BufferedImage; +import java.beans.PropertyChangeListener; +import java.net.URL; +import java.util.concurrent.atomic.AtomicReference; + +import javax.swing.UIManager; + +import org.jemmy2ext.JemmyExt; +import org.jtregext.GuiTestListener; +import org.netbeans.jemmy.ClassReference; +import org.netbeans.jemmy.image.ImageTool; +import org.netbeans.jemmy.operators.JEditorPaneOperator; +import org.netbeans.jemmy.operators.JFrameOperator; +import org.testng.annotations.Listeners; +import org.testng.annotations.Test; + +import com.sun.swingset3.demos.editorpane.EditorPaneDemo; + +/* + * @test + * @key headful + * @summary Verifies SwingSet3 EditorPaneDemo by navigating and and validating + * the page contents in all pages + * + * @library /sanity/client/lib/jemmy/src + * @library /sanity/client/lib/Extensions/src + * @library /sanity/client/lib/SwingSet3/src + * @modules java.desktop + * java.logging + * @build org.jemmy2ext.JemmyExt + * @build com.sun.swingset3.demos.editorpane.EditorPaneDemo + * @run testng/timeout=600 EditorPaneDemoTest + */ +@Listeners(GuiTestListener.class) +public class EditorPaneDemoTest { + + private final static String PROPERTY_NAME_PAGE = "page"; + private final static String INDEX_PAGE_NAME = "index.html"; + private final static String TEXT_IN_INDEX_PAGE = "Octavo Corporation"; + private final static Dimension INDEX_IMAGE_DIMENSION = new Dimension(550, 428); + private final static Dimension imageDimensions[] = {new Dimension(320, 342), + new Dimension(420, 290), new Dimension(381, 384), + new Dimension(316, 498), new Dimension(481 ,325), + new Dimension(516, 445)}; + private final static String REFERENCE_NAMES[] = + {"title", "king", "preface", "seaweed", "ant", "bug"}; + private final static String TEXTS_IN_PAGES[] = + {"Physiological Descriptions", "ROBERT HOOKE", + "Mankind above other Creatures", "Area A B C D", + "Observ. XLIX", "Cylinder F F F"}; + private final AtomicReference newPageURL = new AtomicReference<>(); + + /** + * Testing the navigation through all html pages in EditorPaneDemo by + * clicking on different references and validating the page contents. + * + * @throws Exception + */ + @Test(dataProvider = "availableLookAndFeels", dataProviderClass = TestHelpers.class) + public void test(String lookAndFeel) throws Exception { + UIManager.setLookAndFeel(lookAndFeel); + new ClassReference(EditorPaneDemo.class.getCanonicalName()).startApplication(); + + JFrameOperator frameOperator = new JFrameOperator(DEMO_TITLE); + frameOperator.setComparator(EXACT_STRING_COMPARATOR); + PropertyChangeListener pageChangeListener = + event -> newPageURL.set((URL) event.getNewValue()); + JEditorPaneOperator editorPaneOperator = new JEditorPaneOperator(frameOperator); + + try { + editorPaneOperator.addPropertyChangeListener( + PROPERTY_NAME_PAGE, pageChangeListener); + // Validation of initial or index page + URL indexURL = getPageURL(INDEX_PAGE_NAME); + editorPaneOperator.waitStateOnQueue(comp + -> indexURL.equals(editorPaneOperator.getPage())); + checkImage(editorPaneOperator, INDEX_IMAGE_DIMENSION, INDEX_PAGE_NAME); + checkTextPresence(editorPaneOperator, TEXT_IN_INDEX_PAGE); + + // Clicking on different references and validating pages by selecting + // unique texts in each page + for (int i = 0; i < REFERENCE_NAMES.length; i++) { + editorPaneOperator.clickOnReference(REFERENCE_NAMES[i]); + validatePage(editorPaneOperator, i); + } + } finally { + editorPaneOperator.removePropertyChangeListener( + PROPERTY_NAME_PAGE, pageChangeListener); + } + } + + private void checkTextPresence( + JEditorPaneOperator editorPaneOperator, String text) { + editorPaneOperator.selectText(text); + editorPaneOperator.waitStateOnQueue(comp + -> text.equals(editorPaneOperator.getSelectedText())); + } + + private void validatePage(JEditorPaneOperator editorPaneOperator, + int i) throws Exception { + URL expectedPageURL = getPageURL(REFERENCE_NAMES[i] + ".html"); + editorPaneOperator.waitStateOnQueue(comp + -> expectedPageURL.equals(newPageURL.get())); + checkImage(editorPaneOperator, imageDimensions[i], REFERENCE_NAMES[i]); + checkTextPresence(editorPaneOperator, TEXTS_IN_PAGES[i]); + } + + private void checkImage(JEditorPaneOperator editorPaneOperator, + Dimension imageDim, String pageName) throws Exception { + // Captures image screen shot and checking some 10 pixels from inner + // area of the image are not default background color + Point compLoc = editorPaneOperator.getLocationOnScreen(); + Insets insets = editorPaneOperator.getInsets(); + Rectangle imageRect = new Rectangle(new Point(compLoc.x + insets.left, + compLoc.y + insets.top), imageDim); + final int xGap = 100, yGap = 40, columns = 2, rows = 5; + editorPaneOperator.waitState(comp -> { + BufferedImage capturedImage = ImageTool.getImage(imageRect); + int x = 0, y = 0, i = 0, j; + for (; i < columns; i++) { + x += xGap; + y = 0; + for (j = 0; j < rows; j++) { + y += yGap; + if(capturedImage.getRGB(x, y) == + editorPaneOperator.getBackground().getRGB()) { + // saving image for failure case + JemmyExt.save(capturedImage, "capturedimage_" + pageName + "_" + + UIManager.getLookAndFeel().getClass().getSimpleName() + ".png"); + return false; + } + } + } + return true; + }); + } + + /** + * Gets the URL corresponding to a page name + * + * @param pageName : name of the page + * @return : URL corresponding to page + */ + private URL getPageURL(String pageName) { + String url = null; + for (String sourceFile : SOURCE_FILES) { + if(sourceFile.endsWith(pageName)) { + url = sourceFile; + } + } + return getClass().getResource(url); + } +} diff --git a/test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/EditorPaneDemo.java b/test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/EditorPaneDemo.java new file mode 100644 index 00000000000..62703393075 --- /dev/null +++ b/test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/EditorPaneDemo.java @@ -0,0 +1,150 @@ +/* + * Copyright (c) 2018, 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. + * + * 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. + */ + +package com.sun.swingset3.demos.editorpane; + +import java.awt.BorderLayout; +import java.awt.Dimension; +import java.io.IOException; +import java.net.MalformedURLException; +import java.net.URL; + +import javax.swing.JEditorPane; +import javax.swing.JFrame; +import javax.swing.JPanel; +import javax.swing.JScrollPane; +import javax.swing.JViewport; +import javax.swing.event.HyperlinkEvent; +import javax.swing.event.HyperlinkListener; +import javax.swing.text.html.HTMLDocument; +import javax.swing.text.html.HTMLFrameHyperlinkEvent; + +import com.sun.swingset3.DemoProperties; + +/** + * EditorPane Demo (was HTMLDemo in SwingSet2) + */ +@DemoProperties( + value = "JEditorPane Demo", + category = "Text", + description = "Demonstrates JEditorPane, a text component which supports display and editing of rich text formats (such as HTML)", + sourceFiles = { + "com/sun/swingset3/demos/editorpane/EditorPaneDemo.java", + "com/sun/swingset3/demos/editorpane/book/ant.html", + "com/sun/swingset3/demos/editorpane/book/bug.html", + "com/sun/swingset3/demos/editorpane/book/index.html", + "com/sun/swingset3/demos/editorpane/book/king.html", + "com/sun/swingset3/demos/editorpane/book/preface.html", + "com/sun/swingset3/demos/editorpane/book/seaweed.html", + "com/sun/swingset3/demos/editorpane/book/title.html", + "com/sun/swingset3/demos/editorpane/book/editorpane/back.jpg", + "com/sun/swingset3/demos/editorpane/book/editorpane/forward.jpg", + "com/sun/swingset3/demos/editorpane/book/editorpane/header.jpg", + "com/sun/swingset3/demos/editorpane/book/Octavo/ant.jpg", + "com/sun/swingset3/demos/editorpane/book/Octavo/book.jpg", + "com/sun/swingset3/demos/editorpane/book/Octavo/bug.jpg", + "com/sun/swingset3/demos/editorpane/book/Octavo/bug2.jpg", + "com/sun/swingset3/demos/editorpane/book/Octavo/COPYRIGHT", + "com/sun/swingset3/demos/editorpane/book/Octavo/crest.jpg", + "com/sun/swingset3/demos/editorpane/book/Octavo/king.jpg", + "com/sun/swingset3/demos/editorpane/book/Octavo/micro.jpg", + "com/sun/swingset3/demos/editorpane/book/Octavo/seaweed.jpg", + "com/sun/swingset3/demos/editorpane/resources/EditorPaneDemo.properties", + "com/sun/swingset3/demos/editorpane/resources/images/EditorPaneDemo.gif" + } +) +public class EditorPaneDemo extends JPanel { + + public static final String DEMO_TITLE = EditorPaneDemo.class.getAnnotation(DemoProperties.class).value(); + public static final String[] SOURCE_FILES = EditorPaneDemo.class.getAnnotation(DemoProperties.class).sourceFiles(); + private JEditorPane html; + + /** + * main method allows us to run as a standalone demo. + */ + public static void main(String[] args) { + JFrame frame = new JFrame(EditorPaneDemo.class.getAnnotation(DemoProperties.class).value()); + + frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + frame.getContentPane().add(new EditorPaneDemo()); + frame.setPreferredSize(new Dimension(800, 600)); + frame.pack(); + frame.setLocationRelativeTo(null); + frame.setVisible(true); + } + + /** + * EditorPaneDemo Constructor + */ + public EditorPaneDemo() { + setLayout(new BorderLayout()); + + try { + URL url; + // System.getProperty("user.dir") + + // System.getProperty("file.separator"); + String path = null; + try { + path = "book/index.html"; + url = getClass().getResource(path); + } catch (Exception e) { + System.err.println("Failed to open " + path); + url = null; + } + + if (url != null) { + html = new JEditorPane(url); + html.setEditable(false); + html.addHyperlinkListener(createHyperLinkListener()); + + JScrollPane scroller = new JScrollPane(); + JViewport vp = scroller.getViewport(); + vp.add(html); + add(scroller, BorderLayout.CENTER); + } + } catch (MalformedURLException e) { + System.out.println("Malformed URL: " + e); + } catch (IOException e) { + System.out.println("IOException: " + e); + } + } + + private HyperlinkListener createHyperLinkListener() { + return new HyperlinkListener() { + public void hyperlinkUpdate(HyperlinkEvent e) { + if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) { + if (e instanceof HTMLFrameHyperlinkEvent) { + ((HTMLDocument) html.getDocument()).processHTMLFrameHyperlinkEvent( + (HTMLFrameHyperlinkEvent) e); + } else { + try { + html.setPage(e.getURL()); + } catch (IOException ioe) { + System.out.println("IOE: " + ioe); + } + } + } + } + }; + } +} diff --git a/test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/book/CREDITS b/test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/book/CREDITS new file mode 100644 index 00000000000..a65454a93c5 --- /dev/null +++ b/test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/book/CREDITS @@ -0,0 +1,2 @@ +Images and text in the SwingSet3 EditorPane demo are used by permission of Octavo +Corporation and are sourced from Rare Book Room (rarebookroom.org). \ No newline at end of file diff --git a/test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/book/Octavo/ant.jpg b/test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/book/Octavo/ant.jpg new file mode 100644 index 0000000000000000000000000000000000000000..5ec735079fb340e68f97cb610cb9a0ddd3107766 GIT binary patch literal 41161 zcmbq)1yo$kmhPc(cY+3jOMu`B1UdwV5ZoC34{d5B0d28fcUktrGu-3 zi=~4j9Us>d;OR>_MdTgeckuiZ|H%gcpmWd*_#yld84aWg0I00UcN+Wfe}q5z5E01H z__!DVNDzz7k?760QcLs z2#qZwM*AZ{`iCSdCG~F!FG7O^=py3($RqGa!ue0hpKD$t(g5IyXxslXAaDOx|CcKG z|BvoZo&Rcq-*rXQ6ZGP*??2k(cdr1z?>75WcNCo8Ny2A{=y#hS>;+ySpfUiMwj<;; z06BmJ|F1?23}BYFvNfmkaJF)FHMgfT@uCwqb1*Td`+FP}&B!0OHz6 z@OdBvz`?-4z{J48#Ka-Q#=<5f#mB+HCnYB)CM6~&C&c*^{_*oy;y=eoxY*dZc(??3 zcmyPPcz7hgBRrD7iV*&9E&y)_2r&>9bwoy@2S9{K$b?AnUx-FQhkr)`BdkP4`V$Za z{|?BAiGqTPhK_-Wg^d`3|E@#=K*;~0Bmj_5kdQ$rAXIcT3{+$sK7^7G8RZcX530C| zF)_VUATJt8Tvp{v21ZiV4ii3p=b%vubf$Q<h)@s~IMEZM@&?9{{I;M&b@Z5z(PYIrC|*L1)YOIlgbD4p z0qD#Eonr_iavqpTX$ZQSul{Yqe{TWHKTUwo0XWEi?nwxMfj#cN-tOIxChIlTv;rk> zX^zIKKZ+U|fqH9VIhN2|I17uldGo6{;A9A^K&gdjY zR62jMX{`5mfq1nYCxVw0+m`LL4?U*r(OQx|rF^)kCkr-xl6GldtR1_x`uuc? zf3j_S2|D7Zr50v!4l%HC)7!I<9O=*dxmk@(zgu29M!h6;spY1r2@#FHpr~X(ngv-j z4I6Lrm04^WM4v=mK=KldO4ZV$o$W0zxT@|_!?thD$>+;vHO^t-`$oDWV|qL2g?=8l z)gf0JQF6OV_V2E1rv|;^r!^N!LSYGWzu-V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0g*uw8sz>Q$*JP`?RJkx#M#K~olmy;Jd@7E`*7pC6}E~y zS89^ruPaByh-C+sE@{%q$#($#RzPn62dlg!Lsk7dqr=G%=-USqRi9|v#(lLPceyQ#)^a_y~;6D0b9wksN8o|J)* zF;~Ds*R;nx>-{kE?1Fwy)hd*!HT6g08wXJ-4od>M) zxA*S?Lo!Rp5GU51Osfq>fCiWSXh&Di%L&b<42EaElAMBc9U@Fk18jL7Y+QqIjshEu zvs(Ax(?l~sGb^O0N5qHS4R^1@%q>T()t$_8PY1nrm$`q927MJ^O>?2;mV*fJp(WdW i3-)~Ip>y{$c$4Gl;X%Z>sKo2&zETa80z!KKt^N;;nKH8g literal 0 HcmV?d00001 diff --git a/test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/book/Octavo/bug2.jpg b/test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/book/Octavo/bug2.jpg new file mode 100644 index 0000000000000000000000000000000000000000..18adf731f643b237eace1dd497f55cea7159f1d8 GIT binary patch literal 50942 zcmeFYcU)7?(n+E6LSVUa8&LAK+4cRd;maCpx2{rQa2fx z>8${O={&@kke6!3z*Qr8vx)wM8i7)rvN(Y|Hxw~z&S%-KTnD9VBgSCPk)I!_a&})1l;kI_?I8O zl~7Z>K-~m5{^9|ThqSTjs94|$z;^7|G1g;jtgLL@Cyt-s=I3N%B`O9yk~+QsW9^;=GR?4E6H#5;m$?X;K#%IEK*6<+uwhI zL(~Kc>Z8tGOSbVa_*fXKesaWi!Si>+lTV|t#T`TGl%l7Nsh`Jw5Q>|+#((bGd4)x% zl{9x_mWUcg_TJ$!>7}TiiRC?RfS#TvE#qIASeTjA{)%u~nTL@kLC_gqCY48td`A*| zuo~XJD0%05@Z%(XYkqKu>MtqgBLP^>seK%w2~l{`!@yQO)N|oqBK*%Kkp8y_)M1ii9P2%R+Lnq!+Qir~9Q!jn;H86eg;}Jb)VkVim8&8%Ym{kQOSSb9y|)cp9PJ z-s77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=HEU%#?eY}em@rfB5WB(T z9Fp;7G?0*JSbNHdA?c($XAa>w%?3wr-<0=w_$wwwh7 zQW{~}X}xjKJh564=xv{p8zwcty;m8NkNv2fwrVj|_e|p=ePo8`dCNllt0vjCyzcqu666n@&HFGWfP;^lqI)7`7G6lTz z+u(w&oTl#fcU!AC#(b;K0fAw+NH#lvfcc7BztcTNbtftv70x-cC2G+HNcU zdHBZhQHkSq#CZbThndxA>!?;)nYq1&d;ZL{v;3-eE~?iIP98{tZ~90b?zfS7N(CKY zcziLj(+a)iM&>hLhH(4z5$Y`CzLK)lPJjwo= zhe&Qu4c{BC4pZ?uZ2~?zhL#$?`=F@yz?0 zrBHsHDM4)^mg={G$9U~^T(zv|o!Qu7b&N#uO_uA9K<|+gl!QwVdpdMWXH`?B1UK5W zWaGK(=2G+P?=Of934yP*;7qxm9AAGBlS4%QGFtz22`HWLd4YRjB?aWiYvW%GRHMIr zw89EHAn#7Lbo+*q3{boh8*yw!!*gzM+bty$)%4(ywd+cH zDh%dTgNe{VyE#X^-{J1AYrGt(6!6B!LO<9=x~MH5)W%$u902Z)I#xTU`gr*@6!UKP%uf(HdxA{{giD0?;gjvE?+ znuUB981nHGfr8N3w{gBH3ZE^bI~~VdszqYX03Fj+VqcDjAnF^29)@akgi9|db?GFy mgJ>dXQHI3-gJ1$f@*P_2(|289Ci)-TJhtb#V!eSsn)(+eAU6R3 literal 0 HcmV?d00001 diff --git a/test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/book/Octavo/seaweed.jpg b/test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/book/Octavo/seaweed.jpg new file mode 100644 index 0000000000000000000000000000000000000000..340bae3671b24524dd349c11fee91364661986ad GIT binary patch literal 36616 zcmeFZcUV(T_b<9b=)H+_B2{Su(mPT^m5wyQ&_gIv6(JM_1d*arr8nsv1f(efD!oca zKuW063549}_jlg+J?A;+-22>n|GCd|Cr>7yS!?aR*Iu*s?3pz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ad+b7Keg$M>c7jDPgC z{CAJG3Hkq5Eg19xo<*E3p1b)3>PNzvv5H;6*ma{(4tkxQPd!5>U*Y0hE-0&kAk&J-%zgQc$u!>G{Ww4++N|mxUyfpLcIP zzG>Uvj(aZ$NhH4UXVL7He=nE8csfWW_tDS#!gI*^{1`Va+ww?v;e6 + +Untitled Document + + + + + +


    + Observ. XLIX. Of an Ant or Pismire.
    +

    +

     

    +
    +
    +

    This was a creature, more troublesom to be drawn, then any + of the rest, for I could not, for a good while, think of a way to make it + suffer its body to ly quiet in a natural posture; but whil'st it was alive, + if its feet were fetter'd in Wax or Glew, it would so twist and wind its body, + that I could not any wayes get a good view of it; and if I killed it, its + body was so little, that I did often spoile the shape of it, before I could + throughly view it: for this is the nature of these minute Bodies, that as + soon, almost, as ever their life is destroy'd, their parts immediately shrivel, + and lose their beauty; and so is it also with small Plants, as I instanced + before, in the description of Moss.

    +

    And thence also is the reason of the variations in the beards + of wild Oats, and in those of Muskgrass seed, that their bodies, being exceeding + small, those small variations which are made in the surfaces of all bodies, + almost upon every change of Air, especially if the body be porous, do here + become sensible, where the whole body is so small, that it is almost nothing + but surface; for as in vegetable substances, I see no great reason to think, + that the moisture of the Aire (that, sticking to a wreath'd beard, does make + it untwist) should evaporate, or exhale away, any faster then the moisture + of other bodies, but rather that the avolation from, or access of moisture + to, the surfaces of bodies being much the same, those bodies become most + sensible of it, which have the least proportion of body to their surface. +

    +

    So is it also with Animal substances; the dead body of an + Ant, or such little creature, does almost instantly shrivel and dry, and + your object shall be quite another thing, before you can half delineate + it, which proceeds not from the extraordinary exhalation, but from the small + proportion of body and juices, to the usual drying of bodies in the Air, + especially if warm.

    +

    For which inconvenience, where I could not otherwise remove + it, I thought of this expedient. I took the creature, I had design'd to delineate, + and put it into a drop of very well rectified spirit of Wine, this I found + would presently dispatch, as it were, the Animal, and being taken out of + it, and lay'd on a paper,the spirit of Wine would immediately fly away, + and leave the Animal dry, in its natural posture, or at least, in a constitution, + that it might easily with a pin be plac'd, in what posture you desired to + draw it, and the limbs would so remain, without either moving, or shriveling. +

    +

    And thus I dealt with this Ant, which I have here delineated, + which was one of many, of a very large kind, that inhabited under the Roots + of a Tree, from whence they would sally out in great parties, and make most + grievous havock of the Flowers and Fruits, in the ambient Garden, and return back + again very expertly, by the same wayes and paths they went.

    +

    It was more then half the bigness of an Earwig, of a dark + brown, or reddish colour, with long legs, on the hinder of which it would + stand up, and raise its head as high as it could above the ground, that it + might stare the further about it, just after the same manner as I have also + observ'd a hunting Spider to do: and putting my finger towards them, they + have at first all run towards it, till almost at it; and then they would stand + round about it, at a certain distance, and smell, as it were, and consider + whether they should any of them venture any further, till one more bold then + the rest venturing to climb it, all the rest, if I would have suffered them, + would have immediately followed : much such other seemingly rational actions + I have observ'd in this little Vermine with much pleasure, which would be + too long to be here related; those that desire more of them may satisfie + their curiosity in Ligons History of the Barbadoes.

    +

    Having insnar'd several of these into a small Box, I made + choice of the tallest grown among them, and separating it from the rest, + I gave it a Gill of Brandy, or Spirit of Wine, which after a while e'en knock'd + him down dead drunk, so that he became moveless, though at first putting + in he struggled for a pretty while very much, till at last, certain bubbles + issuing out of his mouth, it ceased to move; this (because I had before found + them quickly to recover again, if they were taken out presently) I suffered + to lye above an hour in the Spirit; and after I had taken it out, and put + its body and legs into a natural posture, remained moveless about an hour; + but then, upon a sudden, as if it had been awaken out of a drunken sleep, + it suddenly reviv'd and ran away; being caught, and serv'd as before, he + for a while continued struggling and striving, till at last there issued + several bubbles out of its mouth, and then, tanquam animam expirasset, he + remained moveless for a good while ; but at length again recovering, it was + again redipt, and suffered to lye some hours in the Spirit; notwithstanding + which, after it had layen dry some three or four hours, it again recovered + life and motion: Which kind of Experiments, if prosecuted, which they highly + deserve, seem to me of no inconsiderable use towards the invention of the + Latent Scheme, (as the Noble Ve rulam calls it) or the hidden, unknown Texture + of Bodies.

    +

    Of what Figure this Creature appear'd through the Microscope, + the 32. Scheme (though not so carefully graven as it ought) will represent + to the eye, namely, That it had a large head A A, at the upper end of which + were two protuberant eyes, pearl'd like those of a Fly, but smaller B B; + of the Nose, or foremost part, issued two horns C C, of a shape sufficiently + differing from those of a blew Fly, though indeed they seem to be both the + same kind of Organ, and to serve for a kind of smelling; beyond these were + two indented jaws D D, which he open'd sideways, and was able to gape them + asunder very wide; and the ends of them being armed with teeth, which meeting + went between each other, it was able to grasp and hold a heavy body, three + or four times the bulk and weight of its own body: It had only six legs, + shap'd like those of a Fly, which, as I shewed before, is an Argument that + it is a winged Insect, and though I could not perceive any sign of them in + the middle part of its body (which seem'd to consist of three joints or pieces + E F G, out of which sprung two legs, yet 'tis known that there are of them + that have long wings, and fly up and down in the air.

    +

    The third and last part of its body I I I was bigger and + larger then the other two, unto which it was joyn'd by a very small middle, + and had a kind of loose shell, or another distinct part of its body H, which + seem'd to be interpos'd, and to keep the thorax and belly from touching. + The whole body was cas'd over with a very strong armour, and the belly I + I I was covered likewise with multitudes of small white shining brisles; + the legs, horns, head, and middle parts of its body were bestruck with hairs + also, but smaller and darker.

    +
    +

     

    +

    +

     

    +

     

    +
    + + diff --git a/test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/book/bug.html b/test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/book/bug.html new file mode 100644 index 00000000000..5ac05e9f3b6 --- /dev/null +++ b/test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/book/bug.html @@ -0,0 +1,128 @@ + + +Untitled Document + + + + + +
    +

    Observ. LIV. Of a Louse.
    +

    +

     

    +
    +
    +

    This is a Creature so officious, that 'twill be known to + every one at one time or other, so busie, and so impudent, that it will + be intruding it self in every ones company, and so proud and aspiring withall, + that it fears not to trample on the best, and affects nothing so much as + a Crown; feeds and lives very high, and that makes it so saucy, as to pull + any one by the ears that comes in its way, and will never be quiet till + it has drawn blood: it is troubled at nothing so much as at a man that scratches + his head, as knowing that man is plotting and contriving some mischief against + it, and that makes it oftentime sculk into some meaner and lower place, and + run behind a mans back, though it go very much against the hair; which ill + conditions of it having made it better known then trusted, would exempt me + from making any further description of it, did not my faithful Mercury, my + Microscope, bring me other information of it.

    +

    For this has discovered to me, by means of a very bright light + cast on it, that it is a Creature of a very odd shape ; it has a head shap'd + like that exprest in 35. Scheme marked with A, which seems almost Conical, + but is a little flatted on the upper and under sides, at the biggest part + of which, on either side behind the head (as it were, being the place where + other Creatures ears stand) are placed its two black shining goggle eyes + B B, looking backwards, and fenced round with several small cilia or hairs + that incompass it, so that it seems this Creature has no very good foresight: + It does not seem to have any eyelids, and therefore perhaps its eyes were + so placed, that it might the better cleanse them with its forelegs; and perhaps + this may be the reason, why they so much avoid and run from the light behind + them, for being made to live in the shady and dark recesses of the hair, + and thence probably their eye having a great aperture, the open and clear + light, especially that of the Sun, must needs very much offend them; to secure + these eyes from receiving any injury from the hairs through which it passes, + it has two horns that grow before it, in the place where one would have thought + the eyes should be; each of these C C have four joynts, which are fringed, + as 'twere, with small brisles, from which to the tip of its snout D, the + head seems very round and tapering, ending in a very sharp nose D, which + seems to have a small hole, and to be the passage through which he sucks + the blood.

    +

     

    +

    +

    Now whereas it if be plac'd on its back, with its belly + upwards, as it is in the 35. Scheme, it seems in several Positions to have + a resemblance of chaps, or jaws, as is represented in the Figure by E E, + yet in other postures those dark strokes disappear; and having kept several + of them in a box for two or three dayes, so that for all that time they had + nothing to feed on, I found, upon letting onecreep on my hand, that it immediately + fell to sucking, and did neither seem to thrust its nose very deep into the + skin, nor to open any kind of mouth, but I could plainly perceive a small + current of blood, which came directly from its snout, and past into its belly; + and about A there seem'd a contrivance, somewhat resembling a Pump, pair + of Bellows, or Heart, for by a very swift systole and diastole the blood + seem'd drawn from the nose, and forced into the body.

    +

    It did not seem at all, though I viewed it a good while as + it was sucking, to thrust more of its nose into the skin then the very snout + D, nor did it cause the least discernable pain, and yet the blood seem'd + to run through its head very quick and freely, so that it seems there is + no part of the skin but the blood is dispers'd into, nay, even into the + cuticula; for had it thrust its whole nose in from D to C C, it would not + have amounted to the supposed thickness of that tegument, the length of + the nose being not more then a three hundredth part of an inch.

    +

    It has six legs, covered with a very transparent shell, + and joynted exactly like a Crab's, or Lobster's; each leg is divided into + six parts by these joynts, and those have here and there several small hairs; + and at the end of each leg it has two claws, very properly adapted for its + peculiar use, being thereby inabled to walk very securely both on the skin + and hair; and indeed this contrivance of the feet is very curious, and could + not be made more commodiously and compendiously, for performing both these + requisite motions, of walking and climbing up the hair of a mans head, then + it is : for, by having the lesser claw (a) set so much short of the bigger + (b) when it walks on the skin the shorter touches not, and then the feet + are the same with those of a Mite, and several other small Insects, but by + means of the small joynts of the longer claw it can bend it round, and so + with both claws take hold of a hair, in the manner represented in the Figure, + the long transparent Cylinder F F F, being a Man's hair held by it.

    +

    The Thorax seem'd cas'd with another kind of substance then + the belly, namely, with a thin transparent horny substance, which upon the fasting + of the Creature did not grow flaccid; through this I could plainly see the + blood, suck'd from my hand, to be variously distributed, and mov'd to and + fro; and about G there seem'd a pretty big white substance, which seem'd + to be moved within its thorax; besides, there appear'd very many small milk-white + vessels, which crost over the breast between the legs, out of which, on + either side, are many small branchings, these seem'd to be the veins and + arteries, for that which is analogus to blood in all Insects is milk-white. +

    +

    The belly is covered with a transparent substance likewise, + but more resembling a skin then a shell, for 'tis grain'd all over the belly + just like the skin in the palms of a man's hand, and when the belly is empty, + grows very flaccid and wrinkled ; at the upper end of this is placed the + stomach H H, and perhaps also the white spot I I may be the liver, or pancreas, + which by the peristaltick motion of the guts, is a little mov'd to and fro, + not with a systole and diastole, but rather with a thronging or justling + motion.

    +

    Viewing one of these Creatures, after it had fasted two + dayes, all the hinder part was lank and flaccid, and the white spot I I + hardly mov'd, most of the white branchings disappear'd, and most also of + the redness or sucked blood in the guts, the peristaltick motion of which + was scarce discernable; but upon the suffering it to suck, it presently + fill'd the skin of the belly, and of the six scolop'd embosments on either side, + as full as it could be stuft ; the stomach and guts were as full as they + could hold; the peristaltick motion of the gut grew quick, and the justling + motion of I I accordingly ; multitudes of milk-white vessels seem'd quickly + filled, and turgid, which were perhaps the veins and arteries, and the Creature + was so greedy, that though it could not contain more, yet it continued sucking + as fast as ever, and as fast emptying it self behind : the digestion of this + Creature must needs be very quick, for though I perceiv'd the blood thicker + and blacker when suck'd, yet, when in the guts, it was of a very lovely + ruby colour, and that part of it, which was digested into the veins, seemed + white; whence it appears, that a further digestion of blood may make it + milk, at least of a resembling colour : What is else observable in the figure + of this Creature, maybe seen by the 35. Scheme.

    +
    +

     

    +

    +

     

    +

     

    +
    + + diff --git a/test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/book/editorpane/back.jpg b/test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/book/editorpane/back.jpg new file mode 100644 index 0000000000000000000000000000000000000000..eb20ab7d6b152080554867774c11459a62ca0b5b GIT binary patch literal 7801 zcmbtY2{@JA+FpA$&vRm%MF^QQWe%Cgl-PTlXSSh2g9e0>sT2`O!iPdsip)bOWGGXJ zh%&@B{qN>G)pxG*o&WsjU;En6d#~qt*8AS?T5DU6d;9(N2w*s(YoH5Ya2U{sK45!} zGQ!l&H^?{8&DRerD|rAY9yTyWOapQY1%L>4^8kP^!8NwOZhu9f;pPCKL=hVRAYF){ z000&!7Yo#JNl@Q!XCz?PK)P67`!h}l`3?Y$D2LtH-&>?hP$xOM!(nbGkAch*z@X2c zS8@zVyAwk~HgqRqQVV zus=OnH*fv)$UqSou!rnFa^!YA62Ck<_gsbg06_Dw{VyBhGdcV(L)-tK*v>oe&H(vc zq4$Jq?0)~85ArHOO9p*WJGnIEF2(~g#iq4n~@t_UC1{^UoGWOHEBnN6SD*$G}2IN5?`obS%3=82^(S zY`+AI6wr(MAz=If&Im&=!nQv^lY-fP4O53$qF_4>B1~=w=!b$tp)nMcRMgNG{A&;f z;D~<&82}6kL%@-66b4O!LeR)UK}H0Uk4YM(Y39Vt?|)7P&2l}fklG~xcC(VR}82Ixu zqh!uqXCX6qW!|+QE9g8La6VDXf)y8d@S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Ti#=UX5rXRan{?QJus}Ijk%Fn;9wegPh8^3V+|DJVf^Z+Ll|DuZIHTEF4n9rJJ5V6 zf7!Dz{8+^`cYE$zGD6)?l3$nP zFf}vDP+d7kYUGOdmS|)PX|9=KPkz=MUJw@9rYvZ9nl4%Aw1QujgW@#<-Mf6#^)>IB zR*JLNhD{ewL{BQsc}>Jn9J$h~w=^0oVYdIOs$I_N=25f8#uaIsg0<@Q!U+?h4`DId zOb$67<=-;m4(14+scE+MG2S}z=~%0p-XDwT#EOqj=T%KCYT^j*^yIq6`PxhB=b<(TTE`*uvfuekRP!_bk)I}^D!so(V)4rPkoMZ9!X*eI-C z^u8Fg=G&g~;C{WL{fS4d0#yi|i(Qe!xXr;<<)dP={bkO@+g;G#+LxRqHp72jp4k+l zRSv<@Ss|r1NyAB(m2(98WzH8DyxJl;RyxN#tQG~QUC#zO7uOtT(h-~CG%@whw7GD_ z(Ks~j<=r>%$$G~~0PeEzaNI0ETO-SrvgP5MfohL=u}QGzwuK*(&Zp7$cyM?1oY8`? dm(`Dvm;*z#V7T4*+u8^X^qh@;@@2dKe*pC87<~W$ literal 0 HcmV?d00001 diff --git a/test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/book/editorpane/forward.jpg b/test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/book/editorpane/forward.jpg new file mode 100644 index 0000000000000000000000000000000000000000..465b99672861f1786e924644bdabab73b456e36a GIT binary patch literal 8558 zcmbtY2UJwcmaWd@oF%l9vt&@B2!fy_i3$i!&Z&tKM8qdS1Q8SvBq&KiM4|$MqLL*D z5>${NNr^3)o(sJ3`TqL<&!3s<)#vUy=hVIXR#j7nP5ek41vIBMwKV|@4g*@y2N1uL zI_Nuj`g!^~d3s@`#Et^_6WV7GGhnX;0)Phxc>usy;i|+R#2*MW+zeqyrul z1Hb^~Vu1=S8R~oOj|9xBNQZMb|BO>XzN0`j>cTcRKV`Pf?}Xvy}z`?(Z*U5o)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q|+3MlC+jHYGC$oqsy! zTf~ZOY5fjM4SMv&HFaIzH#Y=kSwa>v;m{qnwQ>{Y1*~sAl#kG$8vS|jEOJ+TDNC~H zW6;caB1QlNQY=!r8L#cSI7Ud>mNsw-OzbWpE;ak4u-ux@Nw~>6s{65cVS8|t;@5>Z F_+MghlLP<& literal 0 HcmV?d00001 diff --git a/test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/book/editorpane/header.jpg b/test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/book/editorpane/header.jpg new file mode 100644 index 0000000000000000000000000000000000000000..d69cc0f1f28baf7f017bd0d4c52815b9523f92cd GIT binary patch literal 22281 zcmbrl1z1#HyEnXPBt=>fkPvClo4yFny}ZUlu<6c7+8=@^l2X=#H_=?>|R8EOV* z<{kY%=l?v3>T^usJw@88-fpGU9(E0{@i!x#k5n4FI0lzWpx) z-q!Ez|1t~n|C0Bo&42a4@3vywiF^OA|9|wy?@wxOPQIP3r}6%HO14rT${DMXkK z91vDZ0-QeqtMKoDhka1+2?&XZuaS^qr{KS5;sCgK|B-nez`@7C!^OuXAR;6tz#|jI zW>Vqd-@YMC@Icpwn%(P_2q8^;PSryWPFlThPesMNLq`;exDxb_ejVHTh|_(letqXr zqJf>#_gr5I`ccCbdsxkzA7g&2aAocfd119l9ph^!`E{KW>!(Hz{^7|5^<9%2XOb$$ zjsX!Vg$>b5AM&1e_Wq zsBy_jXdCaG2HWm@v97CT7;r5kd@?HR+ytFs9vpWxH65Rx+Mdh+uCS(UI?k((4d zzTZ((n%&BNzOqmOZwU~)HFbwA$L1#ismBYwbf}ORyXIit4kxRQYR#; z><6pE*V=Y0V?tbny_U3h>CBBl+d3{t_}Efdbi%-Mj}R@Lui{VJqJMbD*s?b%j1Gja zn)SN`)UcPz^J0K~>lxQmQ&VAdagfyE*8tsKh-O*Uf-FN+f0d?oB{%a_qP_o8{F!+% z%6Ok?*8#M1K9!IkFwxRd=1S*BQRrZ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^XEzpQWD59VO3hy zDL>8|KOq^mjl2D|*5fdy@B0C@PDTfWFK9(XP4XS%9bezC>POxG;0;e>kmKA8`Bk6A z&rNDb6r0R=$b_W@v(whKM8mI0XH^*cJHk^rSm&W9kFOi zZaYUVTzmHYz{3{EXP&ktVr|xKJZ;uHXLBUot?9{yqNh&;HJ-~PL^LkLq{UN;YMvO{ zK>w0y8!Tn(w*2qo(~s><{{aY6`m2g%fC)}L(b}|efQEnRI6Y&}+$*lLez1>DQbMhE z31g{UTB*zhC+#CQO;S<$8phJ;zuRsWiuYq`9tUiVty9tVD#~+TUbfQu=@X}M2PDkz9y{5}f z2Me7d*{gcr%9z@0O)O7jf{*@KEh@%$^DuCB%9tRfBX;?>UlSt@1zw){aFar*kA-@R z8cCjg`r?`j%q7xY&GH{%meMQrb;$|?Z(r!$d`@@c9|u4~oCTioXUgSA+~uVvA$eYi z(hyyR+8lygKFRX>LXQD1D1~`ru(HKi!Rs=fKrgMAS$iED05=u(6jQA3e)9bJPcKg& r09CX9G|9?~=M;&WYaBBbtJwlS$5$-y&izyw^MA5+|H8j6-)H^?1Rr*2 literal 0 HcmV?d00001 diff --git a/test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/book/index.html b/test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/book/index.html new file mode 100644 index 00000000000..72e2c1a85d7 --- /dev/null +++ b/test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/book/index.html @@ -0,0 +1,41 @@ + + +Untitled Document + + + + +

     

    +

    +

     

    +

     

    +
    +

    Title Page

    +

    To The King

    +

    The Preface

    +

    Of the curious texture of Sea-weeds

    +

    Of an Ant or Pismire

    +

    Of a Louse
    +
    +
    +

    +

    Images and text used by permission of Octavo + Corporation (www.octavo.com),
    +
    (c) 1999 Octavo Corporation. All + rights reserved.
    +
    +
    + Octavo Corporation is a publisher of rare + books and manuscripts with digital tools and formats through partnerships + with libraries, museums, and individuals. Using high-resolution digital imaging + technology, Octavo releases digital rare books on CD-ROM as Adobe PDF files + which can be viewed on and printed from almost any computing platform. You + can view each page and the binding on your computer screen, zoom in to view + detail up to 800% in some cases, and search, copy and paste the "live" text + placed invisibly behind the page images which is available for selected Editions. + Also included in each edition is the work's collation and provenance, as well + as commentary by a noted expert in its field.

    +
    +

     

    + + diff --git a/test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/book/king.html b/test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/book/king.html new file mode 100644 index 00000000000..599606e0ce8 --- /dev/null +++ b/test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/book/king.html @@ -0,0 +1,44 @@ + + +Untitled Document + + + + + +

     

    +
    Do here most humbly lay this small Present at Your + Majesties Royal feet. And though it comes accompany'd with two disadvantages, + the meanness of the Author, and of the Subject; yet in both I am incouraged + by the greatness of your Mercy and your Knowledge. +

    By the one I am taught , that you can forgive the most presumptuous + Offendors: And by the other, that you will not esteem the least work of Nature, + or Art, unworthy your Observation.

    +

    Amidst the many felicities that have accompani'd your Majesties + happy Restauration and Government, it is none of the least considerable, that + Philosophy and Experimental Learning have prosper'd under your Royal Patronage.

    +

    And as the calm prosperity of your Reign has given us the + leisure to follow these Studies of quiet and retirement, so it is just, that + the Fruits of them should, by way of acknowledgement, be return'd to your + Majesty. There are, Sir, several other of your Subjects, of your Royal Society, + now busie about Nobler matters: The Improvement of Manufactures and Agriculture, + the Increase of Commerce, the Advantage of Navigation: In all which they are + assisted by your Majesties Incouragement and Example.

    +

    Amidst all those greater Designs, I here presume to bring + in that which is more proportionable to the smalness of my Abilities, and + to offer some of the least of all visible things, to that Mighty King, that + has establisht an Empire over the best of all Invisible things of this World, + the Minds o f Men.

    +
    +

     

    +
    +

    Your Majesties most humble

    +

    and most obedient

    +

    Subject and Servant,

    +

     

    +

    ROBERT HOOKE .

    +

     

    +

    +
    + + diff --git a/test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/book/preface.html b/test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/book/preface.html new file mode 100644 index 00000000000..6318c113b2d --- /dev/null +++ b/test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/book/preface.html @@ -0,0 +1,116 @@ + + +Untitled Document + + + + + +
    +

     

    +

    THE PREFACE

    +
    +
    +

     

    +

     

    +
    +
    +
    +

    It is the great prerogative of Mankind above + other Creatures, that we are not only able to behold the works of Nature, + or barely to sustein our lives by them, but we have also the power of considering, + comparing, altering, assisting, and improving them to various uses.

    +

    And as this is the peculiar priviledge of humane Nature + in general, so is it capable of being so far advanced by the helps of Art, + and Experience, as to make some Men excel others in their Observations, + and Deductions, almost as much as they do Beasts.

    +

    By the addition of such artificial Instruments and methods, + there may be, in some manner, a reparation made for the mischiefs, and imperfection, + mankind has drawn upon itself, by negligence, and intemperance, and a wilful + and superstitious deserting the Prescripts and Rules of Nature, whereby + every man, both from a deriv'd corruption, innate and born with him, and + from his breeding and converse with men, is very subject to slip into all + sorts of errors.

    +

    The only way which now remains for us to recover some degree + of those former perfections, seems to be, by rectifying the operations of + the Sense, the Memory, and Reason, since upon the evidence, the strength, + the integrity, and the right correspondence of all these, all the light, + by which our actions are to be guided, is to be renewed, and all our command + over things is to be establisht.

    +

    It is therefore most worthy of our consideration, to recollect + their several defects, that so we may the better understand how to supply + them, and by what assistances we may inlarge their power, and secure them + in performing their particular duties.

    +

    As for the actions of our Senses, we cannot but observe + them to be in many particulars much outdone by those of other Creatures, + and when at best, to be far short of the perfection they seem capable of + : And these infirmities of the Senses arise from a double cause, either + from the disproportion of the Object to the Organ, whereby an infinite number + of things can never enter into them, or else from error in the Perception, + that many things, which come within their reach, are not received in a right + manner.

    +

    The like frailties are to be found in the Memory; we often + let many things slip away from us, which deserve to be retain'd; and of + those which we treasure up, a great part is either frivolous or false ; + and if good, and substantial, either in tract of time obliterated, or at + best so overwhelmed and buried under more frothy notions, that when there + is need of them, they are in vain sought for.

    +

    The two main foundations being so deceivable, it is no wonder, + that all the succeeding works which we build upon them, of arguing, concluding, + defining, judging, and all the other degrees of Reason, are lyable to the + same imperfection, being, at best, either vain, or uncertain: So that the + errors of the understanding are answerable to the two other, being defective + both in the quantity and goodness of its knowledge; for the limits, to which + our thoughts are confind, are small in respect of the vast extent of Nature + it self; some parts of it are too large to be comprehended, and some too + little to be perceived.

    +

    And from thence it must follow, that not having a full sensation + of the Object, we must be very lame and imperfect in our conceptions about + it, and in all the propositions which we build upon it; hence we often take + the shadow of things for the substance, small appearances for good similitudes, + similitudes for definitions; and even many of those, which we think to be + the most solid definitions, are rather expressions of our own misguided + apprehensions then of the true nature of the things themselves.

    +

    The effects of these imperfections are manifested in different + ways, according to the temper and disposition of the several minds of men, + some they incline to gross ignorance and stupidity, and others to a presumptuous + imposing on other mens Opinions, and a confident dogmatizing on matters, + whereof there is no assurance to be given.

    +

    Thus all the uncertainty, and mistakes of humane actions, + proceed either from the narrowness and wandring of our Senses, from the + slipperiness or delusion of our Memory, from the confinement or rashness + of our Understanding, so that 'tis no wonder, that our power over natural + causes and effects is so slowly improvd, seeing we are not only to contend + with the obscurity and difficulty of the things whereon we work and think, + but even the forces of our own minds conspire to betray us.

    +

    These being the dangers in the process of humane Reason, + the remedies of them all can only proceed from the real, the mechanical, + the experimental Philosophy, which has this advantage over the Philosophy + of discourse and disputation, that whereas that chiefly aims at the subtilty + of its Deductions and Conclusions, without much regard to the first groundwork, + which ought to be well laid on the Sense and Memory ; so this intends the + right ordering of them all, and the making them serviceable to each other. +

    +

    The first thing to be undertaken in this weighty work, is + a watchfulness over the failings and an inlargement of the dominion, of + the Senses. To which end it is requisite, first, That there should be a + scrupulous choice, and a strict examination, of the reality, constancy, + and certainty of the Particulars that we admit: This is the first rise whereon + truth is to begin, and here the most severe, and most impartial diligence, + must be imployed ; the storing up of all, without any regard to evidence + or use, will only tend to darkness and confusion.

    +

    We must not therefore esteem the riches of our Philosophical + treasure by the number only, but chiefly by the weight; the most vulgar + Instances are not to be neglected, but above all, the most instructive are + to be entertain'd: the footsteps of Nature are to be trac'd, not only in + her ordinary course,but when she seems to be put to her shifts, to make + many doublings and turnings, and to use some kind of art in indeavouring + to avoid our discovery.

    +

     

    +

    +

     

    +

     

    +
    +
    + + diff --git a/test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/book/seaweed.html b/test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/book/seaweed.html new file mode 100644 index 00000000000..1aeaeadaf6f --- /dev/null +++ b/test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/book/seaweed.html @@ -0,0 +1,62 @@ + + +Untitled Document + + + + + +


    + Observ. XXIII. Of the curious texture of Sea-weeds.
    +

    +

     

    +
    +

    For curiosity and beauty, I have not among all the Plants + or Vegetables I have yet observ'd, seen any one comparable to this Sea-weed + I have here describ'd, of which I am able to say very little more then what + is represented by the second Figure of the ninth Scheme: Namely, that it is + a Plant which grows upon the Rocks under the water, and increases and spreads + it self into a great tuft, which is not onely handsomely branch'd into several + leaves, but the whole surface of the Plant is cover'd over with a most curious + kind of carv'd work, which consists of a texture much resembling a Honeycomb; + for the whole surface on both sides is cover'd over with a multitude of very + small holes, being no bigger then so many holes made with the point of a small + Pinn, and rang'd in the neatest and most delicate order imaginable, they being + plac'd in the manner of a Quincunx, or very much like the rows of the eyes + of a Fly, the rows or orders being very regular, which way soever they are + observ'd: what the texture was, as it appear'd through a pretty bigg Magnifying + Microscope, I have here adjoin'd in the first Figure of the 14. Scheme. which + round Area A B C D represents a part of the surface about one eighth part + of an Inch in Diameter: Those little holes, which to the eye look'd round, + like so many little spots, here appear'd very regularly shap'd holes, representing + almost the shape of the sole of a round toed shoe, the hinder part of which, + is, as it were, trod on or cover'd by the toe of that next below it; these + holes seem'd wall'd about with a very thin and transparent substance, looking + of a pale straw-colour; from the edge of which, against the middle of each + hole, were sprouted out four small transparent straw-colour'd Thorns, which + seem'd to protect and cover those cavities, from either side two; neer the + root of this Plant, were sprouted out several small branches of a kind of + bastard Coralline, curiously branch'd, though small.

    +

    And to confirm this, having lately the opportunity of viewing + the large Plant (if I may so call it) of a Sponge petrify'd, of which I made + mention in the last Observation, I found, that each of the Branches or Figures + of it, did, by the range of its pores, exhibit just such a texture, the rows + of pores crossing one another, much after the manner as the rows of eyes do + which are describ'd in the 26. Scheme : Coralline also, and several sorts of + white Coral, I have with a Microscope observ'd very curiously shap'd. And + I doubt not, but that he that shall observe these several kinds of Plants that + grow upon Rocks, which the Sea sometimes overflows, and those heaps of others + which are vomited out of it upon the shore, may find multitudes of little + Plants, and other bodies, which like this will afford very beautifull objects + for the Microscope ; and this Specimen here is adjoin'd onely to excite their + curiosities who have opportunity of observing to examine and collect what + they find worthy their notice; for the Sea, among terrestrial bodies, is also + a prolifick mother, and affords as many Instances of spontaneous generations + as either the Air or Earth.

    +

     

    +

    +

     

    +

     

    +
    + + diff --git a/test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/book/title.html b/test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/book/title.html new file mode 100644 index 00000000000..b83e4d3813f --- /dev/null +++ b/test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/book/title.html @@ -0,0 +1,37 @@ + + +Untitled Document + + + + + +


    + MICROGRAPHIA:

    +

    OR SOME

    +

    Physiological Descriptions

    +

    O F

    +

    MINUTE BODIES

    +

    MADE BY

    +

    MAGNIFYING GLASSES.

    +

    WITH

    +

    OBSERVATIONS and INQUIRIES + thereupon.

    +

    By R. HOOKE + , Fellow of the ROYAL SOCIETY .

    +
    +
    +
    +

    LONDON, Printed by Jo. + Martyn, and Ja. Allestry, + Printers to the ROYAL SOCIETY , and are to + be sold at their Shop at the Bell in S. Paul's Church-yard. M + D C L X V.

    +


    +

    +
    +

    +
    +
    + + diff --git a/test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/resources/EditorPaneDemo.properties b/test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/resources/EditorPaneDemo.properties new file mode 100644 index 00000000000..fa2a38f64fe --- /dev/null +++ b/test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/resources/EditorPaneDemo.properties @@ -0,0 +1,6 @@ +### Html Demo ### + +EditorPaneDemo.accessible_description=This demo shows how to display html text using the JEditorPane component. +EditorPaneDemo.tooltip=JEditorPane HTML demo +EditorPaneDemo.name=JEditorPane HTML Demo +EditorPaneDemo.filename=swing.html diff --git a/test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/resources/images/EditorPaneDemo.gif b/test/jdk/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/editorpane/resources/images/EditorPaneDemo.gif new file mode 100644 index 0000000000000000000000000000000000000000..ce007e2e5816832cf9b47ee665cf3373c1d0a3b0 GIT binary patch literal 194 zcmZ?wbhEHbRA5kGSoELa|NsAI&YVe0o0*oD#=yXE;J^VO2?UBiSr{1@7#Vax9FSTE z=5~o)cmCxyXs%%0dhg`ZNiiCIOO`jJteVBRYMdeO27l`c_f$^#kFonzI!*7rw7LVq2WkmC$!l!T9s?bMu~GSehVT uS0r7oT3A}y)!h}_k>%YqVWRJ3;kc|B$+P0;#2D$iELyCSzKoxf!5RSQ>QVOq literal 0 HcmV?d00001 From d7c7ce19f196c9c3d3042ab955231cd64239215a Mon Sep 17 00:00:00 2001 From: Jean Christophe Beyler Date: Mon, 15 Oct 2018 14:16:35 -0700 Subject: [PATCH 120/124] 8211980: Remove ThreadHeapSampler enable/disable/enabled methods Remove methods from ThreadHeapSampler Reviewed-by: dholmes, phh --- src/hotspot/share/gc/shared/memAllocator.cpp | 4 +- src/hotspot/share/prims/jvmtiEnv.cpp | 7 --- src/hotspot/share/runtime/mutexLocker.cpp | 4 -- src/hotspot/share/runtime/mutexLocker.hpp | 1 - .../share/runtime/threadHeapSampler.cpp | 61 ++++++------------- .../share/runtime/threadHeapSampler.hpp | 18 +++--- 6 files changed, 33 insertions(+), 62 deletions(-) diff --git a/src/hotspot/share/gc/shared/memAllocator.cpp b/src/hotspot/share/gc/shared/memAllocator.cpp index 08ab85a6119..6835ebaa907 100644 --- a/src/hotspot/share/gc/shared/memAllocator.cpp +++ b/src/hotspot/share/gc/shared/memAllocator.cpp @@ -187,7 +187,7 @@ void MemAllocator::Allocation::notify_allocation_jvmti_sampler() { // support for JVMTI VMObjectAlloc event (no-op if not enabled) JvmtiExport::vm_object_alloc_event_collector(obj()); - if (!ThreadHeapSampler::enabled()) { + if (!JvmtiExport::should_post_sampled_object_alloc()) { // Sampling disabled return; } @@ -282,7 +282,7 @@ HeapWord* MemAllocator::allocate_inside_tlab_slow(Allocation& allocation) const HeapWord* mem = NULL; ThreadLocalAllocBuffer& tlab = _thread->tlab(); - if (ThreadHeapSampler::enabled()) { + if (JvmtiExport::should_post_sampled_object_alloc()) { // Try to allocate the sampled object from TLAB, it is possible a sample // point was put and the TLAB still has space. tlab.set_back_allocation_end(); diff --git a/src/hotspot/share/prims/jvmtiEnv.cpp b/src/hotspot/share/prims/jvmtiEnv.cpp index 5a4c02c0367..73be60f1d66 100644 --- a/src/hotspot/share/prims/jvmtiEnv.cpp +++ b/src/hotspot/share/prims/jvmtiEnv.cpp @@ -540,13 +540,6 @@ JvmtiEnv::SetEventNotificationMode(jvmtiEventMode mode, jvmtiEvent event_type, j record_class_file_load_hook_enabled(); } - if (event_type == JVMTI_EVENT_SAMPLED_OBJECT_ALLOC) { - if (enabled) { - ThreadHeapSampler::enable(); - } else { - ThreadHeapSampler::disable(); - } - } JvmtiEventController::set_user_enabled(this, (JavaThread*) NULL, event_type, enabled); } else { // We have a specified event_thread. diff --git a/src/hotspot/share/runtime/mutexLocker.cpp b/src/hotspot/share/runtime/mutexLocker.cpp index f43113f21c1..59c524a8076 100644 --- a/src/hotspot/share/runtime/mutexLocker.cpp +++ b/src/hotspot/share/runtime/mutexLocker.cpp @@ -133,8 +133,6 @@ Monitor* Service_lock = NULL; Monitor* PeriodicTask_lock = NULL; Monitor* RedefineClasses_lock = NULL; -Mutex* ThreadHeapSampler_lock = NULL; - #if INCLUDE_JFR Mutex* JfrStacktrace_lock = NULL; Monitor* JfrMsg_lock = NULL; @@ -301,8 +299,6 @@ void mutex_init() { def(PeriodicTask_lock , PaddedMonitor, nonleaf+5, true, Monitor::_safepoint_check_sometimes); def(RedefineClasses_lock , PaddedMonitor, nonleaf+5, true, Monitor::_safepoint_check_always); - def(ThreadHeapSampler_lock , PaddedMutex, nonleaf, false, Monitor::_safepoint_check_never); - if (WhiteBoxAPI) { def(Compilation_lock , PaddedMonitor, leaf, false, Monitor::_safepoint_check_never); } diff --git a/src/hotspot/share/runtime/mutexLocker.hpp b/src/hotspot/share/runtime/mutexLocker.hpp index 9de409391e8..9a589b8179f 100644 --- a/src/hotspot/share/runtime/mutexLocker.hpp +++ b/src/hotspot/share/runtime/mutexLocker.hpp @@ -132,7 +132,6 @@ extern Mutex* Management_lock; // a lock used to serialize JVM extern Monitor* Service_lock; // a lock used for service thread operation extern Monitor* PeriodicTask_lock; // protects the periodic task structure extern Monitor* RedefineClasses_lock; // locks classes from parallel redefinition -extern Mutex* ThreadHeapSampler_lock; // protects the static data for initialization. #if INCLUDE_JFR extern Mutex* JfrStacktrace_lock; // used to guard access to the JFR stacktrace table diff --git a/src/hotspot/share/runtime/threadHeapSampler.cpp b/src/hotspot/share/runtime/threadHeapSampler.cpp index ac398fecaec..330223d48dc 100644 --- a/src/hotspot/share/runtime/threadHeapSampler.cpp +++ b/src/hotspot/share/runtime/threadHeapSampler.cpp @@ -29,22 +29,29 @@ #include "runtime/sharedRuntime.hpp" #include "runtime/threadHeapSampler.hpp" -// Cheap random number generator +// Cheap random number generator. uint64_t ThreadHeapSampler::_rnd; // Default is 512kb. -int ThreadHeapSampler::_sampling_interval = 512 * 1024; -int ThreadHeapSampler::_enabled; +volatile int ThreadHeapSampler::_sampling_interval = 512 * 1024; -// Statics for the fast log -static const int FastLogNumBits = 10; -static const int FastLogMask = (1 << FastLogNumBits) - 1; -static double log_table[1<(i+0.5) / (1 << FastLogNumBits)) + / log(2.0)); + } + return true; +} // Returns the next prng value. // pRNG is: aX+b mod c with a = 0x5DEECE66D, b = 0xB, c = 1<<48 // This is the lrand64 generator. -static uint64_t next_random(uint64_t rnd) { +uint64_t ThreadHeapSampler::next_random(uint64_t rnd) { const uint64_t PrngMult = 0x5DEECE66DLL; const uint64_t PrngAdd = 0xB; const uint64_t PrngModPower = 48; @@ -54,7 +61,7 @@ static uint64_t next_random(uint64_t rnd) { return (PrngMult * rnd + PrngAdd) & PrngModMask; } -static double fast_log2(const double & d) { +double ThreadHeapSampler::fast_log2(const double& d) { assert(d>0, "bad value passed to assert"); uint64_t x = 0; assert(sizeof(d) == sizeof(x), @@ -64,7 +71,9 @@ static double fast_log2(const double & d) { assert(FastLogNumBits <= 20, "FastLogNumBits should be less than 20."); const uint32_t y = x_high >> (20 - FastLogNumBits) & FastLogMask; const int32_t exponent = ((x_high >> 20) & 0x7FF) - 1023; - return exponent + log_table[y]; + + assert(_log_table_initialized, "log table should be initialized"); + return exponent + _log_table[y]; } // Generates a geometric variable with the specified mean (512K by default). @@ -134,36 +143,6 @@ void ThreadHeapSampler::check_for_sampling(oop obj, size_t allocation_size, size pick_next_sample(overflow_bytes); } -void ThreadHeapSampler::init_log_table() { - MutexLockerEx mu(ThreadHeapSampler_lock, Mutex::_no_safepoint_check_flag); - - if (log_table_initialized) { - return; - } - - for (int i = 0; i < (1 << FastLogNumBits); i++) { - log_table[i] = (log(1.0 + static_cast(i+0.5) / (1 << FastLogNumBits)) - / log(2.0)); - } - - log_table_initialized = true; -} - -void ThreadHeapSampler::enable() { - // Done here to be done when things have settled. This adds a mutex lock but - // presumably, users won't be enabling and disabling all the time. - init_log_table(); - OrderAccess::release_store(&_enabled, 1); -} - -int ThreadHeapSampler::enabled() { - return OrderAccess::load_acquire(&_enabled); -} - -void ThreadHeapSampler::disable() { - OrderAccess::release_store(&_enabled, 0); -} - int ThreadHeapSampler::get_sampling_interval() { return OrderAccess::load_acquire(&_sampling_interval); } diff --git a/src/hotspot/share/runtime/threadHeapSampler.hpp b/src/hotspot/share/runtime/threadHeapSampler.hpp index 2b89ffab567..d48c0d21e2c 100644 --- a/src/hotspot/share/runtime/threadHeapSampler.hpp +++ b/src/hotspot/share/runtime/threadHeapSampler.hpp @@ -30,16 +30,24 @@ class ThreadHeapSampler { private: + // Statics for the fast log + static const int FastLogNumBits = 10; + static const int FastLogMask = (1 << FastLogNumBits) - 1; + size_t _bytes_until_sample; // Cheap random number generator static uint64_t _rnd; + static bool _log_table_initialized; + + static double _log_table[1< Date: Mon, 15 Oct 2018 14:55:17 -0700 Subject: [PATCH 121/124] 8212083: Handle remaining gc/lock native code and fix two strings Migrate code to using wrapping JNI for exceptions Reviewed-by: phh, tschatzl --- .../lock/jni/BooleanArrayCriticalLocker.cpp | 18 ++---- .../gc/lock/jni/ByteArrayCriticalLocker.cpp | 18 ++---- .../gc/lock/jni/CharArrayCriticalLocker.cpp | 18 ++---- .../gc/lock/jni/DoubleArrayCriticalLocker.cpp | 18 ++---- .../gc/lock/jni/FloatArrayCriticalLocker.cpp | 18 ++---- .../gc/lock/jni/IntArrayCriticalLocker.cpp | 18 ++---- .../gc/lock/jni/LongArrayCriticalLocker.cpp | 18 ++---- .../gc/lock/jni/ShortArrayCriticalLocker.cpp | 18 ++---- .../gc/lock/jni/StringCriticalLocker.cpp | 18 ++---- .../jni/libBooleanArrayCriticalLocker.cpp | 1 + .../lock/jni/libByteArrayCriticalLocker.cpp | 1 + .../lock/jni/libCharArrayCriticalLocker.cpp | 1 + .../lock/jni/libDoubleArrayCriticalLocker.cpp | 1 + .../lock/jni/libFloatArrayCriticalLocker.cpp | 1 + .../gc/lock/jni/libIntArrayCriticalLocker.cpp | 1 + .../lock/jni/libLongArrayCriticalLocker.cpp | 1 + .../lock/jni/libShortArrayCriticalLocker.cpp | 1 + .../gc/lock/jni/libStringCriticalLocker.cpp | 1 + .../gc/lock/jniref/JNIGlobalRefLocker.cpp | 2 +- .../gc/lock/jniref/JNILocalRefLocker.cpp | 17 ++---- .../nsk/share/gc/lock/jniref/JNIRefLocker.cpp | 19 ++----- .../gc/lock/jniref/JNIWeakGlobalRefLocker.cpp | 18 ++---- .../gc/lock/jniref/libJNIGlobalRefLocker.cpp | 2 +- .../gc/lock/jniref/libJNILocalRefLocker.cpp | 1 + .../share/gc/lock/jniref/libJNIRefLocker.cpp | 1 + .../lock/jniref/libJNIWeakGlobalRefLocker.cpp | 1 + .../nsk/share/jni/ExceptionCheckingJniEnv.cpp | 56 ++++++++++++++++++- .../nsk/share/jni/ExceptionCheckingJniEnv.hpp | 12 ++++ 28 files changed, 140 insertions(+), 160 deletions(-) diff --git a/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/BooleanArrayCriticalLocker.cpp b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/BooleanArrayCriticalLocker.cpp index 4623bb428e9..e3b247e0401 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/BooleanArrayCriticalLocker.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/BooleanArrayCriticalLocker.cpp @@ -23,6 +23,7 @@ #include #include #include +#include "ExceptionCheckingJniEnv.hpp" #include "jni_tools.h" extern "C" { @@ -35,7 +36,9 @@ static jfieldID objFieldId = NULL; * Signature: ([Z)Z */ JNIEXPORT jboolean JNICALL Java_nsk_share_gc_lock_jni_BooleanArrayCriticalLocker_criticalNative -(JNIEnv *env, jobject o, jlong enterTime, jlong sleepTime) { +(JNIEnv *jni_env, jobject o, jlong enterTime, jlong sleepTime) { + ExceptionCheckingJniEnvPtr env(jni_env); + jsize size, i; jbooleanArray arr; jboolean *pa; @@ -44,22 +47,11 @@ JNIEXPORT jboolean JNICALL Java_nsk_share_gc_lock_jni_BooleanArrayCriticalLocker if (objFieldId == NULL) { jclass klass = env->GetObjectClass(o); - if (klass == NULL) { - printf("Error: GetObjectClass returned NULL\n"); - return JNI_FALSE; - } objFieldId = env->GetFieldID(klass, "obj", "Ljava/lang/Object;"); - if (objFieldId == NULL) { - printf("Error: GetFieldID returned NULL\n"); - return JNI_FALSE; - } } arr = (jbooleanArray) env->GetObjectField(o, objFieldId); - if (arr == NULL) { - printf("Error: GetObjectField returned NULL\n"); - return JNI_FALSE; - } env->SetObjectField(o, objFieldId, NULL); + size = env->GetArrayLength(arr); start_time = time(NULL); enterTime /= 1000; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/ByteArrayCriticalLocker.cpp b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/ByteArrayCriticalLocker.cpp index b198dd43c22..21ec0a782d8 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/ByteArrayCriticalLocker.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/ByteArrayCriticalLocker.cpp @@ -23,6 +23,7 @@ #include #include #include +#include "ExceptionCheckingJniEnv.hpp" #include "jni_tools.h" extern "C" { @@ -34,7 +35,9 @@ static jfieldID objFieldId = NULL; * Method: criticalNative */ JNIEXPORT jbyte JNICALL Java_nsk_share_gc_lock_jni_ByteArrayCriticalLocker_criticalNative -(JNIEnv *env, jobject o, jlong enterTime, jlong sleepTime) { +(JNIEnv *jni_env, jobject o, jlong enterTime, jlong sleepTime) { + ExceptionCheckingJniEnvPtr env(jni_env); + jsize size, i; jbyteArray arr; jbyte *pa; @@ -43,22 +46,11 @@ JNIEXPORT jbyte JNICALL Java_nsk_share_gc_lock_jni_ByteArrayCriticalLocker_criti if (objFieldId == NULL) { jclass klass = env->GetObjectClass(o); - if (klass == NULL) { - printf("Error: GetObjectClass returned NULL\n"); - return 0; - } objFieldId = env->GetFieldID(klass, "obj", "Ljava/lang/Object;"); - if (objFieldId == NULL) { - printf("Error: GetFieldID returned NULL\n"); - return 0; - } } arr = (jbyteArray) env->GetObjectField(o, objFieldId); - if (arr == NULL) { - printf("Error: GetObjectField returned NULL\n"); - return 0; - } env->SetObjectField(o, objFieldId, NULL); + size = env->GetArrayLength(arr); start_time = time(NULL); enterTime /= 1000; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/CharArrayCriticalLocker.cpp b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/CharArrayCriticalLocker.cpp index 0ba7db227d9..51cf50fdcac 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/CharArrayCriticalLocker.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/CharArrayCriticalLocker.cpp @@ -23,6 +23,7 @@ #include #include #include +#include "ExceptionCheckingJniEnv.hpp" #include "jni_tools.h" extern "C" { @@ -35,7 +36,9 @@ static jfieldID objFieldId = NULL; * Signature: ([Z)Z */ JNIEXPORT jchar JNICALL Java_nsk_share_gc_lock_jni_CharArrayCriticalLocker_criticalNative -(JNIEnv *env, jobject o, jlong enterTime, jlong sleepTime) { +(JNIEnv *jni_env, jobject o, jlong enterTime, jlong sleepTime) { + ExceptionCheckingJniEnvPtr env(jni_env); + jsize size, i; jcharArray arr; jchar *pa; @@ -44,22 +47,11 @@ JNIEXPORT jchar JNICALL Java_nsk_share_gc_lock_jni_CharArrayCriticalLocker_criti if (objFieldId == NULL) { jclass klass = env->GetObjectClass(o); - if (klass == NULL) { - printf("Error: GetObjectClass returned NULL\n"); - return 0; - } objFieldId = env->GetFieldID(klass, "obj", "Ljava/lang/Object;"); - if (objFieldId == NULL) { - printf("Error: GetFieldID returned NULL\n"); - return 0; - } } arr = (jcharArray) env->GetObjectField(o, objFieldId); - if (arr == NULL) { - printf("Error: GetObjectField returned NULL\n"); - return JNI_FALSE; - } env->SetObjectField(o, objFieldId, NULL); + size = env->GetArrayLength(arr); start_time = time(NULL); current_time = 0; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/DoubleArrayCriticalLocker.cpp b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/DoubleArrayCriticalLocker.cpp index cced91b8032..043d859e181 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/DoubleArrayCriticalLocker.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/DoubleArrayCriticalLocker.cpp @@ -23,6 +23,7 @@ #include #include #include +#include "ExceptionCheckingJniEnv.hpp" #include "jni_tools.h" extern "C" { @@ -35,7 +36,9 @@ static jfieldID objFieldId = NULL; * Signature: ([Z)Z */ JNIEXPORT jdouble JNICALL Java_nsk_share_gc_lock_jni_DoubleArrayCriticalLocker_criticalNative -(JNIEnv *env, jobject o, jlong enterTime, jlong sleepTime) { +(JNIEnv *jni_env, jobject o, jlong enterTime, jlong sleepTime) { + ExceptionCheckingJniEnvPtr env(jni_env); + jsize size, i; jdoubleArray arr; jdouble *pa; @@ -44,22 +47,11 @@ JNIEXPORT jdouble JNICALL Java_nsk_share_gc_lock_jni_DoubleArrayCriticalLocker_c if (objFieldId == NULL) { jclass klass = env->GetObjectClass(o); - if (klass == NULL) { - printf("Error: GetObjectClass returned NULL\n"); - return 0; - } objFieldId = env->GetFieldID(klass, "obj", "Ljava/lang/Object;"); - if (objFieldId == NULL) { - printf("Error: GetFieldID returned NULL\n"); - return 0; - } } arr = (jdoubleArray) env->GetObjectField(o, objFieldId); - if (arr == NULL) { - printf("Error: GetObjectField returned NULL\n"); - return JNI_FALSE; - } env->SetObjectField(o, objFieldId, NULL); + size = env->GetArrayLength(arr); start_time = time(NULL); enterTime /= 1000; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/FloatArrayCriticalLocker.cpp b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/FloatArrayCriticalLocker.cpp index 036185c4088..6254a5d1984 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/FloatArrayCriticalLocker.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/FloatArrayCriticalLocker.cpp @@ -23,6 +23,7 @@ #include #include #include +#include "ExceptionCheckingJniEnv.hpp" #include "jni_tools.h" extern "C" { @@ -35,7 +36,9 @@ static jfieldID objFieldId = NULL; * Signature: ([Z)Z */ JNIEXPORT jfloat JNICALL Java_nsk_share_gc_lock_jni_FloatArrayCriticalLocker_criticalNative -(JNIEnv *env, jobject o, jlong enterTime, jlong sleepTime) { +(JNIEnv *jni_env, jobject o, jlong enterTime, jlong sleepTime) { + ExceptionCheckingJniEnvPtr env(jni_env); + jsize size, i; jfloatArray arr; jfloat *pa; @@ -44,22 +47,11 @@ JNIEXPORT jfloat JNICALL Java_nsk_share_gc_lock_jni_FloatArrayCriticalLocker_cri if (objFieldId == NULL) { jclass klass = env->GetObjectClass(o); - if (klass == NULL) { - printf("Error: GetObjectClass returned NULL\n"); - return 0; - } objFieldId = env->GetFieldID(klass, "obj", "Ljava/lang/Object;"); - if (objFieldId == NULL) { - printf("Error: GetFieldID returned NULL\n"); - return 0; - } } arr = (jfloatArray) env->GetObjectField(o, objFieldId); - if (arr == NULL) { - printf("Error: GetObjectField returned NULL\n"); - return JNI_FALSE; - } env->SetObjectField(o, objFieldId, NULL); + size = env->GetArrayLength(arr); start_time = time(NULL); enterTime /= 1000; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/IntArrayCriticalLocker.cpp b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/IntArrayCriticalLocker.cpp index 55d7501697c..f4b891af9ee 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/IntArrayCriticalLocker.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/IntArrayCriticalLocker.cpp @@ -23,6 +23,7 @@ #include #include #include +#include "ExceptionCheckingJniEnv.hpp" #include "jni_tools.h" extern "C" { @@ -35,7 +36,9 @@ static jfieldID objFieldId = NULL; * Signature: ([Z)Z */ JNIEXPORT jint JNICALL Java_nsk_share_gc_lock_jni_IntArrayCriticalLocker_criticalNative -(JNIEnv *env, jobject o, jlong enterTime, jlong sleepTime) { +(JNIEnv *jni_env, jobject o, jlong enterTime, jlong sleepTime) { + ExceptionCheckingJniEnvPtr env(jni_env); + jsize size, i; jintArray arr; jint *pa; @@ -44,22 +47,11 @@ JNIEXPORT jint JNICALL Java_nsk_share_gc_lock_jni_IntArrayCriticalLocker_critica if (objFieldId == NULL) { jclass klass = env->GetObjectClass(o); - if (klass == NULL) { - printf("Error: GetObjectClass returned NULL\n"); - return 0; - } objFieldId = env->GetFieldID(klass, "obj", "Ljava/lang/Object;"); - if (objFieldId == NULL) { - printf("Error: GetFieldID returned NULL\n"); - return 0; - } } arr = (jintArray) env->GetObjectField(o, objFieldId); - if (arr == NULL) { - printf("Error: GetObjectField returned NULL\n"); - return JNI_FALSE; - } env->SetObjectField(o, objFieldId, NULL); + size = env->GetArrayLength(arr); start_time = time(NULL); enterTime /= 1000; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/LongArrayCriticalLocker.cpp b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/LongArrayCriticalLocker.cpp index 6ca374e73c6..a35af071398 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/LongArrayCriticalLocker.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/LongArrayCriticalLocker.cpp @@ -23,6 +23,7 @@ #include #include #include +#include "ExceptionCheckingJniEnv.hpp" #include "jni_tools.h" extern "C" { @@ -35,7 +36,9 @@ static jfieldID objFieldId = NULL; * Signature: ([Z)Z */ JNIEXPORT jlong JNICALL Java_nsk_share_gc_lock_jni_LongArrayCriticalLocker_criticalNative -(JNIEnv *env, jobject o, jlong enterTime, jlong sleepTime) { +(JNIEnv *jni_env, jobject o, jlong enterTime, jlong sleepTime) { + ExceptionCheckingJniEnvPtr env(jni_env); + jsize size, i; jlongArray arr; jlong *pa; @@ -44,22 +47,11 @@ JNIEXPORT jlong JNICALL Java_nsk_share_gc_lock_jni_LongArrayCriticalLocker_criti if (objFieldId == NULL) { jclass klass = env->GetObjectClass(o); - if (klass == NULL) { - printf("Error: GetObjectClass returned NULL\n"); - return 0; - } objFieldId = env->GetFieldID(klass, "obj", "Ljava/lang/Object;"); - if (objFieldId == NULL) { - printf("Error: GetFieldID returned NULL\n"); - return 0; - } } arr = (jlongArray) env->GetObjectField(o, objFieldId); - if (arr == NULL) { - printf("Error: GetObjectField returned NULL\n"); - return JNI_FALSE; - } env->SetObjectField(o, objFieldId, NULL); + size = env->GetArrayLength(arr); start_time = time(NULL); enterTime /= 1000; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/ShortArrayCriticalLocker.cpp b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/ShortArrayCriticalLocker.cpp index 6346a15796b..8cac2a45f8b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/ShortArrayCriticalLocker.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/ShortArrayCriticalLocker.cpp @@ -23,6 +23,7 @@ #include #include #include +#include "ExceptionCheckingJniEnv.hpp" #include "jni_tools.h" extern "C" { @@ -35,7 +36,9 @@ static jfieldID objFieldId = NULL; * Signature: ([Z)Z */ JNIEXPORT jshort JNICALL Java_nsk_share_gc_lock_jni_ShortArrayCriticalLocker_criticalNative -(JNIEnv *env, jobject o, jlong enterTime, jlong sleepTime) { +(JNIEnv *jni_env, jobject o, jlong enterTime, jlong sleepTime) { + ExceptionCheckingJniEnvPtr env(jni_env); + jsize size, i; jshortArray arr; jshort *pa; @@ -44,22 +47,11 @@ JNIEXPORT jshort JNICALL Java_nsk_share_gc_lock_jni_ShortArrayCriticalLocker_cri if (objFieldId == NULL) { jclass klass = env->GetObjectClass(o); - if (klass == NULL) { - printf("Error: GetObjectClass returned NULL\n"); - return 0; - } objFieldId = env->GetFieldID(klass, "obj", "Ljava/lang/Object;"); - if (objFieldId == NULL) { - printf("Error: GetFieldID returned NULL\n"); - return 0; - } } arr = (jshortArray) env->GetObjectField(o, objFieldId); - if (arr == NULL) { - printf("Error: GetObjectField returned NULL\n"); - return JNI_FALSE; - } env->SetObjectField(o, objFieldId, NULL); + size = env->GetArrayLength(arr); start_time = time(NULL); enterTime /= 1000; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/StringCriticalLocker.cpp b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/StringCriticalLocker.cpp index 7912692714e..c37bebf44cd 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/StringCriticalLocker.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/StringCriticalLocker.cpp @@ -23,6 +23,7 @@ #include #include #include +#include "ExceptionCheckingJniEnv.hpp" #include "jni_tools.h" extern "C" { @@ -35,7 +36,9 @@ static jfieldID objFieldId = NULL; * Signature: ([Z)Z */ JNIEXPORT jchar JNICALL Java_nsk_share_gc_lock_jni_StringCriticalLocker_criticalNative -(JNIEnv *env, jobject o, jlong enterTime, jlong sleepTime) { +(JNIEnv *jni_env, jobject o, jlong enterTime, jlong sleepTime) { + ExceptionCheckingJniEnvPtr env(jni_env); + jsize size, i; jstring str; const jchar *pa; @@ -44,22 +47,11 @@ JNIEXPORT jchar JNICALL Java_nsk_share_gc_lock_jni_StringCriticalLocker_critical if (objFieldId == NULL) { jclass klass = env->GetObjectClass(o); - if (klass == NULL) { - printf("Error: GetObjectClass returned NULL\n"); - return JNI_FALSE; - } objFieldId = env->GetFieldID(klass, "obj", "Ljava/lang/Object;"); - if (objFieldId == NULL) { - printf("Error: GetFieldID returned NULL\n"); - return JNI_FALSE; - } } str = (jstring) env->GetObjectField(o, objFieldId); - if (str == NULL) { - printf("Error: GetObjectField returned NULL\n"); - return JNI_FALSE; - } env->SetObjectField(o, objFieldId, NULL); + size = env->GetStringLength(str); start_time = time(NULL); enterTime /= 1000; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/libBooleanArrayCriticalLocker.cpp b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/libBooleanArrayCriticalLocker.cpp index 76d22beac45..8a24440056f 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/libBooleanArrayCriticalLocker.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/libBooleanArrayCriticalLocker.cpp @@ -22,5 +22,6 @@ */ #include "BooleanArrayCriticalLocker.cpp" +#include "ExceptionCheckingJniEnv.cpp" #include "jni_tools.cpp" #include "nsk_tools.cpp" diff --git a/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/libByteArrayCriticalLocker.cpp b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/libByteArrayCriticalLocker.cpp index 8af310a3e90..3b9fbb88f8e 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/libByteArrayCriticalLocker.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/libByteArrayCriticalLocker.cpp @@ -22,5 +22,6 @@ */ #include "ByteArrayCriticalLocker.cpp" +#include "ExceptionCheckingJniEnv.cpp" #include "jni_tools.cpp" #include "nsk_tools.cpp" diff --git a/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/libCharArrayCriticalLocker.cpp b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/libCharArrayCriticalLocker.cpp index 9f38546e957..7dd8ce21cf9 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/libCharArrayCriticalLocker.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/libCharArrayCriticalLocker.cpp @@ -22,5 +22,6 @@ */ #include "CharArrayCriticalLocker.cpp" +#include "ExceptionCheckingJniEnv.cpp" #include "jni_tools.cpp" #include "nsk_tools.cpp" diff --git a/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/libDoubleArrayCriticalLocker.cpp b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/libDoubleArrayCriticalLocker.cpp index 9377164bccc..02ab98d4c84 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/libDoubleArrayCriticalLocker.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/libDoubleArrayCriticalLocker.cpp @@ -22,5 +22,6 @@ */ #include "DoubleArrayCriticalLocker.cpp" +#include "ExceptionCheckingJniEnv.cpp" #include "jni_tools.cpp" #include "nsk_tools.cpp" diff --git a/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/libFloatArrayCriticalLocker.cpp b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/libFloatArrayCriticalLocker.cpp index 0db5d1eeccd..e7fc5920b3b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/libFloatArrayCriticalLocker.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/libFloatArrayCriticalLocker.cpp @@ -21,6 +21,7 @@ * questions. */ +#include "ExceptionCheckingJniEnv.cpp" #include "FloatArrayCriticalLocker.cpp" #include "jni_tools.cpp" #include "nsk_tools.cpp" diff --git a/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/libIntArrayCriticalLocker.cpp b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/libIntArrayCriticalLocker.cpp index ac8f5049e67..4df0687cbc4 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/libIntArrayCriticalLocker.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/libIntArrayCriticalLocker.cpp @@ -21,6 +21,7 @@ * questions. */ +#include "ExceptionCheckingJniEnv.cpp" #include "IntArrayCriticalLocker.cpp" #include "jni_tools.cpp" #include "nsk_tools.cpp" diff --git a/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/libLongArrayCriticalLocker.cpp b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/libLongArrayCriticalLocker.cpp index e790517159d..c7a8c5b5087 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/libLongArrayCriticalLocker.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/libLongArrayCriticalLocker.cpp @@ -21,6 +21,7 @@ * questions. */ +#include "ExceptionCheckingJniEnv.cpp" #include "LongArrayCriticalLocker.cpp" #include "jni_tools.cpp" #include "nsk_tools.cpp" diff --git a/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/libShortArrayCriticalLocker.cpp b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/libShortArrayCriticalLocker.cpp index b17f0d1f6d1..541b11174a4 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/libShortArrayCriticalLocker.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/libShortArrayCriticalLocker.cpp @@ -21,6 +21,7 @@ * questions. */ +#include "ExceptionCheckingJniEnv.cpp" #include "ShortArrayCriticalLocker.cpp" #include "jni_tools.cpp" #include "nsk_tools.cpp" diff --git a/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/libStringCriticalLocker.cpp b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/libStringCriticalLocker.cpp index 80d120648b1..5cbea6e59c8 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/libStringCriticalLocker.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jni/libStringCriticalLocker.cpp @@ -21,6 +21,7 @@ * questions. */ +#include "ExceptionCheckingJniEnv.cpp" #include "StringCriticalLocker.cpp" #include "jni_tools.cpp" #include "nsk_tools.cpp" diff --git a/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jniref/JNIGlobalRefLocker.cpp b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jniref/JNIGlobalRefLocker.cpp index 8e7ab509c94..ead0f2139ed 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jniref/JNIGlobalRefLocker.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jniref/JNIGlobalRefLocker.cpp @@ -24,8 +24,8 @@ #include #include #include -#include "jni_tools.h" #include "ExceptionCheckingJniEnv.hpp" +#include "jni_tools.h" extern "C" { diff --git a/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jniref/JNILocalRefLocker.cpp b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jniref/JNILocalRefLocker.cpp index 85173d97bd1..9de1449fb77 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jniref/JNILocalRefLocker.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jniref/JNILocalRefLocker.cpp @@ -23,6 +23,7 @@ #include #include #include +#include "ExceptionCheckingJniEnv.hpp" #include "jni_tools.h" extern "C" { @@ -35,28 +36,18 @@ static jfieldID objFieldId = NULL; * Signature: (JJ)V */ JNIEXPORT void JNICALL Java_nsk_share_gc_lock_jniref_JNILocalRefLocker_criticalNative - (JNIEnv *env, jobject o, jlong enterTime, jlong sleepTime) { + (JNIEnv *jni_env, jobject o, jlong enterTime, jlong sleepTime) { + ExceptionCheckingJniEnvPtr env(jni_env); + jobject obj; jobject gref; time_t start_time, current_time; if (objFieldId == NULL) { jclass klass = env->GetObjectClass(o); - if (klass == NULL) { - printf("Error: GetObjectClass returned NULL\n"); - return; - } objFieldId = env->GetFieldID(klass, "obj", "Ljava/lang/Object;"); - if (objFieldId == NULL) { - printf("Error: GetFieldID returned NULL\n"); - return; - } } obj = env->GetObjectField(o, objFieldId); - if (obj == NULL) { - printf("Error: GetObjectField returned NULL\n"); - return; - } env->SetObjectField(o, objFieldId, NULL); start_time = time(NULL); enterTime /= 1000; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jniref/JNIRefLocker.cpp b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jniref/JNIRefLocker.cpp index 4ec63a5cffa..e0e483e4ba2 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jniref/JNIRefLocker.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jniref/JNIRefLocker.cpp @@ -23,6 +23,7 @@ #include #include #include +#include "ExceptionCheckingJniEnv.hpp" #include "jni_tools.h" extern "C" { @@ -35,29 +36,21 @@ static jfieldID objFieldId = NULL; * Signature: (JJ)V */ JNIEXPORT void JNICALL Java_nsk_share_gc_lock_jniref_JNIRefLocker_criticalNative - (JNIEnv *env, jobject o, jlong enterTime, jlong sleepTime) { + (JNIEnv *jni_env, jobject o, jlong enterTime, jlong sleepTime) { + ExceptionCheckingJniEnvPtr env(jni_env); + jobject obj; jobject gref, lref, gwref; time_t start_time, current_time; if (objFieldId == NULL) { jclass klass = env->GetObjectClass(o); - if (klass == NULL) { - printf("Error: GetObjectClass returned NULL\n"); - return; - } objFieldId = env->GetFieldID(klass, "obj", "Ljava/lang/Object;"); - if (objFieldId == NULL) { - printf("Error: GetFieldID returned NULL\n"); - return; - } } + obj = env->GetObjectField(o, objFieldId); - if (obj == NULL) { - printf("Error: GetObjectField returned NULL\n"); - return; - } env->SetObjectField(o, objFieldId, NULL); + start_time = time(NULL); enterTime /= 1000; current_time = 0; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jniref/JNIWeakGlobalRefLocker.cpp b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jniref/JNIWeakGlobalRefLocker.cpp index 5b2457c682a..ff6c66bc1da 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jniref/JNIWeakGlobalRefLocker.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jniref/JNIWeakGlobalRefLocker.cpp @@ -23,6 +23,7 @@ #include #include #include +#include "ExceptionCheckingJniEnv.hpp" #include "jni_tools.h" extern "C" { @@ -35,29 +36,20 @@ static jfieldID objFieldId = NULL; * Signature: (JJ)V */ JNIEXPORT void JNICALL Java_nsk_share_gc_lock_jniref_JNIWeakGlobalRefLocker_criticalNative - (JNIEnv *env, jobject o, jlong enterTime, jlong sleepTime) { + (JNIEnv *jni_env, jobject o, jlong enterTime, jlong sleepTime) { + ExceptionCheckingJniEnvPtr env(jni_env); + jobject obj; jobject gref; time_t start_time, current_time; if (objFieldId == NULL) { jclass klass = env->GetObjectClass(o); - if (klass == NULL) { - printf("Error: GetObjectClass returned NULL\n"); - return; - } objFieldId = env->GetFieldID(klass, "obj", "Ljava/lang/Object;"); - if (objFieldId == NULL) { - printf("Error: GetFieldID returned NULL\n"); - return; - } } obj = env->GetObjectField(o, objFieldId); - if (obj == NULL) { - printf("Error: GetObjectField returned NULL\n"); - return; - } env->SetObjectField(o, objFieldId, NULL); + start_time = time(NULL); enterTime /= 1000; current_time = 0; diff --git a/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jniref/libJNIGlobalRefLocker.cpp b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jniref/libJNIGlobalRefLocker.cpp index 2e02b2d395a..dc1b88320eb 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jniref/libJNIGlobalRefLocker.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jniref/libJNIGlobalRefLocker.cpp @@ -21,7 +21,7 @@ * questions. */ +#include "ExceptionCheckingJniEnv.cpp" #include "JNIGlobalRefLocker.cpp" #include "jni_tools.cpp" #include "nsk_tools.cpp" -#include "ExceptionCheckingJniEnv.cpp" diff --git a/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jniref/libJNILocalRefLocker.cpp b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jniref/libJNILocalRefLocker.cpp index 615e25924d4..c10eabbf67b 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jniref/libJNILocalRefLocker.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jniref/libJNILocalRefLocker.cpp @@ -21,6 +21,7 @@ * questions. */ +#include "ExceptionCheckingJniEnv.cpp" #include "JNILocalRefLocker.cpp" #include "jni_tools.cpp" #include "nsk_tools.cpp" diff --git a/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jniref/libJNIRefLocker.cpp b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jniref/libJNIRefLocker.cpp index 9856147ca28..b6f02e2c892 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jniref/libJNIRefLocker.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jniref/libJNIRefLocker.cpp @@ -21,6 +21,7 @@ * questions. */ +#include "ExceptionCheckingJniEnv.cpp" #include "JNIRefLocker.cpp" #include "jni_tools.cpp" #include "nsk_tools.cpp" diff --git a/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jniref/libJNIWeakGlobalRefLocker.cpp b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jniref/libJNIWeakGlobalRefLocker.cpp index 7cc53e8b2ec..a0318dd07da 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jniref/libJNIWeakGlobalRefLocker.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/share/gc/lock/jniref/libJNIWeakGlobalRefLocker.cpp @@ -21,6 +21,7 @@ * questions. */ +#include "ExceptionCheckingJniEnv.cpp" #include "JNIWeakGlobalRefLocker.cpp" #include "jni_tools.cpp" #include "nsk_tools.cpp" diff --git a/test/hotspot/jtreg/vmTestbase/nsk/share/jni/ExceptionCheckingJniEnv.cpp b/test/hotspot/jtreg/vmTestbase/nsk/share/jni/ExceptionCheckingJniEnv.cpp index 87a752d4f5e..8b37274eb8f 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/share/jni/ExceptionCheckingJniEnv.cpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/share/jni/ExceptionCheckingJniEnv.cpp @@ -22,6 +22,8 @@ * questions. */ +#include + #include "ExceptionCheckingJniEnv.hpp" namespace { @@ -86,7 +88,7 @@ jclass ExceptionCheckingJniEnv::GetObjectClass(jobject obj) { } jfieldID ExceptionCheckingJniEnv::GetFieldID(jclass klass, const char *name, const char* type) { - JNIVerifier marker(this, "GetObjectClass"); + JNIVerifier marker(this, "GetFieldID"); return marker.ResultNotNull(_jni_env->GetFieldID(klass, name, type)); } @@ -101,7 +103,7 @@ void ExceptionCheckingJniEnv::SetObjectField(jobject obj, jfieldID field, jobjec } jobject ExceptionCheckingJniEnv::NewGlobalRef(jobject obj) { - JNIVerifier marker(this, "GetObjectField"); + JNIVerifier marker(this, "NewGlobalRef"); return marker.ResultNotNull(_jni_env->NewGlobalRef(obj)); } @@ -109,3 +111,53 @@ void ExceptionCheckingJniEnv::DeleteGlobalRef(jobject obj) { JNIVerifier<> marker(this, "DeleteGlobalRef"); _jni_env->DeleteGlobalRef(obj); } + +jobject ExceptionCheckingJniEnv::NewLocalRef(jobject obj) { + JNIVerifier marker(this, "NewLocalRef"); + return marker.ResultNotNull(_jni_env->NewLocalRef(obj)); +} + +void ExceptionCheckingJniEnv::DeleteLocalRef(jobject obj) { + JNIVerifier<> marker(this, "DeleteLocalRef"); + _jni_env->DeleteLocalRef(obj); +} + +jweak ExceptionCheckingJniEnv::NewWeakGlobalRef(jobject obj) { + JNIVerifier marker(this, "NewWeakGlobalRef"); + return marker.ResultNotNull(_jni_env->NewWeakGlobalRef(obj)); +} + +void ExceptionCheckingJniEnv::DeleteWeakGlobalRef(jweak weak_ref) { + JNIVerifier<> marker(this, "DeleteWeakGlobalRef"); + _jni_env->DeleteWeakGlobalRef(weak_ref); +} + +jsize ExceptionCheckingJniEnv::GetArrayLength(jarray array) { + JNIVerifier<> marker(this, "GetArrayLength"); + return _jni_env->GetArrayLength(array); +} + +jsize ExceptionCheckingJniEnv::GetStringLength(jstring str) { + JNIVerifier<> marker(this, "GetStringLength"); + return _jni_env->GetStringLength(str); +} + +void* ExceptionCheckingJniEnv::GetPrimitiveArrayCritical(jarray array, jboolean* isCopy) { + JNIVerifier<> marker(this, "GetPrimitiveArrayCritical"); + return marker.ResultNotNull(_jni_env->GetPrimitiveArrayCritical(array, isCopy)); +} + +void ExceptionCheckingJniEnv::ReleasePrimitiveArrayCritical(jarray array, void* carray, jint mode) { + JNIVerifier<> marker(this, "ReleasePrimitiveArrayCritical"); + _jni_env->ReleasePrimitiveArrayCritical(array, carray, mode); +} + +const jchar* ExceptionCheckingJniEnv::GetStringCritical(jstring str, jboolean* isCopy) { + JNIVerifier marker(this, "GetPrimitiveArrayCritical"); + return marker.ResultNotNull(_jni_env->GetStringCritical(str, isCopy)); +} + +void ExceptionCheckingJniEnv::ReleaseStringCritical(jstring str, const jchar* carray) { + JNIVerifier<> marker(this, "ReleaseStringCritical"); + _jni_env->ReleaseStringCritical(str, carray); +} diff --git a/test/hotspot/jtreg/vmTestbase/nsk/share/jni/ExceptionCheckingJniEnv.hpp b/test/hotspot/jtreg/vmTestbase/nsk/share/jni/ExceptionCheckingJniEnv.hpp index 5345ce7d419..14bdf14126a 100644 --- a/test/hotspot/jtreg/vmTestbase/nsk/share/jni/ExceptionCheckingJniEnv.hpp +++ b/test/hotspot/jtreg/vmTestbase/nsk/share/jni/ExceptionCheckingJniEnv.hpp @@ -66,8 +66,20 @@ class ExceptionCheckingJniEnv { jobject GetObjectField(jobject obj, jfieldID field); void SetObjectField(jobject obj, jfieldID field, jobject value); + jsize GetArrayLength(jarray array); + jsize GetStringLength(jstring str); + + void* GetPrimitiveArrayCritical(jarray array, jboolean* isCopy); + void ReleasePrimitiveArrayCritical(jarray array, void* carray, jint mode); + const jchar* GetStringCritical(jstring str, jboolean* isCopy); + void ReleaseStringCritical(jstring str, const jchar* carray); + jobject NewGlobalRef(jobject obj); void DeleteGlobalRef(jobject obj); + jobject NewLocalRef(jobject ref); + void DeleteLocalRef(jobject ref); + jweak NewWeakGlobalRef(jobject obj); + void DeleteWeakGlobalRef(jweak obj); // ExceptionCheckingJniEnv methods. JNIEnv* GetJNIEnv() { From ffc26adbea513c71baf2c308a36313973cf3d069 Mon Sep 17 00:00:00 2001 From: David Holmes Date: Mon, 15 Oct 2018 21:02:17 -0400 Subject: [PATCH 122/124] 8048215: [TESTBUG] java/lang/management/ManagementFactory/ThreadMXBeanProxy.java Expected non-null LockInfo Ensure the target thread has reached wait() before inspecting it Reviewed-by: mchung, dfuchs, jcbeyler --- .../ManagementFactory/ThreadMXBeanProxy.java | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/test/jdk/java/lang/management/ManagementFactory/ThreadMXBeanProxy.java b/test/jdk/java/lang/management/ManagementFactory/ThreadMXBeanProxy.java index 3d46963be39..a39ba94ff9a 100644 --- a/test/jdk/java/lang/management/ManagementFactory/ThreadMXBeanProxy.java +++ b/test/jdk/java/lang/management/ManagementFactory/ThreadMXBeanProxy.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2018, 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 @@ -23,7 +23,7 @@ /* * @test - * @bug 5086470 6358247 7193302 + * @bug 5086470 6358247 7193302 8048215 * @summary Test type conversion when invoking ThreadMXBean.dumpAllThreads * through proxy. * @author Mandy Chung @@ -45,6 +45,7 @@ public class ThreadMXBeanProxy { private static ThreadMXBean mbean; static Mutex mutex = new Mutex(); static Object lock = new Object(); + static Object waiter = new Object(); static MyThread thread = new MyThread(); public static void main(String[] argv) throws Exception { mbean = newPlatformMXBeanProxy(server, @@ -68,6 +69,12 @@ public class ThreadMXBeanProxy { } } + // 'thread' holds the mutex, which means it must also have the monitor of + // 'waiter' at least until it does the wait(). So we acquire the monitor of + // 'waiter' here, which ensures that 'thread' must be in wait() + synchronized(waiter) { + } + long[] ids = new long[] { thread.getId() }; // validate the local access @@ -108,11 +115,10 @@ public class ThreadMXBeanProxy { } public void run() { synchronized (lock) { - mutex.lock(); - Object o = new Object(); - synchronized(o) { + synchronized(waiter) { + mutex.lock(); try { - o.wait(); + waiter.wait(); } catch (InterruptedException e) { throw new RuntimeException(e); } From 2a105069423ca7bcd82e8e8453be1f7686616008 Mon Sep 17 00:00:00 2001 From: Viktor Dukhovni Date: Tue, 16 Oct 2018 09:19:32 +0800 Subject: [PATCH 123/124] 8212165: JGSS: Fix cut/paste error in NativeUtil.c Reviewed-by: alanb, weijun --- src/java.security.jgss/share/native/libj2gss/NativeUtil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/java.security.jgss/share/native/libj2gss/NativeUtil.c b/src/java.security.jgss/share/native/libj2gss/NativeUtil.c index 8e40177babf..3fba9fcdbfa 100644 --- a/src/java.security.jgss/share/native/libj2gss/NativeUtil.c +++ b/src/java.security.jgss/share/native/libj2gss/NativeUtil.c @@ -145,7 +145,7 @@ DEF_JNI_OnLoad(JavaVM *jvm, void *reserved) { return JNI_ERR; } CLS_GSSNameElement = (*env)->NewGlobalRef(env, cls); - if (CLS_GSSException == NULL) { + if (CLS_GSSNameElement == NULL) { return JNI_ERR; } cls = (*env)->FindClass(env, "sun/security/jgss/wrapper/GSSCredElement"); From f507e3c9d1a30cc6d89c8ac47b8bf605d8d203f6 Mon Sep 17 00:00:00 2001 From: John Jiang Date: Tue, 16 Oct 2018 10:16:04 +0800 Subject: [PATCH 124/124] 8211971: Move security/cacerts/VerifyCACerts.java and security/CheckBlacklistedCerts.java Move lib/security tests to sun/security/lib Reviewed-by: weijun --- .../security => sun/security/lib}/CheckBlacklistedCerts.java | 2 +- .../security => sun/security/lib}/cacerts/VerifyCACerts.java | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename test/jdk/{lib/security => sun/security/lib}/CheckBlacklistedCerts.java (97%) rename test/jdk/{lib/security => sun/security/lib}/cacerts/VerifyCACerts.java (100%) diff --git a/test/jdk/lib/security/CheckBlacklistedCerts.java b/test/jdk/sun/security/lib/CheckBlacklistedCerts.java similarity index 97% rename from test/jdk/lib/security/CheckBlacklistedCerts.java rename to test/jdk/sun/security/lib/CheckBlacklistedCerts.java index ef3cfb4d6ce..15f89cfa5ff 100644 --- a/test/jdk/lib/security/CheckBlacklistedCerts.java +++ b/test/jdk/sun/security/lib/CheckBlacklistedCerts.java @@ -61,7 +61,7 @@ public class CheckBlacklistedCerts { // Assumes the full src is available File blacklist = new File(System.getProperty("test.src"), - "../../../../make/data/blacklistedcertsconverter/blacklisted.certs.pem"); + "../../../../../make/data/blacklistedcertsconverter/blacklisted.certs.pem"); CertificateFactory cf = CertificateFactory.getInstance("X.509"); try (FileInputStream fis = new FileInputStream(blacklist)) { diff --git a/test/jdk/lib/security/cacerts/VerifyCACerts.java b/test/jdk/sun/security/lib/cacerts/VerifyCACerts.java similarity index 100% rename from test/jdk/lib/security/cacerts/VerifyCACerts.java rename to test/jdk/sun/security/lib/cacerts/VerifyCACerts.java