perf profiling - unknown

My program work fast, after changing is two times slower.
I try profile with perf under CLion.
Most time consuming method is [Unknown][Unknown]
what it is?
> My program work fast, after changing is two times slower.
Do you know what you changed?
Can you get back to the original 'fast' version?

If the answer is 'no' to either, then it's time you researched https://git-scm.com/

CLion is just a glossy editor, what matters is how you build the software.

Unknown sounds like you tried to profile a stripped release build.
ld wrote:
-s
--strip-all
Omit all symbol information from the output file.

My changes are big because intermediate versions not works at all, only compiled. New version seems to be work the same, but is slower. New version is preparation for threads.I don't use thread yet.
I thnink "unknown" is not method but all time, main is called from unknown.
But I don't know yet why is slower.

I know!
Small method was called billion times. Previously was inlined , but now compiler can't inline because this method and its caller was on different .cpp files. Now is faster than previous version!
Last edited on
Unfortunately, that is something that can happen once you split things into multiple compilation units, due to how C/C++ compilation works.

There is a compiler flag for link-time optimization which may also solve the speed issues here.
-flto
Last edited on
main is called from unknown

That's expected. main() is called from the startup code. What matters is what main() calls, not what calls main(). After all, the entire program is inside a call to main().

Small method was called billion times.
That's a lot. You might need a better algorithm. The good news is that sometimes a better algorithm can have a dramatic affect on the program's performance.
Topic archived. No new replies allowed.