mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-05 21:38:40 +00:00
strip out ctrl process memory cache fresh flags & hash history, since both will be replaced by hash store layer's capabilities
This commit is contained in:
@@ -821,7 +821,6 @@ ctrl_query_cached_data_from_process_vaddr_range(Arena *arena, CTRL_MachineID mac
|
|||||||
{
|
{
|
||||||
page_found = 1;
|
page_found = 1;
|
||||||
MemoryCopy((U8*)read_out + (page_vaddr-page_range.min), page_data.str, KB(4));
|
MemoryCopy((U8*)read_out + (page_vaddr-page_range.min), page_data.str, KB(4));
|
||||||
result.fresh = result.fresh || !!(node4->page_fresh_flags[lvl5_idx/64] & (1ull<<(lvl5_idx%64)));
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -899,16 +898,6 @@ ctrl_query_cached_data_from_process_vaddr_range(Arena *arena, CTRL_MachineID mac
|
|||||||
};
|
};
|
||||||
U128 page_key = hs_hash_from_data(str8((U8 *)page_key_data, sizeof(page_key_data)));
|
U128 page_key = hs_hash_from_data(str8((U8 *)page_key_data, sizeof(page_key_data)));
|
||||||
U128 page_hash = hs_submit_data(page_key, &page_arena, str8((U8 *)page_base, KB(4)));
|
U128 page_hash = hs_submit_data(page_key, &page_arena, str8((U8 *)page_base, KB(4)));
|
||||||
if(!u128_match(node4->page_hashes[lvl5_idx], u128_zero()) &&
|
|
||||||
!u128_match(node4->page_hashes[lvl5_idx], page_hash))
|
|
||||||
{
|
|
||||||
node4->page_fresh_flags[lvl5_idx/64] |= (1ull<<(lvl5_idx%64));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
node4->page_fresh_flags[lvl5_idx/64] &= ~(1ull<<(lvl5_idx%64));
|
|
||||||
}
|
|
||||||
result.fresh = result.fresh || !!(node4->page_fresh_flags[lvl5_idx/64] & (1ull<<(lvl5_idx%64)));
|
|
||||||
node4->page_hashes[lvl5_idx] = page_hash;
|
node4->page_hashes[lvl5_idx] = page_hash;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -333,8 +333,6 @@ struct CTRL_ProcessMemoryCacheNode4
|
|||||||
{
|
{
|
||||||
U64 page_memgen_idxs[256];
|
U64 page_memgen_idxs[256];
|
||||||
U128 page_hashes[256];
|
U128 page_hashes[256];
|
||||||
U128 last_page_hashes[256];
|
|
||||||
U64 page_fresh_flags[4];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct CTRL_ProcessMemoryCacheNode3 CTRL_ProcessMemoryCacheNode3;
|
typedef struct CTRL_ProcessMemoryCacheNode3 CTRL_ProcessMemoryCacheNode3;
|
||||||
|
|||||||
@@ -243,7 +243,7 @@ hs_scope_touch_node__stripe_r_guarded(HS_Scope *scope, HS_Node *node)
|
|||||||
//~ rjf: Cache Lookup
|
//~ rjf: Cache Lookup
|
||||||
|
|
||||||
internal U128
|
internal U128
|
||||||
hs_hash_from_key(U128 key)
|
hs_hash_from_key(U128 key, U64 rewind_count)
|
||||||
{
|
{
|
||||||
U128 result = {0};
|
U128 result = {0};
|
||||||
U64 key_slot_idx = key.u64[1]%hs_shared->key_slots_count;
|
U64 key_slot_idx = key.u64[1]%hs_shared->key_slots_count;
|
||||||
@@ -254,9 +254,9 @@ hs_hash_from_key(U128 key)
|
|||||||
{
|
{
|
||||||
for(HS_KeyNode *n = key_slot->first; n != 0; n = n->next)
|
for(HS_KeyNode *n = key_slot->first; n != 0; n = n->next)
|
||||||
{
|
{
|
||||||
if(u128_match(n->key, key) && n->hash_history_gen > 0)
|
if(u128_match(n->key, key) && n->hash_history_gen > 0 && n->hash_history_gen-1 >= rewind_count)
|
||||||
{
|
{
|
||||||
result = n->hash_history[(n->hash_history_gen-1)%ArrayCount(n->hash_history)];
|
result = n->hash_history[(n->hash_history_gen-1-rewind_count)%ArrayCount(n->hash_history)];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ internal void hs_scope_touch_node__stripe_r_guarded(HS_Scope *scope, HS_Node *no
|
|||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: Cache Lookups
|
//~ rjf: Cache Lookups
|
||||||
|
|
||||||
internal U128 hs_hash_from_key(U128 key);
|
internal U128 hs_hash_from_key(U128 key, U64 rewind_count);
|
||||||
internal String8 hs_data_from_hash(HS_Scope *scope, U128 hash);
|
internal String8 hs_data_from_hash(HS_Scope *scope, U128 hash);
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
|
|||||||
Reference in New Issue
Block a user