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#2103 on top of refactoring  (it was hard to merge)
  • Loading branch information
VSadov authored Jan 29, 2020
1 parent af0798b commit 1336238
Show file tree
Hide file tree
Showing 13 changed files with 1,507 additions and 1,754 deletions.
4 changes: 2 additions & 2 deletions src/coreclr/src/debug/daccess/request.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,7 @@ ClrDataAccess::GetThreadAllocData(CLRDATA_ADDRESS addr, struct DacpAllocData *da
Thread* thread = PTR_Thread(TO_TADDR(addr));

data->allocBytes = TO_CDADDR(thread->m_alloc_context.alloc_bytes);
data->allocBytesLoh = TO_CDADDR(thread->m_alloc_context.alloc_bytes_loh);
data->allocBytesLoh = TO_CDADDR(thread->m_alloc_context.alloc_bytes_uoh);

SOSDacLeave();
return hr;
Expand Down Expand Up @@ -732,7 +732,7 @@ ClrDataAccess::GetHeapAllocData(unsigned int count, struct DacpGenerationAllocDa
{
dac_generation entry = *GenerationTableIndex(table, i);
data[0].allocData[i].allocBytes = (CLRDATA_ADDRESS)(ULONG_PTR) entry.allocation_context.alloc_bytes;
data[0].allocData[i].allocBytesLoh = (CLRDATA_ADDRESS)(ULONG_PTR) entry.allocation_context.alloc_bytes_loh;
data[0].allocData[i].allocBytesLoh = (CLRDATA_ADDRESS)(ULONG_PTR) entry.allocation_context.alloc_bytes_uoh;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/src/debug/daccess/request_svr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ HRESULT ClrDataAccess::GetServerAllocData(unsigned int count, struct DacpGenerat
{
dac_generation generation = *ServerGenerationTableIndex(pHeap, i);
data[n].allocData[i].allocBytes = (CLRDATA_ADDRESS)(ULONG_PTR) generation.allocation_context.alloc_bytes;
data[n].allocData[i].allocBytesLoh = (CLRDATA_ADDRESS)(ULONG_PTR) generation.allocation_context.alloc_bytes_loh;
data[n].allocData[i].allocBytesLoh = (CLRDATA_ADDRESS)(ULONG_PTR) generation.allocation_context.alloc_bytes_uoh;
}
}
}
Expand Down
6 changes: 6 additions & 0 deletions src/coreclr/src/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 1336238

Please sign in to comment.