aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEtienne Bergeron2013-12-11 09:45:17 (EST)
committerAlexandre Montplaisir2013-12-11 22:14:37 (EST)
commitac5080bda33f3df52f853f35e7cfcaebcb49f247 (patch)
tree030328c18e30221eae0e9412d4fd6fb50b06ae20
parent2852a521cc4f990738c89c003f48c06aff64108a (diff)
downloadorg.eclipse.linuxtools-ac5080bda33f3df52f853f35e7cfcaebcb49f247.zip
org.eclipse.linuxtools-ac5080bda33f3df52f853f35e7cfcaebcb49f247.tar.gz
org.eclipse.linuxtools-ac5080bda33f3df52f853f35e7cfcaebcb49f247.tar.bz2
ctf: Remove a backward dependency into StreamInput to CTF-Trace.refs/changes/50/19650/3
This dependency is useless. In fact, the creation of the indexes seems also to be useless. I didn't find any use of it. I think the notion of StreamPacketInputIndex should be an class only use by StreamInput. Change-Id: I7dc236a64ad9c8a33e0d0f2b701d8794ef3f9226 Signed-off-by: Etienne Bergeron <etienne.bergeron@gmail.com> Reviewed-on: https://git.eclipse.org/r/19650 Reviewed-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im> IP-Clean: Alexandre Montplaisir <alexmonthy@voxpopuli.im> Tested-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
-rw-r--r--lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFTrace.java18
-rw-r--r--lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/StreamInput.java2
2 files changed, 1 insertions, 19 deletions
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 7bf5ddd..e34b9e9 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
@@ -48,7 +48,6 @@ 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.event.CTFCallsiteComparator;
import org.eclipse.linuxtools.internal.ctf.core.event.metadata.exceptions.ParseException;
-import org.eclipse.linuxtools.internal.ctf.core.trace.StreamInputPacketIndex;
/**
* A CTF trace on the file system.
@@ -139,9 +138,6 @@ public class CTFTrace implements IDefinitionScope {
/** map of all the event types */
private final Map<Long, HashMap<Long, IEventDeclaration>> eventDecs = new HashMap<Long, HashMap<Long, IEventDeclaration>>();
- /** map of all the indexes */
- private final Map<StreamInput, StreamInputPacketIndex> indexes = new HashMap<StreamInput, StreamInputPacketIndex>();
-
/** Callsite helpers */
private CTFCallsiteComparator ctfCallsiteComparator = new CTFCallsiteComparator();
@@ -265,20 +261,6 @@ public class CTFTrace implements IDefinitionScope {
}
/**
- * Gets an index for a given StreamInput
- *
- * @param id
- * the StreamInput
- * @return The index
- */
- StreamInputPacketIndex getIndex(StreamInput id) {
- if (!indexes.containsKey(id)) {
- indexes.put(id, new StreamInputPacketIndex());
- }
- return indexes.get(id);
- }
-
- /**
* Gets an event Declaration hashmap for a given StreamInput
*
* @param id
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/ctf/core/trace/StreamInput.java
index dc98260..54827b5 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/ctf/core/trace/StreamInput.java
@@ -99,7 +99,7 @@ public class StreamInput implements IDefinitionScope {
this.stream = stream;
this.fileChannel = fileChannel;
this.file = file;
- this.index = stream.getTrace().getIndex(this);
+ this.index = new StreamInputPacketIndex();
}
// ------------------------------------------------------------------------