upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/src/pe_loader.cpp
diff options
context:
space:
mode:
authorRoberto0953 <131179700+Roberto0953@users.noreply.github.com>2026-11-23 01:43:38 +0100
committerRoberto0953 <131179700+Roberto0953@users.noreply.github.com>2026-11-23 01:44:11 +0100
commite206f186a79cbdcdea8e59dcfb95004fb13439d1 (patch)
treedf6965f3893e4ee949ebf1d0f697d98cfc50920d /runtime/src/pe_loader.cpp
parente9366773651826b8edbe9ff0740ae6d9fe951f3b (diff)
sampler_source_census: follow each load of a chain once, not once per dword
Review of #4268 (shdann): load_source worked out the source of a load again for every dword that came from it. A descriptor that an earlier load produced has four dwords, so a chain of loads asked for the first one 4**depth times: 5, 21, 85 and 341 load_source calls at depth 2 to 5 (5,592,405 at depth 12, 16 s for one listing), with the class right every time. What load_source finds for a load is now kept by its code offset and asked for once: 2, 3, 4, 5 and 12 calls at those depths, 40 at depth 40. The cycle check stays as it was (a load whose address depends on the load itself is given up), and an answer that ran into a cycle is not kept, because that one depends on where the question started; an answer that met none does not, so the classes cannot change. Tests (30, all pass; the first new one fails on the code before this commit with "5 load_source calls for a chain of 2 loads"): - a chain of s_buffer_load_dwordx4 V#s and one of s_load_dwordx2 pointers, depth 2 to 40: at most two load_source calls per load, counted with sys.setprofile, and the class stays user_pointer; the same chain from a fixed table stays other_base; - a pointer chased in a loop and a V# that is its own source through a loop: both end, both are undetermined, and the load before the loop keeps its class. Corpus (1.0.2.1, 26,503 listings, `--jobs 4 --expect-none other_base`, exit 0): the --json output is equal to the one of the commit before, field by field, so the counts in docs/d3d12_vulkan.md stand. One run each on the same machine: 320 s before, 272 s after; the corpus has no deep chain, so read that as "not slower", not as the gain. Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat (limited to 'runtime/src/pe_loader.cpp')
0 files changed, 0 insertions, 0 deletions