comparison src/share/vm/oops/constantPool.hpp @ 12946:b8860472c377

8014910: deadlock between JVM/TI ClassPrepare event handler and CompilerThread Summary: Revert changes in JDK-8008962 Reviewed-by: coleenp, sspitsyn
author iklam
date Tue, 22 Oct 2013 14:29:02 -0700
parents 084b21cd0228
children 096c224171c4
comparison
equal deleted inserted replaced
12944:1327b7f85503 12946:b8860472c377
109 int _resolved_reference_length; 109 int _resolved_reference_length;
110 // keeps version number for redefined classes (used in backtrace) 110 // keeps version number for redefined classes (used in backtrace)
111 int _version; 111 int _version;
112 } _saved; 112 } _saved;
113 113
114 Monitor* _lock;
114 115
115 void set_tags(Array<u1>* tags) { _tags = tags; } 116 void set_tags(Array<u1>* tags) { _tags = tags; }
116 void tag_at_put(int which, jbyte t) { tags()->at_put(which, t); } 117 void tag_at_put(int which, jbyte t) { tags()->at_put(which, t); }
117 void release_tag_at_put(int which, jbyte t) { tags()->release_at_put(which, t); } 118 void release_tag_at_put(int which, jbyte t) { tags()->release_at_put(which, t); }
118 119
841 _saved._version = version >= 0 ? (version + 1) : version; // keep overflow 842 _saved._version = version >= 0 ? (version + 1) : version; // keep overflow
842 } 843 }
843 844
844 void set_resolved_reference_length(int length) { _saved._resolved_reference_length = length; } 845 void set_resolved_reference_length(int length) { _saved._resolved_reference_length = length; }
845 int resolved_reference_length() const { return _saved._resolved_reference_length; } 846 int resolved_reference_length() const { return _saved._resolved_reference_length; }
846 847 void set_lock(Monitor* lock) { _lock = lock; }
847 // lock() may return null -- constant pool updates may happen before this lock is 848 Monitor* lock() { return _lock; }
848 // initialized, because the _pool_holder has not been fully initialized and
849 // has not been registered into the system dictionary. In this case, no other
850 // thread can be modifying this constantpool, so no synchronization is
851 // necessary.
852 //
853 // Use cplock() like this:
854 // oop cplock = cp->lock();
855 // ObjectLocker ol(cplock , THREAD, cplock != NULL);
856 oop lock();
857 849
858 // Decrease ref counts of symbols that are in the constant pool 850 // Decrease ref counts of symbols that are in the constant pool
859 // when the holder class is unloaded 851 // when the holder class is unloaded
860 void unreference_symbols(); 852 void unreference_symbols();
861 853