Ok fine. But again: any repeatable way to prove your thesis or disprove the trashing-code-pages thesis? And how to do this when the system is freezing up?
You can also track variables from /proc/vmstat exported as node_vmstat_allocstall_(normal|dma32|movable), node_vmstat_pgscan_direct, node_vmstat_pgsteal_direct - you'll see them spike when the system enters direct reclaim.
Install and configure systemd-oomd and track its log - it will activate on memory pressure.
To track code page eviction/re-faults specifically, you'll need to write some eBPF code, there are no direct measurements for this available.