PapiEx is a performance analysis tool designed to transparently and passively measure the hardware performance counters of an application. It uses library preloading to intercept process/thread creation. It is not a tool for selective instrumentation, for that you should use DynaProf. It measures the entire run of an application. By default this includes all subprocesses. It can optionally monitor threads, do counter multiplexing and a host of other nifty features.
For more information on PapiEx, and to download a tarball, please visit The PapiEx Home Page.