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.)
This commit is contained in:
Derek Foreman 2017-02-10 11:58:24 -06:00
parent e3bdfae54c
commit 44804a9579
2 changed files with 9 additions and 0 deletions

View File

@ -86,16 +86,21 @@ esac
prefer_assert="no"
eina_log_backtrace="yes"
efl_less_insane="no"
case "${build_profile}" in
dev|debug)
prefer_assert="yes"
eina_log_backtrace="no"
efl_less_insane="yes"
;;
esac
# Enable CRI & ERR backtrace by default for release but not for dev/debug
AC_DEFINE_IF([EINA_LOG_BACKTRACE_ENABLE], [test "x${eina_log_backtrace}" = "xyes"], [1], [Default log level triggering backtraces])
# Additional sanity checks only performed in debug builds
AC_DEFINE_IF([EFL_EXTRA_SANITY_CHECKS], [test "x${efl_less_insane}" = "xyes"], [1], [Extra run time sanity checks])
# TODO: add some build "profile" (server, full, etc...)
AC_ARG_WITH([crypto],

View File

@ -344,6 +344,7 @@ _ecore_fd_close_on_exec(int fd)
#endif
}
#ifdef EFL_EXTRA_SANITY_CHECKS
static inline void
_ecore_fd_valid(void)
{
@ -360,6 +361,7 @@ _ecore_fd_valid(void)
}
}
}
#endif
static inline void
_ecore_try_add_to_call_list(Ecore_Fd_Handler *fdh)
@ -1997,7 +1999,9 @@ _ecore_main_fd_handlers_call(void)
}
}
fdh->references--;
#ifdef EFL_EXTRA_SANITY_CHECKS
_ecore_fd_valid();
#endif
fdh->read_active = EINA_FALSE;
fdh->write_active = EINA_FALSE;