diff options
author | poonam <none@none> | 2018-03-30 20:09:45 +0000 |
---|---|---|
committer | poonam <none@none> | 2018-03-30 20:09:45 +0000 |
commit | d4908f6d9e9b0e05770f8fcb2e1aa42107b7708e (patch) | |
tree | 03d0df844d457c31e18c7d1a9fb386e7656d9ac9 /src/share/vm/code/vtableStubs.cpp | |
parent | 3fb92c006c782c63320060cd7907ceadc19c957b (diff) | |
download | jdk8u_hotspot-d4908f6d9e9b0e05770f8fcb2e1aa42107b7708e.tar.gz |
8199406: Performance drop with Java JDK 1.8.0_162-b32
Summary: Improve the nmethod unloading times by optimizing the search for an itable stub in VtableStubs array
Reviewed-by: kvn, coleenp, tschatzl
Diffstat (limited to 'src/share/vm/code/vtableStubs.cpp')
-rw-r--r-- | src/share/vm/code/vtableStubs.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/share/vm/code/vtableStubs.cpp b/src/share/vm/code/vtableStubs.cpp index ac99da40e..8424378d7 100644 --- a/src/share/vm/code/vtableStubs.cpp +++ b/src/share/vm/code/vtableStubs.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2018, 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 @@ -60,7 +60,7 @@ void* VtableStub::operator new(size_t size, int code_size) throw() { // There is a dependency on the name of the blob in src/share/vm/prims/jvmtiCodeBlobEvents.cpp // If changing the name, update the other file accordingly. - BufferBlob* blob = BufferBlob::create("vtable chunks", bytes); + VtableBlob* blob = VtableBlob::create("vtable chunks", bytes); if (blob == NULL) { return NULL; } @@ -167,17 +167,18 @@ void VtableStubs::enter(bool is_vtable_stub, int vtable_index, VtableStub* s) { _number_of_vtable_stubs++; } - -bool VtableStubs::is_entry_point(address pc) { +VtableStub* VtableStubs::entry_point(address pc) { MutexLocker ml(VtableStubs_lock); VtableStub* stub = (VtableStub*)(pc - VtableStub::entry_offset()); uint hash = VtableStubs::hash(stub->is_vtable_stub(), stub->index()); VtableStub* s; for (s = _table[hash]; s != NULL && s != stub; s = s->next()) {} - return s == stub; + if (s == stub) { + return s; + } + return NULL; } - bool VtableStubs::contains(address pc) { // simple solution for now - we may want to use // a faster way if this function is called often |