任何方式来指定配置文件数据的位置 [英] Any way to specify the location of profile data

查看:107
本文介绍了任何方式来指定配置文件数据的位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

配置文件的默认文件来自可执行文件,并且该文件被称为 gmon.out 。有什么方法可以指定一个新的位置吗?

我在i386 / linux2.6上使用gcc 3.4.6

GMON_OUT_PREFIX 没有记录在glibc中。我从网上获得了以下信息并在我的机器上进行了测试。



如果您设置环境变量 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆