Skip to content
This repository has been archived by the owner on Dec 13, 2024. It is now read-only.

LUDCL refresh points #16

Merged
merged 1 commit into from
Aug 15, 2022
Merged

Conversation

rmnattas
Copy link
Contributor

In ObjectInputStream, the latest user defined class loader (LUDCL) is cached. The cache is refreshed at different points in the code by walking the stack, some of the points are called more ofter than where the LUDCL is actually needed (in resolveClass()). This causes the cache to be refreshed and perform a stackWalk more times than LUDCL is used.

This fix removes the points of refresh outside resolveClass() so a stackWalk is performed at most as many times the LUDCL is needed, or less if already cached.

eclipse-openj9/openj9#15570

Tests were run for the JDK11 PR: ibmruntimes/openj9-openjdk-jdk11#552 (comment)

There exist different points where LUDCL is refreshed by a stackWalk
where it's not needed, this commit removes these cases and stackWalking
only when it needs to.

Signed-off-by: Abdulrahman Alattas <rmnattas@gmail.com>
@pshipton pshipton merged commit ef594cb into ibmruntimes:openj9 Aug 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants