RFR: 8351491: Add info from release file to hserr file [v2]
David Holmes
dholmes at openjdk.org
Thu Apr 3 07:33:49 UTC 2025
On Wed, 2 Apr 2025 07:56:31 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:
> Do you have a good example of such a one-of periodic task?
Not existing in mainline. The last one-of PeriodicTask was a BiasedLocking task:
// One-shot PeriodicTask subclass for enabling biased locking
class EnableBiasedLockingTask : public PeriodicTask {
public:
EnableBiasedLockingTask(size_t interval_time) : PeriodicTask(interval_time) {}
virtual void task() {
VM_EnableBiasedLocking op;
VMThread::execute(&op);
// Reclaim our storage and disenroll ourself
delete this;
}
};
...
EnableBiasedLockingTask* task = new EnableBiasedLockingTask(BiasedLockingStartupDelay);
task->enroll();
In this case we'd use a very short `interval_time` as we are not really trying to delay, and we would do this somewhere early in `create_vm` - I think you can do this before the WatcherThread is created, but not sure.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/24244#issuecomment-2774738247
More information about the hotspot-dev
mailing list