i wonder if there is any good programs for finding bugs in my program that makes it use 100% of the cpu when its running

i searched the forum and didnt find any good answers to this

the progam is a simple windows window and somehow it overuses the cpu, i tried to find if it was due to endless loop or such but cant pinpoint it so how to fix this? im sure this has happend to alot of you guys from now to then so i want to hear some suggestions :alright:

thanks Noobe
Posted on 2002-07-09 17:34:28 by Noobe
I think there is a jump logger on Iczelion's site by defiler. Perhaps you could tweak it to log addresses and find your infinite loops.
Posted on 2002-07-09 18:41:31 by comrade
Intel: VTune (you have to pay for it).
AMD: CodeAnalyst (free).

Both are performance tools, and should identify the cpu usage within the code.

Mirno
Posted on 2002-07-10 04:49:20 by Mirno
I am guessing VTune will only work on Intel CPUs and AMD only on AMD CPUs?
Posted on 2002-07-10 13:07:35 by comrade
I am guessing VTune will only work on Intel CPUs and AMD only on AMD CPUs?
I tried posting a similar question before(like 4 months ago) but nobody seems to know the answer. I'm currently using AMD codeanalyst on an Intel P3 and I don't know if it's giving the correct output/data???

I know it's giving the correct analysis for the different penalties involved in the code but how about it's pipeline analysis???

Does anybody knows the answer?
Posted on 2002-07-10 14:22:04 by stryker

I know it's giving the correct analysis for the different penalties involved in the code but how about it's pipeline analysis???
I doubt that would be correct. What is the purpose in supporting your competetor's product at this level? Doesn't the docs say only K6/K7 support?
Posted on 2002-07-10 14:41:51 by bitRAKE
hmm, I don't know but when I'm expecting a penalty at this part of the code, codeanalyst confirms that the penalty happened, like jump misprediction, qword misalign...:confused:
Posted on 2002-07-10 14:45:02 by stryker
Those are similarities between the chips. You'd have to look for a penalty the Intel chip has, but lacking in the AMD - or visa versa. I can't think of one off the top of my head right now, but I know there are many. :tongue: Point is that the pipelines are very different between the two brands.
Posted on 2002-07-10 14:52:13 by bitRAKE
oh shoot!!!, When is intel going to release a free version. Oh well! if not, I'll just wait until I'll earn more $$$ :grin:

P.S. I know I should've uninstalled it before. Now it's giving me incorrect results. :grin:

Bye Bye CodeAnalyst ... burn in hell!!! :grin:
Posted on 2002-07-10 15:02:05 by stryker
Hey, it's betterthan nothing, imo. They are most likely using the performance counters and so that info is going to be correct, just not the pipeline analysis?
Posted on 2002-07-10 15:02:15 by bitRAKE
I bet AMD CodeAnalyst gives low results for Intel CPUs and Intel VTune gives low results for AMD CPUs. :D
Posted on 2002-07-10 23:25:44 by comrade
I would also have a look at the app with Microsoft's Spy++, and monitor the messages your window is processing. It may be that you have got into a situation where you have done something in code which has triggered a message, which then triggers another message, etc., and basically you can end up never leaving your message loop.
Posted on 2002-07-11 00:05:08 by sluggy