Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[monodroid] Add log timing categories (dotnet#2623)
Fixes: dotnet#2610 Allow the `debug.mono.log` system property to contain a value of `timing=bar` so that Mono's performance counters can be *avoided*, as `counters.txt` and `methods.txt` -- normally generated when the `timing` value is used -- contribute to additional startup time, making it hard to get accurate/usable startup numbers that don't inordinately impact startup time. Example: adb shell setprop debug.mono.log timing=bare Comparison of XF test on Pixel XL 2: Startup times when `debug.mono.log=timing`: Time: 328ms Message: monodroid-timing: Runtime.init: end, total time; elapsed: 0s.18432517441218359126::16774850937603807740 Time: 329ms Message: monodroid-timing: Runtime.init: end, total time; elapsed: 0s.18432517441218787043::16774850937603807745 Time: 337ms Message: monodroid-timing: Runtime.init: end, total time; elapsed: 0s.18432517441219141783::16774850937603807750 Time: 320ms Message: monodroid-timing: Runtime.init: end, total time; elapsed: 0s.18432517441218515064::16774850937603807755 Time: 327ms Message: monodroid-timing: Runtime.init: end, total time; elapsed: 0s.18432517441218450741::16774850937603807760 Startup times when `debug.mono.log=timing=bare`: Time: 321ms Message: monodroid-timing: Runtime.init: end, total time; elapsed: 0s.18432517441219032407::16774850937603807703 Time: 314ms Message: monodroid-timing: Runtime.init: end, total time; elapsed: 0s.18432517441219071678::16774850937603807708 Time: 314ms Message: monodroid-timing: Runtime.init: end, total time; elapsed: 0s.18432517441218700949::16774850937603807713 Time: 313ms Message: monodroid-timing: Runtime.init: end, total time; elapsed: 0s.18432517441218922616::16774850937603807718 Time: 326ms Message: monodroid-timing: Runtime.init: end, total time; elapsed: 0s.18432517441218974960::16774850937603807723 Writing to `counters.txt` and `methods.txt` contributes ~10.6ms to startup time, on average, for this app.
- Loading branch information