Any way to specify the location of profile data

前端 未结 4 2068
青春惊慌失措
青春惊慌失措 2021-01-01 22:03

The default the profile file is from the executable is run and the file is called gmon.out. Is there any way to specify a new location?

I\'m using gcc 3

4条回答
  •  猫巷女王i
    2021-01-01 22:57

    To give a different file name to gprof:

    gprof a.out gprof-foo.out
    

    As to renaming them, set the GMON_OUT_PREFIX environment variable. I found this one by good ol' objdump on libc .... Naturally, the libc docs say nothing.

提交回复
热议问题