Download raw body.
lang/iconv vs profil(2)
lang/icon has this in src/runtime/fmonitr.r, which doesn't work any more
because profil(2) changed.
281 #if UNIX
282 /*
283 * Call profil(2) to enable program counter profiling. We use the smallest
284 * allowable scale factor in order to minimize the number of counters;
285 * we assume that the text of iconx does not exceed 256K and so we use
286 * four bins. One of these four bins will be incremented every system
287 * clock tick (typically 4 to 20 ms).
288 *
289 * Take your local profil(2) man page with a grain of salt. All the systems
290 * we tested really maintain 16-bit counters despite what the man pages say.
291 * Some also say that a scale factor of two maps everything to one counter;
292 * that is believed to be a no-longer-correct statement dating from the days
293 * when the maximum program size was 64K.
294 *
295 * The reference to EVInit below just obtains an arbitrary address within
296 * the text segment.
297 */
298 #ifdef HaveProfil
299 profil(ticker.s, sizeof(ticker.s), (int) EVInit & ~0x3FFFF, 2);
300 #endif /* HaveProfil*/
301 #endif /* UNIX */
Should I just add a !__OpenBSD__ check, or would you like to do
something else?
lang/iconv vs profil(2)