Skip to content
BSD syscall#176

svc · unix #176

add_profil

Adds an additional PC-sampling region to an existing profil(2) session.

Prototype

int add_profil(short *bufbase, size_t bufsize, u_long pcoffset, u_int pcscale);

Returns: int

Arguments

NameTypeDirDescription
bufbaseshort-
bufsizesize_t-
pcoffsetu_long-
pcscaleu_int-

Version history

XNU tagmacOS#
xnu-1456.1.26macOS 10.6 Snow Leopard176
xnu-1699.24.8macOS 10.7 Lion176
xnu-1486.2.11176
xnu-1504.15.3176
xnu-1504.3.12176
xnu-1504.7.4176
xnu-1504.9.17176
xnu-1504.9.26176
xnu-1504.9.37176
xnu-1699.22.73176
xnu-1699.22.81176
xnu-1699.24.23176
xnu-1699.26.8176
xnu-1699.32.7176

Notes

add_profil(2) lets a profiler describe multiple address ranges (typically dynamically loaded modules) so that samples landing in those ranges are bucketed into separate histograms. Like profil(2) it is a historical curiosity on macOS — modern tooling uses kperf, kdebug or DTrace.

Related APIs

profilkperfkdebugDTrace