3 ms·
MUCH prefer to see system calls since strace becomes actually useful and readable. IIRC this is why plan9 is nice to work with. You can actually understand wha
by hendry 6y ago
MUCH prefer to see system calls since strace becomes actually useful and readable.
IIRC this is why plan9 is nice to work with. You can actually understand what a program is doing. On a typical Linux system, mmaps galore and you have no idea what's happening. Pretty awful situation.
- nitrogen 6y agoIs there a way to trace page faults in a program?
- hendry 6y agoSomething like https://aur.archlinux.org/packages/electricfence/ https://aur.archlinux.org/packages/electricfence/ or do I misunderstand you?
- tonyarkles 6y agoWhen you mmap, it gives you back a pointer that you can read from, but doesn’t necessarily populate your process’s page table with all of the data you can read. Instead, when you go to access it, there will be a page fault if the page you’re trying to read hasn’t been read from disk yet. The kernel catches the page fault, allocates a page, does the read from disk, and restarts your read as if nothing happened. The user process has no indication that any of this happened other than perhaps a bit of latency.
- nitrogen 6y agoI'm curious now if electricfence could be configured to detect mmap faults, since it's described as using the virtual memory hardware for malloc debugging. I haven't used -lefence since well before I learned about Valgrind though.
- tonyarkles 6y agoI’m curious now too!