Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRIU adds time compensation for RuntimeMXBean.getUptime() #18235

Merged
merged 1 commit into from Oct 30, 2023

Conversation

JasonFengJ9
Copy link
Member

@JasonFengJ9 JasonFengJ9 commented Oct 5, 2023

CRIU adds time compensation for RuntimeMXBean.getUptime()

Adjusted RuntimeMXBean.getUptime() with checkpointState.checkpointRestoreTimeDelta;
Added a test.

closes #18106

Signed-off-by: Jason Feng fengj@ca.ibm.com

@JasonFengJ9 JasonFengJ9 added comp:vm criu Used to track CRIU snapshot related work labels Oct 5, 2023
@tajila
Copy link
Contributor

tajila commented Oct 11, 2023

@JasonFengJ9 Please rebase this

@JasonFengJ9
Copy link
Member Author

@tajila rebased this and also updated as per #18184 (review) & #18184 (comment)

@tajila
Copy link
Contributor

tajila commented Oct 12, 2023

Can you please add a few tests with elapsed time (System.nano and System.currentmillis) and j.u.Timer for the following scenarios:

  1. Time start pre checkpoint and end post-restore (we may already have this)
  2. Time start in checkpoint hook and end in post-restore
  3. Time start in restore hook and end in post-restore
  4. Time start in checkpoint hook and end in checkpoint hook
  5. Time start in restore hook and end in restore hook
  6. Time start in checkpoint hook and end in restore hook

@tajila
Copy link
Contributor

tajila commented Oct 13, 2023

Adjusted RuntimeMXBean.getUptime() with
checkpointState.checkpointRestoreTimeDelta;
Added a test.

Signed-off-by: Jason Feng <fengj@ca.ibm.com>
@JasonFengJ9
Copy link
Member Author

@tajila I am moving the vm->checkpointState.checkpointRestoreTimeDelta and portLibrary->nanoTimeMonotonicClockDelta calculation changes to a separated PR which will add tests as per #18235 (comment).

This PR addresses the time compensation for RuntimeMXBean.getUptime() and a follow-up change for #18184.

@tajila
Copy link
Contributor

tajila commented Oct 30, 2023

jenkins test sanity alinux64 jdk21

@tajila tajila merged commit b1f9c82 into eclipse-openj9:master Oct 30, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:vm criu Used to track CRIU snapshot related work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CRIU: Add compensations to RuntimeMXBeans.getUptime()
2 participants