8176100: [REDO][REDO] G1 Needs pre barrier on dereference of weak JNI handles

Reviewed-by: kbarrett, coleenp, tschatzl
This commit is contained in:
Mikael Gerdin 2017-03-22 15:25:21 +01:00
parent 6b15d9a82b
commit cc1aaab7e9
42 changed files with 1221 additions and 434 deletions

View file

@ -1,6 +1,6 @@
/*
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016 SAP SE. All rights reserved.
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2017 SAP SE. 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
@ -2272,13 +2272,9 @@ nmethod *SharedRuntime::generate_native_wrapper(MacroAssembler *masm,
__ reset_last_Java_frame();
// Unpack oop result
// Unpack oop result, e.g. JNIHandles::resolve result.
if (ret_type == T_OBJECT || ret_type == T_ARRAY) {
NearLabel L;
__ compare64_and_branch(Z_RET, (RegisterOrConstant)0L, Assembler::bcondEqual, L);
__ z_lg(Z_RET, 0, Z_RET);
__ bind(L);
__ verify_oop(Z_RET);
__ resolve_jobject(Z_RET, /* tmp1 */ Z_R13, /* tmp2 */ Z_R7);
}
if (CheckJNICalls) {