Code cleanup (#45950)
authorMaoni Stephens <Maoni0@users.noreply.github.com>
Fri, 18 Dec 2020 00:26:41 +0000 (16:26 -0800)
committerGitHub <noreply@github.com>
Fri, 18 Dec 2020 00:26:41 +0000 (16:26 -0800)
commitfc4f3ea70fba0bd14c9bed63c6ed546bc1bb1cf6
tree43954abf1495b2e82115336714b53ab2eb5f21ea
parent5ef9a248479a151448a25eb27d8f7bbd3e8c5c2f
Code cleanup (#45950)

Changed a bunch of dprintf levels, eg from 3 to 1 when they are for FATAL_GC_ERROR 'cause you'd always want them; from 1 to 2 in seg_mapping table functions 'cause there could be tons of these when there are many heaps.

Fixed a perf bug in commit_new_mark_array introduced by the refactor change (#1688). This doesn't cause functional problems - we are just calling the same commit_mark_array_with_check on new_heap_segment multiple times.

Got rid of keep_card_live - all it needs is just to increase the cross gen pointer count.

Got rid of useful empty lines/comments/a few vars.

Renamed a few vars to the actual meaning.

Renamed should_commit_mark_array to is_bgc_in_progress and modified a few places to call it instead of duplicated code.

Moved the decision of condemning 1 when bgc is in progress to joined_generation_to_condemn (should logically belong there anyway) which fixes the problem that GCToEEInterface::DiagGCStart was getting the wrong condemned gen in this case. It's also nicer to have all the code that makes the decision of which gen to condemn in only generation_to_condemn and joined_generation_to_condemn.

Make PARALLEL_MARK_LIST_SORT always defined and got rid of code when it's not.

Proper checks for FEATURE_LOH_COMPACTION in a few places.

Changed some really long lines (please try to keep lines under 110 chars in general).
src/coreclr/gc/gc.cpp
src/coreclr/gc/gcee.cpp
src/coreclr/gc/gcpriv.h