Mercurial > hg > truffle
diff src/share/vm/oops/method.cpp @ 20619:b12a2a9b05ca
8056240: Investigate increased GC remark time after class unloading changes in CRM Fuse
Reviewed-by: mgerdin, coleenp, bdelsart
author | stefank |
---|---|
date | Thu, 02 Oct 2014 10:55:36 +0200 |
parents | 966205f0e717 |
children | 600c44255e5f |
line wrap: on
line diff
--- a/src/share/vm/oops/method.cpp Mon Nov 03 12:02:40 2014 -0800 +++ b/src/share/vm/oops/method.cpp Thu Oct 02 10:55:36 2014 +0200 @@ -1863,9 +1863,12 @@ void Method::set_on_stack(const bool value) { // Set both the method itself and its constant pool. The constant pool // on stack means some method referring to it is also on the stack. - _access_flags.set_on_stack(value); constants()->set_on_stack(value); - if (value) MetadataOnStackMark::record(this); + + bool succeeded = _access_flags.set_on_stack(value); + if (value && succeeded) { + MetadataOnStackMark::record(this, Thread::current()); + } } // Called when the class loader is unloaded to make all methods weak.