Quick hack for multi-CPU traces (lib issue).
[deliverable/tracecompass.git] / org.eclipse.linuxtools.lttng / src / org / eclipse / linuxtools / lttng / jni / JniEvent.java
index e9067fce7ab06fe53ac85ae0ff0691d7c4f4c6b6..75905bf988457cdcc8bd78be84f05f4fdd00d80a 100644 (file)
@@ -133,14 +133,25 @@ public final class JniEvent extends Jni_C_Common {
                 || (newParentTracefile == null)) {
             throw new JniEventException("Null or empty value passed to constructor, object is invalid! (JniEvent)");
         }
-
+        
         thisEventPtr = newEventPtr;
         tracefilePtr = newParentTracefile.getTracefilePtr();
         markersMap = newMarkersMap;
         parentTracefile = newParentTracefile;
 
         eventTime = new JniTime();
-
+        
+        // *** FIXME ***
+        // *** HACK  ***
+        // Lttv C library (liblttvtraceread) fail with "assertation error" while calling ltt_seek_next_event() on "metadata" type of events
+        //      We do not really care about "metadata" stuff as these are special events type for marker self-definition in the trace
+        //      However, this force us to add a (very bad) special case here temporary. 
+        // 
+        // Note that this only happen on multi-CPU trace, on single CPU trace, the call to ltt_seek_next_event() works correctly
+        if ( parentTracefile.getTracefileName().equals("metadata") ) {
+               throw new JniNoSuchEventException("FIXME : Metadata tracefile badly handled in liblttvtraceread.");
+        }
+        
         // Try to move to the first event
         // If the event is Out of Range (ERANGE) at the first range, this event
         // type will never been usable
This page took 0.023613 seconds and 5 git commands to generate.