- Notifications
You must be signed in to change notification settings - Fork5.2k
Optimize plan phase for foreground gcs#45208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
PeterSolMS merged 13 commits intodotnet:masterfromPeterSolMS:optimize_plan_phase_for_foreground_gcsNov 26, 2020
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes from1 commit
Commits
Show all changes
13 commits Select commitHold shift + click to select a range
3d639f2 delete backport.yml so I can push to master
PeterSolMSc78344e Merge remote-tracking branch 'upstream/master'
PeterSolMS0fc9aeb Undo unintended changes
PeterSolMS9073278 Merge remote-tracking branch 'upstream/master'
PeterSolMSeb4f188 Merge remote-tracking branch 'upstream/master'
PeterSolMSc809f97 Merge remote-tracking branch 'upstream/master'
PeterSolMS808750e Merge remote-tracking branch 'upstream/master'
PeterSolMS8985284 Merge remote-tracking branch 'upstream/master'
PeterSolMS61be136 Merge remote-tracking branch 'upstream/master'
PeterSolMS1ebec15 Changes to allow us to use the mark list for foreground GCs.
PeterSolMS5893c56 Merge remote-tracking branch 'upstream/master'
PeterSolMSdbd6dc0 Merge branch 'master' into optimize_plan_phase_for_foreground_gcs
PeterSolMS9d053c6 Address code review feedback - factor out common while-loop.
PeterSolMSFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
Changes to allow us to use the mark list for foreground GCs.
The key point is to clear the background GC mark bits for objects that the foreground GC found to be dead.The existing code walked all the dead objects individually and cleared their mark bits, but as it turns out, it is significantly cheaper to turn off the mark bits in bulk.
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
commit1ebec15b15a5aea0dd283f68f729845e8be2495c
There are no files selected for viewing
58 changes: 32 additions & 26 deletionssrc/coreclr/src/gc/gc.cpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -8713,16 +8713,6 @@ void gc_heap::sort_mark_list() | ||
| return; | ||
| } | ||
| // if any other heap had a mark list overflow, we fake one too, | ||
| // so we don't use an incomplete mark list by mistake | ||
| for (int i = 0; i < n_heaps; i++) | ||
| @@ -23439,11 +23429,7 @@ void gc_heap::plan_phase (int condemned_gen_number) | ||
| #endif //GC_CONFIG_DRIVEN | ||
| if ((condemned_gen_number < max_generation) && | ||
| (mark_list_index <= mark_list_end)) | ||
| { | ||
| #ifndef MULTIPLE_HEAPS | ||
| #ifdef USE_VXSORT | ||
| @@ -24145,19 +24131,39 @@ void gc_heap::plan_phase (int condemned_gen_number) | ||
| #ifdef MARK_LIST | ||
| if (use_mark_list) | ||
| { | ||
| if (current_c_gc_state != c_gc_state_marking) | ||
| { | ||
| while ((mark_list_next < mark_list_index) && | ||
| (*mark_list_next <= x)) | ||
| { | ||
| mark_list_next++; | ||
| } | ||
| x = end; | ||
| if ((mark_list_next < mark_list_index) | ||
| #ifdef MULTIPLE_HEAPS | ||
| && (*mark_list_next < end) //for multiple segments | ||
| #endif //MULTIPLE_HEAPS | ||
| ) | ||
| x = *mark_list_next; | ||
| } | ||
| else | ||
| { | ||
| assert(gc_heap::background_running_p()); | ||
| uint8_t* old_x = x; | ||
| while ((mark_list_next < mark_list_index) && | ||
mangod9 marked this conversation as resolved. OutdatedShow resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| (*mark_list_next <= x)) | ||
| { | ||
| mark_list_next++; | ||
| } | ||
| x = end; | ||
| if ((mark_list_next < mark_list_index) | ||
| #ifdef MULTIPLE_HEAPS | ||
| && (*mark_list_next < end) //for multiple segments | ||
| #endif //MULTIPLE_HEAPS | ||
| ) | ||
| x = *mark_list_next; | ||
| bgc_clear_batch_mark_array_bits (old_x, x); | ||
| } | ||
| } | ||
| else | ||
| #endif //MARK_LIST | ||
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.