HomePhabricator

Add build support for 'gprof' profiling.

Description

Add build support for 'gprof' profiling.

Summary:
Backport of core PR12373.

I made the cmake option a string value (not boolean) so that other tools
can be added later.

Test Plan:
For autotools:

./autogen.sh
mkdir build && cd build
../configure --enable-gprof
make

For cmake:

cmake -DENABLE_PROFILING=gprof -DENABLE_HARDENING=OFF
ninja

For both:

./src/bitcoind -help
gprof src/bitcoind gmon.out > profiling.txt

The profiling.txt file contains the profiling information.

cmake -GNinja .. -DENABLE_PROFILING=gprof

Should return an error and ask to disable hardening.

cmake -GNinja ..
ninja check-security

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Subscribers: deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D5181

Details

Provenance
murrayn <github@nesbitt.ca>Authored on Feb 7 2018, 04:58
FabienCommitted on Feb 7 2020, 09:55
FabienPushed on Feb 7 2020, 09:56
Reviewer
Restricted Project
Differential Revision
D5181: Add build support for 'gprof' profiling.
Parents
rABCda4599790500: [CMAKE] Get rid of ECM for running the sanitizers
Branches
Unknown
Tags
Unknown