News for hackers. Stuff that matters.
Re:How do you visualize code? by erwincoumans on Tuesday January 18, 2022 @11:27AM (#29981508)
For run-time visualization, I use Chrome about://tracing it gives very good details, over a time horizon, synchronized over multilple threads/processes. Zoom into nanosecond detail or zoom out over seconds or minutes overview.

I have my own simple C++ code to generate those traces (json data), there is also an official sdk for it (Perfetto is the new shiny way)

For static code analysis, I use Doxygen, it parses the headers, can make high level module diagrams and fine grained dependency graphs. It uses Graphviz/dot for rendering the graphs.

Re:How do you visualize code? by menaerus on Tuesday January 18, 2022 @03:40PM (#29985417)
Quite interesting application of tracing tools, I've only used it for build time optimizations. Do you perhaps have a screenshot to see how the end result would look like ?
Re:How do you visualize code? by erwincoumans on Tuesday January 18, 2022 @06:04PM (#29987413)
Here is a quick video, where you can see all the frames when zoomed out, and detailed frame information when zoomed in https://www.youtube.com/watch?v=w2rz36aJUS4 This is just for a physics engine, with rendering. See also this page by Aras (formerly form Unity 3D) with his screen shots: https://aras-p.info/blog/2017/01/23/Chrome-Tracing-as-Profil...
Re:How do you visualize code? by menaerus on Wednesday January 19, 2022 @09:08AM (#29993743)
Thanks for the effort of creating the video. It looks like it would be useful in a similar sense perf flamegraphs are.