4957990: Perm heap bloat in JVM

Treat ProfileData in MDO's as a source of weak, not strong, roots. Fixes the bug for stop-world collection -- the case of concurrent collection will be fixed separately.

Reviewed-by: jcoomes, jmasa, kvn, never
This commit is contained in:
Y. Srinivas Ramakrishna 2009-09-02 00:04:29 -07:00
parent 2491751525
commit c6763b5bad
27 changed files with 385 additions and 65 deletions

View file

@ -55,6 +55,9 @@ class BytecodeStream;
// with invocation counter incrementation. None of these races harm correct
// execution of the compiled code.
// forward decl
class ProfileData;
// DataLayout
//
// Overlay for generic profiling data.
@ -231,6 +234,10 @@ public:
temp._header._struct._flags = byte_constant;
return temp._header._bits;
}
// GC support
ProfileData* data_in();
void follow_weak_refs(BoolObjectClosure* cl);
};
@ -430,6 +437,7 @@ public:
virtual void oop_iterate(OopClosure* blk) {}
virtual void oop_iterate_m(OopClosure* blk, MemRegion mr) {}
virtual void adjust_pointers() {}
virtual void follow_weak_refs(BoolObjectClosure* is_alive_closure) {}
#ifndef SERIALGC
// Parallel old support
@ -667,11 +675,27 @@ public:
return recv;
}
void set_receiver(uint row, oop p) {
assert((uint)row < row_limit(), "oob");
set_oop_at(receiver_cell_index(row), p);
}
uint receiver_count(uint row) {
assert(row < row_limit(), "oob");
return uint_at(receiver_count_cell_index(row));
}
void set_receiver_count(uint row, uint count) {
assert(row < row_limit(), "oob");
set_uint_at(receiver_count_cell_index(row), count);
}
void clear_row(uint row) {
assert(row < row_limit(), "oob");
set_receiver(row, NULL);
set_receiver_count(row, 0);
}
// Code generation support
static ByteSize receiver_offset(uint row) {
return cell_offset(receiver_cell_index(row));
@ -688,6 +712,7 @@ public:
virtual void oop_iterate(OopClosure* blk);
virtual void oop_iterate_m(OopClosure* blk, MemRegion mr);
virtual void adjust_pointers();
virtual void follow_weak_refs(BoolObjectClosure* is_alive_closure);
#ifndef SERIALGC
// Parallel old support