Skip to content

Commit

Permalink
Refactor handling of non-SOH generations (dotnet#1688)
Browse files Browse the repository at this point in the history
* refactoring

* ploh-->uoh

* fix Linux build
PR feedback

* some PR feedback

* more PR feedback

more PR feedback

* more PR feedback

* address comments in UpdatePreGCCounters

* removed a confusing comment

* stress fix in background sweep

* use `saved_sweep_ephemeral_seg` in background sweep.

* fixed `GCPerHeapHistory_V3` event.

* re-implemented dotnet/runtime#2103 on top of refactoring  (it was hard to merge)
  • Loading branch information
VSadov authored and MichalStrehovsky committed Mar 31, 2020
1 parent 38697e9 commit 42903d7
Show file tree
Hide file tree
Showing 10 changed files with 1,503 additions and 1,750 deletions.
2 changes: 1 addition & 1 deletion src/Native/Runtime/GCHelpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ COOP_PINVOKE_HELPER(Int64, RhGetAllocatedBytesForCurrentThread, ())
{
Thread *pThread = ThreadStore::GetCurrentThread();
gc_alloc_context *ac = pThread->GetAllocContext();
Int64 currentAllocated = ac->alloc_bytes + ac->alloc_bytes_loh - (ac->alloc_limit - ac->alloc_ptr);
Int64 currentAllocated = ac->alloc_bytes + ac->alloc_bytes_uoh - (ac->alloc_limit - ac->alloc_ptr);
return currentAllocated;
}

Expand Down
6 changes: 6 additions & 0 deletions src/Native/gc/env/gcenv.base.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@
#define NOINLINE __declspec(noinline)
#endif // _MSC_VER

#ifdef _MSC_VER
#define __UNREACHABLE() __assume(0)
#else
#define __UNREACHABLE() __builtin_unreachable()
#endif

#ifndef SIZE_T_MAX
#define SIZE_T_MAX ((size_t)-1)
#endif
Expand Down
Loading

0 comments on commit 42903d7

Please sign in to comment.