RFR: 8295427: popframe004: report more details on error
Chris Plummer
cjplummer at openjdk.org
Tue Oct 18 00:50:57 UTC 2022
On Tue, 18 Oct 2022 00:06:57 GMT, Serguei Spitsyn <sspitsyn at openjdk.org> wrote:
>> Failures of the test are usually caused by unexpected frame in the stack.
>> Also the failures are intermittent, so it makes sense to report more details on error to simplify analysis.
>> The fix adds stack trace printing if the test fails
>
> test/hotspot/jtreg/vmTestbase/nsk/jvmti/PopFrame/popframe004/popframe004.cpp line 88:
>
>> 86: }
>> 87:
>> 88: static void printStackTrace(jvmtiEnv *jvmti, jthread thread) {
>
> We normally use C naming convention for function names.
> The exception is JVMTI event call backs.
> For serviceability/jvmti tests we already have this:
> ` test/lib/jdk/test/lib/jvmti/jvmti_common.h`
> You can check for `print_stack_trace()` function there.
> It depends on a couple of other library functions though.
> Unfortunately, we do not have such utility functions for nsk tests.
> We may want something similar for nsk/jvmti tests.
> If so, then it is better, at least, to keep the same function names and signatures if possible.
> It'd make sense to check with Leonid on what approach to take.
Most of this code seems to have been copied from `Java_nsk_jvmti_GetStackTrace_getstacktr001_check`. Maybe some consolidating would be good.
-------------
PR: https://git.openjdk.org/jdk/pull/10733
More information about the serviceability-dev
mailing list