Could you get this to work? As you mention, it won’t register non module calls. The Jit tracer does give code that would still require further parsing to be useful (How to parse torch jit trace output? 28).