-
Notifications
You must be signed in to change notification settings - Fork 648
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add USE_PROFILER to Cmake #1119
Conversation
Thanks.
|
i actually had that too in my initial setup but then confirmed it is not needed, the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- IMO this will get messy if more such options are added in the future. Better keep the original line and only add "-pg" if USE_PROFILER is ON.
- Perhaps add -pg to CMAKE_C_FLAGS not only CMAKE_CXX_FLAGS?
changed this.
I made some tests with this and also by adding pg to the linker flags before. I am not an expert in profiling, actually my first time checking this out but i think they don't make any difference. |
Core developer @abitmore had been using sucessfully some profiling with
gprof
in our binaries at different scenarios for example #1113this pull adds the option to compile with profile information by
cmake
, something as:cmake -DBOOST_ROOT="$BOOST_ROOT" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DUSE_PROFILER=ON .
This option is off by default as the binary will be much more slower when adding profiling info. The use of
gprof
is outside of the scope, option should be used by an experienced developer interested in project performance.A note written in #1140: