Libmonitor is a library for first-party profiling that provides hooks into a program for the begin and end of processes and threads.