RFR: 8294053: Unneeded local variable in handle_safefetch()
Fredrik Bredberg
duke at openjdk.org
Thu Sep 22 10:02:22 UTC 2022
On Wed, 21 Sep 2022 10:11:55 GMT, Fredrik Bredberg <duke at openjdk.org> wrote:
> The input argument "pc" is shadowed by a local variable with the same type and name, and is initialized to the same value as is passed into the handle_safefetch() function by its callers. The local "pc" variable can therefore be removed from handle_safefetch().
>
> Tested tier1, tier2 and tier3 without any new problems.
I assumed that if it was possible to get hold of the pc on Zero, that would have been done by calling os::Posix::ucontext_get_pc(uc) in JVM_HANDLE_XXX_SIGNAL prior to calling handle_safefetch().
I hope this patch haven't done things worse. My intention was just to remove a "local variable shadows a parameter" issue, which I don't think should be in any code base.
-------------
PR: https://git.openjdk.org/jdk/pull/10373
More information about the hotspot-runtime-dev
mailing list