Age | Commit message (Collapse) | Author |
|
While writing a new Task, I was wondering, why it didn't schedule
immediatly after calling Start(). Turned out Start() wasn't even
calling Task::StartTimer(...) to trigger / wake up the Scheduler.
So this changes Task's Start() to call StartTimer(0) to immediatly
trigger the Scheduler at the end of Start(), but Tasks can opt out
of it, if they aren't ready yet (like Timers).
Change-Id: Ia2fdb45f502866c83f432b045e70bf27ccb61012
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117947
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
|
|
The 'Idle' timers are misnamed. They are zero-timeout times, i.e.
they are invoked immediately after returning to the main loop.
But that does not necessarily mean they are invoked when idle,
there may be e.g. user input pending in the system event queue.
In fact, LO events are processed before system events, which means
that 'Idle' timers are normally processed before user input.
Besides being confused, this also leads to poor performance in some
cases, such as when using mouse wheel to zoom in a large document.
This results in several mouse wheel events, each of which will
result in adjusting the zoom and that causing a repaint. Repaints
are internally handled using a TaskPriority::REPAINT 'Idle',
and so what happens is zoom->repaint->zoom->repaint->zoom->repaint
instead of the more efficient zoom->zoom->zoom->repaint.
This change (besides trying to clarify the confusion in the docs)
delays invoking tasks with priorities TaskPriority::HIGH_IDLE
and lower if there is user input or repaint events in the OS queue.
That means that tasks using idle priorities actually will be invoked
only when idle (barring background threads etc.).
I'm reasonably certain this is a safe change, there's no guarantee
when exactly tasks will be invoked (e.g. other tasks with a higher
priority go first) and explicitly specifying such a priority means
asking for it.
I already implemented this once in 06d731428ef6cf93c7333e8228b,
and it was also again done in 87199d3829257420429057336283, but
apparently these have been removed. There was d348035a60361a1b9ba9e
'Drop special idle handling' with the reasoning that 'Idles are just
instant timers'. Which strictly technically speaking is true due to
'Idle' being a misnomer, but the point is that some idles should be
actual idles and that's why they need to be handled specially.
Change-Id: I36c2b02a80ae7e1476b731f878d9b28aa87975f4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110538
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
Change-Id: I4359b7042f98586e2c9f5529d83d769cdf3d033c
Reviewed-on: https://gerrit.libreoffice.org/85775
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ie24f56fed811b3b317d6c20e15289e7cecfb738d
Reviewed-on: https://gerrit.libreoffice.org/81157
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: If831bce4cd1fe2c5233159b31c239b813629e0de
Reviewed-on: https://gerrit.libreoffice.org/45420
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
All relevant information is also provided by UpdateMinPeriod and
the calculations were even duplicated. This also includes dropping
Scheduler::UpdateMinPeriod, as this is now reduced to a simple
comparison and assignment, as we simply ignore larger returned
sleep times.
Change-Id: I13852e3e63daead451bf7fcb98be9b1d44bd7abd
|
|
Add some round-robin to the task processing, so equal priority
(auto) tasks won't always be scheduled, if there are multiple
tasks with the same priority.
Change-Id: Ice111aa5f85e9181b3ee9799ca4df0d58f210fe9
|
|
Idles are just instant timers, which should most time have a low
priority, By dropping most special idle handling we'll just
schedule by priority.
This also reverts SalYieldResult back to a bool, which just
indicates if any event was processed.
Change-Id: Ia0b91b06dffb77af066f01838d8f9483523bf67d
|
|
This refactors some more scheduler code by merging the code from
ProcessTaskScheduling into CalculateMinimumTimeout and keeping the
ProcessTaskScheduling name.
It replace the bHasPendingIdles information with a HasPendingTasks
function, based on the sleep timeout and invoke time.
To drop IsIdle() we simply account Idles again and stop the system
timer, so we instantly run our application loop again. This makes
all Tasks really run immediate instead of waiting 1ms.
Change-Id: I690a8754e6b115a53e74ef777e988b66b4e5037f
|
|
Seem UBSAN doesn't like my forced reinterpret_cast to set the Idles
Link in the Timer class. Now there are two possible solution:
1. convert all (DECL|IMPL).*_LINK call sites to use a Timer* or
2. split the inheritance of Idle from Timer again to maintain
different Link<>s and move all common code into a TimerBase.
While the 1st is more correct, the 2nd has a better indicator for
Idles. This implements the first solution.
And while at it, this also converts all call sites of SetTimeoutHdl
and SetIdleHdl to SetInvokeHandler and gets rid of some local Link
objects, which are just passed to the SetInvokeHandler call.
It also introduces ClearInvokeHandler() and replaces the respective
call sites of SetInvokeHandler( Link<Timer *, void>() ).
Change-Id: I40c4167b1493997b7f136add4dad2f4ff5504b69
|
|
This disallows changing mbAuto and changing values of
ImplSchedulerData outside of Scheduler / Task functions.
Change-Id: Ia624999bd63190c072eb66427aec38e7ac8cfa1b
Reviewed-on: https://gerrit.libreoffice.org/33317
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
|
|
Drops a lot of duplicated code, as Idle is just a convenience
class for instant, mostly low priority timers.
Change-Id: I847592e92e86d15ab1cab168bf0e667322e48048
|
|
Moves all the "task-specific" stuff into a Task class and just
keeps the "real" static Scheduler functions in the original
Scheduler class.
Change-Id: I9eb02d46e2bcf1abb06af5bab1fa0ee734d1984c
|
|
All other places already refer to being Idle, so change the
Scheduler::ProcessTaskScheduling argument to bIdle and adapt
all other scheduler-related functions.
Change-Id: If5a605abbc3e620092127b65ada29f11215a0343
|
|
No need to always update the time - scheduling should be fast!
Change-Id: Ic4c01f5a5759ef4970f1385aab6ef93cd67f33b6
|
|
Change-Id: Ia03f7cccb256d825daa4dc6f4c0598448e46e6cf
Reviewed-on: https://gerrit.libreoffice.org/31069
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Fixes the busy-loop - 100% CPU all the time.
Change-Id: I965f62d6a6f2ec1830c0897dd97179a739c70afc
Reviewed-on: https://gerrit.libreoffice.org/20186
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
|
|
Change-Id: I05e89f9896170d4df3d1377549ea074f06b884a0
|
|
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
|
|
Members are now const-correct.
Replaced compile-time constants with enum.
Refactored common functions from Timer to Scheduler.
Disabled timer-precision unittests as they misfire often.
These changes are non-functional.
Change-Id: I6bb3d9fc402cadd556d9063ed9a4888f114c73d7
Reviewed-on: https://gerrit.libreoffice.org/17977
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
|
|
This reverts commit 1289d3c42af66990a2c8e5a7a38e51b6cd51c7eb, plus follow-ups
762e90ffa0cd5f85dadd9bad93391d105e60e418 "vcl: loplugin:pointertobool" and
863e5685dda88efd0bee3177a08eedffd4730e33 "Fix funny line-ends," as it causes
memory corruption, see valgrind "make CppunitTest_sw_ooxmlexport4" output:
> Invalid write of size 1
> Scheduler::ImplInvoke(unsigned long) (/vcl/source/app/scheduler.cxx:40)
> Scheduler::ProcessTaskScheduling(bool) (/vcl/source/app/scheduler.cxx:128)
> Scheduler::CallbackTaskScheduling(bool) (/vcl/source/app/scheduler.cxx:112)
> SalTimer::CallCallback(bool) (/vcl/inc/saltimer.hxx:53)
> SvpSalInstance::CheckTimeout(bool) (/vcl/headless/svpinst.cxx:191)
> SvpSalInstance::Yield(bool, bool) (/vcl/headless/svpinst.cxx:307)
> ImplYield(bool, bool) (/vcl/source/app/svapp.cxx:353)
> Application::Reschedule(bool) (/vcl/source/app/svapp.cxx:377)
> framework::StatusIndicatorFactory::impl_reschedule(bool) (/framework/source/helper/statusindicatorfactory.cxx:528)
> framework::StatusIndicatorFactory::end(com::sun::star::uno::Reference<com::sun::star::task::XStatusIndicator> const&) (/framework/source/helper/statusindicatorfactory.cxx:229)
> framework::StatusIndicator::end() (/framework/source/helper/statusindicator.cxx:70)
> non-virtual thunk to framework::StatusIndicator::end() (/framework/source/helper/statusindicator.cxx:57)
> writerfilter::ooxml::OOXMLDocumentImpl::resolve(writerfilter::Stream&) (/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx:531)
> WriterFilter::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (/writerfilter/source/filter/WriterFilter.cxx:191)
> non-virtual thunk to WriterFilter::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (/writerfilter/source/filter/WriterFilter.cxx:126)
> SfxObjectShell::ImportFrom(SfxMedium&, com::sun::star::uno::Reference<com::sun::star::text::XTextRange> const&) (/sfx2/source/doc/objstor.cxx:2271)
> SfxObjectShell::DoLoad(SfxMedium*) (/sfx2/source/doc/objstor.cxx:767)
> SfxBaseModel::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (/sfx2/source/doc/sfxbasemodel.cxx:1859)
> non-virtual thunk to SfxBaseModel::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (/sfx2/source/doc/sfxbasemodel.cxx:1810)
> (anonymous namespace)::SfxFrameLoader_Impl::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&) (/sfx2/source/view/frmload.cxx:703)
> non-virtual thunk to (anonymous namespace)::SfxFrameLoader_Impl::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&) (/sfx2/source/view/frmload.cxx:615)
> framework::LoadEnv::impl_loadContent() (/framework/source/loadenv/loadenv.cxx:1122)
> framework::LoadEnv::startLoading() (/framework/source/loadenv/loadenv.cxx:383)
> framework::LoadEnv::loadComponentFromURL(com::sun::star::uno::Reference<com::sun::star::frame::XComponentLoader> const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (/framework/source/loadenv/loadenv.cxx:164)
> framework::Desktop::loadComponentFromURL(rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (/framework/source/services/desktop.cxx:566)
> non-virtual thunk to framework::Desktop::loadComponentFromURL(rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (/framework/source/services/desktop.cxx:552)
> unotest::MacrosTest::loadFromDesktop(rtl::OUString const&, rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (/unotest/source/cpp/macros_test.cxx:50)
> SwModelTestBase::load(char const*, char const*) (/sw/qa/extras/inc/swmodeltestbase.hxx:580)
> SwModelTestBase::executeImportExportImportTest(char const*) (/sw/qa/extras/inc/swmodeltestbase.hxx:219)
> testTrackChangesDeletedParagraphMark::Import_Export_Import() (/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx:132)
> CppUnit::TestCaller<testTrackChangesDeletedParagraphMark>::runTest() (/workdir/UnpackedTarball/cppunit/include/cppunit/TestCaller.h:166)
> CppUnit::TestCaseMethodFunctor::operator()() const (/workdir/UnpackedTarball/cppunit/src/cppunit/TestCase.cpp:32)
> (anonymous namespace)::Protector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) (/test/source/vclbootstrapprotector.cxx:57)
> CppUnit::ProtectorChain::ProtectFunctor::operator()() const (in /home/sbergman/lo/core/workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.13.so.0.0.2)
> (anonymous namespace)::Prot::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) (in /home/sbergman/lo/core/workdir/LinkTarget/Library/unobootstrapprotector.so)
> CppUnit::ProtectorChain::ProtectFunctor::operator()() const (in /home/sbergman/lo/core/workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.13.so.0.0.2)
> (anonymous namespace)::Prot::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) (/unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx:63)
> CppUnit::ProtectorChain::ProtectFunctor::operator()() const (in /home/sbergman/lo/core/workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.13.so.0.0.2)
> CppUnit::DefaultProtector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) (/workdir/UnpackedTarball/cppunit/src/cppunit/DefaultProtector.cpp:15)
> CppUnit::ProtectorChain::ProtectFunctor::operator()() const (in /home/sbergman/lo/core/workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.13.so.0.0.2)
> CppUnit::ProtectorChain::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) (/workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:77)
> CppUnit::TestResult::protect(CppUnit::Functor const&, CppUnit::Test*, std::string const&) (/workdir/UnpackedTarball/cppunit/src/cppunit/TestResult.cpp:181)
> CppUnit::TestCase::run(CppUnit::TestResult*) (/workdir/UnpackedTarball/cppunit/src/cppunit/TestCase.cpp:91)
> CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) (/workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:64)
> CppUnit::TestComposite::run(CppUnit::TestResult*) (/workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:23)
> CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) (/workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:64)
> CppUnit::TestComposite::run(CppUnit::TestResult*) (/workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:23)
> CppUnit::TestRunner::WrappingSuite::run(CppUnit::TestResult*) (/workdir/UnpackedTarball/cppunit/src/cppunit/TestRunner.cpp:47)
> CppUnit::TestResult::runTest(CppUnit::Test*) (/workdir/UnpackedTarball/cppunit/src/cppunit/TestResult.cpp:148)
> CppUnit::TestRunner::run(CppUnit::TestResult&, std::string const&) (/workdir/UnpackedTarball/cppunit/src/cppunit/TestRunner.cpp:96)
> Address 0x2c9ece48 is 40 bytes inside a block of size 104 free'd
> operator delete(void*) (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
> (anonymous namespace)::ImpTimedRefDev::~ImpTimedRefDev() (/drawinglayer/source/primitive2d/textlayoutdevice.cxx:84)
> std::default_delete<(anonymous namespace)::ImpTimedRefDev>::operator()((anonymous namespace)::ImpTimedRefDev*) const (/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../include/c++/4.9.2/bits/unique_ptr.h:76)
> std::unique_ptr<(anonymous namespace)::ImpTimedRefDev, std::default_delete<(anonymous namespace)::ImpTimedRefDev> >::reset((anonymous namespace)::ImpTimedRefDev*) (/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../include/c++/4.9.2/bits/unique_ptr.h:344)
> comphelper::unique_disposing_ptr<(anonymous namespace)::ImpTimedRefDev>::reset((anonymous namespace)::ImpTimedRefDev*) (/include/comphelper/unique_disposing_ptr.hxx:41)
> (anonymous namespace)::ImpTimedRefDev::Invoke() (/drawinglayer/source/primitive2d/textlayoutdevice.cxx:93)
> Scheduler::ImplInvoke(unsigned long) (/vcl/source/app/scheduler.cxx:39)
> Scheduler::ProcessTaskScheduling(bool) (/vcl/source/app/scheduler.cxx:128)
> Scheduler::CallbackTaskScheduling(bool) (/vcl/source/app/scheduler.cxx:112)
> SalTimer::CallCallback(bool) (/vcl/inc/saltimer.hxx:53)
> SvpSalInstance::CheckTimeout(bool) (/vcl/headless/svpinst.cxx:191)
> SvpSalInstance::Yield(bool, bool) (/vcl/headless/svpinst.cxx:307)
> ImplYield(bool, bool) (/vcl/source/app/svapp.cxx:353)
> Application::Reschedule(bool) (/vcl/source/app/svapp.cxx:377)
> framework::StatusIndicatorFactory::impl_reschedule(bool) (/framework/source/helper/statusindicatorfactory.cxx:528)
> framework::StatusIndicatorFactory::end(com::sun::star::uno::Reference<com::sun::star::task::XStatusIndicator> const&) (/framework/source/helper/statusindicatorfactory.cxx:229)
> framework::StatusIndicator::end() (/framework/source/helper/statusindicator.cxx:70)
> non-virtual thunk to framework::StatusIndicator::end() (/framework/source/helper/statusindicator.cxx:57)
> writerfilter::ooxml::OOXMLDocumentImpl::resolve(writerfilter::Stream&) (/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx:531)
> WriterFilter::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (/writerfilter/source/filter/WriterFilter.cxx:191)
> non-virtual thunk to WriterFilter::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (/writerfilter/source/filter/WriterFilter.cxx:126)
> SfxObjectShell::ImportFrom(SfxMedium&, com::sun::star::uno::Reference<com::sun::star::text::XTextRange> const&) (/sfx2/source/doc/objstor.cxx:2271)
> SfxObjectShell::DoLoad(SfxMedium*) (/sfx2/source/doc/objstor.cxx:767)
> SfxBaseModel::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (/sfx2/source/doc/sfxbasemodel.cxx:1859)
> non-virtual thunk to SfxBaseModel::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (/sfx2/source/doc/sfxbasemodel.cxx:1810)
> (anonymous namespace)::SfxFrameLoader_Impl::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&) (/sfx2/source/view/frmload.cxx:703)
> non-virtual thunk to (anonymous namespace)::SfxFrameLoader_Impl::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&) (/sfx2/source/view/frmload.cxx:615)
> framework::LoadEnv::impl_loadContent() (/framework/source/loadenv/loadenv.cxx:1122)
> framework::LoadEnv::startLoading() (/framework/source/loadenv/loadenv.cxx:383)
> framework::LoadEnv::loadComponentFromURL(com::sun::star::uno::Reference<com::sun::star::frame::XComponentLoader> const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (/framework/source/loadenv/loadenv.cxx:164)
> framework::Desktop::loadComponentFromURL(rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (/framework/source/services/desktop.cxx:566)
> non-virtual thunk to framework::Desktop::loadComponentFromURL(rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (/framework/source/services/desktop.cxx:552)
> unotest::MacrosTest::loadFromDesktop(rtl::OUString const&, rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (/unotest/source/cpp/macros_test.cxx:50)
> SwModelTestBase::load(char const*, char const*) (/sw/qa/extras/inc/swmodeltestbase.hxx:580)
> SwModelTestBase::executeImportExportImportTest(char const*) (/sw/qa/extras/inc/swmodeltestbase.hxx:219)
> testTrackChangesDeletedParagraphMark::Import_Export_Import() (/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx:132)
> CppUnit::TestCaller<testTrackChangesDeletedParagraphMark>::runTest() (/workdir/UnpackedTarball/cppunit/include/cppunit/TestCaller.h:166)
> CppUnit::TestCaseMethodFunctor::operator()() const (/workdir/UnpackedTarball/cppunit/src/cppunit/TestCase.cpp:32)
> (anonymous namespace)::Protector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) (/test/source/vclbootstrapprotector.cxx:57)
> CppUnit::ProtectorChain::ProtectFunctor::operator()() const (in /home/sbergman/lo/core/workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.13.so.0.0.2)
> (anonymous namespace)::Prot::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) (in /home/sbergman/lo/core/workdir/LinkTarget/Library/unobootstrapprotector.so)
> CppUnit::ProtectorChain::ProtectFunctor::operator()() const (in /home/sbergman/lo/core/workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.13.so.0.0.2)
> (anonymous namespace)::Prot::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) (/unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx:63)
> CppUnit::ProtectorChain::ProtectFunctor::operator()() const (in /home/sbergman/lo/core/workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.13.so.0.0.2)
> CppUnit::DefaultProtector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) (/workdir/UnpackedTarball/cppunit/src/cppunit/DefaultProtector.cpp:15)
> CppUnit::ProtectorChain::ProtectFunctor::operator()() const (in /home/sbergman/lo/core/workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.13.so.0.0.2)
> CppUnit::ProtectorChain::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) (/workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:77)
> CppUnit::TestResult::protect(CppUnit::Functor const&, CppUnit::Test*, std::string const&) (/workdir/UnpackedTarball/cppunit/src/cppunit/TestResult.cpp:181)
> CppUnit::TestCase::run(CppUnit::TestResult*) (/workdir/UnpackedTarball/cppunit/src/cppunit/TestCase.cpp:91)
> CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) (/workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:64)
|
|
Re-factor the scheduler to use std::list
Because
- ImplSchedulerData
- remove: mbInScheduler, mnUpdateTime, mnUpdateStack
that is scheduler stuff
- this struct is only a container for the scheduler-list
- UpdateMinPeriod
- the scheduler is the pure-virtual-class then
the idle-class must override this method
- ImplDeInitScheduler(bool All=true)
- this patch 2e29a518b04250b5f9cc9d0d77da3df076834d60 remove
all scheduler tasks and the scheduler, but after that,
the scheduler is using, then crash.
With this fix, only delete the scheduler-list, but not the
scheduler
The next steps
- split the scheduler from the scheduler-list-handling
the scheduler-list-handling need a static class
- remove the scheduler from the timer-handling staff
Change-Id: I8d4d4f27b2bc9684a48c2afafd0b3edd0716c71d
Reviewed-on: https://gerrit.libreoffice.org/16148
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
|
|
Change-Id: I2d1aa79a67bf130c3844b3bccb34a1761e8e4dfc
|
|
This clobbers the functionality from commit:
06d731428ef6cf93c7333e8228bfb6088853b52f
make idle timers actually activate only when idle
Since now all rendering and re-sizing is done in idle handlers it
does effectively the opposite of what was intended. A better solution
would allow special-casing the processing of just rendering,
re-sizing and window management to spin for eg. progress bar
rendering.
Also add helpful debugging labels to the idle & timeouts.
Also cleanup the Idle vs. Scheduler handling.
Also ensure that starting an Idle triggers a mainloop wakeup.
Also add a unit test.
Change-Id: Ifb0756714378fdb790be599b93c7a3ac1f9209e6
|
|
Change-Id: I189937950325dc4ef663f7f49cb45f38f8537de9
|
|
Turn the Link class into a template abstracting over the link's argument and
return types, but provide default template arguments that keep the generic,
unsafe "void* in, sal_IntPtr out" behvior. That way, individual uses of the
Link class can be updated over time.
All the related macros are duplicated with ..._TYPED counterparts, that
additionally take the RetType (except for LINK_TYPED, which manages to infer the
relevant types from the supplied Member).
(It would have been attractive to change the "untyped" LinkStubs from taking a
void* to a properly typed ArgType parameter, too, but that would cause
-fsanitize=function to flag uses of "untyped" Link::Call.)
Change-Id: I3b0140378bad99abbf240140ebb4a46a05d2d2f8
|
|
Change-Id: I03db46afcc0cb5e5d7a134b1bdd327abb542e63c
|
|
Change-Id: I12290bed7e4f298ab90393b8de6e2b6e7061e53f
|
|
Change-Id: I4cfbb53763001854d37fbcd304e77e65279173b6
|
|
Change-Id: I8ca272481e573bf3338c5c1b9873a39022928812
|
|
Change-Id: I2c73bb2b2edd3b830dad5d1f7d8f7bc72622b11c
|
|
Change-Id: I093b4812bf3b75d6a6f3c8ea38755619f5c9d151
|
|
If a Timeout appears, while the idle scheduling is in progress.
The idle scheduler gets interrupted and the timeouts are handled.
Now the idle scheduler has a new starving protection.
Change-Id: Ic9081c647e3fb0abf3b0dc014e711a3b97e0e37d
|
|
Now the Idle and Timer are divided in two seperate classes. But now all changed
idles need a new import, before the programm is working again.
Change-Id: I5be7424622b6fcc993c621fa4a11fbee1b6d9bf2
|