Fix multiple SGEN_LOG to correctly scale elapsed time in usec. (#16485)
commit70aba13173840818246b470e425a6d2585e7672d
authorJohan Lorensson <lateralusx.github@gmail.com>
Tue, 27 Aug 2019 10:14:12 +0000 (27 12:14 +0200)
committerGitHub <noreply@github.com>
Tue, 27 Aug 2019 10:14:12 +0000 (27 12:14 +0200)
treefcd1fb18cd5b9a299fe23ffb8dc6bbd330e2efe2
parentbfe1b6182cb4e354f94d00d3206be4b83331db1d
Fix multiple SGEN_LOG to correctly scale elapsed time in usec. (#16485)

Several SGEN_LOG entries logged usec based on result returend from TV_ELAPSED.
On SGEN's implementation of TV_ELAPSED, the result is not scaled to usec
but returned as 100ns ticks. This was not handled correctly by SGEN_LOG,
but other measures, like profile counters and SGEN binary protocol handles
it correctly.

Fix will adjust the SGEN_LOG calls currently presenting usec to correctly
scale the result. Fix also adds one additional logging measuring total
amount of time spend scanning thread data.
mono/metadata/sgen-mono.c
mono/metadata/sgen-stw.c
mono/sgen/sgen-gc.c