forked from enlightenment/efl
parent
b859682fc1
commit
52acb710f5
|
@ -345,13 +345,16 @@ fi
|
||||||
AC_SUBST(pkgconfig_requires_private)
|
AC_SUBST(pkgconfig_requires_private)
|
||||||
|
|
||||||
### Checks for some build time option
|
### Checks for some build time option
|
||||||
|
have_backtrace="no"
|
||||||
|
AC_CHECK_FUNCS([backtrace], [have_backtrace="yes"], [])
|
||||||
|
|
||||||
want_ecore_timer_dump="yes"
|
want_ecore_timer_dump="yes"
|
||||||
|
|
||||||
AC_ARG_ENABLE([ecore-timer-dump],
|
AC_ARG_ENABLE([ecore-timer-dump],
|
||||||
[AC_HELP_STRING([--disable-ecore-timer-dump], [disable tracking of timer allocation. @<:@default=enable@:>@])],
|
[AC_HELP_STRING([--disable-ecore-timer-dump], [disable tracking of timer allocation. @<:@default=enable@:>@])],
|
||||||
[want_ecore_timer_dump=$enableval], [])
|
[want_ecore_timer_dump=$enableval], [])
|
||||||
|
|
||||||
if test "x$want_ecore_timer_dump" = "xyes"; then
|
if test "x$want_ecore_timer_dump" = "xyes" -a "x$have_backtrace" = "xyes"; then
|
||||||
AC_DEFINE(WANT_ECORE_TIMER_DUMP, [1], [Want Ecore_Timer dump infrastructure])
|
AC_DEFINE(WANT_ECORE_TIMER_DUMP, [1], [Want Ecore_Timer dump infrastructure])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -377,11 +377,9 @@ ecore_timer_dump(void)
|
||||||
EINA_LIST_FREE(tmp, tm)
|
EINA_LIST_FREE(tmp, tm)
|
||||||
{
|
{
|
||||||
char **strings;
|
char **strings;
|
||||||
int nptrs;
|
|
||||||
int j;
|
int j;
|
||||||
|
|
||||||
nptrs = backtrace((void**) tm->timer_bt, ECORE_TIMER_DEBUG_BT_NUM);
|
strings = backtrace_symbols((void**) tm->timer_bt, tm->timer_bt_num);
|
||||||
strings = backtrace_symbols((void**) tm->timer_bt, nptrs);
|
|
||||||
if (strings == NULL)
|
if (strings == NULL)
|
||||||
continue ;
|
continue ;
|
||||||
|
|
||||||
|
@ -390,7 +388,7 @@ ecore_timer_dump(void)
|
||||||
eina_strbuf_append(result, "FROZEN\n");
|
eina_strbuf_append(result, "FROZEN\n");
|
||||||
if (tm->delete_me)
|
if (tm->delete_me)
|
||||||
eina_strbuf_append(result, "DELETED\n");
|
eina_strbuf_append(result, "DELETED\n");
|
||||||
for (j = 0; j < nptrs; j++)
|
for (j = 0; j < tm->timer_bt_num; j++)
|
||||||
eina_strbuf_append_printf(result, "%s\n", strings[j]);
|
eina_strbuf_append_printf(result, "%s\n", strings[j]);
|
||||||
|
|
||||||
free(strings);
|
free(strings);
|
||||||
|
|
Loading…
Reference in New Issue