Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancois Chouinard2012-04-03 19:42:19 +0000
committerFrancois Chouinard2012-04-03 19:44:46 +0000
commitaf7f202aa2e48df28b88cd409cd4d7044c78c732 (patch)
treebdcd94d8db7f624cd13b6667d2a64bd6fbe56ca3 /lttng/org.eclipse.linuxtools.lttng.core
parentee2172087f6e4e2704ed5b59a29adce42b6b203d (diff)
downloadorg.eclipse.linuxtools-af7f202aa2e48df28b88cd409cd4d7044c78c732.tar.gz
org.eclipse.linuxtools-af7f202aa2e48df28b88cd409cd4d7044c78c732.tar.xz
org.eclipse.linuxtools-af7f202aa2e48df28b88cd409cd4d7044c78c732.zip
Update TmfTrace as per ITmfTrace
Diffstat (limited to 'lttng/org.eclipse.linuxtools.lttng.core')
-rw-r--r--lttng/org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/internal/lttng/core/trace/LTTngTrace.java65
1 files changed, 26 insertions, 39 deletions
diff --git a/lttng/org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/internal/lttng/core/trace/LTTngTrace.java b/lttng/org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/internal/lttng/core/trace/LTTngTrace.java
index d7f7ca9bed..a373f9cf3f 100644
--- a/lttng/org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/internal/lttng/core/trace/LTTngTrace.java
+++ b/lttng/org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/internal/lttng/core/trace/LTTngTrace.java
@@ -97,8 +97,6 @@ public class LTTngTrace extends TmfTrace<LttngEvent> {
private String traceLibPath;
- private long fStreamingInterval = 0;
-
public LTTngTrace() {
}
@@ -235,14 +233,6 @@ public class LTTngTrace extends TmfTrace<LttngEvent> {
thread.start();
}
- /* (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.trace.TmfTrace#getStreamingInterval()
- */
- @Override
- public long getStreamingInterval() {
- return fStreamingInterval;
- }
-
/**
* Default Constructor.
* <p>
@@ -319,42 +309,39 @@ public class LTTngTrace extends TmfTrace<LttngEvent> {
@Override
public synchronized LTTngTrace clone() {
LTTngTrace clone = null;
+ clone = (LTTngTrace) super.clone();
try {
- clone = (LTTngTrace) super.clone();
- try {
- clone.currentJniTrace = JniTraceFactory.getJniTrace(getPath(), getTraceLibPath(),
- SHOW_LTT_DEBUG_DEFAULT);
- } catch (JniException e) {
- // e.printStackTrace();
- }
+ clone.currentJniTrace = JniTraceFactory.getJniTrace(getPath(), getTraceLibPath(),
+ SHOW_LTT_DEBUG_DEFAULT);
+ } catch (JniException e) {
+ // e.printStackTrace();
+ }
- // Export all the event types from the JNI side
- clone.traceTypes = new HashMap<Integer, LttngEventType>();
- clone.traceTypeNames = new Vector<Integer>();
- clone.initialiseEventTypes(clone.currentJniTrace);
+ // Export all the event types from the JNI side
+ clone.traceTypes = new HashMap<Integer, LttngEventType>();
+ clone.traceTypeNames = new Vector<Integer>();
+ clone.initialiseEventTypes(clone.currentJniTrace);
- // Verify that all those "default constructor" are safe to use
- clone.eventTimestamp = new LttngTimestamp();
- clone.eventSource = ""; //$NON-NLS-1$
- clone.eventType = new LttngEventType();
- clone.eventContent = new LttngEventContent(clone.currentLttngEvent);
- clone.eventReference = getName();
+ // Verify that all those "default constructor" are safe to use
+ clone.eventTimestamp = new LttngTimestamp();
+ clone.eventSource = ""; //$NON-NLS-1$
+ clone.eventType = new LttngEventType();
+ clone.eventContent = new LttngEventContent(clone.currentLttngEvent);
+ clone.eventReference = getName();
- // Create the skeleton event
- clone.currentLttngEvent = new LttngEvent(this, clone.eventTimestamp, clone.eventSource, clone.eventType,
- clone.eventContent, clone.eventReference, null);
+ // Create the skeleton event
+ clone.currentLttngEvent = new LttngEvent(this, clone.eventTimestamp, clone.eventSource, clone.eventType,
+ clone.eventContent, clone.eventReference, null);
- // Create a new current location
- clone.previousLocation = new LttngLocation();
+ // Create a new current location
+ clone.previousLocation = new LttngLocation();
- // Set the currentEvent to the eventContent
- clone.eventContent.setEvent(clone.currentLttngEvent);
+ // Set the currentEvent to the eventContent
+ clone.eventContent.setEvent(clone.currentLttngEvent);
- // Set the start time of the trace
- setTimeRange(new TmfTimeRange(new LttngTimestamp(clone.currentJniTrace.getStartTime().getTime()),
- new LttngTimestamp(clone.currentJniTrace.getEndTime().getTime())));
- } catch (CloneNotSupportedException e) {
- }
+ // Set the start time of the trace
+ setTimeRange(new TmfTimeRange(new LttngTimestamp(clone.currentJniTrace.getStartTime().getTime()),
+ new LttngTimestamp(clone.currentJniTrace.getEndTime().getTime())));
return clone;
}

Back to the top