Skip to content

Commit

Permalink
Merge branch 'master' into DS-SM-8344217
Browse files Browse the repository at this point in the history
  • Loading branch information
dfuch committed Nov 22, 2024
2 parents 668e0f9 + a07b72b commit c9a7336
Show file tree
Hide file tree
Showing 148 changed files with 1,447 additions and 3,853 deletions.
12 changes: 0 additions & 12 deletions make/modules/java.desktop/Java.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,6 @@ EXCLUDE_FILES += \
javax/swing/plaf/nimbus/SpinnerPainter.java \
javax/swing/plaf/nimbus/SplitPanePainter.java \
javax/swing/plaf/nimbus/TabbedPanePainter.java \
sun/awt/resources/security-icon-bw16.png \
sun/awt/resources/security-icon-bw24.png \
sun/awt/resources/security-icon-bw32.png \
sun/awt/resources/security-icon-bw48.png \
sun/awt/resources/security-icon-interim16.png \
sun/awt/resources/security-icon-interim24.png \
sun/awt/resources/security-icon-interim32.png \
sun/awt/resources/security-icon-interim48.png \
sun/awt/resources/security-icon-yellow16.png \
sun/awt/resources/security-icon-yellow24.png \
sun/awt/resources/security-icon-yellow32.png \
sun/awt/resources/security-icon-yellow48.png \
sun/awt/X11/java-icon16.png \
sun/awt/X11/java-icon24.png \
sun/awt/X11/java-icon32.png \
Expand Down
17 changes: 0 additions & 17 deletions make/modules/java.desktop/gensrc/GensrcIcons.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -37,23 +37,6 @@ GENSRC_AWT_ICONS_SRC += \
$(X11_ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon32.png \
$(X11_ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon48.png


AWT_ICONPATH := $(MODULE_SRC)/share/classes/sun/awt/resources

GENSRC_AWT_ICONS_SRC += \
$(AWT_ICONPATH)/security-icon-bw16.png \
$(AWT_ICONPATH)/security-icon-interim16.png \
$(AWT_ICONPATH)/security-icon-yellow16.png \
$(AWT_ICONPATH)/security-icon-bw24.png \
$(AWT_ICONPATH)/security-icon-interim24.png \
$(AWT_ICONPATH)/security-icon-yellow24.png \
$(AWT_ICONPATH)/security-icon-bw32.png \
$(AWT_ICONPATH)/security-icon-interim32.png \
$(AWT_ICONPATH)/security-icon-yellow32.png \
$(AWT_ICONPATH)/security-icon-bw48.png \
$(AWT_ICONPATH)/security-icon-interim48.png \
$(AWT_ICONPATH)/security-icon-yellow48.png

GENSRC_AWT_ICONS_FILES := $(notdir $(GENSRC_AWT_ICONS_SRC))

GENSRC_AWT_ICONS_SHORT_NAME = $(subst .,_,$(subst -,_,$(1)))
Expand Down
8 changes: 1 addition & 7 deletions src/demo/share/jfc/Font2DTest/FontPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -1114,13 +1114,7 @@ public void showZoomed() {
/// Position and set size of zoom window as needed
zoomWindow.setLocation( canvasLoc.x + zoomAreaX, canvasLoc.y + zoomAreaY );
if ( !nowZooming ) {
if ( zoomWindow.getWarningString() != null )
/// If this is not opened as a "secure" window,
/// it has a banner below the zoom dialog which makes it look really BAD
/// So enlarge it by a bit
zoomWindow.setSize( zoomAreaWidth + 1, zoomAreaHeight + 20 );
else
zoomWindow.setSize( zoomAreaWidth + 1, zoomAreaHeight + 1 );
zoomWindow.setSize( zoomAreaWidth + 1, zoomAreaHeight + 1 );
}

/// Prepare zoomed image
Expand Down
28 changes: 28 additions & 0 deletions src/hotspot/cpu/x86/x86.ad
Original file line number Diff line number Diff line change
Expand Up @@ -6179,6 +6179,7 @@ instruct evmulL_reg(vec dst, vec src1, vec src2) %{
VM_Version::supports_avx512dq()) ||
VM_Version::supports_avx512vldq());
match(Set dst (MulVL src1 src2));
ins_cost(500);
format %{ "evpmullq $dst,$src1,$src2\t! mul packedL" %}
ins_encode %{
assert(UseAVX > 2, "required");
Expand All @@ -6195,6 +6196,7 @@ instruct evmulL_mem(vec dst, vec src, memory mem) %{
VM_Version::supports_avx512vldq()));
match(Set dst (MulVL src (LoadVector mem)));
format %{ "evpmullq $dst,$src,$mem\t! mul packedL" %}
ins_cost(500);
ins_encode %{
assert(UseAVX > 2, "required");
int vlen_enc = vector_length_encoding(this);
Expand All @@ -6206,6 +6208,7 @@ instruct evmulL_mem(vec dst, vec src, memory mem) %{
instruct vmulL(vec dst, vec src1, vec src2, vec xtmp) %{
predicate(UseAVX == 0);
match(Set dst (MulVL src1 src2));
ins_cost(500);
effect(TEMP dst, TEMP xtmp);
format %{ "mulVL $dst, $src1, $src2\t! using $xtmp as TEMP" %}
ins_encode %{
Expand All @@ -6232,6 +6235,7 @@ instruct vmulL_reg(vec dst, vec src1, vec src2, vec xtmp1, vec xtmp2) %{
!VM_Version::supports_avx512vldq())));
match(Set dst (MulVL src1 src2));
effect(TEMP xtmp1, TEMP xtmp2);
ins_cost(500);
format %{ "vmulVL $dst, $src1, $src2\t! using $xtmp1, $xtmp2 as TEMP" %}
ins_encode %{
int vlen_enc = vector_length_encoding(this);
Expand All @@ -6248,6 +6252,30 @@ instruct vmulL_reg(vec dst, vec src1, vec src2, vec xtmp1, vec xtmp2) %{
ins_pipe( pipe_slow );
%}

instruct vmuludq_reg(vec dst, vec src1, vec src2) %{
predicate(UseAVX > 0 && n->as_MulVL()->has_uint_inputs());
match(Set dst (MulVL src1 src2));
ins_cost(100);
format %{ "vpmuludq $dst,$src1,$src2\t! muludq packedL" %}
ins_encode %{
int vlen_enc = vector_length_encoding(this);
__ vpmuludq($dst$$XMMRegister, $src1$$XMMRegister, $src2$$XMMRegister, vlen_enc);
%}
ins_pipe( pipe_slow );
%}

instruct vmuldq_reg(vec dst, vec src1, vec src2) %{
predicate(UseAVX > 0 && n->as_MulVL()->has_int_inputs());
match(Set dst (MulVL src1 src2));
ins_cost(100);
format %{ "vpmuldq $dst,$src1,$src2\t! muldq packedL" %}
ins_encode %{
int vlen_enc = vector_length_encoding(this);
__ vpmuldq($dst$$XMMRegister, $src1$$XMMRegister, $src2$$XMMRegister, vlen_enc);
%}
ins_pipe( pipe_slow );
%}

// Floats vector mul
instruct vmulF(vec dst, vec src) %{
predicate(UseAVX == 0);
Expand Down
28 changes: 14 additions & 14 deletions src/hotspot/share/gc/shenandoah/shenandoahPhaseTimings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,33 +185,33 @@ void ShenandoahPhaseTimings::flush_par_workers_to_cycle() {
for (uint pi = 0; pi < _num_phases; pi++) {
Phase phase = Phase(pi);
if (is_worker_phase(phase)) {
double s = uninitialized();
double sum = uninitialized();
for (uint i = 1; i < _num_par_phases; i++) {
ShenandoahWorkerData* wd = worker_data(phase, ParPhase(i));
double ws = uninitialized();
double worker_sum = uninitialized();
for (uint c = 0; c < _max_workers; c++) {
double v = wd->get(c);
if (v != ShenandoahWorkerData::uninitialized()) {
if (ws == uninitialized()) {
ws = v;
double worker_time = wd->get(c);
if (worker_time != ShenandoahWorkerData::uninitialized()) {
if (worker_sum == uninitialized()) {
worker_sum = worker_time;
} else {
ws += v;
worker_sum += worker_time;
}
}
}
if (ws != uninitialized()) {
if (worker_sum != uninitialized()) {
// add to each line in phase
set_cycle_data(Phase(phase + i + 1), ws);
if (s == uninitialized()) {
s = ws;
set_cycle_data(Phase(phase + i + 1), worker_sum);
if (sum == uninitialized()) {
sum = worker_sum;
} else {
s += ws;
sum += worker_sum;
}
}
}
if (s != uninitialized()) {
if (sum != uninitialized()) {
// add to total for phase
set_cycle_data(Phase(phase + 1), s);
set_cycle_data(Phase(phase + 1), sum);
}
}
}
Expand Down
14 changes: 5 additions & 9 deletions src/hotspot/share/nmt/memoryFileTracker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,15 +179,11 @@ const GrowableArrayCHeap<MemoryFileTracker::MemoryFile*, mtNMT>& MemoryFileTrack
};

void MemoryFileTracker::summary_snapshot(VirtualMemorySnapshot* snapshot) const {
for (int d = 0; d < _files.length(); d++) {
const MemoryFile* file = _files.at(d);
for (int i = 0; i < mt_number_of_tags; i++) {
VirtualMemory* snap = snapshot->by_type(NMTUtil::index_to_tag(i));
const VirtualMemory* current = file->_summary.by_type(NMTUtil::index_to_tag(i));
// Only account the committed memory.
snap->commit_memory(current->committed());
}
}
iterate_summary([&](MemTag tag, const VirtualMemory* current) {
VirtualMemory* snap = snapshot->by_type(tag);
// Only account the committed memory.
snap->commit_memory(current->committed());
});
}

void MemoryFileTracker::Instance::summary_snapshot(VirtualMemorySnapshot* snapshot) {
Expand Down
17 changes: 17 additions & 0 deletions src/hotspot/share/nmt/memoryFileTracker.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
// The MemoryFileTracker tracks memory of 'memory files',
// storage with its own memory space separate from the process.
// A typical example of such a file is a memory mapped file.
// All memory is accounted as committed, there is no reserved memory.
// Any reserved memory is expected to exist in the VirtualMemoryTracker.
class MemoryFileTracker {
friend class NMTMemoryFileTrackerTest;

Expand Down Expand Up @@ -72,6 +74,16 @@ class MemoryFileTracker {
MemoryFile* make_file(const char* descriptive_name);
void free_file(MemoryFile* file);

template<typename F>
void iterate_summary(F f) const {
for (int d = 0; d < _files.length(); d++) {
const MemoryFile* file = _files.at(d);
for (int i = 0; i < mt_number_of_tags; i++) {
f(NMTUtil::index_to_tag(i), file->_summary.by_type(NMTUtil::index_to_tag(i)));
}
}
}

void summary_snapshot(VirtualMemorySnapshot* snapshot) const;

// Print detailed report of file
Expand Down Expand Up @@ -99,6 +111,11 @@ class MemoryFileTracker {
const NativeCallStack& stack, MemTag mem_tag);
static void free_memory(MemoryFile* device, size_t offset, size_t size);

template<typename F>
static void iterate_summary(F f) {
_tracker->iterate_summary(f);
};

static void summary_snapshot(VirtualMemorySnapshot* snapshot);

static void print_report_on(const MemoryFile* device, outputStream* stream, size_t scale);
Expand Down
11 changes: 11 additions & 0 deletions src/hotspot/share/nmt/nmtUsage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

#include "precompiled.hpp"
#include "nmt/mallocTracker.hpp"
#include "nmt/memoryFileTracker.hpp"
#include "nmt/nmtCommon.hpp"
#include "nmt/nmtUsage.hpp"
#include "nmt/threadStackTracker.hpp"
Expand Down Expand Up @@ -90,6 +91,16 @@ void NMTUsage::update_vm_usage() {
_vm_total.reserved += vm->reserved();
_vm_total.committed += vm->committed();
}

{ // MemoryFileTracker addition
using MFT = MemoryFileTracker::Instance;
MFT::Locker lock;
MFT::iterate_summary([&](MemTag tag, const VirtualMemory* vm) {
int i = NMTUtil::tag_to_index(tag);
_vm_by_type[i].committed += vm->committed();
_vm_total.committed += vm->committed();
});
}
}

void NMTUsage::refresh() {
Expand Down
1 change: 1 addition & 0 deletions src/hotspot/share/nmt/nmtUsage.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#define SHARE_NMT_NMTUSAGE_HPP

#include "memory/allocation.hpp"
#include "nmt/memTag.hpp"
#include "utilities/globalDefinitions.hpp"

struct NMTUsagePair {
Expand Down
12 changes: 9 additions & 3 deletions src/hotspot/share/oops/cpCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -829,9 +829,15 @@ oop ConstantPoolCache::appendix_if_resolved(ResolvedMethodEntry* method_entry) c
void ConstantPoolCache::print_on(outputStream* st) const {
st->print_cr("%s", internal_name());
// print constant pool cache entries
print_resolved_field_entries(st);
print_resolved_method_entries(st);
print_resolved_indy_entries(st);
if (_resolved_field_entries != nullptr) {
print_resolved_field_entries(st);
}
if (_resolved_method_entries != nullptr) {
print_resolved_method_entries(st);
}
if (_resolved_indy_entries != nullptr) {
print_resolved_indy_entries(st);
}
}

void ConstantPoolCache::print_resolved_field_entries(outputStream* st) const {
Expand Down
3 changes: 3 additions & 0 deletions src/hotspot/share/opto/node.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ class VectorUnboxNode;
class VectorSet;
class VectorReinterpretNode;
class ShiftVNode;
class MulVLNode;
class ExpandVNode;
class CompressVNode;
class CompressMNode;
Expand Down Expand Up @@ -743,6 +744,7 @@ class Node {
DEFINE_CLASS_ID(Reduction, Vector, 7)
DEFINE_CLASS_ID(NegV, Vector, 8)
DEFINE_CLASS_ID(SaturatingVector, Vector, 9)
DEFINE_CLASS_ID(MulVL, Vector, 10)
DEFINE_CLASS_ID(Con, Type, 8)
DEFINE_CLASS_ID(ConI, Con, 0)
DEFINE_CLASS_ID(SafePointScalarMerge, Type, 9)
Expand Down Expand Up @@ -970,6 +972,7 @@ class Node {
DEFINE_CLASS_QUERY(Mul)
DEFINE_CLASS_QUERY(Multi)
DEFINE_CLASS_QUERY(MultiBranch)
DEFINE_CLASS_QUERY(MulVL)
DEFINE_CLASS_QUERY(Neg)
DEFINE_CLASS_QUERY(NegV)
DEFINE_CLASS_QUERY(NeverBranch)
Expand Down
49 changes: 49 additions & 0 deletions src/hotspot/share/opto/vectornode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2085,6 +2085,55 @@ Node* VectorBlendNode::Identity(PhaseGVN* phase) {
}
return this;
}
static bool is_replicate_uint_constant(const Node* n) {
return n->Opcode() == Op_Replicate &&
n->in(1)->is_Con() &&
n->in(1)->bottom_type()->isa_long() &&
n->in(1)->bottom_type()->is_long()->get_con() <= 0xFFFFFFFFL;
}

static bool has_vector_elements_fit_uint(Node* n) {
auto is_lower_doubleword_mask_pattern = [](const Node* n) {
return n->Opcode() == Op_AndV &&
(is_replicate_uint_constant(n->in(1)) ||
is_replicate_uint_constant(n->in(2)));
};

auto is_clear_upper_doubleword_uright_shift_pattern = [](const Node* n) {
return n->Opcode() == Op_URShiftVL &&
n->in(2)->Opcode() == Op_RShiftCntV && n->in(2)->in(1)->is_Con() &&
n->in(2)->in(1)->bottom_type()->isa_int() &&
n->in(2)->in(1)->bottom_type()->is_int()->get_con() >= 32;
};
return is_lower_doubleword_mask_pattern(n) || // (AndV SRC (Replicate C)) where C <= 0xFFFFFFFF
is_clear_upper_doubleword_uright_shift_pattern(n); // (URShiftV SRC S) where S >= 32
}

static bool has_vector_elements_fit_int(Node* n) {
auto is_cast_integer_to_long_pattern = [](const Node* n) {
return n->Opcode() == Op_VectorCastI2X && Matcher::vector_element_basic_type(n) == T_LONG;
};

auto is_clear_upper_doubleword_right_shift_pattern = [](const Node* n) {
return n->Opcode() == Op_RShiftVL &&
n->in(2)->Opcode() == Op_RShiftCntV && n->in(2)->in(1)->is_Con() &&
n->in(2)->in(1)->bottom_type()->isa_int() &&
n->in(2)->in(1)->bottom_type()->is_int()->get_con() >= 32;
};

return is_cast_integer_to_long_pattern(n) || // (VectorCastI2X SRC)
is_clear_upper_doubleword_right_shift_pattern(n); // (RShiftV SRC S) where S >= 32
}

bool MulVLNode::has_int_inputs() const {
return has_vector_elements_fit_int(in(1)) &&
has_vector_elements_fit_int(in(2));
}

bool MulVLNode::has_uint_inputs() const {
return has_vector_elements_fit_uint(in(1)) &&
has_vector_elements_fit_uint(in(2));
}

#ifndef PRODUCT
void VectorBoxAllocateNode::dump_spec(outputStream *st) const {
Expand Down
6 changes: 5 additions & 1 deletion src/hotspot/share/opto/vectornode.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -441,8 +441,12 @@ class MulVINode : public VectorNode {
// Vector multiply long
class MulVLNode : public VectorNode {
public:
MulVLNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1, in2, vt) {}
MulVLNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1, in2, vt) {
init_class_id(Class_MulVL);
}
virtual int Opcode() const;
bool has_int_inputs() const;
bool has_uint_inputs() const;
};

//------------------------------MulVFNode--------------------------------------
Expand Down
Loading

0 comments on commit c9a7336

Please sign in to comment.