New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8271627: Use local field access in favor of Class.getClassLoader0 #4960
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks okay. I assume you concern about the early startup when this method is running in interpreted mode. Do you see any startup improvement by this change?
@cl4es This change now passes all automated pre-integration checks. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been no new commits pushed to the
|
Very tiny, ~90 calls on bootstrap.
Thanks!
Yes. Many of these things that will be executed only when loading and bootstrapping, so might be interpreted for most of a JVM lifecycle. Right off the bat see a thousand or so less bytecode get executed on a hello world with this patch. |
/integrate |
Going to push as commit e621cff. |
Trivial startup hack/cleanup to use the
classLoader
field directly rather than thegetClassLoader0
accessor.Before aa12c8f there was no
classLoader
field andgetClassLoader0
was a native method that retrieved theClassLoader
by calling into the runtime. However, now thatclassLoader
is injected on mirror creation it makes less sense to use the accessor when not necessary.Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/4960/head:pull/4960
$ git checkout pull/4960
Update a local copy of the PR:
$ git checkout pull/4960
$ git pull https://git.openjdk.java.net/jdk pull/4960/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 4960
View PR using the GUI difftool:
$ git pr show -t 4960
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/4960.diff