HLSf use nuint rather than long, L4 now uses hlsf rather than array to alloc cache line.
This commit is contained in:
@@ -51,13 +51,13 @@ namespace StgSharp
|
||||
}
|
||||
|
||||
public bool Predict(
|
||||
Span<CacheLinePrediction> node,
|
||||
Span<CacheLineDescription> node,
|
||||
out int count
|
||||
)
|
||||
{
|
||||
count = Math.Min(_addresses.Length, node.Length);
|
||||
for (int i = 0; i < count; i++) {
|
||||
node[i] = new CacheLinePrediction
|
||||
node[i] = new CacheLineDescription
|
||||
{
|
||||
Address = _addresses[i],
|
||||
MapPolicy = 0,
|
||||
|
||||
@@ -56,13 +56,13 @@ namespace StgSharp
|
||||
}
|
||||
|
||||
public bool Predict(
|
||||
Span<CacheLinePrediction> node,
|
||||
Span<CacheLineDescription> node,
|
||||
out int count
|
||||
)
|
||||
{
|
||||
count = Math.Min(_addresses.Length, node.Length);
|
||||
for (int i = 0; i < count; i++) {
|
||||
node[i] = new CacheLinePrediction
|
||||
node[i] = new CacheLineDescription
|
||||
{
|
||||
Address = _addresses[i],
|
||||
MapPolicy = 0,
|
||||
@@ -308,7 +308,7 @@ namespace StgSharp
|
||||
}
|
||||
L4Assert(
|
||||
evictedOrigin != nuint.Zero,
|
||||
$"{$"WriteBack origin should be a batch1 address, "}{($"WriteBackLog=[{string.Join(", ", predictor2.WriteBackLog)}]")}");
|
||||
$"{$"WriteBack origin should be a batch1 address, "}{$"WriteBackLog=[{string.Join(", ", predictor2.WriteBackLog)}]"}");
|
||||
|
||||
// 断言 c: SwissTable 中已不含该 origin
|
||||
L4Assert(
|
||||
@@ -323,11 +323,11 @@ namespace StgSharp
|
||||
remapped.Dispose();
|
||||
L4Assert(
|
||||
refill == 0xCC,
|
||||
$"{$"Re-mapped evicted line should be re-prefetched with 0xCC, "}{($"got 0x{refill:X2} (0xAA = stale data not evicted)")}");
|
||||
$"{$"Re-mapped evicted line should be re-prefetched with 0xCC, "}{$"got 0x{refill:X2} (0xAA = stale data not evicted)"}");
|
||||
|
||||
if (_l4FailCount == 0) {
|
||||
Console.WriteLine(
|
||||
$"{($"PASS (evicted 0x{evictedOrigin:X}, remain={remain}, ")}{$"WriteBack×{predictor2.WriteBackLog.Count})"}");
|
||||
$"{$"PASS (evicted 0x{evictedOrigin:X}, remain={remain}, "}{$"WriteBack×{predictor2.WriteBackLog.Count})"}");
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
@@ -58,14 +58,14 @@ namespace StgSharp
|
||||
}
|
||||
|
||||
public bool Predict(
|
||||
Span<CacheLinePrediction> node,
|
||||
Span<CacheLineDescription> node,
|
||||
out int count
|
||||
)
|
||||
{
|
||||
PredictCallCount++;
|
||||
count = Math.Min(_addresses.Length, node.Length);
|
||||
for (int i = 0; i < count; i++) {
|
||||
node[i] = new CacheLinePrediction
|
||||
node[i] = new CacheLineDescription
|
||||
{
|
||||
Address = _addresses[i],
|
||||
MapPolicy = 0,
|
||||
|
||||
Reference in New Issue
Block a user