Plan: staticdeps eval

This commit is contained in:
Théophile Bastian 2023-09-13 11:57:51 +02:00
parent 96b23e97f7
commit f787bb2b5a

View file

@ -113,7 +113,47 @@ On SKX,
### Dependencies detection
TODO
#### With valgrind
* Instrument binary:
* for each write, add `write_addr -> writer_pc` to a hashmap
* for each read, fetch `writer_pc` from hashmap
* if found, add a dependency `reader_pc -> writer_pc`
* At the end, write deps file:
* `#occur, src_elf_pc, src_elf_path, dst_elf_pc, dst_elf_path`
* Run for each binary in genbenchs
* For each binary in genbenchs,
* for each BB with more than 10% of max BB hits,
* predict deps with staticdeps
* check which dependencies are found/missed from the instrumented ones
* limitation: will only find deps from/to the same BB! Dependencies leaving
a BB are discarded.
* Result: about 38% of deps found.
* Cause: kernels executed in loops.
* No dependency in the kernel
```
while:
read (%rax)
%rax ++
write (%rax)
```
* But dependencies if executed in a loop! "Unwanted" deps.
* and irrelevant in real life anyway: they are far away and will not cause
latency
* Fix: introduce dependency lifetime
* timestamp = instructions executed (VG instrumentation, added up at the
end of each BB)
* lifetime fixed to 1024 instructions
* dependencies are discarded if written to more than a lifetime ago
* Result: about (?? TODO) of deps found
#### With Gus
TODO ?
### UiCA enriching