RFR: 8282477: [x86, aarch64] vmassert(_last_Java_pc == NULL, "already walkable"); fails with async profiler [v4]
Dean Long
dlong at openjdk.java.net
Mon May 2 21:04:30 UTC 2022
On Fri, 29 Apr 2022 11:14:38 GMT, Johannes Bechberger <duke at openjdk.java.net> wrote:
>> Fix the assertion by replacing it by assertion that does not fail.
>
> Johannes Bechberger has updated the pull request incrementally with one additional commit since the last revision:
>
> Remove Thread from make_walkable signature
How does the async profiler make the stack walkable? If it is by calling make_walkable() or capture_last_Java_pc(), and this is just a race of an idempotent operation (the PC set is always the same), then it seems like the simplest fix would have been to relax the assert like this:
void JavaFrameAnchor::capture_last_Java_pc() {
vmassert(_last_Java_sp != NULL, "no last frame set");
address last_Java_pc = (address)_last_Java_sp[-1];
vmassert(_last_Java_pc == NULL || _last_Java_pc == last_Java_pc, "already walkable");
_last_Java_pc = last_Java_pc;
}
which is similar to how frame::patch_pc() works.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8209
More information about the hotspot-dev
mailing list