< prev index next > src/hotspot/share/gc/shared/ageTable.hpp
Print this page
*/
#ifndef SHARE_GC_SHARED_AGETABLE_HPP
#define SHARE_GC_SHARED_AGETABLE_HPP
+ #include "memory/allocation.hpp"
#include "oops/markWord.hpp"
#include "oops/oop.hpp"
#include "runtime/perfDataTypes.hpp"
/* Copyright (c) 1992, 2021, Oracle and/or its affiliates, and Stanford University.
// Age table for adaptive feedback-mediated tenuring (scavenging)
//
// Note: all sizes are in oops
! class AgeTable {
friend class VMStructs;
public:
// constants
enum { table_size = markWord::max_age + 1 };
// Age table for adaptive feedback-mediated tenuring (scavenging)
//
// Note: all sizes are in oops
! class AgeTable: public CHeapObj<mtGC> {
friend class VMStructs;
public:
// constants
enum { table_size = markWord::max_age + 1 };
AgeTable(bool global = true);
// clear table
void clear();
// add entry
inline void add(oop p, size_t oop_size);
void add(uint age, size_t oop_size) {
! assert(age > 0 && age < table_size, "invalid age of object");
sizes[age] += oop_size;
}
! // Merge another age table with the current one. Used
- // for parallel young generation gc.
void merge(const AgeTable* subTable);
// Calculate new tenuring threshold based on age information.
uint compute_tenuring_threshold(size_t desired_survivor_size);
void print_age_table(uint tenuring_threshold);
AgeTable(bool global = true);
// clear table
void clear();
+ #ifndef PRODUCT
+ // check whether it's clear
+ bool is_clear() const;
+ #endif // !PRODUCT
+
// add entry
inline void add(oop p, size_t oop_size);
void add(uint age, size_t oop_size) {
! assert(age < table_size, "invalid age of object");
sizes[age] += oop_size;
}
! // Merge another age table with the current one.
void merge(const AgeTable* subTable);
// Calculate new tenuring threshold based on age information.
uint compute_tenuring_threshold(size_t desired_survivor_size);
void print_age_table(uint tenuring_threshold);
< prev index next >