File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
runtime/compiler/z/codegen Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -228,8 +228,13 @@ J9::Z::CodeGenerator::initialize()
228
228
// Enable high-resolution timer for System.nanoTime() unless we need to support checkpointing (i.e. snapshot mode), which requires
229
229
// that we adjust nanoTime() after restoring checkpoints. This adjustment is currently not implemented for the high res timer, hence
230
230
// we need to stick to the Java nanoTime() implementation.
231
- if (!fej9->isSnapshotModeEnabled ())
231
+ // In case of generating a portable code, even though we would not suffer the same issue of adjustment required, in case such code is
232
+ // used in application that will be checkpointed, it will suffer the same issue of unsupported nanoTime() adjustment for high res timer.
233
+ // As currently Snapshot mode is available on Linux on Z only, disabling the acceleration on Linux when we are generating portable code.
234
+ if (!(fej9->isSnapshotModeEnabled () || (comp->target ().isLinux () && comp->compilePortableCode ())))
235
+ {
232
236
cg->setSupportsCurrentTimeMaxPrecision ();
237
+ }
233
238
234
239
// Support BigDecimal Long Lookaside versioning optimizations.
235
240
if (!comp->getOption (TR_DisableBDLLVersioning))
You can’t perform that action at this time.
0 commit comments