That sounds awesome! I can't seem to find it right now but I'm pretty sure I started out with one of the samples, I think memtrace_x86.c and that required only minimal modification to get it to do most of what I needed, minus eliminating addresses I don't care about, plotting and stuff which is not extra hard.
If you get stuck and / or end up doing something cool, shoot me an email at hn at my website on my profile!