mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 11:34:38 +02:00
8166188: G1 Needs pre barrier on dereference of weak JNI handles
Add low tag to jweaks and G1 barrier for jweak loads. Co-authored-by: Martin Doerr <martin.doerr@sap.com> Co-authored-by: Volker Simonis <volker.simonis@sap.com> Reviewed-by: mgerdin, mdoerr, pliden, dlong, dcubed, coleenp, aph, tschatzl
This commit is contained in:
parent
6a5e6f2ae1
commit
28477cf493
37 changed files with 1061 additions and 429 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2017, 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
|
||||
|
@ -2226,14 +2226,11 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
|
|||
|
||||
__ reset_last_Java_frame(thread, false);
|
||||
|
||||
// Unpack oop result
|
||||
// Unbox oop result, e.g. JNIHandles::resolve value.
|
||||
if (ret_type == T_OBJECT || ret_type == T_ARRAY) {
|
||||
Label L;
|
||||
__ cmpptr(rax, (int32_t)NULL_WORD);
|
||||
__ jcc(Assembler::equal, L);
|
||||
__ movptr(rax, Address(rax, 0));
|
||||
__ bind(L);
|
||||
__ verify_oop(rax);
|
||||
__ resolve_jobject(rax /* value */,
|
||||
thread /* thread */,
|
||||
rcx /* tmp */);
|
||||
}
|
||||
|
||||
if (CheckJNICalls) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue