window: Add some trace instrumentation to implement show/hide
Showing and hiding caused several second stalls, and still cause large enough stalls to cause missed frames, makes this visible to Sysprof. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1616>
This commit is contained in:
parent
48a90e3a86
commit
7eb20b2c39
@ -1807,6 +1807,8 @@ idle_calc_showing (gpointer data)
|
|||||||
GSList *displays;
|
GSList *displays;
|
||||||
guint queue_index = GPOINTER_TO_INT (data);
|
guint queue_index = GPOINTER_TO_INT (data);
|
||||||
|
|
||||||
|
COGL_TRACE_BEGIN_SCOPED (MetaWindowCalcShowing, "Window: Calc showing");
|
||||||
|
|
||||||
g_return_val_if_fail (queue_pending[queue_index] != NULL, FALSE);
|
g_return_val_if_fail (queue_pending[queue_index] != NULL, FALSE);
|
||||||
|
|
||||||
meta_topic (META_DEBUG_WINDOW_STATE,
|
meta_topic (META_DEBUG_WINDOW_STATE,
|
||||||
@ -1833,6 +1835,8 @@ idle_calc_showing (gpointer data)
|
|||||||
unplaced = NULL;
|
unplaced = NULL;
|
||||||
displays = NULL;
|
displays = NULL;
|
||||||
|
|
||||||
|
COGL_TRACE_BEGIN (MetaWindowCalcShowingCalc, "Window: Calc showing (calc)");
|
||||||
|
|
||||||
tmp = copy;
|
tmp = copy;
|
||||||
while (tmp != NULL)
|
while (tmp != NULL)
|
||||||
{
|
{
|
||||||
@ -1857,6 +1861,11 @@ idle_calc_showing (gpointer data)
|
|||||||
should_show = g_slist_sort (should_show, stackcmp);
|
should_show = g_slist_sort (should_show, stackcmp);
|
||||||
should_show = g_slist_reverse (should_show);
|
should_show = g_slist_reverse (should_show);
|
||||||
|
|
||||||
|
COGL_TRACE_END (MetaWindowCalcShowingCalc);
|
||||||
|
|
||||||
|
COGL_TRACE_BEGIN (MetaWindowCalcShowingUnplaced,
|
||||||
|
"Window: Calc showing (calc unplaced)");
|
||||||
|
|
||||||
tmp = unplaced;
|
tmp = unplaced;
|
||||||
while (tmp != NULL)
|
while (tmp != NULL)
|
||||||
{
|
{
|
||||||
@ -1869,8 +1878,11 @@ idle_calc_showing (gpointer data)
|
|||||||
tmp = tmp->next;
|
tmp = tmp->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
COGL_TRACE_END (MetaWindowCalcShowingUnplaced);
|
||||||
|
|
||||||
meta_stack_freeze (display->stack);
|
meta_stack_freeze (display->stack);
|
||||||
|
|
||||||
|
COGL_TRACE_BEGIN (MetaWindowCalcShowingShow, "Window: Calc showing (show)");
|
||||||
tmp = should_show;
|
tmp = should_show;
|
||||||
while (tmp != NULL)
|
while (tmp != NULL)
|
||||||
{
|
{
|
||||||
@ -1882,7 +1894,9 @@ idle_calc_showing (gpointer data)
|
|||||||
|
|
||||||
tmp = tmp->next;
|
tmp = tmp->next;
|
||||||
}
|
}
|
||||||
|
COGL_TRACE_END (MetaWindowCalcShowingShow);
|
||||||
|
|
||||||
|
COGL_TRACE_BEGIN (MetaWindowCalcShowingHide, "Window: Calc showing (hide)");
|
||||||
tmp = should_hide;
|
tmp = should_hide;
|
||||||
while (tmp != NULL)
|
while (tmp != NULL)
|
||||||
{
|
{
|
||||||
@ -1894,8 +1908,12 @@ idle_calc_showing (gpointer data)
|
|||||||
|
|
||||||
tmp = tmp->next;
|
tmp = tmp->next;
|
||||||
}
|
}
|
||||||
|
COGL_TRACE_END (MetaWindowCalcShowingHide);
|
||||||
|
|
||||||
|
COGL_TRACE_BEGIN (MetaWindowCalcShowingSync,
|
||||||
|
"Window: Calc showing (sync stack)");
|
||||||
meta_stack_thaw (display->stack);
|
meta_stack_thaw (display->stack);
|
||||||
|
COGL_TRACE_END (MetaWindowCalcShowingSync);
|
||||||
|
|
||||||
tmp = copy;
|
tmp = copy;
|
||||||
while (tmp != NULL)
|
while (tmp != NULL)
|
||||||
|
Loading…
Reference in New Issue
Block a user