Add a function to stop profiling after period
authorWoongsuk Cho <ws77.cho@samsung.com>
Thu, 12 Aug 2021 01:01:16 +0000 (10:01 +0900)
committer조웅석/Common Platform Lab(SR)/Principal Engineer/삼성전자 <ws77.cho@samsung.com>
Thu, 12 Aug 2021 21:11:17 +0000 (06:11 +0900)
commitc097e29a79d9340f6c8c33ef4ba8bc700b5684a9
tree72cbd9540640c78517d5d919d520c9da3174713b
parentd2bb6ca268f172acff1f69a822a66d33a8bdf0b1
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
Managed/Tizen.Runtime/Profiler.cs [new file with mode: 0644]
Managed/Tizen.Runtime/Tizen.Runtime.csproj
NativeLauncher/inc/coreclr_host.h
NativeLauncher/launcher/lib/core_runtime.cc