int profil(char *buf, int bufsiz, int offset, int scale);
Buf points to bufsiz bytes of core. Every virtual microsecond, the user's program counter (PC) is examined: offset is subtracted and the result is multiplied by scale. If this address is in buf, then the word pointed to is incremented.
If scale is less than 2 or bufsiz is zero, profiling is disabled.
Calling profil with an invalid buf will result in a core dump.
True kernel profiling provides more accurate results.