Is it possible to change the default name of the gmon.out file that is created when the profile flag (-pg) is set when compiling with gcc, for example, [executable name] .gmon.out?
I need this because I have several executables that are in the same directory and must run in parallel.
Not so short, but actually the answer is YES - when using glibc(at least with version 2.11.1, which is the version I used for testing).
glibc
-pg , gmon.out, GMON_OUT_PREFIX , [value of your choice].[pid], [pid] , .
-pg
GMON_OUT_PREFIX
[value of your choice].[pid]
[pid]
, . , -pg, gmon.out. (, foo.bar) , :
gprof test.exe foo.bar > analysis.txt
Source: https://habr.com/ru/post/1760698/More articles:How to find character code in PL / SQL? - sqlSpring, Hibernate multiple sleep configuration - javaHow to hide empty adsense block - jqueryJoining very large lists - designSpring Пакет: переход от 1 к n, где n потенциально огромно - javaUse lowercase constants for false, true, null in NetBeans - phpIs this the standard DateTime format? - c #Haskell foldr calculation steps - haskellHow to optimize view rendering in Ruby on Rails 2.3.8? - optimizationuse Number as Monoid - haskellAll Articles