mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8062116: JVMTI GetClassMethods is Slow
Allocate enough space for all jmethodids; make adding a jmethodid O(1) Reviewed-by: coleenp, rasbold, sspitsyn
This commit is contained in:
parent
75778598e2
commit
54e9fee4d2
5 changed files with 166 additions and 44 deletions
|
@ -729,6 +729,11 @@ class Method : public Metadata {
|
|||
static jmethodID make_jmethod_id(ClassLoaderData* loader_data, Method* mh);
|
||||
static void destroy_jmethod_id(ClassLoaderData* loader_data, jmethodID mid);
|
||||
|
||||
// Ensure there is enough capacity in the internal tracking data
|
||||
// structures to hold the number of jmethodIDs you plan to generate.
|
||||
// This saves substantial time doing allocations.
|
||||
static void ensure_jmethod_ids(ClassLoaderData* loader_data, int capacity);
|
||||
|
||||
// Use resolve_jmethod_id() in situations where the caller is expected
|
||||
// to provide a valid jmethodID; the only sanity checks are in asserts;
|
||||
// result guaranteed not to be NULL.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue