diff options
author | Jerome Forissier <jerome.forissier@linaro.org> | 2016-10-13 16:27:05 +0200 |
---|---|---|
committer | Jerome Forissier <jerome.forissier@linaro.org> | 2017-01-24 18:10:53 +0100 |
commit | f3bb2312f41f85790c77e749f096f10be36e9506 (patch) | |
tree | 71634813bab848bd61ef97f2a88c9c96a30ff030 /mk/config.mk | |
parent | add061711228da2097f6aca352816272b61a153d (diff) |
Add options to build user libraries with profiling enabled (-pg)
Set CFG_TA_GPROF=y to build libutee and the user-mode versions of
libutils and libmpa with the -pg flag (gprof profiling).
This feature depends on TA profiling support in OP-TEE core which will
be introduced in a later commit.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Diffstat (limited to 'mk/config.mk')
-rw-r--r-- | mk/config.mk | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/mk/config.mk b/mk/config.mk index 6aa3f338..afe1f7f6 100644 --- a/mk/config.mk +++ b/mk/config.mk @@ -209,3 +209,17 @@ CFG_BOOT_SECONDARY_REQUEST ?= n # Default heap size for Core, 64 kB CFG_CORE_HEAP_SIZE ?= 65536 + +ifeq ($(CFG_TA_GPROF),y) +# Build various user-mode libraries with profiling enabled (-pg) +CFG_LIBUTEE_GPROF ?= y +CFG_U_LIBUTILS_GPROF ?= y +CFG_U_LIBMPA_GPROF ?= y +endif + +ifeq ($(filter y,$(CFG_LIBUTEE_GPROF) $(CFG_U_LIBUTILS_GPROF) \ + $(CFG_U_LIBMPA_GPROF)),y) +ifneq ($(CFG_TA_GPROF_SUPPORT),y) +$(error Cannot instrument user library if user mode profiling is disabled) +endif +endif |