Move callgraph printing out of writer.h into callgraph.h