diff --git a/.github/workflows/submit.yml b/.github/workflows/submit.yml index 7cfaf37d336..25e90e9d45d 100644 --- a/.github/workflows/submit.yml +++ b/.github/workflows/submit.yml @@ -172,7 +172,7 @@ jobs: - name: Install dependencies run: | sudo apt-get update - sudo apt-get install gcc-10=10.2.0-5ubuntu1~20.04 g++-10=10.2.0-5ubuntu1~20.04 libxrandr-dev libxtst-dev libcups2-dev libasound2-dev + sudo apt-get install gcc-10=10.3.0-1ubuntu1~20.04 g++-10=10.3.0-1ubuntu1~20.04 libxrandr-dev libxtst-dev libcups2-dev libasound2-dev sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10 - name: Configure @@ -487,12 +487,12 @@ jobs: - name: Install native host dependencies run: | - sudo apt-get install gcc-10=10.2.0-5ubuntu1~20.04 g++-10=10.2.0-5ubuntu1~20.04 libxrandr-dev libxtst-dev libcups2-dev libasound2-dev + sudo apt-get install gcc-10=10.3.0-1ubuntu1~20.04 g++-10=10.3.0-1ubuntu1~20.04 libxrandr-dev libxtst-dev libcups2-dev libasound2-dev sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10 if: matrix.debian-arch == '' - name: Install cross-compilation host dependencies - run: sudo apt-get install gcc-10-${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-flavor}}=10.2.0-5ubuntu1~20.04cross1 g++-10-${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-flavor}}=10.2.0-5ubuntu1~20.04cross1 + run: sudo apt-get install gcc-10-${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-flavor}}=10.3.0-1ubuntu1~20.04cross1 g++-10-${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-flavor}}=10.3.0-1ubuntu1~20.04cross1 if: matrix.debian-arch != '' - name: Cache sysroot diff --git a/src/hotspot/cpu/x86/stubGenerator_x86_64.cpp b/src/hotspot/cpu/x86/stubGenerator_x86_64.cpp index 5037ef19b0a..9a42a94cba3 100644 --- a/src/hotspot/cpu/x86/stubGenerator_x86_64.cpp +++ b/src/hotspot/cpu/x86/stubGenerator_x86_64.cpp @@ -39,6 +39,7 @@ #include "oops/objArrayKlass.hpp" #include "oops/oop.inline.hpp" #include "prims/methodHandles.hpp" +#include "runtime/arguments.hpp" #include "runtime/frame.inline.hpp" #include "runtime/handles.inline.hpp" #include "runtime/sharedRuntime.hpp" @@ -7657,7 +7658,10 @@ address generate_avx_ghash_processBlocks() { // Get svml stub routine addresses void *libsvml = NULL; char ebuf[1024]; - libsvml = os::dll_load(JNI_LIB_PREFIX "svml" JNI_LIB_SUFFIX, ebuf, sizeof ebuf); + char dll_name[JVM_MAXPATHLEN]; + if (os::dll_locate_lib(dll_name, sizeof(dll_name), Arguments::get_dll_dir(), "svml")) { + libsvml = os::dll_load(dll_name, ebuf, sizeof ebuf); + } if (libsvml != NULL) { // SVML method naming convention // All the methods are named as __svml_op_ha_ diff --git a/src/hotspot/cpu/x86/x86.ad b/src/hotspot/cpu/x86/x86.ad index a9971e1c4a1..5313d892b22 100644 --- a/src/hotspot/cpu/x86/x86.ad +++ b/src/hotspot/cpu/x86/x86.ad @@ -8062,7 +8062,7 @@ instruct vpternlog(vec dst, vec src2, vec src3, immU8 func) %{ %} instruct vpternlog_mem(vec dst, vec src2, memory src3, immU8 func) %{ - predicate(vector_length_in_bytes(n->in(1)) > 8); + predicate(vector_length_in_bytes(n->in(1)->in(1)) > 8); match(Set dst (MacroLogicV (Binary dst src2) (Binary (LoadVector src3) func))); effect(TEMP dst); format %{ "vpternlogd $dst,$src2,$src3,$func\t! vector ternary logic" %} diff --git a/src/hotspot/share/gc/z/c2/zBarrierSetC2.cpp b/src/hotspot/share/gc/z/c2/zBarrierSetC2.cpp index 86ed4ae2e8d..918bdbc27a1 100644 --- a/src/hotspot/share/gc/z/c2/zBarrierSetC2.cpp +++ b/src/hotspot/share/gc/z/c2/zBarrierSetC2.cpp @@ -194,11 +194,21 @@ int ZBarrierSetC2::estimate_stub_size() const { static void set_barrier_data(C2Access& access) { if (ZBarrierSet::barrier_needed(access.decorators(), access.type())) { - if (access.decorators() & ON_WEAK_OOP_REF) { - access.set_barrier_data(ZLoadBarrierWeak); + uint8_t barrier_data = 0; + + if (access.decorators() & ON_PHANTOM_OOP_REF) { + barrier_data |= ZLoadBarrierPhantom; + } else if (access.decorators() & ON_WEAK_OOP_REF) { + barrier_data |= ZLoadBarrierWeak; } else { - access.set_barrier_data(ZLoadBarrierStrong); + barrier_data |= ZLoadBarrierStrong; } + + if (access.decorators() & AS_NO_KEEPALIVE) { + barrier_data |= ZLoadBarrierNoKeepalive; + } + + access.set_barrier_data(barrier_data); } } diff --git a/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceIdKlassQueue.cpp b/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceIdKlassQueue.cpp index 9b198198617..7344e2aa6b4 100644 --- a/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceIdKlassQueue.cpp +++ b/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceIdKlassQueue.cpp @@ -67,7 +67,7 @@ static const size_t ELEMENT_SIZE = sizeof(JfrEpochQueueKlassElement); static const size_t NARROW_ELEMENT_SIZE = sizeof(JfrEpochQueueNarrowKlassElement); static const size_t THRESHOLD_SHIFT = 30; -// If the upshifted traceid value is less than this threshold (1 073 741 824), +// If the traceid value is less than this threshold (1 073 741 824), // compress the element for more effective queue storage. static const traceid uncompressed_threshold = ((traceid)1) << THRESHOLD_SHIFT; @@ -121,30 +121,36 @@ static traceid read_element(const u1* pos, const Klass** klass, bool compressed) return compressed ? read_compressed_element(pos, klass) : read_uncompressed_element(pos, klass); } +template +static inline void store_traceid(T* element, traceid id, bool uncompressed) { +#ifdef VM_LITTLE_ENDIAN + id <<= METADATA_SHIFT; +#endif + element->id = uncompressed ? id | UNCOMPRESSED : id; +} + static void store_compressed_element(traceid id, const Klass* klass, u1* pos) { + assert(can_compress_element(id), "invariant"); JfrEpochQueueNarrowKlassElement* const element = new (pos) JfrEpochQueueNarrowKlassElement(); - element->id = id; + store_traceid(element, id, false); element->compressed_klass = encode(klass); } static void store_uncompressed_element(traceid id, const Klass* klass, u1* pos) { JfrEpochQueueKlassElement* const element = new (pos) JfrEpochQueueKlassElement(); - element->id = id | UNCOMPRESSED; + store_traceid(element, id, true); element->klass = klass; } static void store_element(const Klass* klass, u1* pos) { assert(pos != NULL, "invariant"); assert(klass != NULL, "invariant"); - traceid id = JfrTraceId::load_raw(klass); -#ifdef VM_LITTLE_ENDIAN - id <<= METADATA_SHIFT; -#endif + const traceid id = JfrTraceId::load_raw(klass); if (can_compress_element(id)) { store_compressed_element(id, klass, pos); - } else { - store_uncompressed_element(id, klass, pos); + return; } + store_uncompressed_element(id, klass, pos); } static void set_unloaded(const u1* pos) { diff --git a/src/hotspot/share/jfr/utilities/jfrEpochQueue.inline.hpp b/src/hotspot/share/jfr/utilities/jfrEpochQueue.inline.hpp index 454934a83cd..fffeeafb8a5 100644 --- a/src/hotspot/share/jfr/utilities/jfrEpochQueue.inline.hpp +++ b/src/hotspot/share/jfr/utilities/jfrEpochQueue.inline.hpp @@ -68,7 +68,7 @@ JfrEpochQueue::storage_for_element(JfrEpochQueue:: template