Add a function to stop profiling after period
CLR environment "MultiCoreJitProfileWriteDelay" doesnot work on Linux.
In some specific cases, application is terminated without calling coreclr_shutdown() function.
As a result, MCJ profiling data is not written.
Added a function to generate profiling data after delay so that MCJ can be used even in this case.
It works by adding delay to the environment variable as follows:
- CLR_MCJ_PROFILE_WRITE_DELAY={delay}
(The unit of delay is second)
If you want to stop profiling after 10 seconds, add environment variable like below:
- CLR_MCJ_PROFILE_WRITE_DELAY=10