util: Don't generate a backtrace on every G_LOG
We may not show the backtrace, but it's prohibitly expensive to generate, so don't. If someone wants a backtrace they can use the appropriate G_DEBUG environment variable plus GDB. https://bugzilla.gnome.org/show_bug.cgi?id=676855
This commit is contained in:
parent
66406b3035
commit
f143fe3710
5 changed files with 0 additions and 40 deletions
|
@ -113,9 +113,6 @@ AC_ARG_ENABLE(shape,
|
|||
[disable mutter's use of the shaped window extension]),,
|
||||
enable_shape=auto)
|
||||
|
||||
## try definining HAVE_BACKTRACE
|
||||
AC_CHECK_HEADERS(execinfo.h, [AC_CHECK_FUNCS(backtrace)])
|
||||
|
||||
AM_GLIB_GNU_GETTEXT
|
||||
|
||||
## here we get the flags we'll actually use
|
||||
|
|
|
@ -5332,7 +5332,6 @@ timestamp_too_old (MetaDisplay *display,
|
|||
meta_warning ("Got a request to focus %s with a timestamp of 0. This "
|
||||
"shouldn't happen!\n",
|
||||
window ? window->desc : "the no_focus_window");
|
||||
meta_print_backtrace ();
|
||||
*timestamp = meta_display_get_current_time_roundtrip (display);
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
@ -110,7 +110,6 @@ log_handler (const gchar *log_domain,
|
|||
gpointer user_data)
|
||||
{
|
||||
meta_warning ("Log level %d: %s\n", log_level, message);
|
||||
meta_print_backtrace ();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -47,37 +47,6 @@ meta_topic_real_valist (MetaDebugTopic topic,
|
|||
va_list args);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_BACKTRACE
|
||||
#include <execinfo.h>
|
||||
void
|
||||
meta_print_backtrace (void)
|
||||
{
|
||||
void *bt[500];
|
||||
int bt_size;
|
||||
int i;
|
||||
char **syms;
|
||||
|
||||
bt_size = backtrace (bt, 500);
|
||||
|
||||
syms = backtrace_symbols (bt, bt_size);
|
||||
|
||||
i = 0;
|
||||
while (i < bt_size)
|
||||
{
|
||||
meta_verbose (" %s\n", syms[i]);
|
||||
++i;
|
||||
}
|
||||
|
||||
free (syms);
|
||||
}
|
||||
#else
|
||||
void
|
||||
meta_print_backtrace (void)
|
||||
{
|
||||
meta_verbose ("Not compiled with backtrace support\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
static gint verbose_topics = 0;
|
||||
static gboolean is_debugging = FALSE;
|
||||
static gboolean replace_current = FALSE;
|
||||
|
@ -441,8 +410,6 @@ meta_bug (const char *format, ...)
|
|||
fflush (out);
|
||||
|
||||
g_free (str);
|
||||
|
||||
meta_print_backtrace ();
|
||||
|
||||
/* stop us in a debugger */
|
||||
abort ();
|
||||
|
|
|
@ -90,8 +90,6 @@ gint meta_unsigned_long_equal (gconstpointer v1,
|
|||
gconstpointer v2);
|
||||
guint meta_unsigned_long_hash (gconstpointer v);
|
||||
|
||||
void meta_print_backtrace (void);
|
||||
|
||||
const char* meta_frame_type_to_string (MetaFrameType type);
|
||||
const char* meta_gravity_to_string (int gravity);
|
||||
|
||||
|
|
Loading…
Reference in a new issue