mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 01:24:33 +02:00
8216197: Remove unused new_hash methods
Reviewed-by: kbarrett, dholmes
This commit is contained in:
parent
db1518dae2
commit
c6c604784a
5 changed files with 5 additions and 36 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -39,9 +39,6 @@ class Metadata : public MetaspaceObj {
|
|||
|
||||
int identity_hash() { return (int)(uintptr_t)this; }
|
||||
|
||||
// Rehashing support for tables containing pointers to this
|
||||
unsigned int new_hash(juint seed) { ShouldNotReachHere(); return 0; }
|
||||
|
||||
virtual bool is_metadata() const volatile { return true; }
|
||||
virtual bool is_klass() const volatile { return false; }
|
||||
virtual bool is_method() const volatile { return false; }
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -97,21 +97,6 @@ intptr_t oopDesc::slow_identity_hash() {
|
|||
return ObjectSynchronizer::identity_hash_value_for(object);
|
||||
}
|
||||
|
||||
// When String table needs to rehash
|
||||
unsigned int oopDesc::new_hash(juint seed) {
|
||||
EXCEPTION_MARK;
|
||||
ResourceMark rm;
|
||||
int length;
|
||||
jchar* chars = java_lang_String::as_unicode_string(this, length, THREAD);
|
||||
if (chars != NULL) {
|
||||
// Use alternate hashing algorithm on the string
|
||||
return AltHashing::murmur3_32(seed, chars, length);
|
||||
} else {
|
||||
vm_exit_out_of_memory(length, OOM_MALLOC_ERROR, "unable to create Unicode strings for String table rehash");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
// used only for asserts and guarantees
|
||||
bool oopDesc::is_oop(oop obj, bool ignore_mark_word) {
|
||||
if (!Universe::heap()->is_oop(obj)) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -308,9 +308,6 @@ class oopDesc {
|
|||
inline intptr_t identity_hash();
|
||||
intptr_t slow_identity_hash();
|
||||
|
||||
// Alternate hashing code if string table is rehashed
|
||||
unsigned int new_hash(juint seed);
|
||||
|
||||
// marks are forwarded to stack when object is locked
|
||||
inline bool has_displaced_mark_raw() const;
|
||||
inline markOop displaced_mark_raw() const;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -212,13 +212,6 @@ const char* Symbol::as_klass_external_name() const {
|
|||
return str;
|
||||
}
|
||||
|
||||
// Alternate hashing for unbalanced symbol tables.
|
||||
unsigned int Symbol::new_hash(juint seed) {
|
||||
ResourceMark rm;
|
||||
// Use alternate hashing algorithm on this symbol.
|
||||
return AltHashing::murmur3_32(seed, (const jbyte*)as_C_string(), utf8_length());
|
||||
}
|
||||
|
||||
// Increment refcount while checking for zero. If the Symbol's refcount becomes zero
|
||||
// a thread could be concurrently removing the Symbol. This is used during SymbolTable
|
||||
// lookup to avoid reviving a dead Symbol.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -164,9 +164,6 @@ class Symbol : public MetaspaceObj {
|
|||
((addr_bits ^ (length() << 8) ^ (( _body[0] << 8) | _body[1])) << 16);
|
||||
}
|
||||
|
||||
// For symbol table alternate hashing
|
||||
unsigned int new_hash(juint seed);
|
||||
|
||||
// Reference counting. See comments above this class for when to use.
|
||||
int refcount() const { return extract_refcount(_length_and_refcount); }
|
||||
bool try_increment_refcount();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue