RFR: 8290370: Convert SymbolPropertyTable to Resource Hashtable

Coleen Phillimore coleenp at openjdk.org
Thu Jul 21 20:05:10 UTC 2022


On Thu, 14 Jul 2022 15:13:15 GMT, Justin Gu <duke at openjdk.org> wrote:

> Converting the invoke_method_table into two tables, invoke_method_instrinsic_table and invoke_method_type_table

This looks really good!  I have a few minor change suggestions and some notes to reviewers.

src/hotspot/share/classfile/systemDictionary.cpp line 2023:

> 2021:                                                        TRAPS) {
> 2022: 
> 2023:   MutexLocker ml(THREAD, InvokeMethodTable_lock);

Note to reviewers: holding this lock throughout creating the MethodHandle intrinsic, prevents us from leaking a Method* that the code cache is pointing to, so is not easily removed.

src/hotspot/share/classfile/systemDictionary.cpp line 2055:

> 2053:     ResourceMark rm;
> 2054:     tty->print_cr("finding symbol %s %d", signature->as_C_string(), iid_as_int);
> 2055:   }

You should remove this UseNewCode.

src/hotspot/share/classfile/systemDictionary.cpp line 2204:

> 2202:   Handle empty;
> 2203:   OopHandle* o;
> 2204: 

Can you remove this extra blank line?

src/hotspot/share/classfile/systemDictionary.cpp line 2277:

> 2275:     MutexLocker ml(THREAD, InvokeMethodTable_lock);
> 2276:     bool created = false;
> 2277:     assert(method_type != NULL, "THIS IS THE ERROR");

Change the string "THIS IS THE ERROR" (because it's not) to "unexpected null" or something like that.

src/hotspot/share/runtime/java.cpp line 117:

> 115: 
> 116: void print_method_profiling_data() {
> 117:   if ((ProfileInterpreter COMPILER1_PRESENT(|| C1UpdateMethodData)) &&

Note to reviewers: This missing () made us iterate over methods at every exit for non-product mode.

-------------

Changes requested by coleenp (Reviewer).

PR: https://git.openjdk.org/jdk/pull/9495


More information about the hotspot-runtime-dev mailing list