-
Notifications
You must be signed in to change notification settings - Fork 922
Closed
Labels
Description
I was looking at the source code of async-profiler and noticed that the TSC time is queried at JFR event record creation time, which occurs towards the end of the sampling signal handler.
The code leading to the writing of the JFR event entails locks, stack walking, calling into JVMTI internals, etc.
It seems to me there is a potential for time jitter and for the JFR event time to lag the actual sample time by a meaningful margin.
Is the approach of waiting to query the time appropriate or should the time be queried closer to interrupt / instruction pointer resolution?