mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 19:14:38 +02:00
8056240: Investigate increased GC remark time after class unloading changes in CRM Fuse
Reviewed-by: mgerdin, coleenp, bdelsart
This commit is contained in:
parent
1055ae0436
commit
d410f19961
19 changed files with 506 additions and 68 deletions
|
@ -26,9 +26,12 @@
|
|||
#define SHARE_VM_CLASSFILE_METADATAONSTACKMARK_HPP
|
||||
|
||||
#include "memory/allocation.hpp"
|
||||
#include "utilities/chunkedList.hpp"
|
||||
|
||||
class Metadata;
|
||||
|
||||
typedef ChunkedList<Metadata*, mtInternal> MetadataOnStackBuffer;
|
||||
|
||||
// Helper class to mark and unmark metadata used on the stack as either handles
|
||||
// or executing methods, so that it can't be deleted during class redefinition
|
||||
// and class unloading.
|
||||
|
@ -36,10 +39,20 @@ class Metadata;
|
|||
// metadata during parsing, relocated methods, and methods in backtraces.
|
||||
class MetadataOnStackMark : public StackObj {
|
||||
NOT_PRODUCT(static bool _is_active;)
|
||||
|
||||
static volatile MetadataOnStackBuffer* _used_buffers;
|
||||
static volatile MetadataOnStackBuffer* _free_buffers;
|
||||
|
||||
static MetadataOnStackBuffer* allocate_buffer();
|
||||
static void retire_buffer(MetadataOnStackBuffer* buffer);
|
||||
|
||||
public:
|
||||
MetadataOnStackMark(bool has_redefined_a_class);
|
||||
~MetadataOnStackMark();
|
||||
static void record(Metadata* m);
|
||||
MetadataOnStackMark(bool visit_code_cache);
|
||||
~MetadataOnStackMark();
|
||||
|
||||
static void record(Metadata* m, Thread* thread);
|
||||
static void retire_buffer_for_thread(Thread* thread);
|
||||
static bool has_buffer_for_thread(Thread* thread);
|
||||
};
|
||||
|
||||
#endif // SHARE_VM_CLASSFILE_METADATAONSTACKMARK_HPP
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue