From: Francois Chouinard Date: Fri, 20 Apr 2012 23:05:53 +0000 (-0400) Subject: Refactor TmfTrace and dependencies - finalize ITmfTraceIndexer X-Git-Url: http://git.efficios.com/?a=commitdiff_plain;h=d337369aa42e950f182f60db827b571621f884a2;p=deliverable%2Ftracecompass.git Refactor TmfTrace and dependencies - finalize ITmfTraceIndexer --- diff --git a/org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/internal/lttng/core/trace/LTTngTextTrace.java b/org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/internal/lttng/core/trace/LTTngTextTrace.java index 13166d72dc..c757bc783e 100644 --- a/org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/internal/lttng/core/trace/LTTngTextTrace.java +++ b/org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/internal/lttng/core/trace/LTTngTextTrace.java @@ -27,7 +27,6 @@ import org.eclipse.linuxtools.lttng.jni.JniEvent; import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange; import org.eclipse.linuxtools.tmf.core.trace.ITmfContext; import org.eclipse.linuxtools.tmf.core.trace.ITmfLocation; -import org.eclipse.linuxtools.tmf.core.trace.TmfCheckpoint; import org.eclipse.linuxtools.tmf.core.trace.TmfContext; import org.eclipse.linuxtools.tmf.core.trace.TmfLocation; import org.eclipse.linuxtools.tmf.core.trace.TmfTrace; @@ -58,7 +57,7 @@ public class LTTngTextTrace extends TmfTrace { public LTTngTextTrace(final IResource resource, final String path, final boolean skipIndexing) throws Exception { // super(null, LttngEvent.class, path, 1, !skipIndexing); - super(null, LttngEvent.class, path, 1); + super(null, LttngEvent.class, path, 1000); tracepath = path; traceTypes = new HashMap(); @@ -75,11 +74,13 @@ public class LTTngTextTrace extends TmfTrace { if ( positionToFirstEvent() == false ) throw new IOException("Fail to position to the beginning of the trace"); //$NON-NLS-1$ else { - fCacheSize = 1000; +// fCacheSize = 1000; // Skip indexing if asked // if ( skipIndexing == true ) { - fCheckpoints.add(new TmfCheckpoint(new LttngTimestamp(0L), new TmfLocation(0L))); +// fCheckpoints.add(new TmfCheckpoint(new LttngTimestamp(0L), new TmfLocation(0L))); + ITmfContext context = new TmfContext(new TmfLocation(0L), 0); + fIndexer.updateIndex(context, new LttngTimestamp(0L)); // } // else { // indexTrace(true); @@ -104,7 +105,7 @@ public class LTTngTextTrace extends TmfTrace { // *** VERIFY *** // Is this safe? - fCheckpoints = oldTrace.fCheckpoints; +// fCheckpoints = oldTrace.fCheckpoints; } private boolean positionToFirstEvent() { diff --git a/org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/internal/lttng/core/trace/LTTngTrace.java b/org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/internal/lttng/core/trace/LTTngTrace.java index d14f7c2b21..cc65e7ae9b 100644 --- a/org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/internal/lttng/core/trace/LTTngTrace.java +++ b/org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/internal/lttng/core/trace/LTTngTrace.java @@ -307,7 +307,7 @@ public class LTTngTrace extends TmfTrace { */ public LTTngTrace(final LTTngTrace other) throws Exception { this(other.getResource(), other.getPath(), other.getTraceLibPath(), false, true); - this.fCheckpoints = other.fCheckpoints; +// this.fCheckpoints = other.fCheckpoints; setTimeRange(new TmfTimeRange(new LttngTimestamp(other.getStartTime()), new LttngTimestamp(other.getEndTime()))); } @@ -526,17 +526,23 @@ public class LTTngTrace extends TmfTrace { if (PRINT_DEBUG) System.out.println("seekEvent(rank) rank -> " + rank); //$NON-NLS-1$ - ITmfTimestamp timestamp = null; +// ITmfTimestamp timestamp = null; +// long index = rank / getCacheSize(); +// +// // Get the timestamp of the closest check point to the given position +// if (fCheckpoints.size() > 0) { +// if (index >= fCheckpoints.size()) +// index = fCheckpoints.size() - 1; +// timestamp = fCheckpoints.elementAt((int) index).getTimestamp(); +// } else +// timestamp = getStartTime(); + + // Position the trace at the checkpoint + final ITmfContext checkpointContext = fIndexer.seekIndex(rank); + LttngLocation location = (LttngLocation) checkpointContext.getLocation(); + ITmfTimestamp timestamp = location.getLocation(); long index = rank / getCacheSize(); - // Get the timestamp of the closest check point to the given position - if (fCheckpoints.size() > 0) { - if (index >= fCheckpoints.size()) - index = fCheckpoints.size() - 1; - timestamp = fCheckpoints.elementAt((int) index).getTimestamp(); - } else - timestamp = getStartTime(); - // Seek to the found time final TmfContext tmpContext = seekEvent(timestamp); tmpContext.setRank((index + 1) * fCacheSize); @@ -667,7 +673,7 @@ public class LTTngTrace extends TmfTrace { // long eventTime = eventTimestamp.getValue(); previousLocation.setOperationTime(eventTimestamp.getValue()); curLocation.setOperationTime(eventTimestamp.getValue()); - updateIndex(context, context.getRank(), eventTimestamp); + updateAttributes(context, eventTimestamp); context.increaseRank(); } @@ -1011,24 +1017,24 @@ public class LTTngTrace extends TmfTrace { return -1; } - /** - * Print the content of the checkpoint vector. - *

- * - * This is intended for debug purpose only. - */ - public void printCheckpointsVector() { - System.out.println("StartTime : " //$NON-NLS-1$ - + getTimeRange().getStartTime().getValue()); - System.out.println("EndTime : " //$NON-NLS-1$ - + getTimeRange().getEndTime().getValue()); - - for (int pos = 0; pos < fCheckpoints.size(); pos++) { - System.out.print(pos + ": " + "\t"); //$NON-NLS-1$ //$NON-NLS-2$ - System.out.print(fCheckpoints.get(pos).getTimestamp() + "\t"); //$NON-NLS-1$ - System.out.println(fCheckpoints.get(pos).getLocation()); - } - } +// /** +// * Print the content of the checkpoint vector. +// *

+// * +// * This is intended for debug purpose only. +// */ +// public void printCheckpointsVector() { +// System.out.println("StartTime : " //$NON-NLS-1$ +// + getTimeRange().getStartTime().getValue()); +// System.out.println("EndTime : " //$NON-NLS-1$ +// + getTimeRange().getEndTime().getValue()); +// +// for (int pos = 0; pos < fCheckpoints.size(); pos++) { +// System.out.print(pos + ": " + "\t"); //$NON-NLS-1$ //$NON-NLS-2$ +// System.out.print(fCheckpoints.get(pos).getTimestamp() + "\t"); //$NON-NLS-1$ +// System.out.println(fCheckpoints.get(pos).getLocation()); +// } +// } @Override public synchronized void dispose() { diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/component/TmfDataProvider.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/component/TmfDataProvider.java index cd541d3b38..de628fdd5a 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/component/TmfDataProvider.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/component/TmfDataProvider.java @@ -376,13 +376,21 @@ public abstract class TmfDataProvider extends TmfComponent } /** - * Initialize the provider based on the request. The context is provider specific and will be updated by getNext(). + * Initialize the provider based on the request. The context is provider + * specific and will be updated by getNext(). * * @param request * @return an application specific context; null if request can't be serviced */ public abstract ITmfContext armRequest(ITmfDataRequest request); + /** + * Return the next event based on the context supplied. The context + * will be updated for the subsequent read. + * + * @param context the trace read context (updated) + * @return the event referred to by context + */ public abstract T getNext(ITmfContext context); /** diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/ITmfEvent.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/ITmfEvent.java index 2b6be5ebab..550d86de30 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/ITmfEvent.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/ITmfEvent.java @@ -29,6 +29,11 @@ import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace; * For convenience, a free-form reference field is also provided. It could be * used as e.g. a location marker (filename:lineno) to indicate where the event * was generated. + * + * @see ITmfTimestamp + * @see ITmfEventType + * @see ITmfEvetnField + * @see TmfEvent */ public interface ITmfEvent extends Cloneable { diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/ITmfTimestamp.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/ITmfTimestamp.java index 8bb3f3e7e9..b72fb83e5b 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/ITmfTimestamp.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/ITmfTimestamp.java @@ -29,6 +29,13 @@ package org.eclipse.linuxtools.tmf.core.event; *

  • [precision] indicates the error on the value (useful for comparing * timestamps in different scales). Default: 0. * + * + * @since 1.0 + * @version 1.0 + * @author Francois Chouinard + * @see TmfTimestamp + * @see TmfSimpleTimestamp + * @see TmfTimeRange */ public interface ITmfTimestamp extends Cloneable, Comparable { diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfTrace.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfTrace.java index 15666917f8..befb513660 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfTrace.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfTrace.java @@ -46,24 +46,24 @@ import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange; * trace. Seek operations can be performed for a particular event (by rank or * timestamp) or for a plain trace location. *

    - * Example 1: Read a whole trace + * Example 1: Process a whole trace *

      * ITmfContext context = trace.seekLocationt(null);
    - * ITmfEvent event = trace.getEvent(context);
    + * ITmfEvent event = trace.getNextEvent(context);
      * while (event != null) {
    - *     // Do something ...
    - *     event = trace.getEvent(context);
    + *     processEvent(event);
    + *     event = trace.getNextEvent(context);
      * }
      * 
    * Example 2: Process 50 events starting from the 1000th event *
      * int nbEventsRead = 0;
      * ITmfContext context = trace.seekEvent(1000);
    - * ITmfEvent event = trace.getEvent(context);
    + * ITmfEvent event = trace.getNextEvent(context);
      * while (event != null && nbEventsRead < 50) {
      *     nbEventsRead++;
    - *     // Do something ...
    - *     event = trace.getEvent(context);
    + *     processEvent(event);
    + *     event = trace.getNextEvent(context);
      * }
      * 
    * Example 3: Process the events between 2 timestamps (inclusive) @@ -71,12 +71,38 @@ import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange; * ITmfTimestamp startTime = ...; * ITmfTimestamp endTime = ...; * ITmfContext context = trace.seekEvent(startTime); - * ITmfEvent event = trace.getEvent(context); + * ITmfEvent event = trace.getNextEvent(context); * while (event != null && event.getTimestamp().compareTo(endTime) <= 0) { - * // Do something ... - * event = trace.getEvent(context); + * processEvent(event); + * event = trace.getNextEvent(context); * } * + * A trace is also an event provider so it can process event requests + * asynchronously (and coalesce compatible requests). + *

    + * + * Example 4: Process a whole trace + *

    + * ITmfRequest request = new TmfEventRequest<MyEventType>(MyEventType.class) {
    + *     @Override
    + *     public void handleData(MyEventType event) {
    + *         super.handleData(event);
    + *         processEvent(event);
    + *     }
    + *     @Override
    + *     public void handleCompleted() {
    + *         finish();
    + *         super.handleCompleted();
    + *     }
    + * };
    + * fTrace.handleRequest(request);
    + * if (youWant) {
    + *     request.waitForCompletion();
    + * } 
    + * 
    + * @see ITmfEvent + * @see ITmfEventProvider + * @see ITmfRequest */ public interface ITmfTrace extends ITmfDataProvider { @@ -88,7 +114,7 @@ public interface ITmfTrace extends ITmfDataProvider { * Initialize a newly instantiated "empty" trace object. This is used to * properly parameterize an ITmfTrace instantiated with its parameterless * constructor. - * + *

    * Typically, the parameterless constructor will provide the block size * and its associated parser and indexer. * diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfTraceIndexer.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfTraceIndexer.java index dcf878f49a..2048a1170f 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfTraceIndexer.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfTraceIndexer.java @@ -34,10 +34,9 @@ public interface ITmfTraceIndexer> { * Adds an entry to the trace index. * * @param context - * @param rank * @param timestamp */ - public void updateIndex(ITmfContext context, long rank, ITmfTimestamp timestamp); + public void updateIndex(ITmfContext context, ITmfTimestamp timestamp); /** * Returns the context of the checkpoint immediately preceding the requested diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfTrace.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfTrace.java index d7b8e62eaa..0f2063a5a1 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfTrace.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfTrace.java @@ -15,7 +15,6 @@ package org.eclipse.linuxtools.tmf.core.trace; import java.io.File; import java.io.FileNotFoundException; -import java.util.Vector; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IResource; @@ -62,7 +61,7 @@ public abstract class TmfTrace extends TmfEventProvider protected int fCacheSize = DEFAULT_TRACE_CACHE_SIZE; // The set of event stream checkpoints - protected Vector fCheckpoints = new Vector(); +// protected Vector fCheckpoints = new Vector(); // The number of events collected protected long fNbEvents = 0; @@ -137,7 +136,7 @@ public abstract class TmfTrace extends TmfEventProvider super(); fCacheSize = (cacheSize > 0) ? cacheSize : DEFAULT_TRACE_CACHE_SIZE; fStreamingInterval = interval; - fIndexer = (indexer != null) ? indexer : new TmfTraceIndexer(this); + fIndexer = (indexer != null) ? indexer : new TmfTraceIndexer(this, fCacheSize); initialize(resource, path, type); } @@ -382,6 +381,16 @@ public abstract class TmfTrace extends TmfEventProvider // ITmfTrace - Read operations (returning an actual event) // ------------------------------------------------------------------------ + /* (non-Javadoc) + * @see org.eclipse.linuxtools.tmf.core.trace.ITmfTrace#parseEvent(org.eclipse.linuxtools.tmf.core.trace.ITmfContext) + */ + @Override + public synchronized ITmfEvent parseEvent(final ITmfContext context) { + final ITmfContext tmpContext = context.clone(); + final ITmfEvent event = getNextEvent(tmpContext); + return event; + } + /* (non-Javadoc) * @see org.eclipse.linuxtools.tmf.core.trace.ITmfTrace#getNextEvent(org.eclipse.linuxtools.tmf.core.trace.ITmfContext) */ @@ -390,7 +399,7 @@ public abstract class TmfTrace extends TmfEventProvider // parseEvent() does not update the context final ITmfEvent event = parseEvent(context); if (event != null) { - updateIndex(context, context.getRank(), event.getTimestamp()); + updateAttributes(context, event.getTimestamp()); context.setLocation(getCurrentLocation()); context.increaseRank(); processEvent(event); @@ -399,16 +408,23 @@ public abstract class TmfTrace extends TmfEventProvider } /** - * Hook for special processing by the concrete class (called by - * getNextEvent()) + * Hook for special event processing by the concrete class + * (called by TmfTrace.getNextEvent()) * - * @param event + * @param event the event */ protected void processEvent(final ITmfEvent event) { - // Do nothing by default + // Do nothing } - protected synchronized void updateIndex(final ITmfContext context, final long rank, final ITmfTimestamp timestamp) { + /** + * Update the trace attributes + * + * @param context the current trace context + * @param rank + * @param timestamp + */ + protected synchronized void updateAttributes(final ITmfContext context, final ITmfTimestamp timestamp) { if (fStartTime.compareTo(timestamp, false) > 0) { fStartTime = timestamp; } @@ -416,27 +432,21 @@ public abstract class TmfTrace extends TmfEventProvider fEndTime = timestamp; } if (context.hasValidRank()) { + long rank = context.getRank(); if (fNbEvents <= rank) { fNbEvents = rank + 1; } - // Build the index as we go along - if ((rank % fCacheSize) == 0) { - // Determine the table position - final long position = rank / fCacheSize; - // Add new entry at proper location (if empty) - if (fCheckpoints.size() == position) { - final ITmfLocation location = context.getLocation().clone(); - fCheckpoints.add(new TmfCheckpoint(timestamp.clone(), location)); - // System.out.println(getName() + "[" + (fCheckpoints.size() + "] " + timestamp + ", " + location.toString()); - } - } + fIndexer.updateIndex(context, timestamp); } } // ------------------------------------------------------------------------ - // TmfProvider + // TmfDataProvider // ------------------------------------------------------------------------ + /* (non-Javadoc) + * @see org.eclipse.linuxtools.tmf.core.component.TmfDataProvider#armRequest(org.eclipse.linuxtools.tmf.core.request.ITmfDataRequest) + */ @Override public ITmfContext armRequest(final ITmfDataRequest request) { if (request instanceof ITmfEventRequest @@ -450,12 +460,8 @@ public abstract class TmfTrace extends TmfEventProvider return seekEvent(request.getIndex()); } - /** - * Return the next piece of data based on the context supplied. The context - * would typically be updated for the subsequent read. - * - * @param context - * @return the event referred to by context + /* (non-Javadoc) + * @see org.eclipse.linuxtools.tmf.core.component.TmfDataProvider#getNext(org.eclipse.linuxtools.tmf.core.trace.ITmfContext) */ @Override @SuppressWarnings("unchecked") @@ -470,6 +476,9 @@ public abstract class TmfTrace extends TmfEventProvider // toString // ------------------------------------------------------------------------ + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ @Override @SuppressWarnings("nls") public String toString() { diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfTraceIndexer.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfTraceIndexer.java index 8e35d1ab47..65b2f83e65 100644 --- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfTraceIndexer.java +++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfTraceIndexer.java @@ -130,7 +130,7 @@ public class TmfTraceIndexer> implements ITmfTrac // updated as we go by getNextEvent(). final ITmfEventRequest request = new TmfEventRequest(ITmfEvent.class, TmfTimeRange.ETERNITY, TmfDataRequest.ALL_DATA, fCheckpointInterval, ITmfDataRequest.ExecutionType.BACKGROUND) - { + { ITmfTimestamp startTime = null; ITmfTimestamp lastTime = null; @@ -167,16 +167,16 @@ public class TmfTraceIndexer> implements ITmfTrac notifyListeners(startTime, lastTime); } } - }; + }; - // Submit the request and wait for completion if required - fTrace.sendRequest(request); - if (waitForCompletion) { - try { - request.waitForCompletion(); - } catch (final InterruptedException e) { - } - } + // Submit the request and wait for completion if required + fTrace.sendRequest(request); + if (waitForCompletion) { + try { + request.waitForCompletion(); + } catch (final InterruptedException e) { + } + } } private void notifyListeners(final ITmfTimestamp startTime, final ITmfTimestamp endTime) { @@ -187,8 +187,12 @@ public class TmfTraceIndexer> implements ITmfTrac // ITmfTraceIndexer - updateIndex // ------------------------------------------------------------------------ + /* (non-Javadoc) + * @see org.eclipse.linuxtools.tmf.core.trace.ITmfTraceIndexer#updateIndex(org.eclipse.linuxtools.tmf.core.trace.ITmfContext, org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp) + */ @Override - public void updateIndex(final ITmfContext context, final long rank, final ITmfTimestamp timestamp) { + public synchronized void updateIndex(final ITmfContext context, final ITmfTimestamp timestamp) { + final long rank = context.getRank(); if ((rank % fCheckpointInterval) == 0) { // Determine the table position final long position = rank / fCheckpointInterval; @@ -196,7 +200,6 @@ public class TmfTraceIndexer> implements ITmfTrac if (fTraceIndex.size() == position) { final ITmfLocation location = context.getLocation().clone(); fTraceIndex.add(new TmfCheckpoint(timestamp.clone(), location)); - // System.out.println(getName() + "[" + (fCheckpoints.size() - 1) + "] " + timestamp + ", " + location.toString()); } } } diff --git a/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/parsers/custom/CustomTxtTrace.java b/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/parsers/custom/CustomTxtTrace.java index 3447e2444b..11d435a96b 100644 --- a/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/parsers/custom/CustomTxtTrace.java +++ b/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/parsers/custom/CustomTxtTrace.java @@ -169,7 +169,7 @@ public class CustomTxtTrace extends TmfTrace { final ITmfContext savedContext = context.clone(); final TmfEvent event = parseEvent(context); if (event != null) { - updateIndex(savedContext, savedContext.getRank(), event.getTimestamp()); + updateAttributes(savedContext, event.getTimestamp()); context.increaseRank(); } return event; diff --git a/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/parsers/custom/CustomXmlTrace.java b/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/parsers/custom/CustomXmlTrace.java index 9cf7ebb113..707fddc7c4 100644 --- a/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/parsers/custom/CustomXmlTrace.java +++ b/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/parsers/custom/CustomXmlTrace.java @@ -171,7 +171,7 @@ public class CustomXmlTrace extends TmfTrace { final ITmfContext savedContext = context.clone(); final TmfEvent event = parseEvent(context); if (event != null) { - updateIndex(savedContext, savedContext.getRank(), event.getTimestamp()); + updateAttributes(savedContext, event.getTimestamp()); context.increaseRank(); } return event;