Ben Boeckel via Gcc <gcc@gcc.gnu.org> writes: > On Tue, Oct 01, 2024 at 18:06:35 +0200, Richard Biener via Gcc wrote: >> Analyze where the compile time is spent and where memory is spent. >> Identify unfitting data structures and algorithms causing the issue. >> Replace with better ones. That’s what I do for these kind of issues >> in the middle end. > > To this end, are there any plans or progress to implementing > `-ftime-trace` profiling output? (It's a clang thing, but there is > tooling that would be able to use GCC's reports if it made them.)
gcc has had the -Q option since long before clang existed. You could write tooling to aggregate it over a multi file build. It's not free however, there will be a lot more system calls since gcc uses process time, not wall clock time. Getting process time always requires a system call. -Andi