|
|
 |
 |
 |
 |
|
 |
 |
|
 |
 |
|
 |
|
Archive::Off Topic Archive area for Off Topic's posts that were moved here after an inactivity period of 90 days. |

01-24-2004, 07:47 AM
|
Hill Giant
|
|
Join Date: Jul 2003
Location: Germany
Posts: 232
|
|
Program to time your app?
Does anyone know of a good (freeware pref.) program to find out in which functions your app spends the most time?
Edit: Forgot to mention that I need one for Win2k
|

01-24-2004, 08:18 AM
|
Hill Giant
|
|
Join Date: Nov 2003
Posts: 192
|
|
Well, if you are prepared to use Dev-C++, you can use gprof which comes with it. I have never used gprof before, but seeing your post I just recompiled world.exe with Dev-C++ with profiling enabled ( -pg option to compiler and linker). Here is the sort of output it gives you:
http://www.rama.demon.co.uk/worldprof.txt
|

01-24-2004, 09:25 AM
|
Demi-God
|
|
Join Date: Jan 2002
Location: Charlotte, NC
Posts: 2,614
|
|
gprof is also in gcc if you use linux, it along with kprof (a KDE visual front end) , and valgrind, kcachegrind, and leaktracer have been some of my favorite tools recently.
Under MS compilers, I really dont know much other than the commerical ones. Numega tools are AWESOME..
__________________
Quitters never win, and winners never quit, but those who never win and never quit are idiots.
|

01-27-2004, 07:01 AM
|
Hill Giant
|
|
Join Date: Jul 2003
Location: Germany
Posts: 232
|
|
Finally got my app working under dev-cpp, but the profiling doesn't seem to work.
First I tried it manually by adding a -pg to the c++ compiler options like the manual says. But then the linker yelled at me that it can't find "mcount" (unresolved external). A quick search revealed that both "libgmon.a" and "libuser32.a" contain a "mcount".
libuser doesn't work though, but after linking to libgmon the game compiles fine.
Only problem is: There's no output! :(
The menu entry "profile analysis" does ... well ... something, but after running there's no .txt either.
What am I doing wrong?
|

01-27-2004, 07:18 AM
|
Hill Giant
|
|
Join Date: Nov 2003
Posts: 192
|
|
You need to put -pg in the linker parameters as well, i.e. Under project/project options/parameters, specify -pg in both the C++ compiler and the linker boxes. I just tested and omitting it from the linker options does give you the unresolved references to mcount.
|

01-27-2004, 04:33 PM
|
Hill Giant
|
|
Join Date: Nov 2003
Posts: 168
|
|
Quote:
Originally Posted by Trumpcard
Numega tools are AWESOME..
|
Absolutely positively undoubtedly so. Matty P. is fully worthy of idolization.
|

01-27-2004, 08:21 PM
|
Hill Giant
|
|
Join Date: Jul 2003
Location: Germany
Posts: 232
|
|
Quote:
You need to put -pg in the linker parameters as well
|
Ok, gonna try that tonight after work. Thanks.
Quote:
Quote:
Trumpcard wrote:
Numega tools are AWESOME..
|
Absolutely positively undoubtedly so. Matty P. is fully worthy of idolization.
|
I wanted to try them out, but all that blah blah with the phone calls,etc... just to get a trial was too much for me. I realize that they want to protect their work, but for me that's too much of an annoyance.
So I'll stick to gprof for now 
|

01-28-2004, 02:17 AM
|
Discordant
|
|
Join Date: Dec 2002
Location: Stephenville, TX, USA
Posts: 270
|
|
WinXP has a feature that shows which program you use the most...mine says:
EverQuest
Photoshop
Ad-Aware
Dreamweaver MX
Flash MX
(for some odd reason) Notepad
Microsoft Word
now are you talking about which programs you use the longest or what?
__________________
"The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he who, in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon you."
|

01-28-2004, 03:24 AM
|
Hill Giant
|
|
Join Date: Jul 2003
Location: Germany
Posts: 232
|
|
Nah, a program that tells me which parts of my own programs consume the most time.
|

01-28-2004, 04:11 AM
|
Demi-God
|
|
Join Date: Jan 2002
Location: Charlotte, NC
Posts: 2,614
|
|
Its a performance profiler for code...
Have 3 functions, A , B and C.
It will tell you when the program executes it spent 5% of its time executing A, 90% B, and 5% C.
Helps you to find code bottlenecks..
__________________
Quitters never win, and winners never quit, but those who never win and never quit are idiots.
|

01-28-2004, 08:39 PM
|
Hill Giant
|
|
Join Date: Jul 2003
Location: Germany
Posts: 232
|
|
Yay, it works!
Well, more or less, gprof itself says that the output is invalid, but dev-c++ has no problems with it, which is good enough for me (for now at least).
75% of the time spent in the same function ... doh!
|

01-29-2004, 10:35 AM
|
Hill Giant
|
|
Join Date: Nov 2003
Posts: 192
|
|
Quote:
Originally Posted by Mongrel
Yay, it works!
Well, more or less, gprof itself says that the output is invalid
|
Not sure what your problem might be. What command are you typing and what exact error are you getting ?
When I tested it, I CDed to the directory where my exe and gmon.out where, and then did c:\dev-cpp\bin\gprof <myprog>.exe
and it worked fine.
|

01-29-2004, 08:11 PM
|
Hill Giant
|
|
Join Date: Jul 2003
Location: Germany
Posts: 232
|
|
hmmmm, you have to run gprof on the .exe? Never tried that.
"gprof gmon.out" gives me the "not in a.out format" message. Will try it again tonight with the exe.
|

01-29-2004, 11:52 PM
|
Demi-God
|
|
Join Date: Jan 2002
Location: Charlotte, NC
Posts: 2,614
|
|
gprof will automaticlly grab the gmon file, you have to specify the binary.. I made the same mistake initially, I assumed it just needed to read the output file...
__________________
Quitters never win, and winners never quit, but those who never win and never quit are idiots.
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 05:52 PM.
|
|
 |
|
 |
|
|
|
 |
|
 |
|
 |