Hi, cheap plug here for my really, really low-overhead event tracer: ppt.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;lally&#x2F;libmet" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;lally&#x2F;libmet</a> (BSD license)<p>Basically, you define structs that you then fill in your code.  Then give them to a ppt-generated library routine.  It&#x27;s a bit of a pain, but you get two nice features:<p>- The storage is completely non-blocking: you&#x27;re just writing to shared memory.<p>- Overhead is linear to write rate: if you have a spare CPU core on the machine, the overhead on your active cores is a constant + the cost of filling &amp; copying (once) the struct.<p>- It&#x27;ll prefer to lose some data in case the disk falls behind in writing -- it won&#x27;t slow down your app.  Auto-generated sequence numbers tell you what&#x2F;if any data was lost.<p>- You can leave the code on in production: the listener attaches via ptrace() and injects a destination buffer into your process (constant time), and if there&#x27;s no buffer, the data gets harmlessly dropped.<p>I&#x27;ve left it alone as I haven&#x27;t needed it for myself in a while, and there hasn&#x27;t been interest (I don&#x27;t really advertise it, though).  If anyone&#x27;s interested, just ping me or file an issue.