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:
Owen W. Taylor
2014-06-26 20:34:15 -04:00
parent f0d4260c81
commit e30925995f
3 changed files with 41 additions and 9 deletions

View File

@ -72,6 +72,9 @@ function run() {
Scripting.defineScriptEvent("applicationsShowStart", "Starting to switch to applications view");
Scripting.defineScriptEvent("applicationsShowDone", "Done switching to applications view");
// Enable recording of timestamps for different points in the frame cycle
global.frame_timestamps = true;
Main.overview.connect('shown', function() {
Scripting.scriptEvent('overviewShowDone');
});