It should be a bug. A year ago, I found that gfortran and gprof of MSYS2 on Windows generated empty reports. This problem still exists (currently gfortran 11.3 still has this problem), while gfortran on WSL2 has no problem.
empty log
>> gprof -b ./main.exe gmon.out
Flat profile:
Each sample counts as 0.01 seconds.
no time accumulated
% cumulative self self total
time seconds seconds calls Ts/call Ts/call name
Call graph
granularity: each sample hit covers 4 byte(s) no time propagated
index % time self children called name
Index by function name