RFR: Fix ExtendedDTraceProbes with Shenandoah
Zhengyu Gu
zgu at redhat.com
Fri Sep 21 14:19:57 UTC 2018
Yep, it works!
Thanks,
-Zhengyu
On 09/21/2018 09:09 AM, Roland Westrelin wrote:
>
>> Passed most tier2 with ExtendedDTraceProbes (some of tests timeout). Of
>> course, still failed CriticalNativeArgs.java with C2/traversal.
>
> The C2 fix is below. Let me know if that works ok.
>
> Roland.
>
> diff --git a/src/hotspot/share/opto/arraycopynode.cpp b/src/hotspot/share/opto/arraycopynode.cpp
> --- a/src/hotspot/share/opto/arraycopynode.cpp
> +++ b/src/hotspot/share/opto/arraycopynode.cpp
> @@ -60,7 +60,7 @@
> Node* src_length, Node* dest_length) {
>
> ArrayCopyNode* ac = new ArrayCopyNode(kit->C, alloc_tightly_coupled, has_negative_length_guard);
> - Node* prev_mem = kit->set_predefined_input_for_runtime_call(ac);
> + Node* prev_mem = kit->set_predefined_input_for_runtime_call(ac, Compile::AliasIdxBot);
>
> ac->init_req(ArrayCopyNode::Src, src);
> ac->init_req(ArrayCopyNode::SrcPos, src_offset);
> diff --git a/src/hotspot/share/opto/graphKit.cpp b/src/hotspot/share/opto/graphKit.cpp
> --- a/src/hotspot/share/opto/graphKit.cpp
> +++ b/src/hotspot/share/opto/graphKit.cpp
> @@ -1812,12 +1812,13 @@
> // 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, int alias_idx) {
> // Set fixed predefined input arguments
> Node* memory = reset_memory();
> + Node* m = (alias_idx == Compile::AliasIdxBot || !memory->is_MergeMem()) ? memory : memory->as_MergeMem()->memory_at(alias_idx);
> 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;
> @@ -2469,13 +2470,10 @@
>
> Node* prev_mem = NULL;
> if (wide_in) {
> - prev_mem = set_predefined_input_for_runtime_call(call);
> + prev_mem = set_predefined_input_for_runtime_call(call, Compile::AliasIdxBot);
> } 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, C->get_alias_index(adr_type));
> }
>
> // 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
> --- a/src/hotspot/share/opto/graphKit.hpp
> +++ b/src/hotspot/share/opto/graphKit.hpp
> @@ -701,7 +701,7 @@
> 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, int alias_idx);
>
> // Replace the call with the current state of the kit. Requires
> // that the call was generated with separate io_projs so that
>
More information about the shenandoah-dev
mailing list