2 ms·
> There are definitely people who profile their applications ... the entire system, though? Is there a utility I can use to log every instruction performed in o
by wyldfire 10y ago
> There are definitely people who profile their applications ... the entire system, though? Is there a utility I can use to log every instruction performed in one second for an operating system running on bare metal?
Kinda. oprofile and later perf use the hardware's performance counters. So, it's sampled and therefore it's not "every instruction performed" but the scope is indeed the entire system. If your hardware doesn't support it, then the kernel has a sampling feature on a timer. It's IMO representative and probably the sanest way to accept the challenge.
But Knuth questions make me wonder: how could we possibly reason about correctness from the samples? We'd be better off following the trail of breadcrumbs back to the source unless he means something terribly specific beyond "correct or erroneous".
> Can it be done with an emulator like QEMU?
Yes, that's probably an alternative if sampled isn't sufficient.
- no_protocol 10y ago> We'd be better off following the trail of breadcrumbs back to the source I'm thinking this is what was intended. Did something get lost along the way with all the layers of translation from "human problem" to machine language? Here's another quote from the source passage, linked elsewhere in this thread: The sequence of operations will be too difficult to decipher unless you have access to the source code from which the instructions were compiled. University researchers who wish to carry out such an experiment would probably have to sign nondisclosure agreements in order to get a look at the relevant source code.