根据挂钟时间获取gprof配置文件? [英] Get gprof to profile based on wall-clock time?

查看:208
本文介绍了根据挂钟时间获取gprof配置文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的理解是,默认情况下gprof会考虑CPU时间。有没有办法根据挂钟时间得到它的配置文件?

My understanding is that by default gprof takes into account CPU time. Is there a way to get it to profile based on wall-clock time?

我的程序做了很多磁盘i / o,所以它使用的CPU时间只代表实际执行时间的一部分。我需要知道磁盘i / o的哪些部分占用的时间最多。

My program does a lot of disk i/o, so the CPU time it uses only represents a fraction of the actual execution time. I need to know which portions of the disk i/o take up the most time.

推荐答案

通过使用来自google-perftools的分析器。要将google profiler切换到挂钟模式,请将环境变量CPUPROFILE_REALTIME = 1。

You can measure wall-clock time by using profiler from google-perftools. To switch google profiler to wall-clock mode, set the environment variable CPUPROFILE_REALTIME=1.

这篇关于根据挂钟时间获取gprof配置文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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