Redian新闻
>
[转载] 有没有什么好的profiling工具
avatar
[转载] 有没有什么好的profiling工具# Unix - 噫吁兮,危乎高哉
y*e
1
【 以下文字转载自 Programming 讨论区 】
【 原文由 yjlspace 所发表 】
要求具有这样的功能:能统计程序中每个programming entity被调用的次数
programming entity可以由用户定义。可以是class,procedure,甚至single instruction
avatar
q*e
2
Try gprof. Could achieve most of your demand

【在 y******e 的大作中提到】
: 【 以下文字转载自 Programming 讨论区 】
: 【 原文由 yjlspace 所发表 】
: 要求具有这样的功能:能统计程序中每个programming entity被调用的次数
: programming entity可以由用户定义。可以是class,procedure,甚至single instruction

avatar
t*q
3
only routines can be profiled by gprof.
instruction
avatar
q*e
4
You'd better add NOT to your statements! Missing
such an important word is misleading if not cheating!
The fact is that "NOT only routines can be profiled by
gprof", it implies that
"BUT ALSO something else could be profiled by gprof".
The something else includes at least "line by line
profiling", "block counting" etc.
I could hardly understand why you are saying like
that. Don't omit important words like "NOT" in your
statements if you did not intend to mislead the reader!!!
I gue

【在 t******q 的大作中提到】
: only routines can be profiled by gprof.
: instruction

avatar
c*t
5
Unfortunately, it does not list the speed of each line, which
is more important..

【在 q***e 的大作中提到】
: You'd better add NOT to your statements! Missing
: such an important word is misleading if not cheating!
: The fact is that "NOT only routines can be profiled by
: gprof", it implies that
: "BUT ALSO something else could be profiled by gprof".
: The something else includes at least "line by line
: profiling", "block counting" etc.
: I could hardly understand why you are saying like
: that. Don't omit important words like "NOT" in your
: statements if you did not intend to mislead the reader!!!

avatar
q*e
6
The purpose of profiling is to give people
some guide where to focus for optimization, to find
the performance bottleneck. So
if optimization could be done more efficiently
without profiling, It will be pointless to profile
anything.
I don't think "the speed of each line" is
important or "more important" at all. If a line
of code is executed only once and is not the bottle
neck, who cares how much time it takes. On the
other hand, if a piece of code is executed millions
of times. T

【在 c*****t 的大作中提到】
: Unfortunately, it does not list the speed of each line, which
: is more important..

avatar
c*t
7
Well, if you were trying to improve the speed of
a function that would be executed 1 million times,
each line of the code can save significantly over all.
Unfortunately, line profiling is rather difficult and
few tools could do that. For some programs, to speed
up things and reduce function calls, a large function
may exist. Line-by-line profiling is even more important.

【在 q***e 的大作中提到】
: The purpose of profiling is to give people
: some guide where to focus for optimization, to find
: the performance bottleneck. So
: if optimization could be done more efficiently
: without profiling, It will be pointless to profile
: anything.
: I don't think "the speed of each line" is
: important or "more important" at all. If a line
: of code is executed only once and is not the bottle
: neck, who cares how much time it takes. On the

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。