improve debugger/valgrind handling in watchdog
This way it'll avoid incorrect lock-up detection also if the debugger is attached later when LO is already running. Change-Id: I9b762ee439a62631036ad2f09f4396cca0b5ba6b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88609 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
This commit is contained in:
@@ -114,6 +114,15 @@ void WatchdogThread::execute()
|
|||||||
|
|
||||||
gpWatchdogExit->wait(&aQuarterSecond);
|
gpWatchdogExit->wait(&aQuarterSecond);
|
||||||
|
|
||||||
|
#if defined HAVE_VALGRIND_HEADERS
|
||||||
|
if (RUNNING_ON_VALGRIND)
|
||||||
|
continue;
|
||||||
|
#endif
|
||||||
|
#if defined DBG_UTIL
|
||||||
|
if (comphelper::isDebuggerAttached())
|
||||||
|
continue;
|
||||||
|
#endif
|
||||||
|
|
||||||
#if HAVE_FEATURE_OPENGL
|
#if HAVE_FEATURE_OPENGL
|
||||||
WatchdogHelper<OpenGLZone>::check();
|
WatchdogHelper<OpenGLZone>::check();
|
||||||
#endif
|
#endif
|
||||||
@@ -130,14 +139,6 @@ void WatchdogThread::start()
|
|||||||
return; // already running
|
return; // already running
|
||||||
if (getenv("SAL_DISABLE_WATCHDOG"))
|
if (getenv("SAL_DISABLE_WATCHDOG"))
|
||||||
return;
|
return;
|
||||||
#if defined HAVE_VALGRIND_HEADERS
|
|
||||||
if (RUNNING_ON_VALGRIND)
|
|
||||||
return;
|
|
||||||
#endif
|
|
||||||
#if defined DBG_UTIL
|
|
||||||
if (comphelper::isDebuggerAttached())
|
|
||||||
return;
|
|
||||||
#endif
|
|
||||||
gpWatchdogExit = new osl::Condition();
|
gpWatchdogExit = new osl::Condition();
|
||||||
gxWatchdog.set(new WatchdogThread());
|
gxWatchdog.set(new WatchdogThread());
|
||||||
gxWatchdog->launch();
|
gxWatchdog->launch();
|
||||||
|
Reference in New Issue
Block a user