Skip to content

Commit 4c7f7b6

Browse files
author
Datadog Syncup Service
committed
Merge branch 'upstream-master'
2 parents d1f67b3 + 8a2a75e commit 4c7f7b6

File tree

98 files changed

+1317
-919
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+1317
-919
lines changed

src/hotspot/cpu/riscv/globals_riscv.hpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,12 @@ define_pd_global(intx, InlineSmallCode, 1000);
9898
product(bool, UseRVA20U64, true, "Use RVA20U64 profile") \
9999
product(bool, UseRVA22U64, false, EXPERIMENTAL, "Use RVA22U64 profile") \
100100
product(bool, UseRVA23U64, false, EXPERIMENTAL, "Use RVA23U64 profile") \
101-
product(bool, UseRVC, false, "Use RVC instructions") \
102-
product(bool, UseRVV, false, "Use RVV instructions") \
103-
product(bool, UseZba, false, "Use Zba instructions") \
104-
product(bool, UseZbb, false, "Use Zbb instructions") \
105-
product(bool, UseZbs, false, "Use Zbs instructions") \
106-
product(bool, UseZfh, false, "Use Zfh instructions") \
101+
product(bool, UseRVC, false, DIAGNOSTIC, "Use RVC instructions") \
102+
product(bool, UseRVV, false, DIAGNOSTIC, "Use RVV instructions") \
103+
product(bool, UseZba, false, DIAGNOSTIC, "Use Zba instructions") \
104+
product(bool, UseZbb, false, DIAGNOSTIC, "Use Zbb instructions") \
105+
product(bool, UseZbs, false, DIAGNOSTIC, "Use Zbs instructions") \
106+
product(bool, UseZfh, false, DIAGNOSTIC, "Use Zfh instructions") \
107107
product(bool, UseZacas, false, EXPERIMENTAL, "Use Zacas instructions") \
108108
product(bool, UseZcb, false, EXPERIMENTAL, "Use Zcb instructions") \
109109
product(bool, UseZic64b, false, EXPERIMENTAL, "Use Zic64b instructions") \
@@ -114,7 +114,7 @@ define_pd_global(intx, InlineSmallCode, 1000);
114114
"Use Zihintpause instructions") \
115115
product(bool, UseZtso, false, EXPERIMENTAL, "Assume Ztso memory model") \
116116
product(bool, UseZvbb, false, EXPERIMENTAL, "Use Zvbb instructions") \
117-
product(bool, UseZvfh, false, "Use Zvfh instructions") \
117+
product(bool, UseZvfh, false, DIAGNOSTIC, "Use Zvfh instructions") \
118118
product(bool, UseZvkn, false, EXPERIMENTAL, \
119119
"Use Zvkn group extension, Zvkned, Zvknhb, Zvkb, Zvkt") \
120120
product(bool, UseRVVForBigIntegerShiftIntrinsics, true, \

src/hotspot/cpu/riscv/vm_version_riscv.cpp

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -122,22 +122,6 @@ void VM_Version::common_initialize() {
122122
FLAG_SET_DEFAULT(AllocatePrefetchDistance, 0);
123123
}
124124

125-
if (UseZba) {
126-
if (FLAG_IS_DEFAULT(UseCRC32Intrinsics)) {
127-
FLAG_SET_DEFAULT(UseCRC32Intrinsics, true);
128-
}
129-
} else {
130-
if (!FLAG_IS_DEFAULT(UseCRC32Intrinsics)) {
131-
warning("CRC32 intrinsic requires Zba instructions (not available on this CPU)");
132-
}
133-
FLAG_SET_DEFAULT(UseCRC32Intrinsics, false);
134-
}
135-
136-
if (UseCRC32CIntrinsics) {
137-
warning("CRC32C intrinsics are not available on this CPU.");
138-
FLAG_SET_DEFAULT(UseCRC32CIntrinsics, false);
139-
}
140-
141125
if (UseVectorizedMismatchIntrinsic) {
142126
warning("VectorizedMismatch intrinsic is not available on this CPU.");
143127
FLAG_SET_DEFAULT(UseVectorizedMismatchIntrinsic, false);
@@ -217,6 +201,24 @@ void VM_Version::common_initialize() {
217201
_initial_vector_length = cpu_vector_length();
218202
}
219203
}
204+
205+
// Misc Intrinsics could depend on RVV
206+
207+
if (UseZba || UseRVV) {
208+
if (FLAG_IS_DEFAULT(UseCRC32Intrinsics)) {
209+
FLAG_SET_DEFAULT(UseCRC32Intrinsics, true);
210+
}
211+
} else {
212+
if (!FLAG_IS_DEFAULT(UseCRC32Intrinsics)) {
213+
warning("CRC32 intrinsic requires Zba or RVV instructions (not available on this CPU)");
214+
}
215+
FLAG_SET_DEFAULT(UseCRC32Intrinsics, false);
216+
}
217+
218+
if (UseCRC32CIntrinsics) {
219+
warning("CRC32C intrinsics are not available on this CPU.");
220+
FLAG_SET_DEFAULT(UseCRC32CIntrinsics, false);
221+
}
220222
}
221223

222224
#ifdef COMPILER2

src/hotspot/share/jfr/support/jfrDeprecationManager.cpp

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
#include "precompiled.hpp"
2626
#include "classfile/moduleEntry.hpp"
27+
#include "interpreter/bytecodes.hpp"
2728
#include "jfrfiles/jfrEventIds.hpp"
2829
#include "jfr/jni/jfrJavaSupport.hpp"
2930
#include "jfr/recorder/jfrRecorder.hpp"
@@ -216,6 +217,25 @@ static bool should_record(const Method* method, const Method* sender, JavaThread
216217
return is_not_jdk_module(sender_module, jt) && max_limit_not_reached();
217218
}
218219

220+
static inline bool is_invoke_bytecode(const Method* sender, int bci) {
221+
assert(sender != nullptr, "invariant");
222+
assert(sender->validate_bci(bci) >= 0, "invariant");
223+
const Bytecodes::Code bc = (Bytecodes::Code)*sender->bcp_from(bci);
224+
switch (bc) {
225+
case Bytecodes::_invokevirtual:
226+
case Bytecodes::_invokestatic:
227+
case Bytecodes::_invokeinterface:
228+
case Bytecodes::_invokespecial:
229+
case Bytecodes::_invokedynamic: {
230+
return true;
231+
}
232+
default: {
233+
return false;
234+
}
235+
}
236+
return false;
237+
}
238+
219239
// This is the entry point for newly discovered edges in JfrResolution.cpp.
220240
void JfrDeprecationManager::on_link(const Method* method, Method* sender, int bci, u1 frame_type, JavaThread* jt) {
221241
assert(method != nullptr, "invariant");
@@ -224,10 +244,13 @@ void JfrDeprecationManager::on_link(const Method* method, Method* sender, int bc
224244
assert(!sender->is_native(), "invariant");
225245
assert(jt != nullptr, "invariant");
226246
assert(JfrRecorder::is_started_on_commandline(), "invariant");
227-
if (JfrMethodData::mark_deprecated_call_site(sender, bci, jt)) {
228-
if (should_record(method, sender, jt)) {
229-
create_edge(method, sender, bci, frame_type, jt);
247+
if (should_record(method, sender, jt)) {
248+
if (is_invoke_bytecode(sender, bci)) {
249+
if (!JfrMethodData::mark_deprecated_call_site(sender, bci, jt)) {
250+
return;
251+
}
230252
}
253+
create_edge(method, sender, bci, frame_type, jt);
231254
}
232255
}
233256

src/hotspot/share/opto/cfgnode.hpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ class IfNode : public MultiBranchNode {
324324
float _fcnt; // Frequency counter
325325

326326
private:
327-
NOT_PRODUCT(AssertionPredicateType _assertion_predicate_type;)
327+
AssertionPredicateType _assertion_predicate_type;
328328

329329
void init_node(Node* control, Node* bol) {
330330
init_class_id(Class_If);
@@ -426,7 +426,7 @@ class IfNode : public MultiBranchNode {
426426
// gen_subtype_check() and catch_inline_exceptions().
427427

428428
IfNode(Node* control, Node* bol, float p, float fcnt);
429-
NOT_PRODUCT(IfNode(Node* control, Node* bol, float p, float fcnt, AssertionPredicateType assertion_predicate_type);)
429+
IfNode(Node* control, Node* bol, float p, float fcnt, AssertionPredicateType assertion_predicate_type);
430430

431431
static IfNode* make_with_same_profile(IfNode* if_node_profile, Node* ctrl, BoolNode* bol);
432432

@@ -448,11 +448,11 @@ class IfNode : public MultiBranchNode {
448448
// Returns null is it couldn't improve the type.
449449
static const TypeInt* filtered_int_type(PhaseGVN* phase, Node* val, Node* if_proj);
450450

451-
#ifndef PRODUCT
452451
AssertionPredicateType assertion_predicate_type() const {
453452
return _assertion_predicate_type;
454453
}
455454

455+
#ifndef PRODUCT
456456
virtual void dump_spec(outputStream *st) const;
457457
#endif
458458

@@ -468,12 +468,10 @@ class RangeCheckNode : public IfNode {
468468
init_class_id(Class_RangeCheck);
469469
}
470470

471-
#ifndef PRODUCT
472471
RangeCheckNode(Node* control, Node* bol, float p, float fcnt, AssertionPredicateType assertion_predicate_type)
473472
: IfNode(control, bol, p, fcnt, assertion_predicate_type) {
474473
init_class_id(Class_RangeCheck);
475474
}
476-
#endif // NOT PRODUCT
477475

478476
virtual int Opcode() const;
479477
virtual Node* Ideal(PhaseGVN *phase, bool can_reshape);

src/hotspot/share/opto/ifnode.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,20 +50,18 @@ extern uint explicit_null_checks_elided;
5050
IfNode::IfNode(Node* control, Node* bol, float p, float fcnt)
5151
: MultiBranchNode(2),
5252
_prob(p),
53-
_fcnt(fcnt)
54-
NOT_PRODUCT(COMMA _assertion_predicate_type(AssertionPredicateType::None)) {
53+
_fcnt(fcnt),
54+
_assertion_predicate_type(AssertionPredicateType::None) {
5555
init_node(control, bol);
5656
}
5757

58-
#ifndef PRODUCT
5958
IfNode::IfNode(Node* control, Node* bol, float p, float fcnt, AssertionPredicateType assertion_predicate_type)
6059
: MultiBranchNode(2),
6160
_prob(p),
6261
_fcnt(fcnt),
6362
_assertion_predicate_type(assertion_predicate_type) {
6463
init_node(control, bol);
6564
}
66-
#endif // NOT_PRODUCT
6765

6866
//=============================================================================
6967
//------------------------------Value------------------------------------------

src/hotspot/share/opto/loopPredicate.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ void PhaseIdealLoop::register_control(Node* n, IdealLoopTree *loop, Node* pred,
100100
// is an IfTrue projection. This code is also used to clone predicates to cloned loops.
101101
IfTrueNode* PhaseIdealLoop::create_new_if_for_predicate(ParsePredicateSuccessProj* parse_predicate_success_proj,
102102
Node* new_entry, const Deoptimization::DeoptReason reason,
103-
const int opcode, const bool rewire_uncommon_proj_phi_inputs
104-
NOT_PRODUCT (COMMA AssertionPredicateType assertion_predicate_type)) {
103+
const int opcode, const bool rewire_uncommon_proj_phi_inputs,
104+
AssertionPredicateType assertion_predicate_type) {
105105
assert(parse_predicate_success_proj->is_uncommon_trap_if_pattern(reason), "must be a uct if pattern!");
106106
ParsePredicateNode* parse_predicate = parse_predicate_success_proj->in(0)->as_ParsePredicate();
107107
ParsePredicateUncommonProj* uncommon_proj = parse_predicate->uncommon_proj();

src/hotspot/share/opto/loopTransform.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2759,8 +2759,8 @@ void PhaseIdealLoop::do_range_check(IdealLoopTree *loop, Node_List &old_new) {
27592759
// cannot remove an empty loop with a constant limit when init is not a constant as well. We will use
27602760
// a LoopLimitCheck node that can only be folded if the zero grip guard is also foldable.
27612761
loop_entry = initialized_assertion_predicate_creator.create(final_iv_placeholder, loop_entry, stride_con,
2762-
scale_con, int_offset, int_limit NOT_PRODUCT(
2763-
COMMA AssertionPredicateType::FinalIv));
2762+
scale_con, int_offset, int_limit,
2763+
AssertionPredicateType::FinalIv);
27642764
assert(!assertion_predicate_has_loop_opaque_node(loop_entry->in(0)->as_If()), "unexpected");
27652765
}
27662766

@@ -2773,8 +2773,8 @@ void PhaseIdealLoop::do_range_check(IdealLoopTree *loop, Node_List &old_new) {
27732773

27742774
// Initialized Assertion Predicate for the value of the initial main-loop.
27752775
loop_entry = initialized_assertion_predicate_creator.create(init, loop_entry, stride_con, scale_con,
2776-
int_offset, int_limit NOT_PRODUCT(COMMA
2777-
AssertionPredicateType::InitValue));
2776+
int_offset, int_limit,
2777+
AssertionPredicateType::InitValue);
27782778
assert(!assertion_predicate_has_loop_opaque_node(loop_entry->in(0)->as_If()), "unexpected");
27792779

27802780
} else {

src/hotspot/share/opto/loopnode.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1352,8 +1352,8 @@ class PhaseIdealLoop : public PhaseTransform {
13521352
// Create a new if above the uncommon_trap_if_pattern for the predicate to be promoted
13531353
IfTrueNode* create_new_if_for_predicate(
13541354
ParsePredicateSuccessProj* parse_predicate_proj, Node* new_entry, Deoptimization::DeoptReason reason, int opcode,
1355-
bool rewire_uncommon_proj_phi_inputs = false
1356-
NOT_PRODUCT (COMMA AssertionPredicateType assertion_predicate_type = AssertionPredicateType::None));
1355+
bool rewire_uncommon_proj_phi_inputs = false,
1356+
AssertionPredicateType assertion_predicate_type = AssertionPredicateType::None);
13571357

13581358
private:
13591359
// Helper functions for create_new_if_for_predicate()

0 commit comments

Comments
 (0)