Seen while working on signal handling:
I see these in the various Posix signal handlers in os_xxx_yyy:
```
// jni_fast_Get<Primitive>Field can trap at certain pc's if a GC kicks in
// and the heap gets shrunk before the field access.
if ((sig == SIGSEGV) || (sig == SIGBUS)) {
address addr_slow = JNI_FastGetField::find_slowcase_pc(pc);
if (addr_slow != (address)-1) {
stub = addr_slow;
}
}
```
I think this gets executed unnecessarily often. If I understand the comment correctly, it should only be executed if
- A return stub has not yet been determined at this point
- The faulting address is in heap range
I see these in the various Posix signal handlers in os_xxx_yyy:
```
// jni_fast_Get<Primitive>Field can trap at certain pc's if a GC kicks in
// and the heap gets shrunk before the field access.
if ((sig == SIGSEGV) || (sig == SIGBUS)) {
address addr_slow = JNI_FastGetField::find_slowcase_pc(pc);
if (addr_slow != (address)-1) {
stub = addr_slow;
}
}
```
I think this gets executed unnecessarily often. If I understand the comment correctly, it should only be executed if
- A return stub has not yet been determined at this point
- The faulting address is in heap range