tmf: Fix rounding and range issues in periodic marker source
authorPatrick Tasse <patrick.tasse@gmail.com>
Wed, 19 Oct 2016 15:21:34 +0000 (11:21 -0400)
committerPatrick Tasse <patrick.tasse@gmail.com>
Wed, 16 Nov 2016 21:25:09 +0000 (16:25 -0500)
commit55be2778829c92a601e02b8b62afe4600cdc56d7
tree8b44f502d2474daa6ec3e53a71b4ee42862e0185
parent2189785cb5e54774dc58e064c86478f4e5525dda
tmf: Fix rounding and range issues in periodic marker source

When the requested time range and reference are far apart, the floating
point calculations lose precision and can produce marker times that are
not multiples of the period but instead clamped to the nearest multiple
of a power of 2.

The calculations are modified to adjust the reference to a point that is
closer to the request time range, by converting the period to a fraction
representation, if possible, and using exact integer calculations.

Some rounding calculations are corrected to apply to smaller numbers.

When using alternate shading periodic markers, the first marker returned
could overlap with the start time. If this partially visible marker was
selected by the user, the 'previous marker' action would not find any
previous marker. The code is adjusted to make sure that the first marker
returned is the first fully non-visible previous marker.

Change-Id: I1a8ad36441bf44a735621ffe4361e73ee6faaa60
Signed-off-by: Patrick Tasse <patrick.tasse@gmail.com>
Reviewed-on: https://git.eclipse.org/r/83545
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-by: Hudson CI
rcp/org.eclipse.tracecompass.rcp/feature.xml
rcp/org.eclipse.tracecompass.rcp/pom.xml
releng/org.eclipse.tracecompass.target/tracecompass-e4.5.target
releng/org.eclipse.tracecompass.target/tracecompass-e4.6.target
releng/org.eclipse.tracecompass.target/tracecompass-eStaging.target
tmf/org.eclipse.tracecompass.tmf.ui.tests/src/org/eclipse/tracecompass/tmf/ui/tests/markers/PeriodicMarkerEventSourceTest.java
tmf/org.eclipse.tracecompass.tmf.ui/META-INF/MANIFEST.MF
tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/markers/PeriodicMarkerEventSource.java
tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/widgets/timegraph/model/IMarkerEventSource.java
This page took 0.025769 seconds and 5 git commands to generate.