tmf.core: Move the analysis cancel log message
authorGeneviève Bastien <gbastien+lttng@versatic.net>
Tue, 7 Feb 2017 19:00:41 +0000 (14:00 -0500)
committerGenevieve Bastien <gbastien+lttng@versatic.net>
Thu, 9 Feb 2017 21:40:58 +0000 (16:40 -0500)
The analysis cancellation should be logged only if it was running
and is really cancelled. Otherwise, it produces confusing messages
where the analysis was previously finished and then cancelled.

Change-Id: I1704f2a29312b6c1a2a9b15e4869bcb646ab1204
Signed-off-by: Geneviève Bastien <gbastien+lttng@versatic.net>
Reviewed-on: https://git.eclipse.org/r/90577
Reviewed-by: Hudson CI
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Tested-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
tmf/org.eclipse.tracecompass.tmf.core/src/org/eclipse/tracecompass/tmf/core/analysis/TmfAbstractAnalysisModule.java

index 8540fb35d126a3f94d24db39a37580873fcc2d87..23a3a720ec3dc3d585e6eb18b82052350d03491d 100644 (file)
@@ -269,9 +269,9 @@ public abstract class TmfAbstractAnalysisModule extends TmfComponent
     @Override
     public final void cancel() {
         synchronized (syncObj) {
-            TmfCoreTracer.traceAnalysis(getId(), getTrace(), "cancelled by application"); //$NON-NLS-1$
             Job job = fJob;
             if (job != null) {
+                TmfCoreTracer.traceAnalysis(getId(), getTrace(), "cancelled by application"); //$NON-NLS-1$
                 job.cancel();
                 fAnalysisCancelled = true;
                 setAnalysisCompleted();
This page took 0.026612 seconds and 5 git commands to generate.