From 8667f5a5aee85c8a663f2c0773f9bcf021e91a1c Mon Sep 17 00:00:00 2001 From: Alvaro Sanchez-Leon Date: Sat, 29 Nov 2014 21:19:36 -0500 Subject: [PATCH] Bug 453618 - Trace unsuccessful DSF Request Monitor at done() Change-Id: Ia0191fedc9e2dcbcfa244636fbff7b0a640044d1 Reviewed-on: https://git.eclipse.org/r/37320 Tested-by: Hudson CI Reviewed-by: Marc Khouzam Tested-by: Marc Khouzam --- .../eclipse/cdt/dsf/concurrent/RequestMonitor.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/concurrent/RequestMonitor.java b/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/concurrent/RequestMonitor.java index 9475b85e8b8..fa6642543aa 100644 --- a/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/concurrent/RequestMonitor.java +++ b/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/concurrent/RequestMonitor.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2011 Wind River Systems and others. + * Copyright (c) 2006, 2014 Wind River Systems and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -8,6 +8,7 @@ * Contributors: * Wind River Systems - initial API and implementation * Eugene Ostroukhov (NVIDIA) - new done(IStatus) method + * Alvaro Sanchez-Leon (Ericsson) - Trace unsuccessful DSF Request Monitor at done() (Bug 453618) *******************************************************************************/ package org.eclipse.cdt.dsf.concurrent; @@ -296,6 +297,15 @@ public class RequestMonitor extends DsfExecutable { fParentRequestMonitor.removeCancelListener(fCanceledListener); } + if (DEBUG_MONITORS && !isSuccess()) { + IStatus status = getStatus(); + try { + throw new Exception(); + } catch (Exception e) { + DsfPlugin.getDefault().getLog().log(new Status(status.getSeverity(), DsfPlugin.PLUGIN_ID, status.getCode(), status.getMessage() + "\n\nMonitor Back Trace:\n" + fMonitorBacktrace.toString(), e)); //$NON-NLS-1$ + } + } + try { fExecutor.execute(new DsfRunnable() { @Override