summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2017-02-10 11:58:24 -0600
committerDerek Foreman <derekf@osg.samsung.com>2017-02-10 12:13:06 -0600
commit44804a9579e0e817127f3d070c3d050bedaa73e9 (patch)
tree01b3a2184e1e43f53e3320e676836789a1c69ffb
parente3bdfae54c99d3778683f7b7b4d4a1771f3e3356 (diff)
ecore: Don't call _ecore_fd_valid() in release builds
Not sure _ecore_fd_valid() is all that useful anymore, as the commit that introduced it said it would be removed "before release" a long time ago - it's a debug assist that probably doesn't need to be in release builds. (I'm counting syscalls on rpi3 - still, calling this an optimization seems like a bit of a stretch.)
Diffstat (limited to '')
-rw-r--r--configure.ac5
-rw-r--r--src/lib/ecore/ecore_main.c4
2 files changed, 9 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 89a0fe3b2e..2ccedf16a4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -86,16 +86,21 @@ esac
86 86
87prefer_assert="no" 87prefer_assert="no"
88eina_log_backtrace="yes" 88eina_log_backtrace="yes"
89efl_less_insane="no"
89case "${build_profile}" in 90case "${build_profile}" in
90 dev|debug) 91 dev|debug)
91 prefer_assert="yes" 92 prefer_assert="yes"
92 eina_log_backtrace="no" 93 eina_log_backtrace="no"
94 efl_less_insane="yes"
93 ;; 95 ;;
94esac 96esac
95 97
96# Enable CRI & ERR backtrace by default for release but not for dev/debug 98# Enable CRI & ERR backtrace by default for release but not for dev/debug
97AC_DEFINE_IF([EINA_LOG_BACKTRACE_ENABLE], [test "x${eina_log_backtrace}" = "xyes"], [1], [Default log level triggering backtraces]) 99AC_DEFINE_IF([EINA_LOG_BACKTRACE_ENABLE], [test "x${eina_log_backtrace}" = "xyes"], [1], [Default log level triggering backtraces])
98 100
101# Additional sanity checks only performed in debug builds
102AC_DEFINE_IF([EFL_EXTRA_SANITY_CHECKS], [test "x${efl_less_insane}" = "xyes"], [1], [Extra run time sanity checks])
103
99# TODO: add some build "profile" (server, full, etc...) 104# TODO: add some build "profile" (server, full, etc...)
100 105
101AC_ARG_WITH([crypto], 106AC_ARG_WITH([crypto],
diff --git a/src/lib/ecore/ecore_main.c b/src/lib/ecore/ecore_main.c
index ebd272d669..125c886e65 100644
--- a/src/lib/ecore/ecore_main.c
+++ b/src/lib/ecore/ecore_main.c
@@ -344,6 +344,7 @@ _ecore_fd_close_on_exec(int fd)
344#endif 344#endif
345} 345}
346 346
347#ifdef EFL_EXTRA_SANITY_CHECKS
347static inline void 348static inline void
348_ecore_fd_valid(void) 349_ecore_fd_valid(void)
349{ 350{
@@ -360,6 +361,7 @@ _ecore_fd_valid(void)
360 } 361 }
361 } 362 }
362} 363}
364#endif
363 365
364static inline void 366static inline void
365_ecore_try_add_to_call_list(Ecore_Fd_Handler *fdh) 367_ecore_try_add_to_call_list(Ecore_Fd_Handler *fdh)
@@ -1997,7 +1999,9 @@ _ecore_main_fd_handlers_call(void)
1997 } 1999 }
1998 } 2000 }
1999 fdh->references--; 2001 fdh->references--;
2002#ifdef EFL_EXTRA_SANITY_CHECKS
2000 _ecore_fd_valid(); 2003 _ecore_fd_valid();
2004#endif
2001 2005
2002 fdh->read_active = EINA_FALSE; 2006 fdh->read_active = EINA_FALSE;
2003 fdh->write_active = EINA_FALSE; 2007 fdh->write_active = EINA_FALSE;