Skip to content

Commit

Permalink
Merge in 'release/7.0' changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dotnet-bot committed Nov 29, 2022
2 parents 05b1a93 + e721ae9 commit fa34169
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 31 deletions.
32 changes: 16 additions & 16 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -178,37 +178,37 @@
<Uri>https://github.com/dotnet/runtime-assets</Uri>
<Sha>0c78106337dbe19ce4dd99140636865cdc99d008</Sha>
</Dependency>
<Dependency Name="runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk" Version="11.1.0-alpha.1.22564.1">
<Dependency Name="runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk" Version="11.1.0-alpha.1.22578.2">
<Uri>https://github.com/dotnet/llvm-project</Uri>
<Sha>335a70e88e5904f8127486d17dc6a87a9fad81b8</Sha>
<Sha>4b771d6d4bbd843fb7e1a9c2aeb0a2e2f1e9584b</Sha>
</Dependency>
<Dependency Name="runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools" Version="11.1.0-alpha.1.22564.1">
<Dependency Name="runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools" Version="11.1.0-alpha.1.22578.2">
<Uri>https://github.com/dotnet/llvm-project</Uri>
<Sha>335a70e88e5904f8127486d17dc6a87a9fad81b8</Sha>
<Sha>4b771d6d4bbd843fb7e1a9c2aeb0a2e2f1e9584b</Sha>
</Dependency>
<Dependency Name="runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk" Version="11.1.0-alpha.1.22564.1">
<Dependency Name="runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk" Version="11.1.0-alpha.1.22578.2">
<Uri>https://github.com/dotnet/llvm-project</Uri>
<Sha>335a70e88e5904f8127486d17dc6a87a9fad81b8</Sha>
<Sha>4b771d6d4bbd843fb7e1a9c2aeb0a2e2f1e9584b</Sha>
</Dependency>
<Dependency Name="runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools" Version="11.1.0-alpha.1.22564.1">
<Dependency Name="runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools" Version="11.1.0-alpha.1.22578.2">
<Uri>https://github.com/dotnet/llvm-project</Uri>
<Sha>335a70e88e5904f8127486d17dc6a87a9fad81b8</Sha>
<Sha>4b771d6d4bbd843fb7e1a9c2aeb0a2e2f1e9584b</Sha>
</Dependency>
<Dependency Name="runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk" Version="11.1.0-alpha.1.22564.1">
<Dependency Name="runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk" Version="11.1.0-alpha.1.22578.2">
<Uri>https://github.com/dotnet/llvm-project</Uri>
<Sha>335a70e88e5904f8127486d17dc6a87a9fad81b8</Sha>
<Sha>4b771d6d4bbd843fb7e1a9c2aeb0a2e2f1e9584b</Sha>
</Dependency>
<Dependency Name="runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools" Version="11.1.0-alpha.1.22564.1">
<Dependency Name="runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools" Version="11.1.0-alpha.1.22578.2">
<Uri>https://github.com/dotnet/llvm-project</Uri>
<Sha>335a70e88e5904f8127486d17dc6a87a9fad81b8</Sha>
<Sha>4b771d6d4bbd843fb7e1a9c2aeb0a2e2f1e9584b</Sha>
</Dependency>
<Dependency Name="runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk" Version="11.1.0-alpha.1.22564.1">
<Dependency Name="runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk" Version="11.1.0-alpha.1.22578.2">
<Uri>https://github.com/dotnet/llvm-project</Uri>
<Sha>335a70e88e5904f8127486d17dc6a87a9fad81b8</Sha>
<Sha>4b771d6d4bbd843fb7e1a9c2aeb0a2e2f1e9584b</Sha>
</Dependency>
<Dependency Name="runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools" Version="11.1.0-alpha.1.22564.1">
<Dependency Name="runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools" Version="11.1.0-alpha.1.22578.2">
<Uri>https://github.com/dotnet/llvm-project</Uri>
<Sha>335a70e88e5904f8127486d17dc6a87a9fad81b8</Sha>
<Sha>4b771d6d4bbd843fb7e1a9c2aeb0a2e2f1e9584b</Sha>
</Dependency>
<Dependency Name="Microsoft.NETCore.App.Runtime.win-x64" Version="7.0.0-rc.1.22414.6">
<Uri>https://github.com/dotnet/runtime</Uri>
Expand Down
16 changes: 8 additions & 8 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -190,14 +190,14 @@
<MicrosoftNativeQuicMsQuicVersion>2.1.1</MicrosoftNativeQuicMsQuicVersion>
<SystemNetMsQuicTransportVersion>7.0.0-alpha.1.22406.1</SystemNetMsQuicTransportVersion>
<!-- Mono LLVM -->
<runtimelinuxarm64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>11.1.0-alpha.1.22564.1</runtimelinuxarm64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>
<runtimelinuxarm64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>11.1.0-alpha.1.22564.1</runtimelinuxarm64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>
<runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>11.1.0-alpha.1.22564.1</runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>
<runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>11.1.0-alpha.1.22564.1</runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>
<runtimewinx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>11.1.0-alpha.1.22564.1</runtimewinx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>
<runtimewinx64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>11.1.0-alpha.1.22564.1</runtimewinx64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>
<runtimeosx1012x64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>11.1.0-alpha.1.22564.1</runtimeosx1012x64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>
<runtimeosx1012x64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>11.1.0-alpha.1.22564.1</runtimeosx1012x64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>
<runtimelinuxarm64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>11.1.0-alpha.1.22578.2</runtimelinuxarm64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>
<runtimelinuxarm64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>11.1.0-alpha.1.22578.2</runtimelinuxarm64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>
<runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>11.1.0-alpha.1.22578.2</runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>
<runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>11.1.0-alpha.1.22578.2</runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>
<runtimewinx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>11.1.0-alpha.1.22578.2</runtimewinx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>
<runtimewinx64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>11.1.0-alpha.1.22578.2</runtimewinx64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>
<runtimeosx1012x64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>11.1.0-alpha.1.22578.2</runtimeosx1012x64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>
<runtimeosx1012x64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>11.1.0-alpha.1.22578.2</runtimeosx1012x64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>
<!-- emscripten / Node -->
<MicrosoftNETRuntimeEmscriptenVersion>$(MicrosoftNETWorkloadEmscriptennet7Manifest70100Version)</MicrosoftNETRuntimeEmscriptenVersion>
<!-- workloads -->
Expand Down
27 changes: 23 additions & 4 deletions src/coreclr/gc/gc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24092,12 +24092,17 @@ BOOL ref_p (uint8_t* r)
return (straight_ref_p (r) || partial_object_p (r));
}

mark_queue_t::mark_queue_t() : curr_slot_index(0)
mark_queue_t::mark_queue_t()
#ifdef MARK_PHASE_PREFETCH
: curr_slot_index(0)
#endif //MARK_PHASE_PREFETCH
{
#ifdef MARK_PHASE_PREFETCH
for (size_t i = 0; i < slot_count; i++)
{
slot_table[i] = nullptr;
}
#endif //MARK_PHASE_PREFETCH
}

// place an object in the mark queue
Expand All @@ -24107,6 +24112,7 @@ mark_queue_t::mark_queue_t() : curr_slot_index(0)
FORCEINLINE
uint8_t *mark_queue_t::queue_mark(uint8_t *o)
{
#ifdef MARK_PHASE_PREFETCH
Prefetch (o);

// while the prefetch is taking effect, park our object in the queue
Expand All @@ -24119,6 +24125,9 @@ uint8_t *mark_queue_t::queue_mark(uint8_t *o)
curr_slot_index = (slot_index + 1) % slot_count;
if (old_o == nullptr)
return nullptr;
#else //MARK_PHASE_PREFETCH
uint8_t* old_o = o;
#endif //MARK_PHASE_PREFETCH

// this causes us to access the method table pointer of the old object
BOOL already_marked = marked (old_o);
Expand Down Expand Up @@ -24170,6 +24179,7 @@ uint8_t *mark_queue_t::queue_mark(uint8_t *o, int condemned_gen)
// returns nullptr if there is no such object
uint8_t* mark_queue_t::get_next_marked()
{
#ifdef MARK_PHASE_PREFETCH
size_t slot_index = curr_slot_index;
size_t empty_slot_count = 0;
while (empty_slot_count < slot_count)
Expand All @@ -24189,15 +24199,18 @@ uint8_t* mark_queue_t::get_next_marked()
}
empty_slot_count++;
}
#endif //MARK_PHASE_PREFETCH
return nullptr;
}

void mark_queue_t::verify_empty()
{
#ifdef MARK_PHASE_PREFETCH
for (size_t slot_index = 0; slot_index < slot_count; slot_index++)
{
assert(slot_table[slot_index] == nullptr);
}
#endif //MARK_PHASE_PREFETCH
}

void gc_heap::mark_object_simple1 (uint8_t* oo, uint8_t* start THREAD_NUMBER_DCL)
Expand Down Expand Up @@ -25892,6 +25905,7 @@ BOOL gc_heap::process_mark_overflow(int condemned_gen_number)

BOOL overflow_p = FALSE;
recheck:
drain_mark_queue();
if ((! (max_overflow_address == 0) ||
! (min_overflow_address == MAX_PTR)))
{
Expand Down Expand Up @@ -26156,7 +26170,8 @@ void gc_heap::scan_dependent_handles (int condemned_gen_number, ScanContext *sc,
if (process_mark_overflow(condemned_gen_number))
fUnscannedPromotions = true;

drain_mark_queue();
// mark queue must be empty after process_mark_overflow
mark_queue.verify_empty();

// Perform the scan and set the flag if any promotions resulted.
if (GCScan::GcDhReScan(sc))
Expand Down Expand Up @@ -26774,7 +26789,9 @@ void gc_heap::mark_phase (int condemned_gen_number, BOOL mark_only_p)
// handle table has been fully promoted.
GCScan::GcDhInitialScan(GCHeap::Promote, condemned_gen_number, max_generation, &sc);
scan_dependent_handles(condemned_gen_number, &sc, true);
drain_mark_queue();

// mark queue must be empty after scan_dependent_handles
mark_queue.verify_empty();
fire_mark_event (ETW::GC_ROOT_DH_HANDLES, current_promoted_bytes, last_promoted_bytes);

#ifdef MULTIPLE_HEAPS
Expand Down Expand Up @@ -26864,7 +26881,9 @@ void gc_heap::mark_phase (int condemned_gen_number, BOOL mark_only_p)
// Scan dependent handles again to promote any secondaries associated with primaries that were promoted
// for finalization. As before scan_dependent_handles will also process any mark stack overflow.
scan_dependent_handles(condemned_gen_number, &sc, false);
drain_mark_queue();

// mark queue must be empty after scan_dependent_handles
mark_queue.verify_empty();
fire_mark_event (ETW::GC_ROOT_DH_HANDLES, current_promoted_bytes, last_promoted_bytes);
#endif //FEATURE_PREMORTEM_FINALIZATION

Expand Down
3 changes: 3 additions & 0 deletions src/coreclr/gc/gcpriv.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ inline void FATAL_GC_ERROR()
// + creates some ro segs
// We can add more mechanisms here.
//#define STRESS_REGIONS
#define MARK_PHASE_PREFETCH
#endif //USE_REGIONS

// FEATURE_STRUCTALIGN was added by Midori. In CLR we are not interested
Expand Down Expand Up @@ -1224,9 +1225,11 @@ enum bookkeeping_element

class mark_queue_t
{
#ifdef MARK_PHASE_PREFETCH
static const size_t slot_count = 16;
uint8_t* slot_table[slot_count];
size_t curr_slot_index;
#endif //MARK_PHASE_PREFETCH

public:
mark_queue_t();
Expand Down
8 changes: 5 additions & 3 deletions src/coreclr/vm/proftoeeinterfaceimpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,7 @@ void GenerationTable::Refresh()

// This is the table of generation bounds updated by the gc
// and read by the profiler.
static GenerationTable *s_currentGenerationTable;
static GenerationTable *s_currentGenerationTable = nullptr;

// This is just so we can assert there's a single writer
#ifdef ENABLE_CONTRACTS
Expand Down Expand Up @@ -931,7 +931,6 @@ void __stdcall UpdateGenerationBounds()
// Notify the profiler of start of the collection
if (CORProfilerTrackGC() || CORProfilerTrackBasicGC())
{

if (s_currentGenerationTable == nullptr)
{
EX_TRY
Expand Down Expand Up @@ -965,7 +964,10 @@ void __stdcall ProfilerAddNewRegion(int generation, uint8_t* rangeStart, uint8_t
#ifdef PROFILING_SUPPORTED
if (CORProfilerTrackGC() || CORProfilerTrackBasicGC())
{
s_currentGenerationTable->AddRecord(generation, rangeStart, rangeEnd, rangeEndReserved);
if (s_currentGenerationTable != nullptr)
{
s_currentGenerationTable->AddRecord(generation, rangeStart, rangeEnd, rangeEndReserved);
}
}
#endif // PROFILING_SUPPORTED
RETURN;
Expand Down

0 comments on commit fa34169

Please sign in to comment.