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
@ -113,9 +113,6 @@ AC_ARG_ENABLE(shape,
|
|||||||
[disable mutter's use of the shaped window extension]),,
|
[disable mutter's use of the shaped window extension]),,
|
||||||
enable_shape=auto)
|
enable_shape=auto)
|
||||||
|
|
||||||
## try definining HAVE_BACKTRACE
|
|
||||||
AC_CHECK_HEADERS(execinfo.h, [AC_CHECK_FUNCS(backtrace)])
|
|
||||||
|
|
||||||
AM_GLIB_GNU_GETTEXT
|
AM_GLIB_GNU_GETTEXT
|
||||||
|
|
||||||
## here we get the flags we'll actually use
|
## 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 "
|
meta_warning ("Got a request to focus %s with a timestamp of 0. This "
|
||||||
"shouldn't happen!\n",
|
"shouldn't happen!\n",
|
||||||
window ? window->desc : "the no_focus_window");
|
window ? window->desc : "the no_focus_window");
|
||||||
meta_print_backtrace ();
|
|
||||||
*timestamp = meta_display_get_current_time_roundtrip (display);
|
*timestamp = meta_display_get_current_time_roundtrip (display);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -110,7 +110,6 @@ log_handler (const gchar *log_domain,
|
|||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
meta_warning ("Log level %d: %s\n", log_level, message);
|
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);
|
va_list args);
|
||||||
#endif
|
#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 gint verbose_topics = 0;
|
||||||
static gboolean is_debugging = FALSE;
|
static gboolean is_debugging = FALSE;
|
||||||
static gboolean replace_current = FALSE;
|
static gboolean replace_current = FALSE;
|
||||||
@ -442,8 +411,6 @@ meta_bug (const char *format, ...)
|
|||||||
|
|
||||||
g_free (str);
|
g_free (str);
|
||||||
|
|
||||||
meta_print_backtrace ();
|
|
||||||
|
|
||||||
/* stop us in a debugger */
|
/* stop us in a debugger */
|
||||||
abort ();
|
abort ();
|
||||||
}
|
}
|
||||||
|
@ -90,8 +90,6 @@ gint meta_unsigned_long_equal (gconstpointer v1,
|
|||||||
gconstpointer v2);
|
gconstpointer v2);
|
||||||
guint meta_unsigned_long_hash (gconstpointer v);
|
guint meta_unsigned_long_hash (gconstpointer v);
|
||||||
|
|
||||||
void meta_print_backtrace (void);
|
|
||||||
|
|
||||||
const char* meta_frame_type_to_string (MetaFrameType type);
|
const char* meta_frame_type_to_string (MetaFrameType type);
|
||||||
const char* meta_gravity_to_string (int gravity);
|
const char* meta_gravity_to_string (int gravity);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user