From 5cae27e88f5e173408e7c22513b9c60d6a30b53c Mon Sep 17 00:00:00 2001 From: Seunghun Lee Date: Thu, 12 Jun 2025 11:18:28 +0900 Subject: [PATCH] build: Make function-trace default Change-Id: Icbbd4ab162087793d550540218263d7a6e563c8c --- meson_options.txt | 1 - packaging/enlightenment.spec | 1 - src/bin/meson.build | 4 ---- src/include/e_log.h | 22 ++++++++-------------- 4 files changed, 8 insertions(+), 20 deletions(-) diff --git a/meson_options.txt b/meson_options.txt index 3ca7410752..425a695122 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,2 +1 @@ -option('function-trace', type: 'boolean', value: false, description: 'enable function trace: (default=false)') option('tests', type: 'boolean', value: true, description: 'Compile Enlightenment tests') diff --git a/packaging/enlightenment.spec b/packaging/enlightenment.spec index 909640a6c5..13658e4164 100644 --- a/packaging/enlightenment.spec +++ b/packaging/enlightenment.spec @@ -130,7 +130,6 @@ meson setup \ --prefix /usr \ --libdir %{_libdir} \ --bindir %{_bindir} \ - -Dfunction-trace=true \ %{?disable_tests:-Dtests=false}%{!?disable_tests:-Dtests=true} %install diff --git a/src/bin/meson.build b/src/bin/meson.build index b4d62f00bd..b47491466e 100644 --- a/src/bin/meson.build +++ b/src/bin/meson.build @@ -1,7 +1,3 @@ -if get_option('function-trace') - config_h.set('ENABLE_FUNCTION_TRACE', '1') -endif - cc.check_header('fnmatch.h', required: true) if cc.has_header('features.h') diff --git a/src/include/e_log.h b/src/include/e_log.h index 426b6d243c..788ea37357 100644 --- a/src/include/e_log.h +++ b/src/include/e_log.h @@ -33,19 +33,18 @@ extern "C" { #undef PRCTL_BACKTRACE #undef DLOG_BACKTRACE -#ifdef ENABLE_FUNCTION_TRACE -# include -# undef PR_TASK_PERF_USER_TRACE -# define PR_TASK_PERF_USER_TRACE 666 -# define PRCTL(str, x...) \ +#include +#undef PR_TASK_PERF_USER_TRACE +#define PR_TASK_PERF_USER_TRACE 666 +#define PRCTL(str, x...) \ ({ \ char __buf__[256]; \ snprintf(__buf__, sizeof(__buf__), str, ##x); \ prctl(PR_TASK_PERF_USER_TRACE, __buf__, strlen(__buf__)); \ }) -# include -# define PRCTL_BACKTRACE() \ +#include +#define PRCTL_BACKTRACE() \ ({ \ void *__buf__[256]; \ char **__strings__; \ @@ -60,8 +59,8 @@ extern "C" { } \ }) -# ifdef HAVE_DLOG -# define DLOG_BACKTRACE() \ +#ifdef HAVE_DLOG +# define DLOG_BACKTRACE() \ ({ \ void *__buf__[256]; \ char **__strings__; \ @@ -75,11 +74,6 @@ extern "C" { free(__strings__); \ } \ }) -# endif -#else -# define PRCTL -# define PRCTL_BACKTRACE -# define DLOG_BACKTRACE #endif static inline Ecore_Window -- 2.34.1