mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8203490: StringTable::dump lacks a load barrier
Reviewed-by: coleenp, pliden
This commit is contained in:
parent
88aa1562f7
commit
6c2e9e1981
3 changed files with 6 additions and 4 deletions
|
@ -434,7 +434,7 @@ void StringTable::verify() {
|
|||
|
||||
void StringTable::dump(outputStream* st, bool verbose) {
|
||||
if (!verbose) {
|
||||
the_table()->print_table_statistics(st, "StringTable");
|
||||
the_table()->print_table_statistics(st, "StringTable", string_object_no_keepalive);
|
||||
} else {
|
||||
Thread* THREAD = Thread::current();
|
||||
st->print_cr("VERSION: 1.1");
|
||||
|
|
|
@ -320,7 +320,8 @@ template <MEMFLAGS F> bool BasicHashtable<F>::resize(int new_size) {
|
|||
// literals.
|
||||
|
||||
template <class T, MEMFLAGS F> void Hashtable<T, F>::print_table_statistics(outputStream* st,
|
||||
const char *table_name) {
|
||||
const char *table_name,
|
||||
T (*literal_load_barrier)(HashtableEntry<T, F>*)) {
|
||||
NumberSeq summary;
|
||||
int literal_bytes = 0;
|
||||
for (int i = 0; i < this->table_size(); ++i) {
|
||||
|
@ -328,7 +329,8 @@ template <class T, MEMFLAGS F> void Hashtable<T, F>::print_table_statistics(outp
|
|||
for (HashtableEntry<T, F>* e = this->bucket(i);
|
||||
e != NULL; e = e->next()) {
|
||||
count++;
|
||||
literal_bytes += literal_size(e->literal());
|
||||
T l = (literal_load_barrier != NULL) ? literal_load_barrier(e) : e->literal();
|
||||
literal_bytes += literal_size(l);
|
||||
}
|
||||
summary.add((double)count);
|
||||
}
|
||||
|
|
|
@ -265,7 +265,7 @@ public:
|
|||
return this->hash_to_index(compute_hash(name));
|
||||
}
|
||||
|
||||
void print_table_statistics(outputStream* st, const char *table_name);
|
||||
void print_table_statistics(outputStream* st, const char *table_name, T (*literal_load_barrier)(HashtableEntry<T, F>*) = NULL);
|
||||
|
||||
protected:
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue