Make frame-timestamp logging optional
Instead of always logging frame timestamps for every frame - which was using >26 bytes of memory per frame, or 5MB per hour of continuous redrawing - make frame timestamps something that defaults off and is turned turned on using a new ShellGlobal::frame-timestamps property by the perf scripts. https://bugzilla.gnome.org/show_bug.cgi?id=732350
This commit is contained in:
@ -389,9 +389,17 @@ gnome_shell_plugin_xevent_filter (MetaPlugin *plugin,
|
||||
* can send this with a ust of 0. Simplify life for consumers
|
||||
* by ignoring such events */
|
||||
if (swap_complete_event->ust != 0)
|
||||
shell_perf_log_event_x (shell_perf_log_get_default (),
|
||||
"glx.swapComplete",
|
||||
swap_complete_event->ust);
|
||||
{
|
||||
gboolean frame_timestamps;
|
||||
g_object_get (shell_plugin->global,
|
||||
"frame-timestamps", &frame_timestamps,
|
||||
NULL);
|
||||
|
||||
if (frame_timestamps)
|
||||
shell_perf_log_event_x (shell_perf_log_get_default (),
|
||||
"glx.swapComplete",
|
||||
swap_complete_event->ust);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user