HomeFreeBSD

Add setproctitle_fast(3) for frequent callers.

Description

Add setproctitle_fast(3) for frequent callers.

Some applications, notably PostgreSQL, want to call setproctitle()
very often. It's slow. Provide an alternative cheap way of updating
process titles without making any syscalls, instead requiring other
processes (top, ps etc) to do a bit more work to retrieve the data.
This uses a pre-existing code path inherited from ancient BSD, which
always did it that way.

Submitted by: Thomas Munro
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D16111

Details

Provenance
kibAuthored on
Differential Revision
D16111: Add setproctitle_fast() for frequent callers.
Parents
rS335938: Add getprogname(3) (ie null) benchmark.
Branches
Unknown
Tags
Unknown