The GNU C library provides a user-space implementation profil(3), which internally uses setitimer(2) with ITIMER_PROF to populate the PC value histogram. The times(2) and getrusage(2) library calls allow collection of some data that may prove relevant to a performance analysis.
The GNU C library provides hooks into its memory allocation routines[glibc]. You can use these hooks in order to collection allocation lifetime data, size distributions etc. Particularly for object-oriented code, allocation can become a crucial part of an application's performance, and sometimes it is necessary to fine-tune the application's behaviour in this respect.
Dietlibc[dietlibc] supports ITIMER_PROF for setitimer(2), but does not implement profil(3) as of this writing.