[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/workspace/ksmserver
From: Luboš Luňák <l.lunak () kde ! org>
Date: 2009-11-24 9:31:34
Message-ID: 1259055094.062559.32016.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1053471 by lunakl:
some profiling info
M +1 -0 server.h
M +48 -0 startup.cpp
--- trunk/KDE/kdebase/workspace/ksmserver/server.h #1053470:1053471
@@ -32,6 +32,7 @@
#include <kapplication.h>
#include <kworkspace.h>
+#include <kmessagebox.h>
#include <QTimer>
#include <QTime>
#include <QMap>
--- trunk/KDE/kdebase/workspace/ksmserver/startup.cpp #1053470:1053471
@@ -82,6 +82,12 @@
#include <klauncher_iface.h>
#include "kcminit_interface.h"
+#define KSMSERVER_STARTUP_DEBUG1
+
+#ifdef KSMSERVER_STARTUP_DEBUG1
+static QTime t;
+#endif
+
/*! Restores the previous session. Ensures the window manager is
running (if specified).
*/
@@ -89,6 +95,9 @@
{
if( state != Idle )
return;
+#ifdef KSMSERVER_STARTUP_DEBUG1
+ t.start();
+#endif
state = LaunchingWM;
kDebug( 1218 ) << "KSMServer::restoreSession " << sessionName;
@@ -130,6 +139,9 @@
if( state != Idle )
return;
state = LaunchingWM;
+#ifdef KSMSERVER_STARTUP_DEBUG1
+ t.start();
+#endif
sessionGroup = "";
upAndRunning( "ksmserver" );
connect( klauncherSignals, SIGNAL( autoStart0Done()), SLOT( autoStart0Done()));
@@ -160,6 +172,24 @@
{
if( client->program() == wm )
autoStart0();
+#ifndef KSMSERVER_STARTUP_DEBUGl
+ if( state == Idle )
+ {
+ static int cnt = 0;
+ if( client->program() == "gedit" && ( cnt == 0 ))
+ ++cnt;
+ else if( client->program() == "konqueror" && ( cnt == 1 ))
+ ++cnt;
+ else if( client->program() == "kspaceduel" && ( cnt == 2 ))
+ ++cnt;
+ else if( client->program() == "gedit" && ( cnt == 3 ))
+ ++cnt;
+ else
+ cnt = 0;
+ if( cnt == 4 )
+ KMessageBox::information( NULL, "drat" );
+ }
+#endif
}
void KSMServer::wmProcessChange()
@@ -190,6 +220,9 @@
if( !checkStartupSuspend())
return;
state = AutoStart0;
+#ifdef KSMSERVER_STARTUP_DEBUG1
+ kDebug() << t.elapsed();
+#endif
org::kde::KLauncher klauncher("org.kde.klauncher", "/KLauncher", \
QDBusConnection::sessionBus()); klauncher.autoStart((int)0);
}
@@ -202,6 +235,9 @@
if( !checkStartupSuspend())
return;
kDebug( 1218 ) << "Autostart 0 done";
+#ifdef KSMSERVER_STARTUP_DEBUG1
+ kDebug() << t.elapsed();
+#endif
upAndRunning( "desktop" );
kcminitSignals = new QDBusInterface("org.kde.kcminit", "/kcminit", \
"org.kde.KCMInit", QDBusConnection::sessionBus(), this ); if( \
!kcminitSignals->isValid()) @@ -236,6 +272,9 @@
if( state != KcmInitPhase1 )
return;
state = AutoStart1;
+#ifdef KSMSERVER_STARTUP_DEBUG1
+ kDebug() << t.elapsed();
+#endif
org::kde::KLauncher klauncher("org.kde.klauncher", "/KLauncher", \
QDBusConnection::sessionBus()); klauncher.autoStart((int)1);
}
@@ -251,6 +290,9 @@
lastAppStarted = 0;
lastIdStarted.clear();
state = Restoring;
+#ifdef KSMSERVER_STARTUP_DEBUG1
+ kDebug() << t.elapsed();
+#endif
if( defaultSession()) {
autoStart2();
return;
@@ -308,6 +350,9 @@
if( !checkStartupSuspend())
return;
state = FinishingStartup;
+#ifdef KSMSERVER_STARTUP_DEBUG1
+ kDebug() << t.elapsed();
+#endif
waitAutoStart2 = true;
waitKcmInit2 = true;
org::kde::KLauncher klauncher("org.kde.klauncher", "/KLauncher", \
QDBusConnection::sessionBus()); @@ -389,6 +434,9 @@
return;
upAndRunning( "ready" );
+#ifdef KSMSERVER_STARTUP_DEBUG1
+ kDebug() << t.elapsed();
+#endif
state = Idle;
setupXIOErrorHandler(); // From now on handle X errors as normal shutdown.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic