Fix experiment checkpoint issue with CTF traces
authorFrancois Chouinard <fchouinard@gmail.com>
Fri, 11 May 2012 18:27:13 +0000 (14:27 -0400)
committerFrancois Chouinard <fchouinard@gmail.com>
Fri, 11 May 2012 18:27:13 +0000 (14:27 -0400)
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/experiment/TmfExperiment.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfContext.java

index 4f2f06929195e35471c8c7825dfe519ecdb10ba5..afc5c2ce79bf65da2dfc35cf428f7e20c636f434 100644 (file)
@@ -275,10 +275,10 @@ public class TmfExperiment<T extends ITmfEvent> extends TmfTrace<T> implements I
      */
     @Override
     public synchronized ITmfEvent readNextEvent(final ITmfContext context) {
-        // parseEvent() does not update the context
+        final ITmfContext previousContext = (TmfExperimentContext) context.clone();
         final ITmfEvent event = parseEvent(context);
         if (event != null) {
-            updateAttributes(context, event.getTimestamp());
+            updateAttributes(previousContext, event.getTimestamp());
 
             TmfExperimentContext expContext = (TmfExperimentContext) context;
             int trace = expContext.getLastTrace();
index a65e020ad2598faa6c438966157e23fe6f47f173..cfee4087b570ca957267148f9de9128332cb8b90 100644 (file)
@@ -15,10 +15,11 @@ package org.eclipse.linuxtools.tmf.core.trace;
 
 /**
  * The basic trace context structure in TMF. The purpose of the context is to
- * associate a trace location to an event of a specific rank (order).
+ * associate a trace location to an event at a specific rank (order).
  * <p>
  * The context should be sufficient to allow the trace to position itself so
- * that performing a trace read operation will yield the corresponding event.
+ * that performing a trace read operation will yield the corresponding 'nth'
+ * event.
  * 
  * @version 1.0
  * @author Francois Chouinard
@@ -41,12 +42,12 @@ public interface ITmfContext {
     // ------------------------------------------------------------------------
 
     /**
-     * @return the rank of the event referred to by the context
+     * @return the rank of the event at the context location
      */
     public long getRank();
 
     /**
-     * @return the location of the event referred to by the context
+     * @return the location of the event at the context rank
      */
     public ITmfLocation<? extends Comparable<?>> getLocation();
 
This page took 0.025731 seconds and 5 git commands to generate.