summaryrefslogtreecommitdiff
path: root/sfx2/source
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2016-07-20 10:54:30 +0200
committerAshod Nakashian <ashod.nakashian@collabora.co.uk>2017-12-05 08:17:46 -0500
commit4ffee8f4532cc561cd0c717b4bd6e52a99f5c43d (patch)
treeb81098e0b953f32810ba5ae1b842be26ead96d9e /sfx2/source
parent4d6750e789c4dd6d75398021b9f804dcd5aab78f (diff)
tdf#97087 GDB pretty print the Scheduler task list
In addition to the GDB pretty printer, this annotates a lot more Timers and Idles. Change-Id: I5b93fab02161b23bb753e65ef92643a04fb0789c (cherry picked from commit 9e51007039770370182839846676b205f5c34c57) (cherry picked from commit a090e1e17962c5ca95f66c9d18fca6ac5dd4bca0)
Diffstat (limited to 'sfx2/source')
-rw-r--r--sfx2/source/appl/appcfg.cxx1
-rw-r--r--sfx2/source/control/bindings.cxx53
-rw-r--r--sfx2/source/control/dispatch.cxx1
-rw-r--r--sfx2/source/control/itemdel.cxx2
-rw-r--r--sfx2/source/dialog/dockwin.cxx1
5 files changed, 31 insertions, 27 deletions
diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx
index 4b4a394c2bc2..c170a656bbaa 100644
--- a/sfx2/source/appl/appcfg.cxx
+++ b/sfx2/source/appl/appcfg.cxx
@@ -111,6 +111,7 @@ SfxEventAsyncer_Impl::SfxEventAsyncer_Impl( const SfxEventHint& rHint )
pIdle = new Idle("SfxEventASyncer");
pIdle->SetIdleHdl( LINK(this, SfxEventAsyncer_Impl, IdleHdl) );
pIdle->SetPriority( SchedulerPriority::HIGHEST );
+ pIdle->SetDebugName( "sfx::SfxEventAsyncer_Impl pIdle" );
pIdle->Start();
}
diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx
index 4562cc1d8063..6bf46934ca51 100644
--- a/sfx2/source/control/bindings.cxx
+++ b/sfx2/source/control/bindings.cxx
@@ -144,7 +144,7 @@ public:
bool bAllMsgDirty; // Has a MessageServer been invalidated?
bool bAllDirty; // After InvalidateAll
bool bCtrlReleased; // while EnterRegistrations
- AutoTimer aTimer; // for volatile Slots
+ AutoTimer aAutoTimer; // for volatile Slots
bool bInUpdate; // for Assertions
bool bInNextJob; // for Assertions
bool bFirstRound; // First round in Update
@@ -179,7 +179,8 @@ SfxBindings::SfxBindings()
// all caches are valid (no pending invalidate-job)
// create the list of caches
pImpl->pCaches = new SfxStateCacheArr_Impl;
- pImpl->aTimer.SetTimeoutHdl( LINK(this, SfxBindings, NextJob) );
+ pImpl->aAutoTimer.SetTimeoutHdl( LINK(this, SfxBindings, NextJob) );
+ pImpl->aAutoTimer.SetDebugName( "sfx::SfxBindings aAutoTimer" );
}
@@ -203,7 +204,7 @@ SfxBindings::~SfxBindings()
ENTERREGISTRATIONS();
- pImpl->aTimer.Stop();
+ pImpl->aAutoTimer.Stop();
DeleteControllers_Impl();
// Delete Caches
@@ -604,9 +605,9 @@ void SfxBindings::InvalidateAll
pImpl->nMsgPos = 0;
if ( !nRegLevel )
{
- pImpl->aTimer.Stop();
- pImpl->aTimer.SetTimeout(TIMEOUT_FIRST);
- pImpl->aTimer.Start();
+ pImpl->aAutoTimer.Stop();
+ pImpl->aAutoTimer.SetTimeout(TIMEOUT_FIRST);
+ pImpl->aAutoTimer.Start();
}
}
@@ -655,9 +656,9 @@ void SfxBindings::Invalidate
pImpl->nMsgPos = 0;
if ( !nRegLevel )
{
- pImpl->aTimer.Stop();
- pImpl->aTimer.SetTimeout(TIMEOUT_FIRST);
- pImpl->aTimer.Start();
+ pImpl->aAutoTimer.Stop();
+ pImpl->aAutoTimer.SetTimeout(TIMEOUT_FIRST);
+ pImpl->aAutoTimer.Start();
}
}
@@ -707,9 +708,9 @@ void SfxBindings::InvalidateShell
pImpl->nMsgPos = 0;
if ( !nRegLevel )
{
- pImpl->aTimer.Stop();
- pImpl->aTimer.SetTimeout(TIMEOUT_FIRST);
- pImpl->aTimer.Start();
+ pImpl->aAutoTimer.Stop();
+ pImpl->aAutoTimer.SetTimeout(TIMEOUT_FIRST);
+ pImpl->aAutoTimer.Start();
pImpl->bFirstRound = true;
pImpl->nFirstShell = nLevel;
}
@@ -743,9 +744,9 @@ void SfxBindings::Invalidate
pImpl->nMsgPos = std::min(GetSlotPos(nId), pImpl->nMsgPos);
if ( !nRegLevel )
{
- pImpl->aTimer.Stop();
- pImpl->aTimer.SetTimeout(TIMEOUT_FIRST);
- pImpl->aTimer.Start();
+ pImpl->aAutoTimer.Stop();
+ pImpl->aAutoTimer.SetTimeout(TIMEOUT_FIRST);
+ pImpl->aAutoTimer.Start();
}
}
}
@@ -779,9 +780,9 @@ void SfxBindings::Invalidate
pImpl->nMsgPos = std::min(GetSlotPos(nId), pImpl->nMsgPos);
if ( !nRegLevel )
{
- pImpl->aTimer.Stop();
- pImpl->aTimer.SetTimeout(TIMEOUT_FIRST);
- pImpl->aTimer.Start();
+ pImpl->aAutoTimer.Stop();
+ pImpl->aAutoTimer.SetTimeout(TIMEOUT_FIRST);
+ pImpl->aAutoTimer.Start();
}
}
}
@@ -1449,7 +1450,7 @@ bool SfxBindings::NextJob_Impl(Timer * pTimer)
if ( Application::GetLastInputInterval() < MAX_INPUT_DELAY && pTimer )
{
- pImpl->aTimer.SetTimeout(TIMEOUT_UPDATING);
+ pImpl->aAutoTimer.SetTimeout(TIMEOUT_UPDATING);
return true;
}
@@ -1477,7 +1478,7 @@ bool SfxBindings::NextJob_Impl(Timer * pTimer)
}
pImpl->bAllDirty = false;
- pImpl->aTimer.SetTimeout(TIMEOUT_UPDATING);
+ pImpl->aAutoTimer.SetTimeout(TIMEOUT_UPDATING);
// at least 10 loops and further if more jobs are available but no input
bool bPreEmptive = pTimer && !pSfxApp->Get_Impl()->nInReschedule;
@@ -1525,7 +1526,7 @@ bool SfxBindings::NextJob_Impl(Timer * pTimer)
pImpl->nMsgPos = 0;
- pImpl->aTimer.Stop();
+ pImpl->aAutoTimer.Stop();
// Update round is finished
pImpl->bInNextJob = false;
@@ -1561,7 +1562,7 @@ sal_uInt16 SfxBindings::EnterRegistrations(const char *pFile, int nLine)
if ( ++nRegLevel == 1 )
{
// stop background-processing
- pImpl->aTimer.Stop();
+ pImpl->aAutoTimer.Stop();
// flush the cache
pImpl->nCachedFunc1 = 0;
@@ -1627,9 +1628,9 @@ void SfxBindings::LeaveRegistrations( const char *pFile, int nLine )
return;
if ( pImpl->pCaches && !pImpl->pCaches->empty() )
{
- pImpl->aTimer.Stop();
- pImpl->aTimer.SetTimeout(TIMEOUT_FIRST);
- pImpl->aTimer.Start();
+ pImpl->aAutoTimer.Stop();
+ pImpl->aAutoTimer.SetTimeout(TIMEOUT_FIRST);
+ pImpl->aAutoTimer.Start();
}
}
@@ -1722,7 +1723,7 @@ void SfxBindings::StartUpdate_Impl( bool bComplete )
if ( !bComplete )
// Update may be interrupted
- NextJob_Impl(&pImpl->aTimer);
+ NextJob_Impl(&pImpl->aAutoTimer);
else
// Update all slots in a row
NextJob_Impl(nullptr);
diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index c22fe4329481..2aeccf26c471 100644
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -451,6 +451,7 @@ void SfxDispatcher::Construct_Impl()
xImp->aIdle.SetPriority(SchedulerPriority::MEDIUM);
xImp->aIdle.SetIdleHdl( LINK(this, SfxDispatcher, EventHdl_Impl ) );
+ xImp->aIdle.SetDebugName( "sfx::SfxDispatcher_Impl aIdle" );
}
SfxDispatcher::SfxDispatcher()
diff --git a/sfx2/source/control/itemdel.cxx b/sfx2/source/control/itemdel.cxx
index a1d6478a45fd..c835b8c145d5 100644
--- a/sfx2/source/control/itemdel.cxx
+++ b/sfx2/source/control/itemdel.cxx
@@ -42,7 +42,7 @@ public:
SfxItemDisruptor_Impl::SfxItemDisruptor_Impl(SfxPoolItem *const pItemToDisrupt)
: pItem(pItemToDisrupt)
- , m_Idle("SfxItemDisruptor_Impl")
+ , m_Idle("sfx SfxItemDisruptor_Impl::Delete")
{
m_Idle.SetIdleHdl(LINK(this, SfxItemDisruptor_Impl, Delete));
m_Idle.SetPriority(SchedulerPriority::DEFAULT_IDLE);
diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx
index 01792284d479..60eb826cf714 100644
--- a/sfx2/source/dialog/dockwin.cxx
+++ b/sfx2/source/dialog/dockwin.cxx
@@ -435,6 +435,7 @@ SfxDockingWindow_Impl::SfxDockingWindow_Impl(SfxDockingWindow* pBase)
{
aMoveIdle.SetPriority(SchedulerPriority::RESIZE);
aMoveIdle.SetIdleHdl(LINK(pBase,SfxDockingWindow,TimerHdl));
+ aMoveIdle.SetDebugName( "sfx::SfxDockingWindow_Impl aMoveIdle" );
}
/* [Description]