adapt doc generation to profiling