New profiling subsystem committed to -current
Contributed by Peter N. M. Hansteen on from the make that profile a skyline dept.
-current
, from the hands of none other than Theo de Raadt (deraadt@
) himself.
A longish sequence of commits introduced the changes incrementally, with a summary as follows:
List: openbsd-cvs Subject: CVS: cvs.openbsd.org: src From: Theo de Raadt <deraadt () cvs ! openbsd ! org> Date: 2025-05-24 6:49:17 CVSROOT: /cvs Module name: src Changes by: deraadt@cvs.openbsd.org 2025/05/24 00:49:17 Modified files: include : unistd.h sys/sys : exec.h exec_elf.h gmon.h proc.h systm.h sys/kern : exec_elf.c init_sysent.c kern_exec.c kern_exit.c kern_fork.c kern_pledge.c subr_prof.c syscalls.master Log message: In the old gprof profiling subsystem, the simplistic profil() syscall told the kernel about the sample buffer, and then the normal exit-time _mcleanup() would finalize the buffer, open()'ed a file and write out the details. This file opening has become increasingly impossible because of our privsep / privdrop, chroot, setresuid uid-dropping, pledge, unveil, and other efforts. So people stopped using gprof. Programs which needed profiling needed substantial mitigation removal changes to put them under test.