diff options
2 files changed, 6 insertions, 5 deletions
diff --git a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/Histogram.java b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/Histogram.java index 2ab2b1b3a4..d80b90aac1 100644 --- a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/Histogram.java +++ b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/Histogram.java @@ -326,7 +326,9 @@ public abstract class Histogram implements ControlListener, PaintListener, KeyLi */ public void clear() { fDataModel.clear(); - fScaledData = null; + synchronized (fDataModel) { + fScaledData = null; + } } /** @@ -459,7 +461,7 @@ public abstract class Histogram implements ControlListener, PaintListener, KeyLi } fDataModel.setCurrentEvent(fCurrentEventTime); fScaledData = fDataModel.scaleTo(canvasWidth, canvasHeight, 1); - synchronized(fScaledData) { + synchronized(fDataModel) { if (fScaledData != null) { fCanvas.redraw(); // Display histogram and update X-,Y-axis labels diff --git a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/HistogramCurrentTimeControl.java b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/HistogramCurrentTimeControl.java index f43d968a8d..678110ee53 100644 --- a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/HistogramCurrentTimeControl.java +++ b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/HistogramCurrentTimeControl.java @@ -81,14 +81,13 @@ public class HistogramCurrentTimeControl extends HistogramTextControl { value = TmfTimestampFormat.getDefaulTimeFormat().parseValue(string, fTraceStartTime); } catch (ParseException e) { } - if (getValue() != value) { // Make sure that the new time is within range ITmfTrace trace = fParentView.getTrace(); if (trace != null) { TmfTimeRange range = trace.getTimeRange(); - long startTime = range.getStartTime().getValue(); - long endTime = range.getEndTime().getValue(); + long startTime = range.getStartTime().normalize(0, ITmfTimestamp.NANOSECOND_SCALE).getValue(); + long endTime = range.getEndTime().normalize(0, ITmfTimestamp.NANOSECOND_SCALE).getValue(); if (value < startTime) { value = startTime; } else if (value > endTime) { |