任何方式来指定配置文件数据的位置 [英] Any way to specify the location of profile data
问题描述
配置文件的默认文件来自可执行文件,并且该文件被称为 gmon.out
。有什么方法可以指定一个新的位置吗?
我在i386 / linux2.6上使用gcc 3.4.6
如果您设置环境变量 GMON_OUT_PREFIX
,那么输出文件被命名为
$ {GMON_OUT_PREFIX}。[PID]
,pid是配置文件进程的id。
例如:
GMON_OUT_PREFIX = mygmon; gcc -o foo -pg foo.c
gmon输出文件是: mygmon.12345
,假设foo进程id = 12345。
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.6 on i386/linux2.6
Too badly, the environment variable GMON_OUT_PREFIX
is not documented in the glibc. I got the following information from the web and tested on my machine.
if you set the environment variable GMON_OUT_PREFIX
, then the output file is named as
${GMON_OUT_PREFIX}.[PID]
, the pid is the id of the profiled process.
For example:
GMON_OUT_PREFIX=mygmon; gcc -o foo -pg foo.c
the gmon out file is: mygmon.12345
, assuming the foo process id=12345.
这篇关于任何方式来指定配置文件数据的位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!