< prev index next >
src/share/vm/opto/callnode.hpp
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
@@ -983,10 +983,13 @@
bool is_eliminated() const { return (_kind != Regular); }
bool is_non_esc_obj() const { return (_kind == NonEscObj); }
bool is_coarsened() const { return (_kind == Coarsened); }
bool is_nested() const { return (_kind == Nested); }
+ const char * kind_as_string() const;
+ void log_lock_optimization(Phase* phase, const char * tag) const;
+
void set_non_esc_obj() { _kind = NonEscObj; set_eliminated_lock_counter(); }
void set_coarsened() { _kind = Coarsened; set_eliminated_lock_counter(); }
void set_nested() { _kind = Nested; set_eliminated_lock_counter(); }
// locking does not modify its arguments
@@ -1043,26 +1046,43 @@
jvms()->set_map_deep(this);
}
}
bool is_nested_lock_region(); // Is this Lock nested?
+ bool is_nested_lock_region(Phase * p); // Why isn't this Lock nested?
};
//------------------------------Unlock---------------------------------------
// High-level unlock operation
class UnlockNode : public AbstractLockNode {
+private:
+#ifdef ASSERT
+ JVMState* const _dbg_jvms; // Pointer to list of JVM State objects
+#endif
public:
virtual int Opcode() const;
virtual uint size_of() const; // Size is bigger
- UnlockNode(Compile* C, const TypeFunc *tf) : AbstractLockNode( tf ) {
+ UnlockNode(Compile* C, const TypeFunc *tf) : AbstractLockNode( tf )
+#ifdef ASSERT
+ , _dbg_jvms(NULL)
+#endif
+ {
init_class_id(Class_Unlock);
init_flags(Flag_is_macro);
C->add_macro_node(this);
}
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
// unlock is never a safepoint
virtual bool guaranteed_safepoint() { return false; }
+#ifdef ASSERT
+ void set_dbg_jvms(JVMState* s) {
+ *(JVMState**)&_dbg_jvms = s; // override const attribute in the accessor
+ }
+ JVMState* dbg_jvms() const { return _dbg_jvms; }
+#else
+ JVMState* dbg_jvms() const { return NULL; }
+#endif
};
class GraphKit;
class ArrayCopyNode : public CallNode {
< prev index next >