News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

profiling with C::B

Started by C:B_newbie, September 09, 2018, 05:54:38 PM

Previous topic - Next topic

C:B_newbie

Hello together,

I never used a profiler or anything similar before. But I have heard of tools or methods that check what part of the code takes the most runtime.
Is there a way to easily do this (with CodeBlocks or without)?
I usually don't run programs via the command shell, so if I need this, please tell me exactly what I have to type there.

Regards.

oBFusCATed

Generally C::B has an integration with the GCC's profiler, but it is a bit useless these days and there are better tools.

What OS are you using?
On linux you're better of using perf or something similar. I'm testing the hotspot perf data viewer and it isn't that bad. Also using flamegraphs is really useful, but getting reliable callstacks on linux is tough :(.

On windows I'm not really sure if there is really a free alternative to perf. I've heard there is an window integrated profiler, but I've never used it.

At work we use Intel VTune (for both linux and windows), but it is quite expensive unfortunately. No other tool is close to the UI features of VTune. And callstacks work quite a lot better with it on linux.

Another thing which is getting attention is the XRay system integrated in LLVM.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

C:B_newbie

Thank you for your response!

I am using Windows (sorry for not mentioning it, I always forget that the idea that most people use windows does not hold true when it comes to software developement :D), I will switch to Linux as soon as I have a bit time to spare.

So it's not that simple. I am just a student, so I don't want to pay for it :D