summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorMatthew Khouzam2012-04-12 15:29:13 (EDT)
committer Francois Chouinard2012-04-16 14:20:39 (EDT)
commitf83095792d29998aaa60da3fb2a5da7fb247e8ca (patch)
tree1f29f52de5c1b6b2467e94bb6b4152a131b253dc
parente01715736570787024910bdb3cf25dfa30ae4469 (diff)
downloadorg.eclipse.linuxtools-f83095792d29998aaa60da3fb2a5da7fb247e8ca.zip
org.eclipse.linuxtools-f83095792d29998aaa60da3fb2a5da7fb247e8ca.tar.gz
org.eclipse.linuxtools-f83095792d29998aaa60da3fb2a5da7fb247e8ca.tar.bz2
Define CTF API
-rw-r--r--lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/CTFTraceTest.java4
-rw-r--r--lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/StreamInputPacketIndexTest.java2
-rw-r--r--lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/StreamInputPacketReaderTest.java194
-rw-r--r--lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/StreamInputReaderComparatorTest.java4
-rw-r--r--lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/StreamInputReaderTest.java29
-rw-r--r--lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/StreamInputReaderTimestampComparatorTest.java6
-rw-r--r--lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/StreamInputTest.java6
-rw-r--r--lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/StreamTest.java6
-rw-r--r--lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/types/EventDeclarationTest.java4
-rw-r--r--lttng/org.eclipse.linuxtools.ctf.core/META-INF/MANIFEST.MF2
-rw-r--r--lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/EventDeclaration.java2
-rw-r--r--lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFTrace.java6
-rw-r--r--lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFTraceReader.java6
-rw-r--r--lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/Metadata.java2
-rw-r--r--lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/StreamInputPacketReader.java5
-rw-r--r--lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/StreamInputReader.java19
-rw-r--r--lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/internal/ctf/core/event/metadata/DeclarationScope.java (renamed from lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/metadata/DeclarationScope.java)4
-rw-r--r--lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/internal/ctf/core/event/metadata/IOStructGen.java5
-rw-r--r--lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/internal/ctf/core/event/metadata/exceptions/ParseException.java (renamed from lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/metadata/exceptions/ParseException.java)2
-rw-r--r--lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/internal/ctf/core/trace/Stream.java (renamed from lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/Stream.java)5
-rw-r--r--lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/internal/ctf/core/trace/StreamInput.java (renamed from lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/StreamInput.java)6
-rw-r--r--lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/internal/ctf/core/trace/StreamInputPacketIndex.java (renamed from lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/StreamInputPacketIndex.java)4
-rw-r--r--lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/internal/ctf/core/trace/StreamInputReaderComparator.java1
-rw-r--r--lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/internal/ctf/core/trace/StreamInputReaderTimestampComparator.java (renamed from lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/StreamInputReaderTimestampComparator.java)5
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfIterator.java2
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfEvent.java5
26 files changed, 78 insertions, 258 deletions
diff --git a/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/CTFTraceTest.java b/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/CTFTraceTest.java
index 58358e6..260b17b 100644
--- a/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/CTFTraceTest.java
+++ b/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/CTFTraceTest.java
@@ -12,13 +12,13 @@ import java.util.Map;
import java.util.UUID;
import org.eclipse.linuxtools.ctf.core.event.CTFClock;
-import org.eclipse.linuxtools.ctf.core.event.metadata.exceptions.ParseException;
import org.eclipse.linuxtools.ctf.core.event.types.Definition;
import org.eclipse.linuxtools.ctf.core.event.types.StructDeclaration;
import org.eclipse.linuxtools.ctf.core.tests.TestParams;
import org.eclipse.linuxtools.ctf.core.trace.CTFReaderException;
import org.eclipse.linuxtools.ctf.core.trace.CTFTrace;
-import org.eclipse.linuxtools.ctf.core.trace.Stream;
+import org.eclipse.linuxtools.internal.ctf.core.event.metadata.exceptions.ParseException;
+import org.eclipse.linuxtools.internal.ctf.core.trace.Stream;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
diff --git a/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/StreamInputPacketIndexTest.java b/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/StreamInputPacketIndexTest.java
index 99fca9d..0992c7e 100644
--- a/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/StreamInputPacketIndexTest.java
+++ b/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/StreamInputPacketIndexTest.java
@@ -7,7 +7,7 @@ import java.util.Collection;
import java.util.ListIterator;
import org.eclipse.linuxtools.ctf.core.trace.CTFReaderException;
-import org.eclipse.linuxtools.ctf.core.trace.StreamInputPacketIndex;
+import org.eclipse.linuxtools.internal.ctf.core.trace.StreamInputPacketIndex;
import org.eclipse.linuxtools.internal.ctf.core.trace.StreamInputPacketIndexEntry;
import org.junit.After;
import org.junit.Before;
diff --git a/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/StreamInputPacketReaderTest.java b/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/StreamInputPacketReaderTest.java
deleted file mode 100644
index 49aac9d..0000000
--- a/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/StreamInputPacketReaderTest.java
+++ /dev/null
@@ -1,194 +0,0 @@
-package org.eclipse.linuxtools.ctf.core.tests.trace;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import java.nio.channels.FileChannel;
-
-import org.eclipse.linuxtools.ctf.core.event.EventDefinition;
-import org.eclipse.linuxtools.ctf.core.event.types.Definition;
-import org.eclipse.linuxtools.ctf.core.event.types.StructDefinition;
-import org.eclipse.linuxtools.ctf.core.tests.TestParams;
-import org.eclipse.linuxtools.ctf.core.trace.CTFReaderException;
-import org.eclipse.linuxtools.ctf.core.trace.Stream;
-import org.eclipse.linuxtools.ctf.core.trace.StreamInput;
-import org.eclipse.linuxtools.ctf.core.trace.StreamInputPacketReader;
-import org.eclipse.linuxtools.ctf.core.trace.StreamInputReader;
-import org.eclipse.linuxtools.internal.ctf.core.trace.StreamInputPacketIndexEntry;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * The class <code>StreamInputPacketReaderTest</code> contains tests for the
- * class <code>{@link StreamInputPacketReader}</code>.
- *
- * @author ematkho
- * @version $Revision: 1.0 $
- */
-public class StreamInputPacketReaderTest {
-
- private StreamInputPacketReader fixture;
-
- /**
- * Launch the test.
- *
- * @param args
- * the command line arguments
- */
- public static void main(String[] args) {
- new org.junit.runner.JUnitCore().run(StreamInputPacketReaderTest.class);
- }
-
- /**
- * Perform pre-test initialization.
- *
- * @throws CTFReaderException
- */
- @Before
- public void setUp() throws CTFReaderException {
- // FIXME The test is broken here. "FileChannel" can't be null because we
- // need it further in. Heck this whole thing shouldn't be public in the
- // first place, perhaps fixing that is the best way to go.
- fixture = new StreamInputPacketReader(new StreamInputReader(
- new StreamInput(new Stream(TestParams.createTrace()),
- (FileChannel) null, TestParams.getEmptyFile())));
- }
-
- /**
- * Perform post-test clean-up.
- */
- @After
- public void tearDown() {
- // Add additional tear down code here
- }
-
- /**
- * Run the StreamInputPacketReader(StreamInputReader) constructor test.
- *
- * @throws CTFReaderException
- */
- @Test
- public void testStreamInputPacketReader() throws CTFReaderException {
- StreamInputReader streamInputReader;
- StreamInputPacketReader result;
-
- streamInputReader = new StreamInputReader(new StreamInput(new Stream(
- TestParams.createTrace()), (FileChannel) null,
- TestParams.getEmptyFile()));
-
- result = new StreamInputPacketReader(streamInputReader);
-
- assertNotNull(result);
- }
-
- /**
- * Run the int getCPU() method test.
- */
- @Test
- public void testGetCPU() {
- int result = fixture.getCPU();
- assertEquals(0, result);
- }
-
- /**
- * Run the StreamInputPacketIndexEntry getCurrentPacket() method test.
- */
- @Test
- public void testGetCurrentPacket() {
- StreamInputPacketIndexEntry sipie = new StreamInputPacketIndexEntry(1L);
- fixture.setCurrentPacket(sipie);
- StreamInputPacketIndexEntry result = fixture.getCurrentPacket();
- assertNotNull(result);
- }
-
- /**
- * Run the String getPath() method test.
- */
- @Test
- public void testGetPath() {
- String result = fixture.getPath();
- assertNotNull(result);
- }
-
- /**
- * Run the StructDefinition getStreamPacketContextDef() method test.
- */
- @Test
- public void testGetStreamPacketContextDef() {
- fixture.setCurrentPacket(new StreamInputPacketIndexEntry(1L));
- StructDefinition result = fixture.getStreamPacketContextDef();
- assertNotNull(result);
- }
-
- /**
- * Run the boolean hasMoreEvents() method test.
- */
- @Test
- public void testHasMoreEvents() {
- fixture.setCurrentPacket(new StreamInputPacketIndexEntry(1L));
- boolean result = fixture.hasMoreEvents();
- assertTrue(result);
- }
-
- /**
- * Run the Definition lookupDefinition(String) method test.
- */
- @Test
- public void testLookupDefinition() {
- fixture.setCurrentPacket(new StreamInputPacketIndexEntry(1L));
- String lookupPath = ""; //$NON-NLS-1$
- Definition result = fixture.lookupDefinition(lookupPath);
- assertNotNull(result);
- }
-
- /**
- * Run the EventDefinition readNextEvent() method test.
- *
- * @throws CTFReaderException
- */
- @Test
- public void testReadNextEvent() throws CTFReaderException {
- fixture.setCurrentPacket(new StreamInputPacketIndexEntry(1L));
- EventDefinition result = fixture.readNextEvent();
- assertNotNull(result);
- }
-
- /**
- * Run the void setCurrentPacket(StreamInputPacketIndexEntry) method test.
- */
- @Test
- public void testSetCurrentPacket() {
- fixture.setCurrentPacket(new StreamInputPacketIndexEntry(1L));
- StreamInputPacketIndexEntry currentPacket = new StreamInputPacketIndexEntry(
- 1L);
- currentPacket.setPacketSizeBits(1);
- fixture.setCurrentPacket(currentPacket);
- }
-
- /**
- * Run the void setCurrentPacket(StreamInputPacketIndexEntry) method test.
- */
- @Test
- public void testSetCurrentPacket_2() throws Exception {
- fixture.setCurrentPacket(new StreamInputPacketIndexEntry(1L));
- StreamInputPacketIndexEntry currentPacket = null;
- fixture.setCurrentPacket(currentPacket);
-
- }
-
- /**
- * Run the void setCurrentPacket(StreamInputPacketIndexEntry) method test.
- */
- @Test
- public void testSetCurrentPacket_3() {
- fixture.setCurrentPacket(new StreamInputPacketIndexEntry(1L));
- StreamInputPacketIndexEntry currentPacket = new StreamInputPacketIndexEntry(
- 1L);
- currentPacket.setTimestampBegin(1L);
- currentPacket.setPacketSizeBits(1);
-
- fixture.setCurrentPacket(currentPacket);
- }
-}
diff --git a/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/StreamInputReaderComparatorTest.java b/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/StreamInputReaderComparatorTest.java
index 280194d..2b03b38 100644
--- a/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/StreamInputReaderComparatorTest.java
+++ b/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/StreamInputReaderComparatorTest.java
@@ -8,9 +8,9 @@ import org.eclipse.linuxtools.ctf.core.event.EventDeclaration;
import org.eclipse.linuxtools.ctf.core.event.EventDefinition;
import org.eclipse.linuxtools.ctf.core.tests.TestParams;
import org.eclipse.linuxtools.ctf.core.trace.CTFReaderException;
-import org.eclipse.linuxtools.ctf.core.trace.Stream;
-import org.eclipse.linuxtools.ctf.core.trace.StreamInput;
import org.eclipse.linuxtools.ctf.core.trace.StreamInputReader;
+import org.eclipse.linuxtools.internal.ctf.core.trace.Stream;
+import org.eclipse.linuxtools.internal.ctf.core.trace.StreamInput;
import org.eclipse.linuxtools.internal.ctf.core.trace.StreamInputReaderComparator;
import org.junit.*;
diff --git a/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/StreamInputReaderTest.java b/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/StreamInputReaderTest.java
index d9a6573..f10138f 100644
--- a/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/StreamInputReaderTest.java
+++ b/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/StreamInputReaderTest.java
@@ -13,9 +13,9 @@ import org.eclipse.linuxtools.ctf.core.event.types.StructDefinition;
import org.eclipse.linuxtools.ctf.core.tests.TestParams;
import org.eclipse.linuxtools.ctf.core.trace.CTFReaderException;
import org.eclipse.linuxtools.ctf.core.trace.CTFTrace;
-import org.eclipse.linuxtools.ctf.core.trace.Stream;
-import org.eclipse.linuxtools.ctf.core.trace.StreamInput;
import org.eclipse.linuxtools.ctf.core.trace.StreamInputReader;
+import org.eclipse.linuxtools.internal.ctf.core.trace.Stream;
+import org.eclipse.linuxtools.internal.ctf.core.trace.StreamInput;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
@@ -23,7 +23,7 @@ import org.junit.Test;
/**
* The class <code>StreamInputReaderTest</code> contains tests for the class
* <code>{@link StreamInputReader}</code>.
- *
+ *
* @author ematkho
* @version $Revision: 1.0 $
*/
@@ -33,7 +33,7 @@ public class StreamInputReaderTest {
/**
* Launch the test.
- *
+ *
* @param args
* the command line arguments
*/
@@ -43,8 +43,8 @@ public class StreamInputReaderTest {
/**
* Perform pre-test initialization.
- *
- * @throws CTFReaderException
+ *
+ * @throws CTFReaderException
*/
@Before
public void setUp() throws CTFReaderException {
@@ -92,7 +92,7 @@ public class StreamInputReaderTest {
/**
* Run the StreamInputReader(StreamInput) constructor test, with an invalid
* trace.
- *
+ *
* @throws CTFReaderException
*/
@Test(expected = CTFReaderException.class)
@@ -141,17 +141,8 @@ public class StreamInputReaderTest {
}
/**
- * Run the StreamInput getStreamInput() method test.
- */
- @Test
- public void testGetStreamInput() {
- StreamInput result = fixture.getStreamInput();
- assertNotNull(result);
- }
-
- /**
* Run the void goToLastEvent() method test.
- *
+ *
* @throws CTFReaderException
*/
@Test
@@ -180,8 +171,8 @@ public class StreamInputReaderTest {
/**
* Run the seek test. Seek by passing an EventDefinition to which we've
* given the timestamp we want.
- *
- * @throws CTFReaderException
+ *
+ * @throws CTFReaderException
*/
@Test
public void testSeek_eventDefinition() throws CTFReaderException {
diff --git a/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/StreamInputReaderTimestampComparatorTest.java b/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/StreamInputReaderTimestampComparatorTest.java
index 1d3a3ca..33ab674 100644
--- a/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/StreamInputReaderTimestampComparatorTest.java
+++ b/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/StreamInputReaderTimestampComparatorTest.java
@@ -7,10 +7,10 @@ import java.nio.channels.FileChannel;
import org.eclipse.linuxtools.ctf.core.tests.TestParams;
import org.eclipse.linuxtools.ctf.core.trace.CTFReaderException;
-import org.eclipse.linuxtools.ctf.core.trace.Stream;
-import org.eclipse.linuxtools.ctf.core.trace.StreamInput;
import org.eclipse.linuxtools.ctf.core.trace.StreamInputReader;
-import org.eclipse.linuxtools.ctf.core.trace.StreamInputReaderTimestampComparator;
+import org.eclipse.linuxtools.internal.ctf.core.trace.Stream;
+import org.eclipse.linuxtools.internal.ctf.core.trace.StreamInput;
+import org.eclipse.linuxtools.internal.ctf.core.trace.StreamInputReaderTimestampComparator;
import org.junit.*;
/**
diff --git a/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/StreamInputTest.java b/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/StreamInputTest.java
index 4a71dc3..40963a9 100644
--- a/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/StreamInputTest.java
+++ b/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/StreamInputTest.java
@@ -10,9 +10,9 @@ import java.nio.channels.FileChannel;
import org.eclipse.linuxtools.ctf.core.event.types.Definition;
import org.eclipse.linuxtools.ctf.core.tests.TestParams;
import org.eclipse.linuxtools.ctf.core.trace.CTFReaderException;
-import org.eclipse.linuxtools.ctf.core.trace.Stream;
-import org.eclipse.linuxtools.ctf.core.trace.StreamInput;
-import org.eclipse.linuxtools.ctf.core.trace.StreamInputPacketIndex;
+import org.eclipse.linuxtools.internal.ctf.core.trace.Stream;
+import org.eclipse.linuxtools.internal.ctf.core.trace.StreamInput;
+import org.eclipse.linuxtools.internal.ctf.core.trace.StreamInputPacketIndex;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
diff --git a/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/StreamTest.java b/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/StreamTest.java
index cf660c8..c6b6740 100644
--- a/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/StreamTest.java
+++ b/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/StreamTest.java
@@ -8,13 +8,13 @@ import java.util.HashMap;
import java.util.Set;
import org.eclipse.linuxtools.ctf.core.event.EventDeclaration;
-import org.eclipse.linuxtools.ctf.core.event.metadata.exceptions.ParseException;
import org.eclipse.linuxtools.ctf.core.event.types.StructDeclaration;
import org.eclipse.linuxtools.ctf.core.tests.TestParams;
import org.eclipse.linuxtools.ctf.core.trace.CTFReaderException;
import org.eclipse.linuxtools.ctf.core.trace.CTFTrace;
-import org.eclipse.linuxtools.ctf.core.trace.Stream;
-import org.eclipse.linuxtools.ctf.core.trace.StreamInput;
+import org.eclipse.linuxtools.internal.ctf.core.event.metadata.exceptions.ParseException;
+import org.eclipse.linuxtools.internal.ctf.core.trace.Stream;
+import org.eclipse.linuxtools.internal.ctf.core.trace.StreamInput;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
diff --git a/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/types/EventDeclarationTest.java b/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/types/EventDeclarationTest.java
index f129c9a..2c796be 100644
--- a/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/types/EventDeclarationTest.java
+++ b/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/types/EventDeclarationTest.java
@@ -15,9 +15,9 @@ import org.eclipse.linuxtools.ctf.core.tests.TestParams;
import org.eclipse.linuxtools.ctf.core.trace.CTFReaderException;
import org.eclipse.linuxtools.ctf.core.trace.CTFTrace;
import org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader;
-import org.eclipse.linuxtools.ctf.core.trace.Stream;
-import org.eclipse.linuxtools.ctf.core.trace.StreamInput;
import org.eclipse.linuxtools.ctf.core.trace.StreamInputReader;
+import org.eclipse.linuxtools.internal.ctf.core.trace.Stream;
+import org.eclipse.linuxtools.internal.ctf.core.trace.StreamInput;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
diff --git a/lttng/org.eclipse.linuxtools.ctf.core/META-INF/MANIFEST.MF b/lttng/org.eclipse.linuxtools.ctf.core/META-INF/MANIFEST.MF
index bc67bb9..64b5eb1 100644
--- a/lttng/org.eclipse.linuxtools.ctf.core/META-INF/MANIFEST.MF
+++ b/lttng/org.eclipse.linuxtools.ctf.core/META-INF/MANIFEST.MF
@@ -12,7 +12,5 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
org.antlr.runtime;bundle-version="3.2.0",
org.eclipse.linuxtools.ctf.parser;bundle-version="0.1.0"
Export-Package: org.eclipse.linuxtools.ctf.core.event,
- org.eclipse.linuxtools.ctf.core.event.metadata,
- org.eclipse.linuxtools.ctf.core.event.metadata.exceptions,
org.eclipse.linuxtools.ctf.core.event.types,
org.eclipse.linuxtools.ctf.core.trace
diff --git a/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/EventDeclaration.java b/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/EventDeclaration.java
index c6e06f8..1650ed1 100644
--- a/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/EventDeclaration.java
+++ b/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/EventDeclaration.java
@@ -13,8 +13,8 @@
package org.eclipse.linuxtools.ctf.core.event;
import org.eclipse.linuxtools.ctf.core.event.types.StructDeclaration;
-import org.eclipse.linuxtools.ctf.core.trace.Stream;
import org.eclipse.linuxtools.ctf.core.trace.StreamInputReader;
+import org.eclipse.linuxtools.internal.ctf.core.trace.Stream;
/**
* <b><u>EventDeclaration</u></b>
diff --git a/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFTrace.java b/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFTrace.java
index 599f352..0873281 100644
--- a/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFTrace.java
+++ b/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFTrace.java
@@ -28,7 +28,6 @@ import java.util.Set;
import java.util.UUID;
import org.eclipse.linuxtools.ctf.core.event.CTFClock;
-import org.eclipse.linuxtools.ctf.core.event.metadata.exceptions.ParseException;
import org.eclipse.linuxtools.ctf.core.event.types.ArrayDefinition;
import org.eclipse.linuxtools.ctf.core.event.types.Definition;
import org.eclipse.linuxtools.ctf.core.event.types.IDefinitionScope;
@@ -37,6 +36,9 @@ import org.eclipse.linuxtools.ctf.core.event.types.StructDeclaration;
import org.eclipse.linuxtools.ctf.core.event.types.StructDefinition;
import org.eclipse.linuxtools.internal.ctf.core.Activator;
import org.eclipse.linuxtools.internal.ctf.core.event.io.BitBuffer;
+import org.eclipse.linuxtools.internal.ctf.core.event.metadata.exceptions.ParseException;
+import org.eclipse.linuxtools.internal.ctf.core.trace.Stream;
+import org.eclipse.linuxtools.internal.ctf.core.trace.StreamInput;
/**
* <b><u>CTFTrace</u></b>
@@ -637,7 +639,7 @@ public class CTFTrace implements IDefinitionScope {
{
return 0;
}
- return (Long) getClock().getProperty("offset");
+ return (Long) getClock().getProperty("offset"); //$NON-NLS-1$
}
}
diff --git a/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFTraceReader.java b/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFTraceReader.java
index 0de9104..a4fccaa 100644
--- a/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFTraceReader.java
+++ b/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFTraceReader.java
@@ -19,7 +19,10 @@ import java.util.Vector;
import org.eclipse.linuxtools.ctf.core.event.EventDefinition;
import org.eclipse.linuxtools.internal.ctf.core.Activator;
+import org.eclipse.linuxtools.internal.ctf.core.trace.Stream;
+import org.eclipse.linuxtools.internal.ctf.core.trace.StreamInput;
import org.eclipse.linuxtools.internal.ctf.core.trace.StreamInputPacketIndexEntry;
+import org.eclipse.linuxtools.internal.ctf.core.trace.StreamInputReaderTimestampComparator;
/**
* Reads the events of a trace.
@@ -440,8 +443,7 @@ public class CTFTraceReader {
int len = (width * this.eventCountPerTraceFile[se.getName()])
/ numEvents;
- StringBuilder sb = new StringBuilder(se.getStreamInput()
- .getFilename() + "\t["); //$NON-NLS-1$
+ StringBuilder sb = new StringBuilder(se.getFilename() + "\t["); //$NON-NLS-1$
for (int i = 0; i < len; i++) {
sb.append('+');
diff --git a/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/Metadata.java b/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/Metadata.java
index f1931a9..10172d0 100644
--- a/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/Metadata.java
+++ b/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/Metadata.java
@@ -29,11 +29,11 @@ import org.antlr.runtime.ANTLRReaderStream;
import org.antlr.runtime.CommonTokenStream;
import org.antlr.runtime.RecognitionException;
import org.antlr.runtime.tree.CommonTree;
-import org.eclipse.linuxtools.ctf.core.event.metadata.exceptions.ParseException;
import org.eclipse.linuxtools.ctf.parser.CTFLexer;
import org.eclipse.linuxtools.ctf.parser.CTFParser;
import org.eclipse.linuxtools.ctf.parser.CTFParser.parse_return;
import org.eclipse.linuxtools.internal.ctf.core.event.metadata.IOStructGen;
+import org.eclipse.linuxtools.internal.ctf.core.event.metadata.exceptions.ParseException;
/**
* <b><u>Metadata</u></b>
diff --git a/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/StreamInputPacketReader.java b/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/StreamInputPacketReader.java
index bd6684d..53e4106 100644
--- a/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/StreamInputPacketReader.java
+++ b/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/StreamInputPacketReader.java
@@ -27,6 +27,7 @@ import org.eclipse.linuxtools.ctf.core.event.types.StructDeclaration;
import org.eclipse.linuxtools.ctf.core.event.types.StructDefinition;
import org.eclipse.linuxtools.ctf.core.event.types.VariantDefinition;
import org.eclipse.linuxtools.internal.ctf.core.event.io.BitBuffer;
+import org.eclipse.linuxtools.internal.ctf.core.trace.Stream;
import org.eclipse.linuxtools.internal.ctf.core.trace.StreamInputPacketIndexEntry;
/**
@@ -34,7 +35,7 @@ import org.eclipse.linuxtools.internal.ctf.core.trace.StreamInputPacketIndexEntr
* <p>
* Reads the events of a packet of a trace file.
*/
-public class StreamInputPacketReader implements IDefinitionScope {
+class StreamInputPacketReader implements IDefinitionScope {
// ------------------------------------------------------------------------
// Constants
@@ -109,7 +110,7 @@ public class StreamInputPacketReader implements IDefinitionScope {
/*
* Set the BitBuffer's byte order.
*/
- getBitBuffer().setByteOrder(streamInputReader.getStreamInput().getStream().getTrace().getByteOrder());
+ getBitBuffer().setByteOrder(streamInputReader.getByteOrder());
/*
* Create definitions needed to read the events.
diff --git a/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/StreamInputReader.java b/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/StreamInputReader.java
index 8c421ba..b33dd77 100644
--- a/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/StreamInputReader.java
+++ b/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/StreamInputReader.java
@@ -12,10 +12,12 @@
package org.eclipse.linuxtools.ctf.core.trace;
+import java.nio.ByteOrder;
import java.util.ListIterator;
import org.eclipse.linuxtools.ctf.core.event.EventDefinition;
import org.eclipse.linuxtools.ctf.core.event.types.StructDefinition;
+import org.eclipse.linuxtools.internal.ctf.core.trace.StreamInput;
import org.eclipse.linuxtools.internal.ctf.core.trace.StreamInputPacketIndexEntry;
/**
@@ -90,8 +92,8 @@ public class StreamInputReader {
return this.packetReader.getStreamPacketContextDef();
}
- public StreamInput getStreamInput() {
- return this.streamInput;
+ public ByteOrder getByteOrder() {
+ return streamInput.getStream().getTrace().getByteOrder();
}
public int getName() {
@@ -106,6 +108,17 @@ public class StreamInputReader {
return this.packetReader.getCPU();
}
+ public String getFilename() {
+ return streamInput.getFilename();
+ }
+
+ /*
+ * for internal use only
+ */
+ StreamInput getStreamInput() {
+ return streamInput;
+ }
+
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
@@ -242,4 +255,6 @@ public class StreamInputReader {
return packetReader;
}
+
+
}
diff --git a/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/metadata/DeclarationScope.java b/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/internal/ctf/core/event/metadata/DeclarationScope.java
index 57e887e..82ed90b 100644
--- a/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/metadata/DeclarationScope.java
+++ b/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/internal/ctf/core/event/metadata/DeclarationScope.java
@@ -10,15 +10,15 @@
* Contributors: Simon Marchi - Initial API and implementation
*******************************************************************************/
-package org.eclipse.linuxtools.ctf.core.event.metadata;
+package org.eclipse.linuxtools.internal.ctf.core.event.metadata;
import java.util.HashMap;
-import org.eclipse.linuxtools.ctf.core.event.metadata.exceptions.ParseException;
import org.eclipse.linuxtools.ctf.core.event.types.EnumDeclaration;
import org.eclipse.linuxtools.ctf.core.event.types.IDeclaration;
import org.eclipse.linuxtools.ctf.core.event.types.StructDeclaration;
import org.eclipse.linuxtools.ctf.core.event.types.VariantDeclaration;
+import org.eclipse.linuxtools.internal.ctf.core.event.metadata.exceptions.ParseException;
/**
* <b><u>DeclarationScope</u></b>
diff --git a/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/internal/ctf/core/event/metadata/IOStructGen.java b/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/internal/ctf/core/event/metadata/IOStructGen.java
index e6e9e47..40588eb 100644
--- a/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/internal/ctf/core/event/metadata/IOStructGen.java
+++ b/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/internal/ctf/core/event/metadata/IOStructGen.java
@@ -25,8 +25,6 @@ import java.util.UUID;
import org.antlr.runtime.tree.CommonTree;
import org.eclipse.linuxtools.ctf.core.event.CTFClock;
import org.eclipse.linuxtools.ctf.core.event.EventDeclaration;
-import org.eclipse.linuxtools.ctf.core.event.metadata.DeclarationScope;
-import org.eclipse.linuxtools.ctf.core.event.metadata.exceptions.ParseException;
import org.eclipse.linuxtools.ctf.core.event.types.ArrayDeclaration;
import org.eclipse.linuxtools.ctf.core.event.types.Encoding;
import org.eclipse.linuxtools.ctf.core.event.types.EnumDeclaration;
@@ -37,9 +35,10 @@ import org.eclipse.linuxtools.ctf.core.event.types.StringDeclaration;
import org.eclipse.linuxtools.ctf.core.event.types.StructDeclaration;
import org.eclipse.linuxtools.ctf.core.event.types.VariantDeclaration;
import org.eclipse.linuxtools.ctf.core.trace.CTFTrace;
-import org.eclipse.linuxtools.ctf.core.trace.Stream;
import org.eclipse.linuxtools.ctf.parser.CTFParser;
import org.eclipse.linuxtools.internal.ctf.core.Activator;
+import org.eclipse.linuxtools.internal.ctf.core.event.metadata.exceptions.ParseException;
+import org.eclipse.linuxtools.internal.ctf.core.trace.Stream;
/*
* Asserts throughout this class denote the assumptions we can make because of
diff --git a/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/metadata/exceptions/ParseException.java b/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/internal/ctf/core/event/metadata/exceptions/ParseException.java
index f4eb8a4..48055d9 100644
--- a/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/event/metadata/exceptions/ParseException.java
+++ b/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/internal/ctf/core/event/metadata/exceptions/ParseException.java
@@ -10,7 +10,7 @@
* Contributors: Simon Marchi - Initial API and implementation
*******************************************************************************/
-package org.eclipse.linuxtools.ctf.core.event.metadata.exceptions;
+package org.eclipse.linuxtools.internal.ctf.core.event.metadata.exceptions;
/**
* <b><u>ParseException</u></b>
diff --git a/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/Stream.java b/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/internal/ctf/core/trace/Stream.java
index 473eeaa..9a83d84 100644
--- a/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/Stream.java
+++ b/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/internal/ctf/core/trace/Stream.java
@@ -10,15 +10,16 @@
* Contributors: Simon Marchi - Initial API and implementation
*******************************************************************************/
-package org.eclipse.linuxtools.ctf.core.trace;
+package org.eclipse.linuxtools.internal.ctf.core.trace;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Set;
import org.eclipse.linuxtools.ctf.core.event.EventDeclaration;
-import org.eclipse.linuxtools.ctf.core.event.metadata.exceptions.ParseException;
import org.eclipse.linuxtools.ctf.core.event.types.StructDeclaration;
+import org.eclipse.linuxtools.ctf.core.trace.CTFTrace;
+import org.eclipse.linuxtools.internal.ctf.core.event.metadata.exceptions.ParseException;
/**
* <b><u>Stream</u></b>
diff --git a/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/StreamInput.java b/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/internal/ctf/core/trace/StreamInput.java
index ca42c1e..931b5d3 100644
--- a/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/StreamInput.java
+++ b/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/internal/ctf/core/trace/StreamInput.java
@@ -10,7 +10,7 @@
* Contributors: Simon Marchi - Initial API and implementation
*******************************************************************************/
-package org.eclipse.linuxtools.ctf.core.trace;
+package org.eclipse.linuxtools.internal.ctf.core.trace;
import java.io.File;
import java.io.IOException;
@@ -24,8 +24,9 @@ import org.eclipse.linuxtools.ctf.core.event.types.Definition;
import org.eclipse.linuxtools.ctf.core.event.types.IDefinitionScope;
import org.eclipse.linuxtools.ctf.core.event.types.IntegerDefinition;
import org.eclipse.linuxtools.ctf.core.event.types.StructDefinition;
+import org.eclipse.linuxtools.ctf.core.trace.CTFReaderException;
+import org.eclipse.linuxtools.ctf.core.trace.Utils;
import org.eclipse.linuxtools.internal.ctf.core.event.io.BitBuffer;
-import org.eclipse.linuxtools.internal.ctf.core.trace.StreamInputPacketIndexEntry;
/**
* <b><u>StreamInput</u></b>
@@ -117,6 +118,7 @@ public class StreamInput implements IDefinitionScope {
// Operations
// ------------------------------------------------------------------------
+ @SuppressWarnings("unused")
@Override
public Definition lookupDefinition(String lookupPath) {
/* TODO: lookup in different dynamic scopes is not supported yet. */
diff --git a/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/StreamInputPacketIndex.java b/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/internal/ctf/core/trace/StreamInputPacketIndex.java
index cf2252c..80723ea 100644
--- a/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/StreamInputPacketIndex.java
+++ b/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/internal/ctf/core/trace/StreamInputPacketIndex.java
@@ -10,12 +10,12 @@
* Contributors: Simon Marchi - Initial API and implementation
*******************************************************************************/
-package org.eclipse.linuxtools.ctf.core.trace;
+package org.eclipse.linuxtools.internal.ctf.core.trace;
import java.util.ListIterator;
import java.util.Vector;
-import org.eclipse.linuxtools.internal.ctf.core.trace.StreamInputPacketIndexEntry;
+import org.eclipse.linuxtools.ctf.core.trace.CTFReaderException;
/**
* <b><u>StreamInputPacketIndex</u></b>
diff --git a/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/internal/ctf/core/trace/StreamInputReaderComparator.java b/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/internal/ctf/core/trace/StreamInputReaderComparator.java
index 43d5962..105e96d 100644
--- a/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/internal/ctf/core/trace/StreamInputReaderComparator.java
+++ b/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/internal/ctf/core/trace/StreamInputReaderComparator.java
@@ -17,6 +17,7 @@ import java.util.Comparator;
import org.eclipse.linuxtools.ctf.core.trace.StreamInputReader;
+
/**
* <b><u>StreamInputReaderComparator</u></b>
* <p>
diff --git a/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/StreamInputReaderTimestampComparator.java b/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/internal/ctf/core/trace/StreamInputReaderTimestampComparator.java
index 0971758..7bc12e7 100644
--- a/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/StreamInputReaderTimestampComparator.java
+++ b/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/internal/ctf/core/trace/StreamInputReaderTimestampComparator.java
@@ -10,11 +10,14 @@
* Contributors: Simon Marchi - Initial API and implementation
*******************************************************************************/
-package org.eclipse.linuxtools.ctf.core.trace;
+package org.eclipse.linuxtools.internal.ctf.core.trace;
import java.io.Serializable;
import java.util.Comparator;
+import org.eclipse.linuxtools.ctf.core.trace.StreamInputReader;
+
+
/**
* <b><u>StreamInputReaderTimestampComparator</u></b>
* <p>
diff --git a/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfIterator.java b/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfIterator.java
index 67bf708..ad469f7 100644
--- a/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfIterator.java
+++ b/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfIterator.java
@@ -47,7 +47,7 @@ public class CtfIterator extends CTFTraceReader implements ITmfContext,
public CtfTmfEvent getCurrentEvent() {
StreamInputReader top = super.prio.peek();
if (top != null) {
- return new CtfTmfEvent(top.getCurrentEvent(), top, ctfTmfTrace);
+ return new CtfTmfEvent(top.getCurrentEvent(), top.getFilename(), ctfTmfTrace);
}
return null;
}
diff --git a/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfEvent.java b/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfEvent.java
index 76d337e..1500c50 100644
--- a/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfEvent.java
+++ b/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfEvent.java
@@ -19,7 +19,6 @@ import java.util.Map.Entry;
import org.eclipse.linuxtools.ctf.core.event.EventDefinition;
import org.eclipse.linuxtools.ctf.core.event.types.Definition;
import org.eclipse.linuxtools.ctf.core.event.types.StructDefinition;
-import org.eclipse.linuxtools.ctf.core.trace.StreamInputReader;
import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
import org.eclipse.linuxtools.tmf.core.event.ITmfEventField;
import org.eclipse.linuxtools.tmf.core.event.ITmfEventType;
@@ -65,7 +64,7 @@ public final class CtfTmfEvent implements ITmfEvent {
* @param eventDef
* @param top
*/
- public CtfTmfEvent(EventDefinition eventDef, StreamInputReader top,
+ public CtfTmfEvent(EventDefinition eventDef, String fileName,
CtfTmfTrace originTrace) {
this.fTrace = originTrace;
@@ -85,7 +84,7 @@ public final class CtfTmfEvent implements ITmfEvent {
this.sourceCPU = eventDef.getCPU();
this.typeId = eventDef.getDeclaration().getId();
this.eventName = eventDef.getDeclaration().getName();
- this.fileName = top.getStreamInput().getFilename();
+ this.fileName = fileName;
/* Read the fields */
this.fContent = new CtfTmfContent(ITmfEventField.ROOT_FIELD_ID,