H******M 发帖数: 133 | 1 【 以下文字转载自 Programming 讨论区,原文如下 】
发信人: HiddenMM (HMM), 信区: Programming
标 题: Help on profiler
发信站: Unknown Space - 未名空间 (Thu Jul 15 16:00:49 2004) WWW-POST
Here is the problem. The main program A has a loop which starts another
program B. I want to see how much time is spent on a function F in B. I used
gprof to do this. But it seems gprof only records the last run of program B.
How do I get the accumulated time spent on F? Thanks alot! | A*****e 发帖数: 12 | 2 想个办法把每次B run的profile写到不同的文件里,然后再汇总。
比如,在每次run B返回A以后,把feedback文件重命名为一个unique的名字
【在 H******M 的大作中提到】 : 【 以下文字转载自 Programming 讨论区,原文如下 】 : 发信人: HiddenMM (HMM), 信区: Programming : 标 题: Help on profiler : 发信站: Unknown Space - 未名空间 (Thu Jul 15 16:00:49 2004) WWW-POST : Here is the problem. The main program A has a loop which starts another : program B. I want to see how much time is spent on a function F in B. I used : gprof to do this. But it seems gprof only records the last run of program B. : How do I get the accumulated time spent on F? Thanks alot!
|
|