Author Topic: profiling with C::B  (Read 816 times)

Offline C:B_newbie

  • Multiple posting newcomer
  • *
  • Posts: 10
profiling with C::B
« on: September 09, 2018, 05:54:38 pm »
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.


Online oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12600
    • Travis build status
Re: profiling with C::B
« Reply #1 on: September 09, 2018, 06:05:29 pm »
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!]

Offline C:B_newbie

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: profiling with C::B
« Reply #2 on: September 09, 2018, 11:46:03 pm »
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