46 // instance variables
47 size_t sizes[table_size];
48
49 // constructor. "global" indicates that this is the global age table
50 // (as opposed to gc-thread-local)
51 AgeTable(bool global = true);
52
53 // clear table
54 void clear();
55
56 // add entry
57 inline void add(oop p, size_t oop_size);
58
59 void add(uint age, size_t oop_size) {
60 assert(age > 0 && age < table_size, "invalid age of object");
61 sizes[age] += oop_size;
62 }
63
64 // Merge another age table with the current one. Used
65 // for parallel young generation gc.
66 void merge(AgeTable* subTable);
67
68 // Calculate new tenuring threshold based on age information.
69 uint compute_tenuring_threshold(size_t desired_survivor_size);
70 void print_age_table(uint tenuring_threshold);
71
72 private:
73
74 PerfVariable* _perf_sizes[table_size];
75 };
76
77 #endif // SHARE_GC_SHARED_AGETABLE_HPP
|
46 // instance variables
47 size_t sizes[table_size];
48
49 // constructor. "global" indicates that this is the global age table
50 // (as opposed to gc-thread-local)
51 AgeTable(bool global = true);
52
53 // clear table
54 void clear();
55
56 // add entry
57 inline void add(oop p, size_t oop_size);
58
59 void add(uint age, size_t oop_size) {
60 assert(age > 0 && age < table_size, "invalid age of object");
61 sizes[age] += oop_size;
62 }
63
64 // Merge another age table with the current one. Used
65 // for parallel young generation gc.
66 void merge(const AgeTable* subTable);
67
68 // Calculate new tenuring threshold based on age information.
69 uint compute_tenuring_threshold(size_t desired_survivor_size);
70 void print_age_table(uint tenuring_threshold);
71 void print_on(outputStream* st, uint tenuring_threshold);
72
73 private:
74 bool _use_perf_data;
75 PerfVariable* _perf_sizes[table_size];
76 };
77
78 #endif // SHARE_GC_SHARED_AGETABLE_HPP
|