Skip to content

Commit fa34169

Browse files
committed
Merge in 'release/7.0' changes
2 parents 05b1a93 + e721ae9 commit fa34169

File tree

5 files changed

+55
-31
lines changed

5 files changed

+55
-31
lines changed

eng/Version.Details.xml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -178,37 +178,37 @@
178178
<Uri>https://github.com/dotnet/runtime-assets</Uri>
179179
<Sha>0c78106337dbe19ce4dd99140636865cdc99d008</Sha>
180180
</Dependency>
181-
<Dependency Name="runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk" Version="11.1.0-alpha.1.22564.1">
181+
<Dependency Name="runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk" Version="11.1.0-alpha.1.22578.2">
182182
<Uri>https://github.com/dotnet/llvm-project</Uri>
183-
<Sha>335a70e88e5904f8127486d17dc6a87a9fad81b8</Sha>
183+
<Sha>4b771d6d4bbd843fb7e1a9c2aeb0a2e2f1e9584b</Sha>
184184
</Dependency>
185-
<Dependency Name="runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools" Version="11.1.0-alpha.1.22564.1">
185+
<Dependency Name="runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools" Version="11.1.0-alpha.1.22578.2">
186186
<Uri>https://github.com/dotnet/llvm-project</Uri>
187-
<Sha>335a70e88e5904f8127486d17dc6a87a9fad81b8</Sha>
187+
<Sha>4b771d6d4bbd843fb7e1a9c2aeb0a2e2f1e9584b</Sha>
188188
</Dependency>
189-
<Dependency Name="runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk" Version="11.1.0-alpha.1.22564.1">
189+
<Dependency Name="runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk" Version="11.1.0-alpha.1.22578.2">
190190
<Uri>https://github.com/dotnet/llvm-project</Uri>
191-
<Sha>335a70e88e5904f8127486d17dc6a87a9fad81b8</Sha>
191+
<Sha>4b771d6d4bbd843fb7e1a9c2aeb0a2e2f1e9584b</Sha>
192192
</Dependency>
193-
<Dependency Name="runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools" Version="11.1.0-alpha.1.22564.1">
193+
<Dependency Name="runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools" Version="11.1.0-alpha.1.22578.2">
194194
<Uri>https://github.com/dotnet/llvm-project</Uri>
195-
<Sha>335a70e88e5904f8127486d17dc6a87a9fad81b8</Sha>
195+
<Sha>4b771d6d4bbd843fb7e1a9c2aeb0a2e2f1e9584b</Sha>
196196
</Dependency>
197-
<Dependency Name="runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk" Version="11.1.0-alpha.1.22564.1">
197+
<Dependency Name="runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk" Version="11.1.0-alpha.1.22578.2">
198198
<Uri>https://github.com/dotnet/llvm-project</Uri>
199-
<Sha>335a70e88e5904f8127486d17dc6a87a9fad81b8</Sha>
199+
<Sha>4b771d6d4bbd843fb7e1a9c2aeb0a2e2f1e9584b</Sha>
200200
</Dependency>
201-
<Dependency Name="runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools" Version="11.1.0-alpha.1.22564.1">
201+
<Dependency Name="runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools" Version="11.1.0-alpha.1.22578.2">
202202
<Uri>https://github.com/dotnet/llvm-project</Uri>
203-
<Sha>335a70e88e5904f8127486d17dc6a87a9fad81b8</Sha>
203+
<Sha>4b771d6d4bbd843fb7e1a9c2aeb0a2e2f1e9584b</Sha>
204204
</Dependency>
205-
<Dependency Name="runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk" Version="11.1.0-alpha.1.22564.1">
205+
<Dependency Name="runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk" Version="11.1.0-alpha.1.22578.2">
206206
<Uri>https://github.com/dotnet/llvm-project</Uri>
207-
<Sha>335a70e88e5904f8127486d17dc6a87a9fad81b8</Sha>
207+
<Sha>4b771d6d4bbd843fb7e1a9c2aeb0a2e2f1e9584b</Sha>
208208
</Dependency>
209-
<Dependency Name="runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools" Version="11.1.0-alpha.1.22564.1">
209+
<Dependency Name="runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools" Version="11.1.0-alpha.1.22578.2">
210210
<Uri>https://github.com/dotnet/llvm-project</Uri>
211-
<Sha>335a70e88e5904f8127486d17dc6a87a9fad81b8</Sha>
211+
<Sha>4b771d6d4bbd843fb7e1a9c2aeb0a2e2f1e9584b</Sha>
212212
</Dependency>
213213
<Dependency Name="Microsoft.NETCore.App.Runtime.win-x64" Version="7.0.0-rc.1.22414.6">
214214
<Uri>https://github.com/dotnet/runtime</Uri>

eng/Versions.props

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -190,14 +190,14 @@
190190
<MicrosoftNativeQuicMsQuicVersion>2.1.1</MicrosoftNativeQuicMsQuicVersion>
191191
<SystemNetMsQuicTransportVersion>7.0.0-alpha.1.22406.1</SystemNetMsQuicTransportVersion>
192192
<!-- Mono LLVM -->
193-
<runtimelinuxarm64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>11.1.0-alpha.1.22564.1</runtimelinuxarm64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>
194-
<runtimelinuxarm64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>11.1.0-alpha.1.22564.1</runtimelinuxarm64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>
195-
<runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>11.1.0-alpha.1.22564.1</runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>
196-
<runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>11.1.0-alpha.1.22564.1</runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>
197-
<runtimewinx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>11.1.0-alpha.1.22564.1</runtimewinx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>
198-
<runtimewinx64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>11.1.0-alpha.1.22564.1</runtimewinx64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>
199-
<runtimeosx1012x64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>11.1.0-alpha.1.22564.1</runtimeosx1012x64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>
200-
<runtimeosx1012x64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>11.1.0-alpha.1.22564.1</runtimeosx1012x64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>
193+
<runtimelinuxarm64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>11.1.0-alpha.1.22578.2</runtimelinuxarm64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>
194+
<runtimelinuxarm64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>11.1.0-alpha.1.22578.2</runtimelinuxarm64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>
195+
<runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>11.1.0-alpha.1.22578.2</runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>
196+
<runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>11.1.0-alpha.1.22578.2</runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>
197+
<runtimewinx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>11.1.0-alpha.1.22578.2</runtimewinx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>
198+
<runtimewinx64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>11.1.0-alpha.1.22578.2</runtimewinx64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>
199+
<runtimeosx1012x64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>11.1.0-alpha.1.22578.2</runtimeosx1012x64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>
200+
<runtimeosx1012x64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>11.1.0-alpha.1.22578.2</runtimeosx1012x64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>
201201
<!-- emscripten / Node -->
202202
<MicrosoftNETRuntimeEmscriptenVersion>$(MicrosoftNETWorkloadEmscriptennet7Manifest70100Version)</MicrosoftNETRuntimeEmscriptenVersion>
203203
<!-- workloads -->

src/coreclr/gc/gc.cpp

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24092,12 +24092,17 @@ BOOL ref_p (uint8_t* r)
2409224092
return (straight_ref_p (r) || partial_object_p (r));
2409324093
}
2409424094

24095-
mark_queue_t::mark_queue_t() : curr_slot_index(0)
24095+
mark_queue_t::mark_queue_t()
24096+
#ifdef MARK_PHASE_PREFETCH
24097+
: curr_slot_index(0)
24098+
#endif //MARK_PHASE_PREFETCH
2409624099
{
24100+
#ifdef MARK_PHASE_PREFETCH
2409724101
for (size_t i = 0; i < slot_count; i++)
2409824102
{
2409924103
slot_table[i] = nullptr;
2410024104
}
24105+
#endif //MARK_PHASE_PREFETCH
2410124106
}
2410224107

2410324108
// place an object in the mark queue
@@ -24107,6 +24112,7 @@ mark_queue_t::mark_queue_t() : curr_slot_index(0)
2410724112
FORCEINLINE
2410824113
uint8_t *mark_queue_t::queue_mark(uint8_t *o)
2410924114
{
24115+
#ifdef MARK_PHASE_PREFETCH
2411024116
Prefetch (o);
2411124117

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

2412324132
// this causes us to access the method table pointer of the old object
2412424133
BOOL already_marked = marked (old_o);
@@ -24170,6 +24179,7 @@ uint8_t *mark_queue_t::queue_mark(uint8_t *o, int condemned_gen)
2417024179
// returns nullptr if there is no such object
2417124180
uint8_t* mark_queue_t::get_next_marked()
2417224181
{
24182+
#ifdef MARK_PHASE_PREFETCH
2417324183
size_t slot_index = curr_slot_index;
2417424184
size_t empty_slot_count = 0;
2417524185
while (empty_slot_count < slot_count)
@@ -24189,15 +24199,18 @@ uint8_t* mark_queue_t::get_next_marked()
2418924199
}
2419024200
empty_slot_count++;
2419124201
}
24202+
#endif //MARK_PHASE_PREFETCH
2419224203
return nullptr;
2419324204
}
2419424205

2419524206
void mark_queue_t::verify_empty()
2419624207
{
24208+
#ifdef MARK_PHASE_PREFETCH
2419724209
for (size_t slot_index = 0; slot_index < slot_count; slot_index++)
2419824210
{
2419924211
assert(slot_table[slot_index] == nullptr);
2420024212
}
24213+
#endif //MARK_PHASE_PREFETCH
2420124214
}
2420224215

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

2589325906
BOOL overflow_p = FALSE;
2589425907
recheck:
25908+
drain_mark_queue();
2589525909
if ((! (max_overflow_address == 0) ||
2589625910
! (min_overflow_address == MAX_PTR)))
2589725911
{
@@ -26156,7 +26170,8 @@ void gc_heap::scan_dependent_handles (int condemned_gen_number, ScanContext *sc,
2615626170
if (process_mark_overflow(condemned_gen_number))
2615726171
fUnscannedPromotions = true;
2615826172

26159-
drain_mark_queue();
26173+
// mark queue must be empty after process_mark_overflow
26174+
mark_queue.verify_empty();
2616026175

2616126176
// Perform the scan and set the flag if any promotions resulted.
2616226177
if (GCScan::GcDhReScan(sc))
@@ -26774,7 +26789,9 @@ void gc_heap::mark_phase (int condemned_gen_number, BOOL mark_only_p)
2677426789
// handle table has been fully promoted.
2677526790
GCScan::GcDhInitialScan(GCHeap::Promote, condemned_gen_number, max_generation, &sc);
2677626791
scan_dependent_handles(condemned_gen_number, &sc, true);
26777-
drain_mark_queue();
26792+
26793+
// mark queue must be empty after scan_dependent_handles
26794+
mark_queue.verify_empty();
2677826795
fire_mark_event (ETW::GC_ROOT_DH_HANDLES, current_promoted_bytes, last_promoted_bytes);
2677926796

2678026797
#ifdef MULTIPLE_HEAPS
@@ -26864,7 +26881,9 @@ void gc_heap::mark_phase (int condemned_gen_number, BOOL mark_only_p)
2686426881
// Scan dependent handles again to promote any secondaries associated with primaries that were promoted
2686526882
// for finalization. As before scan_dependent_handles will also process any mark stack overflow.
2686626883
scan_dependent_handles(condemned_gen_number, &sc, false);
26867-
drain_mark_queue();
26884+
26885+
// mark queue must be empty after scan_dependent_handles
26886+
mark_queue.verify_empty();
2686826887
fire_mark_event (ETW::GC_ROOT_DH_HANDLES, current_promoted_bytes, last_promoted_bytes);
2686926888
#endif //FEATURE_PREMORTEM_FINALIZATION
2687026889

src/coreclr/gc/gcpriv.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ inline void FATAL_GC_ERROR()
6262
// + creates some ro segs
6363
// We can add more mechanisms here.
6464
//#define STRESS_REGIONS
65+
#define MARK_PHASE_PREFETCH
6566
#endif //USE_REGIONS
6667

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

12251226
class mark_queue_t
12261227
{
1228+
#ifdef MARK_PHASE_PREFETCH
12271229
static const size_t slot_count = 16;
12281230
uint8_t* slot_table[slot_count];
12291231
size_t curr_slot_index;
1232+
#endif //MARK_PHASE_PREFETCH
12301233

12311234
public:
12321235
mark_queue_t();

src/coreclr/vm/proftoeeinterfaceimpl.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -901,7 +901,7 @@ void GenerationTable::Refresh()
901901

902902
// This is the table of generation bounds updated by the gc
903903
// and read by the profiler.
904-
static GenerationTable *s_currentGenerationTable;
904+
static GenerationTable *s_currentGenerationTable = nullptr;
905905

906906
// This is just so we can assert there's a single writer
907907
#ifdef ENABLE_CONTRACTS
@@ -931,7 +931,6 @@ void __stdcall UpdateGenerationBounds()
931931
// Notify the profiler of start of the collection
932932
if (CORProfilerTrackGC() || CORProfilerTrackBasicGC())
933933
{
934-
935934
if (s_currentGenerationTable == nullptr)
936935
{
937936
EX_TRY
@@ -965,7 +964,10 @@ void __stdcall ProfilerAddNewRegion(int generation, uint8_t* rangeStart, uint8_t
965964
#ifdef PROFILING_SUPPORTED
966965
if (CORProfilerTrackGC() || CORProfilerTrackBasicGC())
967966
{
968-
s_currentGenerationTable->AddRecord(generation, rangeStart, rangeEnd, rangeEndReserved);
967+
if (s_currentGenerationTable != nullptr)
968+
{
969+
s_currentGenerationTable->AddRecord(generation, rangeStart, rangeEnd, rangeEndReserved);
970+
}
969971
}
970972
#endif // PROFILING_SUPPORTED
971973
RETURN;

0 commit comments

Comments
 (0)