Mercurial > hg > graal-jvmci-8
comparison src/share/vm/opto/callnode.hpp @ 22833:6e8e0bf87bbe
8069412: Locks need better debug-printing support
Summary: Added better debug-printing support and enhanced LogCompilation tool
Reviewed-by: kvn, roland, dholmes
author | drchase |
---|---|
date | Fri, 20 Feb 2015 22:12:53 -0500 |
parents | 411e30e5fbb8 |
children | dd9cc155639c 3ff8d0b5a04b |
comparison
equal
deleted
inserted
replaced
22832:9d6eb2757167 | 22833:6e8e0bf87bbe |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
983 bool is_eliminated() const { return (_kind != Regular); } | 983 bool is_eliminated() const { return (_kind != Regular); } |
984 bool is_non_esc_obj() const { return (_kind == NonEscObj); } | 984 bool is_non_esc_obj() const { return (_kind == NonEscObj); } |
985 bool is_coarsened() const { return (_kind == Coarsened); } | 985 bool is_coarsened() const { return (_kind == Coarsened); } |
986 bool is_nested() const { return (_kind == Nested); } | 986 bool is_nested() const { return (_kind == Nested); } |
987 | 987 |
988 const char * kind_as_string() const; | |
989 void log_lock_optimization(Compile* c, const char * tag) const; | |
990 | |
988 void set_non_esc_obj() { _kind = NonEscObj; set_eliminated_lock_counter(); } | 991 void set_non_esc_obj() { _kind = NonEscObj; set_eliminated_lock_counter(); } |
989 void set_coarsened() { _kind = Coarsened; set_eliminated_lock_counter(); } | 992 void set_coarsened() { _kind = Coarsened; set_eliminated_lock_counter(); } |
990 void set_nested() { _kind = Nested; set_eliminated_lock_counter(); } | 993 void set_nested() { _kind = Nested; set_eliminated_lock_counter(); } |
991 | 994 |
992 // locking does not modify its arguments | 995 // locking does not modify its arguments |
1043 jvms()->set_map_deep(this); | 1046 jvms()->set_map_deep(this); |
1044 } | 1047 } |
1045 } | 1048 } |
1046 | 1049 |
1047 bool is_nested_lock_region(); // Is this Lock nested? | 1050 bool is_nested_lock_region(); // Is this Lock nested? |
1051 bool is_nested_lock_region(Compile * c); // Why isn't this Lock nested? | |
1048 }; | 1052 }; |
1049 | 1053 |
1050 //------------------------------Unlock--------------------------------------- | 1054 //------------------------------Unlock--------------------------------------- |
1051 // High-level unlock operation | 1055 // High-level unlock operation |
1052 class UnlockNode : public AbstractLockNode { | 1056 class UnlockNode : public AbstractLockNode { |
1057 private: | |
1058 #ifdef ASSERT | |
1059 JVMState* const _dbg_jvms; // Pointer to list of JVM State objects | |
1060 #endif | |
1053 public: | 1061 public: |
1054 virtual int Opcode() const; | 1062 virtual int Opcode() const; |
1055 virtual uint size_of() const; // Size is bigger | 1063 virtual uint size_of() const; // Size is bigger |
1056 UnlockNode(Compile* C, const TypeFunc *tf) : AbstractLockNode( tf ) { | 1064 UnlockNode(Compile* C, const TypeFunc *tf) : AbstractLockNode( tf ) |
1065 #ifdef ASSERT | |
1066 , _dbg_jvms(NULL) | |
1067 #endif | |
1068 { | |
1057 init_class_id(Class_Unlock); | 1069 init_class_id(Class_Unlock); |
1058 init_flags(Flag_is_macro); | 1070 init_flags(Flag_is_macro); |
1059 C->add_macro_node(this); | 1071 C->add_macro_node(this); |
1060 } | 1072 } |
1061 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); | 1073 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); |
1062 // unlock is never a safepoint | 1074 // unlock is never a safepoint |
1063 virtual bool guaranteed_safepoint() { return false; } | 1075 virtual bool guaranteed_safepoint() { return false; } |
1076 #ifdef ASSERT | |
1077 void set_dbg_jvms(JVMState* s) { | |
1078 *(JVMState**)&_dbg_jvms = s; // override const attribute in the accessor | |
1079 } | |
1080 JVMState* dbg_jvms() const { return _dbg_jvms; } | |
1081 #else | |
1082 JVMState* dbg_jvms() const { return NULL; } | |
1083 #endif | |
1064 }; | 1084 }; |
1065 | 1085 |
1066 #endif // SHARE_VM_OPTO_CALLNODE_HPP | 1086 #endif // SHARE_VM_OPTO_CALLNODE_HPP |