1.1 --- a/src/share/vm/opto/callnode.hpp Wed Feb 11 18:56:26 2015 -0800 1.2 +++ b/src/share/vm/opto/callnode.hpp Fri Feb 20 22:12:53 2015 -0500 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -985,6 +985,9 @@ 1.11 bool is_coarsened() const { return (_kind == Coarsened); } 1.12 bool is_nested() const { return (_kind == Nested); } 1.13 1.14 + const char * kind_as_string() const; 1.15 + void log_lock_optimization(Compile* c, const char * tag) const; 1.16 + 1.17 void set_non_esc_obj() { _kind = NonEscObj; set_eliminated_lock_counter(); } 1.18 void set_coarsened() { _kind = Coarsened; set_eliminated_lock_counter(); } 1.19 void set_nested() { _kind = Nested; set_eliminated_lock_counter(); } 1.20 @@ -1045,15 +1048,24 @@ 1.21 } 1.22 1.23 bool is_nested_lock_region(); // Is this Lock nested? 1.24 + bool is_nested_lock_region(Compile * c); // Why isn't this Lock nested? 1.25 }; 1.26 1.27 //------------------------------Unlock--------------------------------------- 1.28 // High-level unlock operation 1.29 class UnlockNode : public AbstractLockNode { 1.30 +private: 1.31 +#ifdef ASSERT 1.32 + JVMState* const _dbg_jvms; // Pointer to list of JVM State objects 1.33 +#endif 1.34 public: 1.35 virtual int Opcode() const; 1.36 virtual uint size_of() const; // Size is bigger 1.37 - UnlockNode(Compile* C, const TypeFunc *tf) : AbstractLockNode( tf ) { 1.38 + UnlockNode(Compile* C, const TypeFunc *tf) : AbstractLockNode( tf ) 1.39 +#ifdef ASSERT 1.40 + , _dbg_jvms(NULL) 1.41 +#endif 1.42 + { 1.43 init_class_id(Class_Unlock); 1.44 init_flags(Flag_is_macro); 1.45 C->add_macro_node(this); 1.46 @@ -1061,6 +1073,14 @@ 1.47 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); 1.48 // unlock is never a safepoint 1.49 virtual bool guaranteed_safepoint() { return false; } 1.50 +#ifdef ASSERT 1.51 + void set_dbg_jvms(JVMState* s) { 1.52 + *(JVMState**)&_dbg_jvms = s; // override const attribute in the accessor 1.53 + } 1.54 + JVMState* dbg_jvms() const { return _dbg_jvms; } 1.55 +#else 1.56 + JVMState* dbg_jvms() const { return NULL; } 1.57 +#endif 1.58 }; 1.59 1.60 #endif // SHARE_VM_OPTO_CALLNODE_HPP