*******************************************************************************/
import java.util.ArrayList;
+
+import org.eclipse.linuxtools.internal.lttng.jni.common.JniTime;
import org.eclipse.linuxtools.lttng.jni.JniEvent;
import org.eclipse.linuxtools.lttng.jni.JniMarkerField;
import org.eclipse.linuxtools.lttng.jni.JniTrace;
-import org.eclipse.linuxtools.lttng.jni.common.JniTime;
import org.eclipse.linuxtools.lttng.jni.factory.JniTraceFactory;
import java.util.List;
import java.util.Set;
+import org.eclipse.linuxtools.internal.lttng.jni.exception.JniException;
import org.eclipse.linuxtools.lttng.jni.JniEvent;
import org.eclipse.linuxtools.lttng.jni.JniMarker;
import org.eclipse.linuxtools.lttng.jni.JniMarkerField;
import org.eclipse.linuxtools.lttng.jni.JniTrace;
-import org.eclipse.linuxtools.lttng.jni.exception.JniException;
import org.eclipse.linuxtools.lttng.jni.factory.JniTraceFactory;
import junit.framework.TestCase;
+import org.eclipse.linuxtools.internal.lttng.jni.common.JniTime;
+import org.eclipse.linuxtools.internal.lttng.jni.exception.JniException;
import org.eclipse.linuxtools.lttng.jni.JniEvent;
import org.eclipse.linuxtools.lttng.jni.JniTracefile;
-import org.eclipse.linuxtools.lttng.jni.common.JniTime;
-import org.eclipse.linuxtools.lttng.jni.exception.JniException;
import org.eclipse.linuxtools.lttng.jni.factory.JniTraceFactory;
@SuppressWarnings("nls")
import junit.framework.TestCase;
+import org.eclipse.linuxtools.internal.lttng.jni.exception.JniException;
import org.eclipse.linuxtools.lttng.jni.JniEvent;
import org.eclipse.linuxtools.lttng.jni.JniMarker;
import org.eclipse.linuxtools.lttng.jni.JniMarkerField;
-import org.eclipse.linuxtools.lttng.jni.exception.JniException;
import org.eclipse.linuxtools.lttng.jni.factory.JniTraceFactory;
/*
import junit.framework.TestCase;
+import org.eclipse.linuxtools.internal.lttng.jni.exception.JniException;
import org.eclipse.linuxtools.lttng.jni.JniEvent;
import org.eclipse.linuxtools.lttng.jni.JniMarker;
-import org.eclipse.linuxtools.lttng.jni.exception.JniException;
import org.eclipse.linuxtools.lttng.jni.factory.JniTraceFactory;
/*
package org.eclipse.linuxtools.lttng.core.tests.jni;
+import org.eclipse.linuxtools.internal.lttng.jni.common.JniTime;
+import org.eclipse.linuxtools.internal.lttng.jni.exception.JniException;
import org.eclipse.linuxtools.lttng.jni.JniEvent;
import org.eclipse.linuxtools.lttng.jni.JniTrace;
-import org.eclipse.linuxtools.lttng.jni.common.JniTime;
-import org.eclipse.linuxtools.lttng.jni.exception.JniException;
import org.eclipse.linuxtools.lttng.jni.factory.JniTraceFactory;
import junit.framework.TestCase;
import junit.framework.TestCase;
+import org.eclipse.linuxtools.internal.lttng.jni.common.JniTime;
+import org.eclipse.linuxtools.internal.lttng.jni.exception.JniException;
import org.eclipse.linuxtools.lttng.jni.JniTrace;
import org.eclipse.linuxtools.lttng.jni.JniTracefile;
-import org.eclipse.linuxtools.lttng.jni.common.JniTime;
-import org.eclipse.linuxtools.lttng.jni.exception.JniException;
import org.eclipse.linuxtools.lttng.jni.factory.JniTraceFactory;
/*
import org.eclipse.linuxtools.internal.lttng.core.event.LttngTimestamp;
import org.eclipse.linuxtools.internal.lttng.core.exceptions.LttngException;
import org.eclipse.linuxtools.internal.lttng.core.tracecontrol.utility.LiveTraceManager;
+import org.eclipse.linuxtools.internal.lttng.jni.common.JniTime;
+import org.eclipse.linuxtools.internal.lttng.jni.exception.JniException;
import org.eclipse.linuxtools.lttng.jni.JniEvent;
import org.eclipse.linuxtools.lttng.jni.JniMarker;
import org.eclipse.linuxtools.lttng.jni.JniTrace;
import org.eclipse.linuxtools.lttng.jni.JniTracefile;
-import org.eclipse.linuxtools.lttng.jni.common.JniTime;
-import org.eclipse.linuxtools.lttng.jni.exception.JniException;
import org.eclipse.linuxtools.lttng.jni.factory.JniTraceFactory;
import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
import org.eclipse.linuxtools.tmf.core.event.TmfEvent;
*******************************************************************************/
import org.eclipse.linuxtools.internal.lttng.core.exceptions.LttngException;
-import org.eclipse.linuxtools.lttng.jni.exception.JniTraceVersionException;
+import org.eclipse.linuxtools.internal.lttng.jni.exception.JniTraceVersionException;
import org.eclipse.linuxtools.lttng.jni.factory.JniTraceVersion;
/**
Bundle-SymbolicName: org.eclipse.linuxtools.lttng.jni
Bundle-Version: 0.5.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Export-Package: org.eclipse.linuxtools.lttng.jni,
- org.eclipse.linuxtools.lttng.jni.common,
- org.eclipse.linuxtools.lttng.jni.exception,
- org.eclipse.linuxtools.lttng.jni.factory,
- org.eclipse.linuxtools.lttng.jni_v2_3,
- org.eclipse.linuxtools.lttng.jni_v2_5
+Export-Package: org.eclipse.linuxtools.internal.lttng.jni.common;x-friends:="org.eclipse.linuxtools.lttng.core,org.eclipse.linuxtools.lttng.core.tests",
+ org.eclipse.linuxtools.internal.lttng.jni.exception;x-friends:="org.eclipse.linuxtools.lttng.core,org.eclipse.linuxtools.lttng.core.tests",
+ org.eclipse.linuxtools.internal.lttng.jni_v2_3;x-internal:=true,
+ org.eclipse.linuxtools.internal.lttng.jni_v2_5;x-internal:=true,
+ org.eclipse.linuxtools.lttng.jni;x-friends:="org.eclipse.linuxtools.lttng.core,org.eclipse.linuxtools.lttng.core.tests",
+ org.eclipse.linuxtools.lttng.jni.factory;x-friends:="org.eclipse.linuxtools.lttng.core,org.eclipse.linuxtools.lttng.core.tests"
Bundle-Localization: plugin
Bundle-Vendor: %Bundle-Vendor
Require-Bundle: org.eclipse.core.runtime
--- /dev/null
+package org.eclipse.linuxtools.internal.lttng.jni.common;
+/*******************************************************************************
+ * Copyright (c) 2009 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * William Bourque (wbourque@gmail.com) - Initial API and implementation
+ *******************************************************************************/
+
+/**
+ * <b><u>JniTime</u></b>
+ * <p>
+ * Used to store (event, trace, tracefile, ...) timestamp.
+ *
+ * Mimic the behavior of the LttTime C structure.
+ */
+public class JniTime extends Jni_C_Constant implements Comparable<JniTime>
+{
+ private long time = 0;
+
+ /**
+ * Default constructor.<p>
+ *
+ * Note : Time will be set to 0.
+ *
+ */
+ public JniTime() {
+ time = 0;
+ }
+
+ /**
+ * Copy constructor.
+ *
+ * @param oldTime Reference to the JniTime you want to copy.
+ */
+ public JniTime(JniTime oldTime) {
+ time = oldTime.getTime();
+ }
+
+ /**
+ * Constructor with parameters.<p>
+ *
+ * "LTT style" constructor with Seconds et Nanoseconds
+ *
+ * @param newSec Seconds of the JniTime
+ * @param newNanoSec Nanoseconds of the JniTime
+ */
+ public JniTime(long newSec, long newNanoSec) {
+ time = (newSec * NANO) + newNanoSec;
+ }
+
+ /**
+ * Constructor with parameters.<p>
+ *
+ * Usual "nanosecond only" constructor.
+ *
+ * @param newNanoSecTime Time in nanoseconds
+ */
+ public JniTime(long newNanoSecTime) {
+ time = newNanoSecTime;
+ }
+
+ /**
+ * Second of the time.<p>
+ *
+ * Returns seconds, i.e. multiple of 1 000 000, of the stored nanoseconds time.
+ *
+ * @return Second of this time.
+ */
+ public long getSeconds() {
+ return (time / NANO);
+ }
+
+ /**
+ * Getter for the nanosecond of the time.<p>
+ *
+ * Returns nanoseconds part, i.e. modulo of 1 000 000, of the stored nanoseconds time.
+ *
+ * @return Nanoseconds of this time
+ */
+ public long getNanoSeconds() {
+ return time % NANO;
+ }
+
+ /**
+ * Full time, in nanoseconds.<p>
+ *
+ * @return Complete time in nanoseconds
+ */
+ public long getTime() {
+ return time;
+ }
+
+ /**
+ * Changes the current time for this object<p>
+ *
+ * @param newTime New time to set, in nanoseconds.
+ */
+ public void setTime(long newTime) {
+ time = newTime;
+ }
+
+ /*
+ * Populate this time object
+ *
+ * Note: This function is called from C side.
+ *
+ * @param newTime The time we want to populate
+ */
+ @SuppressWarnings("unused")
+ private void setTimeFromC(long newTime) {
+ time = newTime;
+ }
+
+ /**
+ * Comparaison operator smaller or equal than "<=" .<p>
+ *
+ * @param comparedTime The time we want to compare with this one
+ *
+ * @return true if compared time is smaller or equal, false otherwise
+ */
+ public boolean isSmallerOrEqual(JniTime comparedTime) {
+
+ // NOTE : We check <= instead of just <
+ // This mean the LEFT OPERAND (comparedTime) always prevails
+ if (this.getTime() <= comparedTime.getTime() ) {
+ return true;
+ }
+ else {
+ return false;
+ }
+ }
+
+ /**
+ * compareTo operator.<p>
+ *
+ * @param right The time we want to compare with this one
+ *
+ * @return int of value -1, 0 or 1, as the pased argument is bigger, equal or smaller than this time
+ */
+ @Override
+ public int compareTo(JniTime right) {
+ long leftTime = this.getTime();
+ long rightTime = right.getTime();
+
+ if ( leftTime < rightTime ) {
+ return -1;
+ }
+ else if ( leftTime > rightTime ) {
+ return 1;
+ }
+ else {
+ return 0;
+ }
+ }
+
+ /**
+ * faster equals since it is called very often
+ * @param other the object to the right of this
+ * @return true if the times are the same, false otherwise.
+ */
+ public boolean equals(JniTime other) {
+ return ((other != null) && (this.time == other.time));
+ }
+
+ /**
+ * Overridden equals for JniTime type
+ *
+ * @param The object we want to compare too
+ *
+ * @return true if the time is the same, false otherwise.
+ */
+ @Override
+ public boolean equals(Object obj) {
+ if (obj instanceof JniTime) {
+ return (((JniTime) obj).time == this.time);
+ }
+ return false;
+ }
+
+ /**
+ * Overridden hash code for JniTime type
+ *
+ */
+ @Override
+ public int hashCode() {
+ return this.toString().hashCode();
+ }
+
+
+ /**
+ * toString() method.
+ * <u>Intended to debug</u><p>
+ *
+ * NOTE : We output the time in the same format as LTT (seconds and nanosecond separatly)
+ *
+ * @return String Attributes of the object concatenated in String
+ */
+ @Override
+ @SuppressWarnings("nls")
+ public String toString() {
+ String returnData = "";
+
+ returnData += "seconds : " + this.getSeconds() + "\n";
+ returnData += "nanoSeconds : " + this.getNanoSeconds() + "\n";
+
+ return returnData;
+ }
+}
--- /dev/null
+package org.eclipse.linuxtools.internal.lttng.jni.common;
+/*******************************************************************************
+ * Copyright (c) 2009 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * William Bourque (wbourque@gmail.com) - Initial API and implementation
+ *******************************************************************************/
+
+/**
+ * <b><u>Jni_C_Common</u></b>
+ * <p>
+ * Common constants and methods that should be shared between JNI objects.<p>
+ *
+ * This class is abstract and is intended to be extended by LTTng modules that need the constants.
+ */
+public abstract class Jni_C_Constant {
+
+ // Needed for native types
+ public static final int NULL = 0;
+
+ // C errno correspondance. Used to interpret LTT return value
+ public static final int EOK = 0;
+ public static final int EPERM = 1;
+ public static final int ERANGE = 34;
+
+ // Timestamps are in nanoseconds, this const ease up the math
+ public static final long NANO = 1000000000;
+
+ /**
+ * Default constructor
+ */
+ public Jni_C_Constant() {
+ }
+
+ /**
+ * "Alternate" .toString()<p>
+ *
+ * Simulates the way Java Object implements "toString()"
+ *
+ * @return The Java hashed UID of the object (i.e. : NAME@HASH)
+ */
+ @SuppressWarnings("nls")
+ public String getReferenceToString() {
+ return this.getClass().getName() + "@" + Integer.toHexString(this.hashCode());
+ }
+}
\ No newline at end of file
--- /dev/null
+package org.eclipse.linuxtools.internal.lttng.jni.common;
+/*******************************************************************************
+ * Copyright (c) 2009 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * William Bourque (wbourque@gmail.com) - Initial API and implementation
+ *******************************************************************************/
+
+/**
+ * <b><u>Jni_C_Pointer</u></b>
+ * <p>
+ * Class pointer to handle properly "C pointer" <p>
+ *
+ * Can transparently handle pointer of 32 or 64 bits.
+ */
+public class Jni_C_Pointer extends Jni_C_Constant {
+
+ protected long ptr = NULL;
+ protected boolean isLong = true;
+
+ /**
+ * Default constructor.<p>
+ *
+ * Note : Pointer will be set to a 64bits "NULL".
+ */
+ public Jni_C_Pointer() {
+ ptr = NULL;
+ }
+
+ /**
+ * Constructor with parameters for 64bits pointers.
+ *
+ * @param newPtr long-converted (64 bits) C pointer.
+ */
+ public Jni_C_Pointer(long newPtr) {
+ ptr = newPtr;
+ isLong = true;
+ }
+
+ /**
+ * Constructor with parameters for 32bits pointers.
+ *
+ * @param newPtr int-converted (32 bits) C pointer.
+ */
+ public Jni_C_Pointer(int newPtr) {
+ ptr = (long)newPtr;
+ isLong = false;
+ }
+
+ /**
+ * Get the current pointer.
+ *
+ * @return The current pointer, in long.
+ */
+ public long getPointer() {
+ return ptr;
+ }
+
+ /**
+ * Set the pointer, as a 64bits pointer.
+ *
+ * @param newPtr long-converted (64 bits) C pointer.
+ */
+ public void setPointer(long newPtr) {
+ ptr = newPtr;
+ isLong = true;
+ }
+
+ /**
+ * Set the pointer, as a 64bits pointer.
+ *
+ * @param newPtr int-converted (32 bits) C pointer.
+ */
+ public void setPointer(int newPtr) {
+ ptr = newPtr;
+ isLong = false;
+ }
+
+ /**
+ * toString() method. <p>
+ *
+ * Convert the pointer to a nice looking int/long hexadecimal format.
+ *
+ * @return Attributes of the object concatenated in String
+ */
+ @Override
+ @SuppressWarnings("nls")
+ public String toString() {
+ String returnData = "0x";
+
+ if (isLong == true) {
+ returnData += Long.toHexString(ptr);
+ }
+ else {
+ returnData += Integer.toHexString((int) ptr);
+ }
+
+ return returnData;
+ }
+}
--- /dev/null
+package org.eclipse.linuxtools.internal.lttng.jni.common;
+
+public class Jni_C_Pointer_And_Library_Id extends Jni_C_Pointer {
+
+ // *** Library Id
+ // Needed to know which library we need to make our functions call in case several are loaded
+ // This make possible to use several different trace version at the same time
+ private int libraryId = -1;
+
+ /**
+ * Default constructor.<p>
+ *
+ * Note : Pointer will be set to a 64bits "NULL" and Id -1.
+ */
+ public Jni_C_Pointer_And_Library_Id() {
+ super();
+ libraryId = -1;
+ }
+
+ /**
+ * Constructor with parameters for 64bits pointers and library handle id.
+ *
+ * @param newPtr long-converted (64 bits) C pointer.
+ * @param newHandle a valid library id as int
+ */
+ public Jni_C_Pointer_And_Library_Id(int newId, long newPtr) {
+ super(newPtr);
+ libraryId = newId;
+ }
+
+ /**
+ * Constructor with parameters for 32bits pointers and library handle id.
+ *
+ * @param newPtr int-converted (32 bits) C pointer.
+ * @param newHandle a valid library id as int
+ */
+ public Jni_C_Pointer_And_Library_Id(int newId, int newPtr) {
+ super(newPtr);
+ libraryId = newId;
+ }
+
+ /**
+ * Copy constructor.<p>
+ *
+ * @param oldPointerAndId The old object to copy from.
+ */
+ public Jni_C_Pointer_And_Library_Id(Jni_C_Pointer_And_Library_Id oldPointerAndId) {
+ super(oldPointerAndId.ptr);
+ libraryId = oldPointerAndId.libraryId;
+ }
+
+ /**
+ * Get the library handle id currently in use.<p>
+ * Id is used to tell the C which version of the functions to call.<p>
+ *
+ * @return The current id
+ */
+ public int getLibraryId() {
+ return libraryId;
+ }
+
+ /**
+ * Set a new library id.<p>
+ * Id is used to tell the C which version of the functions to call.<p>
+ *
+ * @param newHandleId The new Id to use (must be a valid id for the C library).
+ */
+ public void setLibraryId(int newId) {
+ this.libraryId = newId;
+ }
+}
--- /dev/null
+package org.eclipse.linuxtools.internal.lttng.jni.exception;
+/*******************************************************************************
+ * Copyright (c) 2009 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * William Bourque (wbourque@gmail.com) - Initial API and implementation
+ *******************************************************************************/
+
+/**
+ * <b><u>JniEventException</u></b>
+ * <p>
+ * Basic exception class for the JniEvent class
+ */
+public class JniEventException extends JniException {
+ private static final long serialVersionUID = -5891749130387304519L;
+
+ public JniEventException(String errMsg) {
+ super(errMsg);
+ }
+}
\ No newline at end of file
--- /dev/null
+package org.eclipse.linuxtools.internal.lttng.jni.exception;
+/*******************************************************************************
+ * Copyright (c) 2009 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * William Bourque (wbourque@gmail.com) - Initial API and implementation
+ *******************************************************************************/
+
+/**
+ * <b><u>JniEventOutOfRangeException</u></b>
+ * <p>
+ * Sub-exception type for the JniEventException type
+ * This exception type will get thrown when there is no more event of this type
+ * available
+ */
+public class JniEventOutOfRangeException extends JniEventException {
+ private static final long serialVersionUID = -4645877232795324541L;
+
+ public JniEventOutOfRangeException(String errMsg) {
+ super(errMsg);
+ }
+}
+
--- /dev/null
+package org.eclipse.linuxtools.internal.lttng.jni.exception;
+/*******************************************************************************
+ * Copyright (c) 2009 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * William Bourque (wbourque@gmail.com) - Initial API and implementation
+ *******************************************************************************/
+
+
+/**
+ * <b><u>JniException</u></b>
+ * <p>
+ * Super class for JNI exception.
+ */
+public class JniException extends Exception {
+ private static final long serialVersionUID = -6620784221853154537L;
+
+ public JniException(String errMsg) {
+ super(errMsg);
+ }
+}
+
--- /dev/null
+package org.eclipse.linuxtools.internal.lttng.jni.exception;
+/*******************************************************************************
+ * Copyright (c) 2009 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * William Bourque (wbourque@gmail.com) - Initial API and implementation
+ *******************************************************************************/
+
+/**
+ * <b><u>JniMarkerException</u></b>
+ * <p>
+ * Basic Exception class for the JniMarker class
+ */
+public class JniMarkerException extends JniException {
+ private static final long serialVersionUID = -4694173610721983794L;
+
+ public JniMarkerException(String errMsg) {
+ super(errMsg);
+ }
+}
--- /dev/null
+package org.eclipse.linuxtools.internal.lttng.jni.exception;
+/*******************************************************************************
+ * Copyright (c) 2009 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * William Bourque (wbourque@gmail.com) - Initial API and implementation
+ *******************************************************************************/
+
+/**
+ * <b><u>JniMarkerFieldException</u></b>
+ * <p>
+ * Basic Exception class for the JniMarkerField class
+ */
+public class JniMarkerFieldException extends JniException {
+ private static final long serialVersionUID = 6066381741374806879L;
+
+ public JniMarkerFieldException(String errMsg) {
+ super(errMsg);
+ }
+}
--- /dev/null
+package org.eclipse.linuxtools.internal.lttng.jni.exception;
+/*******************************************************************************
+ * Copyright (c) 2009 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * William Bourque (wbourque@gmail.com) - Initial API and implementation
+ *******************************************************************************/
+
+/**
+ * <b><u>JniNoNextEventInTraceException</u></b>
+ * <p>
+ * Sub-exception class type for JniTraceException
+ * This type will get thrown when we can't find any "next" event
+ * This should usually mean there is no more event in the trace
+
+ */
+public class JniNoNextEventInTraceException extends JniTraceException {
+ private static final long serialVersionUID = -2887528566100063849L;
+
+ public JniNoNextEventInTraceException(String errMsg) {
+ super(errMsg);
+ }
+}
--- /dev/null
+package org.eclipse.linuxtools.internal.lttng.jni.exception;
+/*******************************************************************************
+ * Copyright (c) 2009 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * William Bourque (wbourque@gmail.com) - Initial API and implementation
+ *******************************************************************************/
+
+/**
+ * <b><u>JniNoSuchEventException</u></b>
+ * <p>
+ * Sub-exception type for the JniEventException type
+ * This exception type will get thrown when an event is unavailable
+ * This might happen at construction because some events type are not present in
+ * the trace
+ */
+public class JniNoSuchEventException extends JniEventException {
+ private static final long serialVersionUID = -4379712949891538051L;
+
+ public JniNoSuchEventException(String errMsg) {
+ super(errMsg);
+ }
+}
--- /dev/null
+package org.eclipse.linuxtools.internal.lttng.jni.exception;
+/*******************************************************************************
+ * Copyright (c) 2009 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * William Bourque (wbourque@gmail.com) - Initial API and implementation
+ *******************************************************************************/
+
+/**
+ * <b><u>JniOpenTraceFailedException</u></b>
+ * <p>
+ * Sub-exception class type for JniTraceException
+ * This type will get thrown when a trace fail to open
+ * Most likely to be caused by a bad tracepath
+ */
+public class JniOpenTraceFailedException extends JniTraceException {
+ private static final long serialVersionUID = 877769692366394895L;
+
+ public JniOpenTraceFailedException(String errMsg) {
+ super(errMsg);
+ }
+}
\ No newline at end of file
--- /dev/null
+package org.eclipse.linuxtools.internal.lttng.jni.exception;
+/*******************************************************************************
+ * Copyright (c) 2009 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * William Bourque (wbourque@gmail.com) - Initial API and implementation
+ *******************************************************************************/
+
+/**
+ * <b><u>JniTraceException</u></b>
+ * <p>
+ * Basic exception class for the JniTrace class
+ */
+public class JniTraceException extends JniException {
+ private static final long serialVersionUID = -6873007333085268143L;
+
+ public JniTraceException(String errMsg) {
+ super(errMsg);
+ }
+}
--- /dev/null
+package org.eclipse.linuxtools.internal.lttng.jni.exception;
+/*******************************************************************************
+ * Copyright (c) 2009 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * William Bourque (wbourque@gmail.com) - Initial API and implementation
+ *******************************************************************************/
+
+/**
+ * <b><u>JniTraceVersionException</u></b>
+ * <p>
+ * Basic exception class for the JniTraceVersion class
+ */
+public class JniTraceVersionException extends JniException {
+ private static final long serialVersionUID = -5891749123457304519L;
+
+ public JniTraceVersionException(String errMsg) {
+ super(errMsg);
+ }
+}
\ No newline at end of file
--- /dev/null
+package org.eclipse.linuxtools.internal.lttng.jni.exception;
+/*******************************************************************************
+ * Copyright (c) 2009 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * William Bourque (wbourque@gmail.com) - Initial API and implementation
+ *******************************************************************************/
+
+/**
+ * <b><u>JniTracefileException</u></b>
+ * <p>
+ * Basic exception class for the JniTracefile class
+ */
+public class JniTracefileException extends JniException {
+ private static final long serialVersionUID = 5081317864491800084L;
+
+ public JniTracefileException(String errMsg) {
+ super(errMsg);
+ }
+}
--- /dev/null
+package org.eclipse.linuxtools.internal.lttng.jni.exception;
+/*******************************************************************************
+ * Copyright (c) 2009 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * William Bourque (wbourque@gmail.com) - Initial API and implementation
+ *******************************************************************************/
+
+/**
+ * <b><u>JniTracefileWithoutEventException</u></b>
+ * <p>
+ * Sub-exception class type for JniTracefileException
+ * This type will get thrown when a trace file contain no readable events
+ * The proper course of action would usually be to ignore this useless trace file
+ */
+public class JniTracefileWithoutEventException extends JniTracefileException {
+ private static final long serialVersionUID = -8183967479236071261L;
+
+ public JniTracefileWithoutEventException(String errMsg) {
+ super(errMsg);
+ }
+}
--- /dev/null
+package org.eclipse.linuxtools.internal.lttng.jni_v2_3;
+/*******************************************************************************
+ * Copyright (c) 2009 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * William Bourque (wbourque@gmail.com) - Initial API and implementation
+ *******************************************************************************/
+
+import java.util.HashMap;
+
+import org.eclipse.linuxtools.internal.lttng.jni.common.Jni_C_Pointer_And_Library_Id;
+import org.eclipse.linuxtools.internal.lttng.jni.exception.JniException;
+import org.eclipse.linuxtools.lttng.jni.JniEvent;
+import org.eclipse.linuxtools.lttng.jni.JniMarker;
+import org.eclipse.linuxtools.lttng.jni.JniTracefile;
+
+/**
+ * <b><u>JniEvent_v2_3</u></b>
+ * <p>
+ * JniEvent version to support Lttng traceformat of version 2.3<br>
+ * This class extend abstract class JniEvent with (possibly) version specific implementation.<br>
+ * <p>
+ */
+public class JniEvent_v2_3 extends JniEvent {
+
+ /*
+ * Forbid access to the default constructor
+ */
+ protected JniEvent_v2_3() {
+ super();
+ }
+
+ public JniEvent_v2_3(JniEvent_v2_3 oldEvent) {
+ super(oldEvent);
+ }
+
+ public JniEvent_v2_3(Jni_C_Pointer_And_Library_Id newEventPtr, HashMap<Integer, JniMarker> newMarkersMap, JniTracefile newParentTracefile) throws JniException {
+ super(newEventPtr, newMarkersMap, newParentTracefile);
+ }
+
+}
--- /dev/null
+package org.eclipse.linuxtools.internal.lttng.jni_v2_3;
+/*******************************************************************************
+ * Copyright (c) 2009 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * William Bourque (wbourque@gmail.com) - Initial API and implementation
+ *******************************************************************************/
+
+import org.eclipse.linuxtools.internal.lttng.jni.common.Jni_C_Pointer_And_Library_Id;
+import org.eclipse.linuxtools.internal.lttng.jni.exception.JniException;
+import org.eclipse.linuxtools.lttng.jni.JniMarkerField;
+
+/**
+ * <b><u>JniMarkerField_v2_3</u></b>
+ * <p>
+ * JniMarkerField version to support Lttng traceformat of version 2.3<br>
+ * This class extend abstract class JniMarkerField with (possibly) version specific implementation.<br>
+ * <p>
+ */
+public class JniMarkerField_v2_3 extends JniMarkerField {
+
+ /*
+ * Forbid access to the default constructor
+ */
+ protected JniMarkerField_v2_3() {
+ super();
+ }
+
+
+ public JniMarkerField_v2_3(JniMarkerField_v2_3 oldMarkerField) {
+ super(oldMarkerField);
+ }
+
+ public JniMarkerField_v2_3(Jni_C_Pointer_And_Library_Id newMarkerFieldPtr) throws JniException {
+ super(newMarkerFieldPtr);
+ }
+}
--- /dev/null
+package org.eclipse.linuxtools.internal.lttng.jni_v2_3;
+/*******************************************************************************
+ * Copyright (c) 2009 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * William Bourque (wbourque@gmail.com) - Initial API and implementation
+ *******************************************************************************/
+
+import org.eclipse.linuxtools.internal.lttng.jni.common.Jni_C_Pointer_And_Library_Id;
+import org.eclipse.linuxtools.internal.lttng.jni.exception.JniException;
+import org.eclipse.linuxtools.lttng.jni.JniMarker;
+import org.eclipse.linuxtools.lttng.jni.JniMarkerField;
+
+/**
+ * <b><u>JniMarker_v2_3</u></b>
+ * <p>
+ * JniMarker version to support Lttng traceformat of version 2.3<br>
+ * This class extend abstract class JniMarker with (possibly) version specific implementation.<br>
+ * <p>
+ */
+public class JniMarker_v2_3 extends JniMarker {
+
+ /*
+ * Forbid access to the default constructor
+ */
+ protected JniMarker_v2_3() {
+ super();
+ }
+
+
+ public JniMarker_v2_3(JniMarker_v2_3 oldMarker) {
+ super(oldMarker);
+ }
+
+ public JniMarker_v2_3(Jni_C_Pointer_And_Library_Id newMarkerPtr) throws JniException {
+ super(newMarkerPtr);
+ }
+
+
+ /**
+ * Allocate (call constructor for) a new JniMarkerField.<p>
+ *
+ * This method is made to bypass limitation related to abstract class, see comment in JniMarker
+ *
+ * @return JniMarkerField a newly allocated JniMarkerField
+ *
+ * @see org.eclipse.linuxtools.lttng.jni.JniMarker
+ */
+ @Override
+ public JniMarkerField allocateNewJniMarkerField(Jni_C_Pointer_And_Library_Id newMarkerFieldPtr) throws JniException {
+ return new JniMarkerField_v2_3(newMarkerFieldPtr);
+ }
+
+}
--- /dev/null
+package org.eclipse.linuxtools.internal.lttng.jni_v2_3;
+/*******************************************************************************
+ * Copyright (c) 2009 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * William Bourque (wbourque@gmail.com) - Initial API and implementation
+ *******************************************************************************/
+
+import org.eclipse.linuxtools.lttng.jni.JniParser;
+
+/**
+ * <b><u>JniParser_v2_3</u></b>
+ * <p>
+ * JniParser version to support Lttng traceformat of version 2.3<br>
+ * This class extend abstract class JniParser with (possibly) version specific implementation.<br>
+ * <p>
+ */
+public class JniParser_v2_3 extends JniParser {
+
+ /*
+ * Forbid access to the default constructor
+ */
+ protected JniParser_v2_3() {
+ super();
+ }
+}
--- /dev/null
+package org.eclipse.linuxtools.internal.lttng.jni_v2_3;
+/*******************************************************************************
+ * Copyright (c) 2009, 2011 Ericsson, MontaVista Software
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * William Bourque (wbourque@gmail.com) - Initial API and implementation
+ * Yufen Kuo (ykuo@mvista.com) - add support to allow user specify trace library path
+ * Yufen Kuo (ykuo@mvista.com) - bug 340341: handle gracefully when native library failed to initialize
+ *******************************************************************************/
+
+import org.eclipse.linuxtools.internal.lttng.jni.common.Jni_C_Pointer_And_Library_Id;
+import org.eclipse.linuxtools.internal.lttng.jni.exception.JniException;
+import org.eclipse.linuxtools.lttng.jni.JniTrace;
+import org.eclipse.linuxtools.lttng.jni.JniTracefile;
+
+/**
+ * <b><u>JniTrace_v2_3</u></b>
+ * <p>
+ * JniTrace version to support Lttng traceformat of version 2.3.<br>
+ * This class extend abstract class JniTrace with (possibly) version specific implementation.<br>
+ *
+ * It also make sure the correct library is loaded by liblttvlibraryloader.so
+ * <p>
+ */
+public class JniTrace_v2_3 extends JniTrace {
+
+ // This is the dynamic library name that is passed to the library loader (liblttvlibraryloader.so) to load.
+ // It needs to be a complete name, like "libXYZ.so", unlike java that would take "XYZ". It could also take a complete path.
+ // The library need to be accessible, i.e. LD_LIBRARY_PATH need to be set correctly.
+ private static final String LIBRARY_NAME = "liblttvtraceread-2.3.so"; //$NON-NLS-1$
+
+ /*
+ * Forbid access to the default constructor
+ */
+ protected JniTrace_v2_3() {
+ super();
+ }
+
+
+ public JniTrace_v2_3(String newpath) throws JniException {
+ super(newpath);
+ }
+
+ public JniTrace_v2_3(String newpath, boolean newPrintDebug) throws JniException {
+ super(newpath, newPrintDebug);
+ }
+
+
+ public JniTrace_v2_3(JniTrace_v2_3 oldTrace) {
+ super(oldTrace);
+ }
+
+ public JniTrace_v2_3(Jni_C_Pointer_And_Library_Id newPtr, boolean newPrintDebug) throws JniException {
+ super(newPtr, newPrintDebug);
+ }
+
+ /**
+ * Get the trace library name
+ * <p>
+ *
+ * Get the version specific native trace library name
+ *
+ * @return The native trace library name
+ */
+ @Override
+ public String getTraceLibName() {
+ return LIBRARY_NAME;
+ }
+
+ /**
+ * Allocate (call constructor for) a new JniTracefile.<p>
+ *
+ * This method is made to bypass limitation related to abstract class, see comment in JniTrace
+ *
+ * @return JniTracefile a newly allocated JniTracefile
+ *
+ * @see org.eclipse.linuxtools.lttng.jni.JniTrace
+ */
+ @Override
+ public JniTracefile allocateNewJniTracefile(Jni_C_Pointer_And_Library_Id newPtr, JniTrace newParentTrace) throws JniException {
+ return new JniTracefile_v2_3(newPtr, newParentTrace);
+ }
+
+}
--- /dev/null
+package org.eclipse.linuxtools.internal.lttng.jni_v2_3;
+/*******************************************************************************
+ * Copyright (c) 2009 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * William Bourque (wbourque@gmail.com) - Initial API and implementation
+ *******************************************************************************/
+
+import java.util.HashMap;
+
+import org.eclipse.linuxtools.internal.lttng.jni.common.Jni_C_Pointer_And_Library_Id;
+import org.eclipse.linuxtools.internal.lttng.jni.exception.JniException;
+import org.eclipse.linuxtools.lttng.jni.JniEvent;
+import org.eclipse.linuxtools.lttng.jni.JniMarker;
+import org.eclipse.linuxtools.lttng.jni.JniTrace;
+import org.eclipse.linuxtools.lttng.jni.JniTracefile;
+
+/**
+ * <b><u>JniTracefile_v2_3</u></b>
+ * <p>
+ * JniTracefile version to support Lttng traceformat of version 2.3<br>
+ * This class extend abstract class JniTracefile with (possibly) version specific implementation.<br>
+ * <p>
+ */
+public class JniTracefile_v2_3 extends JniTracefile {
+
+ /*
+ * Forbid access to the default constructor
+ */
+ protected JniTracefile_v2_3() {
+ super();
+ }
+
+
+ public JniTracefile_v2_3(JniTracefile_v2_3 oldTracefile) {
+ super(oldTracefile);
+ }
+
+ public JniTracefile_v2_3(Jni_C_Pointer_And_Library_Id newPtr, JniTrace newParentTrace) throws JniException {
+ super(newPtr, newParentTrace);
+ }
+
+
+ /**
+ * Allocate (call constructor for) a new JniEvent.<p>
+ *
+ * This method is made to bypass limitation related to abstract class, see comment in JniTracefile
+ *
+ * @return JniEvent a newly allocated JniEvent
+ *
+ * @see org.eclipse.linuxtools.lttng.jni.JniTracefile
+ */
+ @Override
+ public JniEvent allocateNewJniEvent(Jni_C_Pointer_And_Library_Id newEventPtr, HashMap<Integer, JniMarker> newMarkersMap, JniTracefile newParentTracefile) throws JniException {
+ return new JniEvent_v2_3(newEventPtr, newMarkersMap, newParentTracefile);
+ }
+
+
+ /**
+ * Allocate (call constructor for) a new JniMarker.<p>
+ *
+ * This method is made to bypass limitation related to abstract class, see comment in JniTracefile
+ *
+ * @return JniMarker a newly allocated JniMarker
+ *
+ * @see org.eclipse.linuxtools.lttng.jni.JniTracefile
+ */
+ @Override
+ public JniMarker allocateNewJniMarker(Jni_C_Pointer_And_Library_Id newMarkerPtr) throws JniException {
+ return new JniMarker_v2_3(newMarkerPtr);
+ }
+}
--- /dev/null
+package org.eclipse.linuxtools.internal.lttng.jni_v2_5;
+/*******************************************************************************
+ * Copyright (c) 2009 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * William Bourque (wbourque@gmail.com) - Initial API and implementation
+ *******************************************************************************/
+
+import java.util.HashMap;
+
+import org.eclipse.linuxtools.internal.lttng.jni.common.Jni_C_Pointer_And_Library_Id;
+import org.eclipse.linuxtools.internal.lttng.jni.exception.JniException;
+import org.eclipse.linuxtools.lttng.jni.JniEvent;
+import org.eclipse.linuxtools.lttng.jni.JniMarker;
+import org.eclipse.linuxtools.lttng.jni.JniTracefile;
+
+/**
+ * <b><u>JniEvent_v2_5</u></b>
+ * <p>
+ * JniEvent version to support Lttng traceformat of version 2.5<br>
+ * This class extend abstract class JniEvent with (possibly) version specific implementation.<br>
+ * <p>
+ */
+public class JniEvent_v2_5 extends JniEvent {
+
+ /*
+ * Forbid access to the default constructor
+ */
+ protected JniEvent_v2_5() {
+ super();
+ }
+
+ public JniEvent_v2_5(JniEvent_v2_5 oldEvent) {
+ super(oldEvent);
+ }
+
+ public JniEvent_v2_5(Jni_C_Pointer_And_Library_Id newEventPtr, HashMap<Integer, JniMarker> newMarkersMap, JniTracefile newParentTracefile) throws JniException {
+ super(newEventPtr, newMarkersMap, newParentTracefile);
+ }
+
+}
--- /dev/null
+package org.eclipse.linuxtools.internal.lttng.jni_v2_5;
+/*******************************************************************************
+ * Copyright (c) 2009 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * William Bourque (wbourque@gmail.com) - Initial API and implementation
+ *******************************************************************************/
+
+import org.eclipse.linuxtools.internal.lttng.jni.common.Jni_C_Pointer_And_Library_Id;
+import org.eclipse.linuxtools.internal.lttng.jni.exception.JniException;
+import org.eclipse.linuxtools.lttng.jni.JniMarkerField;
+
+/**
+ * <b><u>JniMarkerField_v2_5</u></b>
+ * <p>
+ * JniMarkerField version to support Lttng traceformat of version 2.5<br>
+ * This class extend abstract class JniMarkerField with (possibly) version specific implementation.<br>
+ * <p>
+ */
+public class JniMarkerField_v2_5 extends JniMarkerField {
+
+ /*
+ * Forbid access to the default constructor
+ */
+ protected JniMarkerField_v2_5() {
+ super();
+ }
+
+
+ public JniMarkerField_v2_5(JniMarkerField_v2_5 oldMarkerField) {
+ super(oldMarkerField);
+ }
+
+ public JniMarkerField_v2_5(Jni_C_Pointer_And_Library_Id newMarkerFieldPtr) throws JniException {
+ super(newMarkerFieldPtr);
+ }
+}
--- /dev/null
+package org.eclipse.linuxtools.internal.lttng.jni_v2_5;
+/*******************************************************************************
+ * Copyright (c) 2009 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * William Bourque (wbourque@gmail.com) - Initial API and implementation
+ *******************************************************************************/
+
+import org.eclipse.linuxtools.internal.lttng.jni.common.Jni_C_Pointer_And_Library_Id;
+import org.eclipse.linuxtools.internal.lttng.jni.exception.JniException;
+import org.eclipse.linuxtools.lttng.jni.JniMarker;
+import org.eclipse.linuxtools.lttng.jni.JniMarkerField;
+
+/**
+ * <b><u>JniMarker_v2_5</u></b>
+ * <p>
+ * JniMarker version to support Lttng traceformat of version 2.5<br>
+ * This class extend abstract class JniMarker with (possibly) version specific implementation.<br>
+ * <p>
+ */
+public class JniMarker_v2_5 extends JniMarker {
+
+ /*
+ * Forbid access to the default constructor
+ */
+ protected JniMarker_v2_5() {
+ super();
+ }
+
+
+ public JniMarker_v2_5(JniMarker_v2_5 oldMarker) {
+ super(oldMarker);
+ }
+
+ public JniMarker_v2_5(Jni_C_Pointer_And_Library_Id newMarkerPtr) throws JniException {
+ super(newMarkerPtr);
+ }
+
+
+ /**
+ * Allocate (call constructor for) a new JniMarkerField.<p>
+ *
+ * This method is made to bypass limitation related to abstract class, see comment in JniMarker
+ *
+ * @return JniMarkerField a newly allocated JniMarkerField
+ *
+ * @see org.eclipse.linuxtools.lttng.jni.JniMarker
+ */
+ @Override
+ public JniMarkerField allocateNewJniMarkerField(Jni_C_Pointer_And_Library_Id newMarkerFieldPtr) throws JniException {
+ return new JniMarkerField_v2_5(newMarkerFieldPtr);
+ }
+
+}
--- /dev/null
+package org.eclipse.linuxtools.internal.lttng.jni_v2_5;
+/*******************************************************************************
+ * Copyright (c) 2009 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * William Bourque (wbourque@gmail.com) - Initial API and implementation
+ *******************************************************************************/
+
+import org.eclipse.linuxtools.lttng.jni.JniParser;
+
+/**
+ * <b><u>JniParser_v2_5</u></b>
+ * <p>
+ * JniParser version to support Lttng traceformat of version 2.5<br>
+ * This class extend abstract class JniParser with (possibly) version specific implementation.<br>
+ * <p>
+ */
+public class JniParser_v2_5 extends JniParser {
+
+ /*
+ * Forbid access to the default constructor
+ */
+ protected JniParser_v2_5() {
+ super();
+ }
+}
--- /dev/null
+package org.eclipse.linuxtools.internal.lttng.jni_v2_5;
+/*******************************************************************************
+ * Copyright (c) 2009, 2011 Ericsson, MontaVista Software
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * William Bourque (wbourque@gmail.com) - Initial API and implementation
+ * Yufen Kuo (ykuo@mvista.com) - add support to allow user specify trace library path
+ * Yufen Kuo (ykuo@mvista.com) - bug 340341: handle gracefully when native library failed to initialize
+ *******************************************************************************/
+
+import org.eclipse.linuxtools.internal.lttng.jni.common.Jni_C_Pointer_And_Library_Id;
+import org.eclipse.linuxtools.internal.lttng.jni.exception.JniException;
+import org.eclipse.linuxtools.lttng.jni.JniTrace;
+import org.eclipse.linuxtools.lttng.jni.JniTracefile;
+
+/**
+ * <b><u>JniTrace_v2_5</u></b>
+ * <p>
+ * JniTrace version to support Lttng traceformat of version 2.5.<br>
+ * This class extend abstract class JniTrace with (possibly) version specific implementation (none yet).<br>
+ *
+ * It also make sure the correct library is loaded by liblttvlibraryloader.so
+ * <p>
+ */
+public class JniTrace_v2_5 extends JniTrace {
+
+ // This is the dynamic library name that is passed to the library loader (liblttvlibraryloader.so) to load.
+ // It needs to be a complete name, like "libXYZ.so", unlike java that would take "XYZ". It could also take a complete path.
+ // The library need to be accessible, i.e. LD_LIBRARY_PATH need to be set correctly.
+ private static final String LIBRARY_NAME = "liblttvtraceread-2.5.so"; //$NON-NLS-1$
+
+ /*
+ * Forbid access to the default constructor
+ */
+ protected JniTrace_v2_5() {
+ super();
+ }
+
+
+ public JniTrace_v2_5(String newpath) throws JniException {
+ super(newpath);
+ }
+
+ public JniTrace_v2_5(String newpath, boolean newPrintDebug) throws JniException {
+ super(newpath, newPrintDebug);
+ }
+
+
+ public JniTrace_v2_5(JniTrace_v2_5 oldTrace) {
+ super(oldTrace);
+ }
+
+ public JniTrace_v2_5(Jni_C_Pointer_And_Library_Id newPtr, boolean newPrintDebug) throws JniException {
+ super(newPtr, newPrintDebug);
+ }
+
+
+ /**
+ * Get the trace library name
+ * <p>
+ *
+ * Get the version specific native trace library name
+ *
+ * @return The native trace library name
+ */
+ @Override
+ public String getTraceLibName() {
+ return LIBRARY_NAME;
+ }
+
+ /**
+ * Allocate (call constructor for) a new JniTracefile.<p>
+ *
+ * This method is made to bypass limitation related to abstract class, see comment in JniTrace
+ *
+ * @return JniTracefile a newly allocated JniTracefile
+ *
+ * @see org.eclipse.linuxtools.lttng.jni.JniTrace
+ */
+ @Override
+ public JniTracefile allocateNewJniTracefile(Jni_C_Pointer_And_Library_Id newPtr, JniTrace newParentTrace) throws JniException {
+ return new JniTracefile_v2_5(newPtr, newParentTrace);
+ }
+
+
+
+}
--- /dev/null
+package org.eclipse.linuxtools.internal.lttng.jni_v2_5;
+/*******************************************************************************
+ * Copyright (c) 2009 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * William Bourque (wbourque@gmail.com) - Initial API and implementation
+ *******************************************************************************/
+
+import java.util.HashMap;
+
+import org.eclipse.linuxtools.internal.lttng.jni.common.Jni_C_Pointer_And_Library_Id;
+import org.eclipse.linuxtools.internal.lttng.jni.exception.JniException;
+import org.eclipse.linuxtools.lttng.jni.JniEvent;
+import org.eclipse.linuxtools.lttng.jni.JniMarker;
+import org.eclipse.linuxtools.lttng.jni.JniTrace;
+import org.eclipse.linuxtools.lttng.jni.JniTracefile;
+
+/**
+ * <b><u>JniTracefile_v2_5</u></b>
+ * <p>
+ * JniTracefile version to support Lttng traceformat of version 2.5<br>
+ * This class extend abstract class JniTracefile with (possibly) version specific implementation.<br>
+ * <p>
+ */
+public class JniTracefile_v2_5 extends JniTracefile {
+
+ /*
+ * Forbid access to the default constructor
+ */
+ protected JniTracefile_v2_5() {
+ super();
+ }
+
+
+ public JniTracefile_v2_5(JniTracefile_v2_5 oldTracefile) {
+ super(oldTracefile);
+ }
+
+ public JniTracefile_v2_5(Jni_C_Pointer_And_Library_Id newPtr, JniTrace newParentTrace) throws JniException {
+ super(newPtr, newParentTrace);
+ }
+
+
+ /**
+ * Allocate (call constructor for) a new JniEvent.<p>
+ *
+ * This method is made to bypass limitation related to abstract class, see comment in JniTracefile
+ *
+ * @return JniEvent a newly allocated JniEvent
+ *
+ * @see org.eclipse.linuxtools.lttng.jni.JniTracefile
+ */
+ @Override
+ public JniEvent allocateNewJniEvent(Jni_C_Pointer_And_Library_Id newEventPtr, HashMap<Integer, JniMarker> newMarkersMap, JniTracefile newParentTracefile) throws JniException {
+ return new JniEvent_v2_5(newEventPtr, newMarkersMap, newParentTracefile);
+ }
+
+
+ /**
+ * Allocate (call constructor for) a new JniMarker.<p>
+ *
+ * This method is made to bypass limitation related to abstract class, see comment in JniTracefile
+ *
+ * @return JniMarker a newly allocated JniMarker
+ *
+ * @see org.eclipse.linuxtools.lttng.jni.JniTracefile
+ */
+ @Override
+ public JniMarker allocateNewJniMarker(Jni_C_Pointer_And_Library_Id newMarkerPtr) throws JniException {
+ return new JniMarker_v2_5(newMarkerPtr);
+ }
+
+}
--- /dev/null
+package org.eclipse.linuxtools.internal.lttng.jni_v2_6;
+/*******************************************************************************
+ * Copyright (c) 2009 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * William Bourque (wbourque@gmail.com) - Initial API and implementation
+ *******************************************************************************/
+
+import java.util.HashMap;
+
+import org.eclipse.linuxtools.internal.lttng.jni.common.Jni_C_Pointer_And_Library_Id;
+import org.eclipse.linuxtools.internal.lttng.jni.exception.JniException;
+import org.eclipse.linuxtools.lttng.jni.JniEvent;
+import org.eclipse.linuxtools.lttng.jni.JniMarker;
+import org.eclipse.linuxtools.lttng.jni.JniTracefile;
+
+/**
+ * <b><u>JniEvent_v2_6</u></b>
+ * <p>
+ * JniEvent version to support Lttng traceformat of version 2.6<br>
+ * This class extend abstract class JniEvent with (possibly) version specific implementation.<br>
+ * <p>
+ */
+public class JniEvent_v2_6 extends JniEvent {
+
+ /*
+ * Forbid access to the default constructor
+ */
+ protected JniEvent_v2_6() {
+ super();
+ }
+
+ public JniEvent_v2_6(JniEvent_v2_6 oldEvent) {
+ super(oldEvent);
+ }
+
+ public JniEvent_v2_6(Jni_C_Pointer_And_Library_Id newEventPtr, HashMap<Integer, JniMarker> newMarkersMap, JniTracefile newParentTracefile) throws JniException {
+ super(newEventPtr, newMarkersMap, newParentTracefile);
+ }
+
+}
--- /dev/null
+package org.eclipse.linuxtools.internal.lttng.jni_v2_6;
+/*******************************************************************************
+ * Copyright (c) 2009 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * William Bourque (wbourque@gmail.com) - Initial API and implementation
+ *******************************************************************************/
+
+import org.eclipse.linuxtools.internal.lttng.jni.common.Jni_C_Pointer_And_Library_Id;
+import org.eclipse.linuxtools.internal.lttng.jni.exception.JniException;
+import org.eclipse.linuxtools.lttng.jni.JniMarkerField;
+
+/**
+ * <b><u>JniMarkerField_v2_6</u></b>
+ * <p>
+ * JniMarkerField version to support Lttng traceformat of version 2.6<br>
+ * This class extend abstract class JniMarkerField with (possibly) version specific implementation.<br>
+ * <p>
+ */
+public class JniMarkerField_v2_6 extends JniMarkerField {
+
+ /*
+ * Forbid access to the default constructor
+ */
+ protected JniMarkerField_v2_6() {
+ super();
+ }
+
+
+ public JniMarkerField_v2_6(JniMarkerField_v2_6 oldMarkerField) {
+ super(oldMarkerField);
+ }
+
+ public JniMarkerField_v2_6(Jni_C_Pointer_And_Library_Id newMarkerFieldPtr) throws JniException {
+ super(newMarkerFieldPtr);
+ }
+}
--- /dev/null
+package org.eclipse.linuxtools.internal.lttng.jni_v2_6;
+/*******************************************************************************
+ * Copyright (c) 2009 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * William Bourque (wbourque@gmail.com) - Initial API and implementation
+ *******************************************************************************/
+
+import org.eclipse.linuxtools.internal.lttng.jni.common.Jni_C_Pointer_And_Library_Id;
+import org.eclipse.linuxtools.internal.lttng.jni.exception.JniException;
+import org.eclipse.linuxtools.lttng.jni.JniMarker;
+import org.eclipse.linuxtools.lttng.jni.JniMarkerField;
+
+/**
+ * <b><u>JniMarker_v2_6</u></b>
+ * <p>
+ * JniMarker version to support Lttng traceformat of version 2.6<br>
+ * This class extend abstract class JniMarker with (possibly) version specific implementation.<br>
+ * <p>
+ */
+public class JniMarker_v2_6 extends JniMarker {
+
+ /*
+ * Forbid access to the default constructor
+ */
+ protected JniMarker_v2_6() {
+ super();
+ }
+
+
+ public JniMarker_v2_6(JniMarker_v2_6 oldMarker) {
+ super(oldMarker);
+ }
+
+ public JniMarker_v2_6(Jni_C_Pointer_And_Library_Id newMarkerPtr) throws JniException {
+ super(newMarkerPtr);
+ }
+
+
+ /**
+ * Allocate (call constructor for) a new JniMarkerField.<p>
+ *
+ * This method is made to bypass limitation related to abstract class, see comment in JniMarker
+ *
+ * @return JniMarkerField a newly allocated JniMarkerField
+ *
+ * @see org.eclipse.linuxtools.lttng.jni.JniMarker
+ */
+ @Override
+ public JniMarkerField allocateNewJniMarkerField(Jni_C_Pointer_And_Library_Id newMarkerFieldPtr) throws JniException {
+ return new JniMarkerField_v2_6(newMarkerFieldPtr);
+ }
+}
--- /dev/null
+package org.eclipse.linuxtools.internal.lttng.jni_v2_6;
+/*******************************************************************************
+ * Copyright (c) 2009 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * William Bourque (wbourque@gmail.com) - Initial API and implementation
+ *******************************************************************************/
+
+import org.eclipse.linuxtools.lttng.jni.JniParser;
+
+/**
+ * <b><u>JniParser_v2_6</u></b>
+ * <p>
+ * JniParser version to support Lttng traceformat of version 2.6<br>
+ * This class extend abstract class JniParser with (possibly) version specific implementation.<br>
+ * <p>
+ */
+public class JniParser_v2_6 extends JniParser {
+
+ /*
+ * Forbid access to the default constructor
+ */
+ protected JniParser_v2_6() {
+ super();
+ }
+}
--- /dev/null
+package org.eclipse.linuxtools.internal.lttng.jni_v2_6;
+/*******************************************************************************
+ * Copyright (c) 2009, 2011 Ericsson, MontaVista Software
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * William Bourque (wbourque@gmail.com) - Initial API and implementation
+ * Yufen Kuo (ykuo@mvista.com) - add support to allow user specify trace library path
+ * Yufen Kuo (ykuo@mvista.com) - bug 340341: handle gracefully when native library failed to initialize
+ *******************************************************************************/
+
+import org.eclipse.linuxtools.internal.lttng.jni.common.Jni_C_Pointer_And_Library_Id;
+import org.eclipse.linuxtools.internal.lttng.jni.exception.JniException;
+import org.eclipse.linuxtools.lttng.jni.JniTrace;
+import org.eclipse.linuxtools.lttng.jni.JniTracefile;
+
+/**
+ * <b><u>JniTrace_v2_6</u></b>
+ * <p>
+ * JniTrace version to support Lttng traceformat of version 2.6.<br>
+ * This class extend abstract class JniTrace with (possibly) version specific implementation (none yet).<br>
+ *
+ * It also make sure the correct library is loaded by liblttvlibraryloader.so
+ * <p>
+ */
+public class JniTrace_v2_6 extends JniTrace {
+
+ // This is the dynamic library name that is passed to the library loader (liblttvlibraryloader.so) to load.
+ // It needs to be a complete name, like "libXYZ.so", unlike java that would take "XYZ". It could also take a complete path.
+ // The library need to be accessible, i.e. LD_LIBRARY_PATH need to be set correctly.
+ private static final String LIBRARY_NAME = "liblttvtraceread-2.6.so"; //$NON-NLS-1$
+
+ /*
+ * Forbid access to the default constructor
+ */
+ protected JniTrace_v2_6() {
+ super();
+ }
+
+ public JniTrace_v2_6(String newpath) throws JniException {
+ super(newpath);
+ }
+
+ public JniTrace_v2_6(String newpath, boolean newPrintDebug) throws JniException {
+ super(newpath, newPrintDebug);
+ }
+
+ public JniTrace_v2_6(JniTrace_v2_6 oldTrace) {
+ super(oldTrace);
+ }
+
+ public JniTrace_v2_6(Jni_C_Pointer_And_Library_Id newPtr, boolean newPrintDebug) throws JniException {
+ super(newPtr, newPrintDebug);
+ }
+
+ /**
+ * Get the trace library name
+ * <p>
+ *
+ * Get the version specific native trace library name
+ *
+ * @return The native trace library name
+ */
+ @Override
+ public String getTraceLibName() {
+ return LIBRARY_NAME;
+ }
+
+ /**
+ * Allocate (call constructor for) a new JniTracefile.<p>
+ *
+ * This method is made to bypass limitation related to abstract class, see comment in JniTrace
+ *
+ * @return JniTracefile a newly allocated JniTracefile
+ *
+ * @see org.eclipse.linuxtools.lttng.jni.JniTrace
+ */
+ @Override
+ public JniTracefile allocateNewJniTracefile(Jni_C_Pointer_And_Library_Id newPtr, JniTrace newParentTrace) throws JniException {
+ return new JniTracefile_v2_6(newPtr, newParentTrace);
+ }
+}
--- /dev/null
+package org.eclipse.linuxtools.internal.lttng.jni_v2_6;
+/*******************************************************************************
+ * Copyright (c) 2009 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * William Bourque (wbourque@gmail.com) - Initial API and implementation
+ *******************************************************************************/
+
+import java.util.HashMap;
+
+import org.eclipse.linuxtools.internal.lttng.jni.common.Jni_C_Pointer_And_Library_Id;
+import org.eclipse.linuxtools.internal.lttng.jni.exception.JniException;
+import org.eclipse.linuxtools.lttng.jni.JniEvent;
+import org.eclipse.linuxtools.lttng.jni.JniMarker;
+import org.eclipse.linuxtools.lttng.jni.JniTrace;
+import org.eclipse.linuxtools.lttng.jni.JniTracefile;
+
+/**
+ * <b><u>JniTracefile_v2_6</u></b>
+ * <p>
+ * JniTracefile version to support Lttng traceformat of version 2.6<br>
+ * This class extend abstract class JniTracefile with (possibly) version specific implementation.<br>
+ * <p>
+ */
+public class JniTracefile_v2_6 extends JniTracefile {
+
+ /*
+ * Forbid access to the default constructor
+ */
+ protected JniTracefile_v2_6() {
+ super();
+ }
+
+
+ public JniTracefile_v2_6(JniTracefile_v2_6 oldTracefile) {
+ super(oldTracefile);
+ }
+
+ public JniTracefile_v2_6(Jni_C_Pointer_And_Library_Id newPtr, JniTrace newParentTrace) throws JniException {
+ super(newPtr, newParentTrace);
+ }
+
+
+ /**
+ * Allocate (call constructor for) a new JniEvent.<p>
+ *
+ * This method is made to bypass limitation related to abstract class, see comment in JniTracefile
+ *
+ * @return JniEvent a newly allocated JniEvent
+ *
+ * @see org.eclipse.linuxtools.lttng.jni.JniTracefile
+ */
+ @Override
+ public JniEvent allocateNewJniEvent(Jni_C_Pointer_And_Library_Id newEventPtr, HashMap<Integer, JniMarker> newMarkersMap, JniTracefile newParentTracefile) throws JniException {
+ return new JniEvent_v2_6(newEventPtr, newMarkersMap, newParentTracefile);
+ }
+
+
+ /**
+ * Allocate (call constructor for) a new JniMarker.<p>
+ *
+ * This method is made to bypass limitation related to abstract class, see comment in JniTracefile
+ *
+ * @return JniMarker a newly allocated JniMarker
+ *
+ * @see org.eclipse.linuxtools.lttng.jni.JniTracefile
+ */
+ @Override
+ public JniMarker allocateNewJniMarker(Jni_C_Pointer_And_Library_Id newMarkerPtr) throws JniException {
+ return new JniMarker_v2_6(newMarkerPtr);
+ }
+
+}
import java.util.HashMap;
-import org.eclipse.linuxtools.lttng.jni.common.JniTime;
-import org.eclipse.linuxtools.lttng.jni.common.Jni_C_Pointer_And_Library_Id;
-import org.eclipse.linuxtools.lttng.jni.exception.JniEventException;
-import org.eclipse.linuxtools.lttng.jni.exception.JniException;
-import org.eclipse.linuxtools.lttng.jni.exception.JniNoSuchEventException;
+import org.eclipse.linuxtools.internal.lttng.jni.common.JniTime;
+import org.eclipse.linuxtools.internal.lttng.jni.common.Jni_C_Pointer_And_Library_Id;
+import org.eclipse.linuxtools.internal.lttng.jni.exception.JniEventException;
+import org.eclipse.linuxtools.internal.lttng.jni.exception.JniException;
+import org.eclipse.linuxtools.internal.lttng.jni.exception.JniNoSuchEventException;
/**
* <b><u>JniEvent</u></b> <p>
*
* @exception JniException
*
- * @see org.eclipse.linuxtools.lttng.jni.common.Jni_C_Pointer_And_Library_Id
+ * @see org.eclipse.linuxtools.internal.lttng.jni.common.Jni_C_Pointer_And_Library_Id
* @see org.eclipse.linuxtools.lttng.jni.JniMarker
* @see org.eclipse.linuxtools.lttng.jni.JniTracefile
*/
*
* @return LTT read status, as defined in Jni_C_Constant.
*
- * @see org.eclipse.linuxtools.lttng.jni.common.Jni_C_Constant
+ * @see org.eclipse.linuxtools.internal.lttng.jni.common.Jni_C_Constant
*/
public int readNextEvent() {
// Ask Ltt to read the next event for this particular tracefile
*
* @return LTT read status, as defined in Jni_C_Constant
*
- * @see org.eclipse.linuxtools.lttng.jni.common.Jni_C_Constant
+ * @see org.eclipse.linuxtools.internal.lttng.jni.common.Jni_C_Constant
*/
public int seekToTime(JniTime seekTime) {
// Ask Ltt to read the next event for this particular tracefile
*
* @return LTT read status, as defined in Jni_C_Constant
*
- * @see org.eclipse.linuxtools.lttng.jni.common.Jni_C_Constant
+ * @see org.eclipse.linuxtools.internal.lttng.jni.common.Jni_C_Constant
*/
public int seekOrFallBack(JniTime seekTime) {
// Save the old time
*
* @return LTT read status, as defined in Jni_C_Constant
*
- * @see org.eclipse.linuxtools.lttng.jni.common.Jni_C_Constant
+ * @see org.eclipse.linuxtools.internal.lttng.jni.common.Jni_C_Constant
*/
protected int positionToFirstEvent() {
eventState = ltt_positionToFirstEvent(tracefilePtr.getLibraryId(), tracefilePtr.getPointer());
*
* @return The actual (long converted) pointer or NULL.
*
- * @see org.eclipse.linuxtools.lttng.jni.common.Jni_C_Pointer_And_Library_Id
+ * @see org.eclipse.linuxtools.internal.lttng.jni.common.Jni_C_Pointer_And_Library_Id
*/
public Jni_C_Pointer_And_Library_Id getTracefilePtr() {
return new Jni_C_Pointer_And_Library_Id(thisEventPtr.getLibraryId(), ltt_getTracefilePtr(thisEventPtr.getLibraryId(), thisEventPtr.getPointer()) );
*
* @return The actual (long converted) pointer or NULL.
*
- * @see org.eclipse.linuxtools.lttng.jni.common.Jni_C_Pointer_And_Library_Id
+ * @see org.eclipse.linuxtools.internal.lttng.jni.common.Jni_C_Pointer_And_Library_Id
*/
public Jni_C_Pointer_And_Library_Id getEventPtr() {
return thisEventPtr;
import java.util.ArrayList;
import java.util.HashMap;
-import org.eclipse.linuxtools.lttng.jni.common.Jni_C_Pointer_And_Library_Id;
-import org.eclipse.linuxtools.lttng.jni.exception.JniException;
-import org.eclipse.linuxtools.lttng.jni.exception.JniMarkerException;
+import org.eclipse.linuxtools.internal.lttng.jni.common.Jni_C_Pointer_And_Library_Id;
+import org.eclipse.linuxtools.internal.lttng.jni.exception.JniException;
+import org.eclipse.linuxtools.internal.lttng.jni.exception.JniMarkerException;
/**
* <b><u>JniMarker</u></b><p>
*
* @return The actual (long converted) pointer or NULL
*
- * @see org.eclipse.linuxtools.lttng.jni.common.Jni_C_Pointer_And_Library_Id
+ * @see org.eclipse.linuxtools.internal.lttng.jni.common.Jni_C_Pointer_And_Library_Id
*/
public Jni_C_Pointer_And_Library_Id getMarkerPtr() {
return thisMarkerPtr;
*
* @throws JniException The construction (allocation) failed.
*
- * @see org.eclipse.linuxtools.lttng.jni.common.Jni_C_Pointer_And_Library_Id
+ * @see org.eclipse.linuxtools.internal.lttng.jni.common.Jni_C_Pointer_And_Library_Id
* @see org.eclipse.linuxtools.lttng.jni.JniMarkerField
*/
public abstract JniMarkerField allocateNewJniMarkerField(Jni_C_Pointer_And_Library_Id newMarkerFieldPtr) throws JniException;
package org.eclipse.linuxtools.lttng.jni;
-import org.eclipse.linuxtools.lttng.jni.common.Jni_C_Pointer_And_Library_Id;
-import org.eclipse.linuxtools.lttng.jni.exception.JniException;
-import org.eclipse.linuxtools.lttng.jni.exception.JniMarkerFieldException;
+import org.eclipse.linuxtools.internal.lttng.jni.common.Jni_C_Pointer_And_Library_Id;
+import org.eclipse.linuxtools.internal.lttng.jni.exception.JniException;
+import org.eclipse.linuxtools.internal.lttng.jni.exception.JniMarkerFieldException;
/**
*
* @exception JniException
*
- * @see org.eclipse.linuxtools.lttng.jni.common.Jni_C_Pointer_And_Library_Id
+ * @see org.eclipse.linuxtools.internal.lttng.jni.common.Jni_C_Pointer_And_Library_Id
*/
public JniMarkerField(Jni_C_Pointer_And_Library_Id newMarkerFieldPtr) throws JniException {
thisMarkerFieldPtr = newMarkerFieldPtr;
*
* @return The actual (long converted) pointer or NULL
*
- * @see org.eclipse.linuxtools.lttng.jni.common.Jni_C_Pointer_And_Library_Id
+ * @see org.eclipse.linuxtools.internal.lttng.jni.common.Jni_C_Pointer_And_Library_Id
*/
public Jni_C_Pointer_And_Library_Id getMarkerFieldPtr() {
return thisMarkerFieldPtr;
import java.util.HashMap;
import java.util.Iterator;
-import org.eclipse.linuxtools.lttng.jni.common.Jni_C_Pointer;
+import org.eclipse.linuxtools.internal.lttng.jni.common.Jni_C_Pointer;
/**
* <b><u>JniParser</u></b><p>
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
-import org.eclipse.linuxtools.lttng.jni.common.JniTime;
-import org.eclipse.linuxtools.lttng.jni.common.Jni_C_Pointer_And_Library_Id;
-import org.eclipse.linuxtools.lttng.jni.exception.JniException;
-import org.eclipse.linuxtools.lttng.jni.exception.JniOpenTraceFailedException;
-import org.eclipse.linuxtools.lttng.jni.exception.JniTraceException;
-import org.eclipse.linuxtools.lttng.jni.exception.JniTracefileWithoutEventException;
+import org.eclipse.linuxtools.internal.lttng.jni.common.JniTime;
+import org.eclipse.linuxtools.internal.lttng.jni.common.Jni_C_Pointer_And_Library_Id;
+import org.eclipse.linuxtools.internal.lttng.jni.exception.JniException;
+import org.eclipse.linuxtools.internal.lttng.jni.exception.JniOpenTraceFailedException;
+import org.eclipse.linuxtools.internal.lttng.jni.exception.JniTraceException;
+import org.eclipse.linuxtools.internal.lttng.jni.exception.JniTracefileWithoutEventException;
/**
* <b><u>JniTrace</u></b>
*
* @exception JniException
*
- * @see org.eclipse.linuxtools.lttng.jni.common.Jni_C_Pointer_And_Library_Id
+ * @see org.eclipse.linuxtools.internal.lttng.jni.common.Jni_C_Pointer_And_Library_Id
*/
public JniTrace(Jni_C_Pointer_And_Library_Id newPtr, boolean newPrintDebug) throws JniException {
thisTracePtr = newPtr;
*
* @param seekTime The time where we want to seek to
*
- * @see org.eclipse.linuxtools.lttng.jni.common.JniTime
+ * @see org.eclipse.linuxtools.internal.lttng.jni.common.JniTime
*/
public void seekToTime(JniTime seekTime) {
* @param seekTime The time where we want to seek to
*
* @see org.eclipse.linuxtools.lttng.jni.JniTracefile
- * @see org.eclipse.linuxtools.lttng.jni.common.JniTime
+ * @see org.eclipse.linuxtools.internal.lttng.jni.common.JniTime
*/
public void seekToTime(JniTime seekTime, JniTracefile targetTracefile) {
// Invalidate the current read event
* @return The event just after the seeked time or null if none available.
*
* @see org.eclipse.linuxtools.lttng.jni.JniEvent
- * @see org.eclipse.linuxtools.lttng.jni.common.JniTime
+ * @see org.eclipse.linuxtools.internal.lttng.jni.common.JniTime
*/
public JniEvent seekAndRead(JniTime seekTime) {
JniEvent returnedEvent = null;
* @return The event just after the seeked time or null if none available.
*
* @see org.eclipse.linuxtools.lttng.jni.JniTracefile
- * @see org.eclipse.linuxtools.lttng.jni.common.JniTime
+ * @see org.eclipse.linuxtools.internal.lttng.jni.common.JniTime
* @see org.eclipse.linuxtools.lttng.jni.JniEvent
*/
public JniEvent seekAndRead(JniTime seekTime, JniTracefile targetTracefile) {
*
* @return Time of the last event read
*
- * @see org.eclipse.linuxtools.lttng.jni.common.JniTime
+ * @see org.eclipse.linuxtools.internal.lttng.jni.common.JniTime
*/
public JniTime getCurrentEventTimestamp() {
JniTime returnedTime = null;
*
* @return The actual (long converted) pointer or NULL.
*
- * @see org.eclipse.linuxtools.lttng.jni.common.Jni_C_Pointer_And_Library_Id
+ * @see org.eclipse.linuxtools.internal.lttng.jni.common.Jni_C_Pointer_And_Library_Id
*/
public Jni_C_Pointer_And_Library_Id getTracePtr() {
return thisTracePtr;
* @throws JniException The construction (allocation) failed.
*
* @see org.eclipse.linuxtools.lttng.jni.JniTracefile
- * @see org.eclipse.linuxtools.lttng.jni.common.Jni_C_Pointer_And_Library_Id
+ * @see org.eclipse.linuxtools.internal.lttng.jni.common.Jni_C_Pointer_And_Library_Id
* @see org.eclipse.linuxtools.lttng.jni.JniTrace
*/
public abstract JniTracefile allocateNewJniTracefile(Jni_C_Pointer_And_Library_Id newPtr, JniTrace newParentTrace) throws JniException;
import java.util.HashMap;
-import org.eclipse.linuxtools.lttng.jni.common.JniTime;
-import org.eclipse.linuxtools.lttng.jni.common.Jni_C_Pointer;
-import org.eclipse.linuxtools.lttng.jni.common.Jni_C_Pointer_And_Library_Id;
-import org.eclipse.linuxtools.lttng.jni.exception.JniException;
-import org.eclipse.linuxtools.lttng.jni.exception.JniNoSuchEventException;
-import org.eclipse.linuxtools.lttng.jni.exception.JniTracefileException;
-import org.eclipse.linuxtools.lttng.jni.exception.JniTracefileWithoutEventException;
+import org.eclipse.linuxtools.internal.lttng.jni.common.JniTime;
+import org.eclipse.linuxtools.internal.lttng.jni.common.Jni_C_Pointer;
+import org.eclipse.linuxtools.internal.lttng.jni.common.Jni_C_Pointer_And_Library_Id;
+import org.eclipse.linuxtools.internal.lttng.jni.exception.JniException;
+import org.eclipse.linuxtools.internal.lttng.jni.exception.JniNoSuchEventException;
+import org.eclipse.linuxtools.internal.lttng.jni.exception.JniTracefileException;
+import org.eclipse.linuxtools.internal.lttng.jni.exception.JniTracefileWithoutEventException;
/**
* <b><u>JniTracefile</u></b>
* @exception JniException
*
* @see org.eclipse.linuxtools.lttng.jni.JniTrace
- * @see org.eclipse.linuxtools.lttng.jni.common.Jni_C_Pointer_And_Library_Id
+ * @see org.eclipse.linuxtools.internal.lttng.jni.common.Jni_C_Pointer_And_Library_Id
*/
public JniTracefile(Jni_C_Pointer_And_Library_Id newPtr, JniTrace newParentTrace) throws JniException {
thisTracefilePtr = newPtr;
*
* @return LTT read status, as defined in Jni_C_Constant
*
- * @see org.eclipse.linuxtools.lttng.jni.common.Jni_C_Constant
+ * @see org.eclipse.linuxtools.internal.lttng.jni.common.Jni_C_Constant
*/
public int readNextEvent() {
return currentEvent.readNextEvent();
*
* @return LTT read status, as defined in Jni_C_Constant
*
- * @see org.eclipse.linuxtools.lttng.jni.common.Jni_C_Constant
+ * @see org.eclipse.linuxtools.internal.lttng.jni.common.Jni_C_Constant
*/
public int seekToTime(JniTime seekTime) {
return currentEvent.seekToTime(seekTime);
*
* @return The actual (long converted) pointer or NULL.
*
- * @see org.eclipse.linuxtools.lttng.jni.common.Jni_C_Pointer_And_Library_Id
+ * @see org.eclipse.linuxtools.internal.lttng.jni.common.Jni_C_Pointer_And_Library_Id
*/
public Jni_C_Pointer_And_Library_Id getTracefilePtr() {
return thisTracefilePtr;
* @throws JniException The construction (allocation) failed.
*
* @see org.eclipse.linuxtools.lttng.jni.JniEvent
- * @see org.eclipse.linuxtools.lttng.jni.common.Jni_C_Pointer_And_Library_Id
+ * @see org.eclipse.linuxtools.internal.lttng.jni.common.Jni_C_Pointer_And_Library_Id
* @see org.eclipse.linuxtools.lttng.jni.JniMarker
* @see org.eclipse.linuxtools.lttng.jni.JniTracefile
*/
* @throws JniException The construction (allocation) failed.
*
* @see org.eclipse.linuxtools.lttng.jni.JniMarker
- * @see org.eclipse.linuxtools.lttng.jni.common.Jni_C_Pointer_And_Library_Id
+ * @see org.eclipse.linuxtools.internal.lttng.jni.common.Jni_C_Pointer_And_Library_Id
*/
public abstract JniMarker allocateNewJniMarker(Jni_C_Pointer_And_Library_Id newMarkerPtr) throws JniException;
package org.eclipse.linuxtools.lttng.jni;
-import org.eclipse.linuxtools.lttng.jni.common.Jni_C_Constant;
+import org.eclipse.linuxtools.internal.lttng.jni.common.Jni_C_Constant;
/*******************************************************************************
* Copyright (c) 2009 Ericsson
+++ /dev/null
-package org.eclipse.linuxtools.lttng.jni.common;
-/*******************************************************************************
- * Copyright (c) 2009 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * William Bourque (wbourque@gmail.com) - Initial API and implementation
- *******************************************************************************/
-
-/**
- * <b><u>JniTime</u></b>
- * <p>
- * Used to store (event, trace, tracefile, ...) timestamp.
- *
- * Mimic the behavior of the LttTime C structure.
- */
-public class JniTime extends Jni_C_Constant implements Comparable<JniTime>
-{
- private long time = 0;
-
- /**
- * Default constructor.<p>
- *
- * Note : Time will be set to 0.
- *
- */
- public JniTime() {
- time = 0;
- }
-
- /**
- * Copy constructor.
- *
- * @param oldTime Reference to the JniTime you want to copy.
- */
- public JniTime(JniTime oldTime) {
- time = oldTime.getTime();
- }
-
- /**
- * Constructor with parameters.<p>
- *
- * "LTT style" constructor with Seconds et Nanoseconds
- *
- * @param newSec Seconds of the JniTime
- * @param newNanoSec Nanoseconds of the JniTime
- */
- public JniTime(long newSec, long newNanoSec) {
- time = (newSec * NANO) + newNanoSec;
- }
-
- /**
- * Constructor with parameters.<p>
- *
- * Usual "nanosecond only" constructor.
- *
- * @param newNanoSecTime Time in nanoseconds
- */
- public JniTime(long newNanoSecTime) {
- time = newNanoSecTime;
- }
-
- /**
- * Second of the time.<p>
- *
- * Returns seconds, i.e. multiple of 1 000 000, of the stored nanoseconds time.
- *
- * @return Second of this time.
- */
- public long getSeconds() {
- return (time / NANO);
- }
-
- /**
- * Getter for the nanosecond of the time.<p>
- *
- * Returns nanoseconds part, i.e. modulo of 1 000 000, of the stored nanoseconds time.
- *
- * @return Nanoseconds of this time
- */
- public long getNanoSeconds() {
- return time % NANO;
- }
-
- /**
- * Full time, in nanoseconds.<p>
- *
- * @return Complete time in nanoseconds
- */
- public long getTime() {
- return time;
- }
-
- /**
- * Changes the current time for this object<p>
- *
- * @param newTime New time to set, in nanoseconds.
- */
- public void setTime(long newTime) {
- time = newTime;
- }
-
- /*
- * Populate this time object
- *
- * Note: This function is called from C side.
- *
- * @param newTime The time we want to populate
- */
- @SuppressWarnings("unused")
- private void setTimeFromC(long newTime) {
- time = newTime;
- }
-
- /**
- * Comparaison operator smaller or equal than "<=" .<p>
- *
- * @param comparedTime The time we want to compare with this one
- *
- * @return true if compared time is smaller or equal, false otherwise
- */
- public boolean isSmallerOrEqual(JniTime comparedTime) {
-
- // NOTE : We check <= instead of just <
- // This mean the LEFT OPERAND (comparedTime) always prevails
- if (this.getTime() <= comparedTime.getTime() ) {
- return true;
- }
- else {
- return false;
- }
- }
-
- /**
- * compareTo operator.<p>
- *
- * @param right The time we want to compare with this one
- *
- * @return int of value -1, 0 or 1, as the pased argument is bigger, equal or smaller than this time
- */
- @Override
- public int compareTo(JniTime right) {
- long leftTime = this.getTime();
- long rightTime = right.getTime();
-
- if ( leftTime < rightTime ) {
- return -1;
- }
- else if ( leftTime > rightTime ) {
- return 1;
- }
- else {
- return 0;
- }
- }
-
- /**
- * faster equals since it is called very often
- * @param other the object to the right of this
- * @return true if the times are the same, false otherwise.
- */
- public boolean equals(JniTime other) {
- return ((other != null) && (this.time == other.time));
- }
-
- /**
- * Overridden equals for JniTime type
- *
- * @param The object we want to compare too
- *
- * @return true if the time is the same, false otherwise.
- */
- @Override
- public boolean equals(Object obj) {
- if (obj instanceof JniTime) {
- return (((JniTime) obj).time == this.time);
- }
- return false;
- }
-
- /**
- * Overridden hash code for JniTime type
- *
- */
- @Override
- public int hashCode() {
- return this.toString().hashCode();
- }
-
-
- /**
- * toString() method.
- * <u>Intended to debug</u><p>
- *
- * NOTE : We output the time in the same format as LTT (seconds and nanosecond separatly)
- *
- * @return String Attributes of the object concatenated in String
- */
- @Override
- @SuppressWarnings("nls")
- public String toString() {
- String returnData = "";
-
- returnData += "seconds : " + this.getSeconds() + "\n";
- returnData += "nanoSeconds : " + this.getNanoSeconds() + "\n";
-
- return returnData;
- }
-}
+++ /dev/null
-package org.eclipse.linuxtools.lttng.jni.common;
-/*******************************************************************************
- * Copyright (c) 2009 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * William Bourque (wbourque@gmail.com) - Initial API and implementation
- *******************************************************************************/
-
-/**
- * <b><u>Jni_C_Common</u></b>
- * <p>
- * Common constants and methods that should be shared between JNI objects.<p>
- *
- * This class is abstract and is intended to be extended by LTTng modules that need the constants.
- */
-public abstract class Jni_C_Constant {
-
- // Needed for native types
- public static final int NULL = 0;
-
- // C errno correspondance. Used to interpret LTT return value
- public static final int EOK = 0;
- public static final int EPERM = 1;
- public static final int ERANGE = 34;
-
- // Timestamps are in nanoseconds, this const ease up the math
- public static final long NANO = 1000000000;
-
- /**
- * Default constructor
- */
- public Jni_C_Constant() {
- }
-
- /**
- * "Alternate" .toString()<p>
- *
- * Simulates the way Java Object implements "toString()"
- *
- * @return The Java hashed UID of the object (i.e. : NAME@HASH)
- */
- @SuppressWarnings("nls")
- public String getReferenceToString() {
- return this.getClass().getName() + "@" + Integer.toHexString(this.hashCode());
- }
-}
\ No newline at end of file
+++ /dev/null
-package org.eclipse.linuxtools.lttng.jni.common;
-/*******************************************************************************
- * Copyright (c) 2009 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * William Bourque (wbourque@gmail.com) - Initial API and implementation
- *******************************************************************************/
-
-/**
- * <b><u>Jni_C_Pointer</u></b>
- * <p>
- * Class pointer to handle properly "C pointer" <p>
- *
- * Can transparently handle pointer of 32 or 64 bits.
- */
-public class Jni_C_Pointer extends Jni_C_Constant {
-
- protected long ptr = NULL;
- protected boolean isLong = true;
-
- /**
- * Default constructor.<p>
- *
- * Note : Pointer will be set to a 64bits "NULL".
- */
- public Jni_C_Pointer() {
- ptr = NULL;
- }
-
- /**
- * Constructor with parameters for 64bits pointers.
- *
- * @param newPtr long-converted (64 bits) C pointer.
- */
- public Jni_C_Pointer(long newPtr) {
- ptr = newPtr;
- isLong = true;
- }
-
- /**
- * Constructor with parameters for 32bits pointers.
- *
- * @param newPtr int-converted (32 bits) C pointer.
- */
- public Jni_C_Pointer(int newPtr) {
- ptr = (long)newPtr;
- isLong = false;
- }
-
- /**
- * Get the current pointer.
- *
- * @return The current pointer, in long.
- */
- public long getPointer() {
- return ptr;
- }
-
- /**
- * Set the pointer, as a 64bits pointer.
- *
- * @param newPtr long-converted (64 bits) C pointer.
- */
- public void setPointer(long newPtr) {
- ptr = newPtr;
- isLong = true;
- }
-
- /**
- * Set the pointer, as a 64bits pointer.
- *
- * @param newPtr int-converted (32 bits) C pointer.
- */
- public void setPointer(int newPtr) {
- ptr = newPtr;
- isLong = false;
- }
-
- /**
- * toString() method. <p>
- *
- * Convert the pointer to a nice looking int/long hexadecimal format.
- *
- * @return Attributes of the object concatenated in String
- */
- @Override
- @SuppressWarnings("nls")
- public String toString() {
- String returnData = "0x";
-
- if (isLong == true) {
- returnData += Long.toHexString(ptr);
- }
- else {
- returnData += Integer.toHexString((int) ptr);
- }
-
- return returnData;
- }
-}
+++ /dev/null
-package org.eclipse.linuxtools.lttng.jni.common;
-
-public class Jni_C_Pointer_And_Library_Id extends Jni_C_Pointer {
-
- // *** Library Id
- // Needed to know which library we need to make our functions call in case several are loaded
- // This make possible to use several different trace version at the same time
- private int libraryId = -1;
-
- /**
- * Default constructor.<p>
- *
- * Note : Pointer will be set to a 64bits "NULL" and Id -1.
- */
- public Jni_C_Pointer_And_Library_Id() {
- super();
- libraryId = -1;
- }
-
- /**
- * Constructor with parameters for 64bits pointers and library handle id.
- *
- * @param newPtr long-converted (64 bits) C pointer.
- * @param newHandle a valid library id as int
- */
- public Jni_C_Pointer_And_Library_Id(int newId, long newPtr) {
- super(newPtr);
- libraryId = newId;
- }
-
- /**
- * Constructor with parameters for 32bits pointers and library handle id.
- *
- * @param newPtr int-converted (32 bits) C pointer.
- * @param newHandle a valid library id as int
- */
- public Jni_C_Pointer_And_Library_Id(int newId, int newPtr) {
- super(newPtr);
- libraryId = newId;
- }
-
- /**
- * Copy constructor.<p>
- *
- * @param oldPointerAndId The old object to copy from.
- */
- public Jni_C_Pointer_And_Library_Id(Jni_C_Pointer_And_Library_Id oldPointerAndId) {
- super(oldPointerAndId.ptr);
- libraryId = oldPointerAndId.libraryId;
- }
-
- /**
- * Get the library handle id currently in use.<p>
- * Id is used to tell the C which version of the functions to call.<p>
- *
- * @return The current id
- */
- public int getLibraryId() {
- return libraryId;
- }
-
- /**
- * Set a new library id.<p>
- * Id is used to tell the C which version of the functions to call.<p>
- *
- * @param newHandleId The new Id to use (must be a valid id for the C library).
- */
- public void setLibraryId(int newId) {
- this.libraryId = newId;
- }
-}
+++ /dev/null
-package org.eclipse.linuxtools.lttng.jni.exception;
-/*******************************************************************************
- * Copyright (c) 2009 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * William Bourque (wbourque@gmail.com) - Initial API and implementation
- *******************************************************************************/
-
-/**
- * <b><u>JniEventException</u></b>
- * <p>
- * Basic exception class for the JniEvent class
- */
-public class JniEventException extends JniException {
- private static final long serialVersionUID = -5891749130387304519L;
-
- public JniEventException(String errMsg) {
- super(errMsg);
- }
-}
\ No newline at end of file
+++ /dev/null
-package org.eclipse.linuxtools.lttng.jni.exception;
-/*******************************************************************************
- * Copyright (c) 2009 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * William Bourque (wbourque@gmail.com) - Initial API and implementation
- *******************************************************************************/
-
-/**
- * <b><u>JniEventOutOfRangeException</u></b>
- * <p>
- * Sub-exception type for the JniEventException type
- * This exception type will get thrown when there is no more event of this type
- * available
- */
-public class JniEventOutOfRangeException extends JniEventException {
- private static final long serialVersionUID = -4645877232795324541L;
-
- public JniEventOutOfRangeException(String errMsg) {
- super(errMsg);
- }
-}
-
+++ /dev/null
-package org.eclipse.linuxtools.lttng.jni.exception;
-/*******************************************************************************
- * Copyright (c) 2009 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * William Bourque (wbourque@gmail.com) - Initial API and implementation
- *******************************************************************************/
-
-
-/**
- * <b><u>JniException</u></b>
- * <p>
- * Super class for JNI exception.
- */
-public class JniException extends Exception {
- private static final long serialVersionUID = -6620784221853154537L;
-
- public JniException(String errMsg) {
- super(errMsg);
- }
-}
-
+++ /dev/null
-package org.eclipse.linuxtools.lttng.jni.exception;
-/*******************************************************************************
- * Copyright (c) 2009 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * William Bourque (wbourque@gmail.com) - Initial API and implementation
- *******************************************************************************/
-
-/**
- * <b><u>JniMarkerException</u></b>
- * <p>
- * Basic Exception class for the JniMarker class
- */
-public class JniMarkerException extends JniException {
- private static final long serialVersionUID = -4694173610721983794L;
-
- public JniMarkerException(String errMsg) {
- super(errMsg);
- }
-}
+++ /dev/null
-package org.eclipse.linuxtools.lttng.jni.exception;
-/*******************************************************************************
- * Copyright (c) 2009 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * William Bourque (wbourque@gmail.com) - Initial API and implementation
- *******************************************************************************/
-
-/**
- * <b><u>JniMarkerFieldException</u></b>
- * <p>
- * Basic Exception class for the JniMarkerField class
- */
-public class JniMarkerFieldException extends JniException {
- private static final long serialVersionUID = 6066381741374806879L;
-
- public JniMarkerFieldException(String errMsg) {
- super(errMsg);
- }
-}
+++ /dev/null
-package org.eclipse.linuxtools.lttng.jni.exception;
-/*******************************************************************************
- * Copyright (c) 2009 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * William Bourque (wbourque@gmail.com) - Initial API and implementation
- *******************************************************************************/
-
-/**
- * <b><u>JniNoNextEventInTraceException</u></b>
- * <p>
- * Sub-exception class type for JniTraceException
- * This type will get thrown when we can't find any "next" event
- * This should usually mean there is no more event in the trace
-
- */
-public class JniNoNextEventInTraceException extends JniTraceException {
- private static final long serialVersionUID = -2887528566100063849L;
-
- public JniNoNextEventInTraceException(String errMsg) {
- super(errMsg);
- }
-}
+++ /dev/null
-package org.eclipse.linuxtools.lttng.jni.exception;
-/*******************************************************************************
- * Copyright (c) 2009 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * William Bourque (wbourque@gmail.com) - Initial API and implementation
- *******************************************************************************/
-
-/**
- * <b><u>JniNoSuchEventException</u></b>
- * <p>
- * Sub-exception type for the JniEventException type
- * This exception type will get thrown when an event is unavailable
- * This might happen at construction because some events type are not present in
- * the trace
- */
-public class JniNoSuchEventException extends JniEventException {
- private static final long serialVersionUID = -4379712949891538051L;
-
- public JniNoSuchEventException(String errMsg) {
- super(errMsg);
- }
-}
+++ /dev/null
-package org.eclipse.linuxtools.lttng.jni.exception;
-/*******************************************************************************
- * Copyright (c) 2009 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * William Bourque (wbourque@gmail.com) - Initial API and implementation
- *******************************************************************************/
-
-/**
- * <b><u>JniOpenTraceFailedException</u></b>
- * <p>
- * Sub-exception class type for JniTraceException
- * This type will get thrown when a trace fail to open
- * Most likely to be caused by a bad tracepath
- */
-public class JniOpenTraceFailedException extends JniTraceException {
- private static final long serialVersionUID = 877769692366394895L;
-
- public JniOpenTraceFailedException(String errMsg) {
- super(errMsg);
- }
-}
\ No newline at end of file
+++ /dev/null
-package org.eclipse.linuxtools.lttng.jni.exception;
-/*******************************************************************************
- * Copyright (c) 2009 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * William Bourque (wbourque@gmail.com) - Initial API and implementation
- *******************************************************************************/
-
-/**
- * <b><u>JniTraceException</u></b>
- * <p>
- * Basic exception class for the JniTrace class
- */
-public class JniTraceException extends JniException {
- private static final long serialVersionUID = -6873007333085268143L;
-
- public JniTraceException(String errMsg) {
- super(errMsg);
- }
-}
+++ /dev/null
-package org.eclipse.linuxtools.lttng.jni.exception;
-/*******************************************************************************
- * Copyright (c) 2009 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * William Bourque (wbourque@gmail.com) - Initial API and implementation
- *******************************************************************************/
-
-/**
- * <b><u>JniTraceVersionException</u></b>
- * <p>
- * Basic exception class for the JniTraceVersion class
- */
-public class JniTraceVersionException extends JniException {
- private static final long serialVersionUID = -5891749123457304519L;
-
- public JniTraceVersionException(String errMsg) {
- super(errMsg);
- }
-}
\ No newline at end of file
+++ /dev/null
-package org.eclipse.linuxtools.lttng.jni.exception;
-/*******************************************************************************
- * Copyright (c) 2009 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * William Bourque (wbourque@gmail.com) - Initial API and implementation
- *******************************************************************************/
-
-/**
- * <b><u>JniTracefileException</u></b>
- * <p>
- * Basic exception class for the JniTracefile class
- */
-public class JniTracefileException extends JniException {
- private static final long serialVersionUID = 5081317864491800084L;
-
- public JniTracefileException(String errMsg) {
- super(errMsg);
- }
-}
+++ /dev/null
-package org.eclipse.linuxtools.lttng.jni.exception;
-/*******************************************************************************
- * Copyright (c) 2009 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * William Bourque (wbourque@gmail.com) - Initial API and implementation
- *******************************************************************************/
-
-/**
- * <b><u>JniTracefileWithoutEventException</u></b>
- * <p>
- * Sub-exception class type for JniTracefileException
- * This type will get thrown when a trace file contain no readable events
- * The proper course of action would usually be to ignore this useless trace file
- */
-public class JniTracefileWithoutEventException extends JniTracefileException {
- private static final long serialVersionUID = -8183967479236071261L;
-
- public JniTracefileWithoutEventException(String errMsg) {
- super(errMsg);
- }
-}
* Yufen Kuo (ykuo@mvista.com) - add support to allow user specify trace library path
*******************************************************************************/
+import org.eclipse.linuxtools.internal.lttng.jni.exception.JniException;
+import org.eclipse.linuxtools.internal.lttng.jni.exception.JniTraceVersionException;
+import org.eclipse.linuxtools.internal.lttng.jni_v2_3.JniTrace_v2_3;
+import org.eclipse.linuxtools.internal.lttng.jni_v2_5.JniTrace_v2_5;
+import org.eclipse.linuxtools.internal.lttng.jni_v2_6.JniTrace_v2_6;
import org.eclipse.linuxtools.lttng.jni.JniTrace;
-import org.eclipse.linuxtools.lttng.jni.exception.JniException;
-import org.eclipse.linuxtools.lttng.jni.exception.JniTraceVersionException;
-import org.eclipse.linuxtools.lttng.jni_v2_3.JniTrace_v2_3;
-import org.eclipse.linuxtools.lttng.jni_v2_5.JniTrace_v2_5;
-import org.eclipse.linuxtools.lttng.jni_v2_6.JniTrace_v2_6;
/**
* <b><u>JniTraceFactory</u></b>
import java.io.File;
-import org.eclipse.linuxtools.lttng.jni.exception.JniException;
-import org.eclipse.linuxtools.lttng.jni.exception.JniTraceVersionException;
+import org.eclipse.linuxtools.internal.lttng.jni.exception.JniException;
+import org.eclipse.linuxtools.internal.lttng.jni.exception.JniTraceVersionException;
/**
* <b><u>JniTraceVersion</u></b>
+++ /dev/null
-package org.eclipse.linuxtools.lttng.jni_v2_3;
-/*******************************************************************************
- * Copyright (c) 2009 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * William Bourque (wbourque@gmail.com) - Initial API and implementation
- *******************************************************************************/
-
-import java.util.HashMap;
-
-import org.eclipse.linuxtools.lttng.jni.JniEvent;
-import org.eclipse.linuxtools.lttng.jni.JniMarker;
-import org.eclipse.linuxtools.lttng.jni.JniTracefile;
-import org.eclipse.linuxtools.lttng.jni.common.Jni_C_Pointer_And_Library_Id;
-import org.eclipse.linuxtools.lttng.jni.exception.JniException;
-
-/**
- * <b><u>JniEvent_v2_3</u></b>
- * <p>
- * JniEvent version to support Lttng traceformat of version 2.3<br>
- * This class extend abstract class JniEvent with (possibly) version specific implementation.<br>
- * <p>
- */
-public class JniEvent_v2_3 extends JniEvent {
-
- /*
- * Forbid access to the default constructor
- */
- protected JniEvent_v2_3() {
- super();
- }
-
- public JniEvent_v2_3(JniEvent_v2_3 oldEvent) {
- super(oldEvent);
- }
-
- public JniEvent_v2_3(Jni_C_Pointer_And_Library_Id newEventPtr, HashMap<Integer, JniMarker> newMarkersMap, JniTracefile newParentTracefile) throws JniException {
- super(newEventPtr, newMarkersMap, newParentTracefile);
- }
-
-}
+++ /dev/null
-package org.eclipse.linuxtools.lttng.jni_v2_3;
-/*******************************************************************************
- * Copyright (c) 2009 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * William Bourque (wbourque@gmail.com) - Initial API and implementation
- *******************************************************************************/
-
-import org.eclipse.linuxtools.lttng.jni.JniMarkerField;
-import org.eclipse.linuxtools.lttng.jni.common.Jni_C_Pointer_And_Library_Id;
-import org.eclipse.linuxtools.lttng.jni.exception.JniException;
-
-/**
- * <b><u>JniMarkerField_v2_3</u></b>
- * <p>
- * JniMarkerField version to support Lttng traceformat of version 2.3<br>
- * This class extend abstract class JniMarkerField with (possibly) version specific implementation.<br>
- * <p>
- */
-public class JniMarkerField_v2_3 extends JniMarkerField {
-
- /*
- * Forbid access to the default constructor
- */
- protected JniMarkerField_v2_3() {
- super();
- }
-
-
- public JniMarkerField_v2_3(JniMarkerField_v2_3 oldMarkerField) {
- super(oldMarkerField);
- }
-
- public JniMarkerField_v2_3(Jni_C_Pointer_And_Library_Id newMarkerFieldPtr) throws JniException {
- super(newMarkerFieldPtr);
- }
-}
+++ /dev/null
-package org.eclipse.linuxtools.lttng.jni_v2_3;
-/*******************************************************************************
- * Copyright (c) 2009 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * William Bourque (wbourque@gmail.com) - Initial API and implementation
- *******************************************************************************/
-
-import org.eclipse.linuxtools.lttng.jni.JniMarker;
-import org.eclipse.linuxtools.lttng.jni.JniMarkerField;
-import org.eclipse.linuxtools.lttng.jni.common.Jni_C_Pointer_And_Library_Id;
-import org.eclipse.linuxtools.lttng.jni.exception.JniException;
-
-/**
- * <b><u>JniMarker_v2_3</u></b>
- * <p>
- * JniMarker version to support Lttng traceformat of version 2.3<br>
- * This class extend abstract class JniMarker with (possibly) version specific implementation.<br>
- * <p>
- */
-public class JniMarker_v2_3 extends JniMarker {
-
- /*
- * Forbid access to the default constructor
- */
- protected JniMarker_v2_3() {
- super();
- }
-
-
- public JniMarker_v2_3(JniMarker_v2_3 oldMarker) {
- super(oldMarker);
- }
-
- public JniMarker_v2_3(Jni_C_Pointer_And_Library_Id newMarkerPtr) throws JniException {
- super(newMarkerPtr);
- }
-
-
- /**
- * Allocate (call constructor for) a new JniMarkerField.<p>
- *
- * This method is made to bypass limitation related to abstract class, see comment in JniMarker
- *
- * @return JniMarkerField a newly allocated JniMarkerField
- *
- * @see org.eclipse.linuxtools.lttng.jni.JniMarker
- */
- @Override
- public JniMarkerField allocateNewJniMarkerField(Jni_C_Pointer_And_Library_Id newMarkerFieldPtr) throws JniException {
- return new JniMarkerField_v2_3(newMarkerFieldPtr);
- }
-
-}
+++ /dev/null
-package org.eclipse.linuxtools.lttng.jni_v2_3;
-/*******************************************************************************
- * Copyright (c) 2009 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * William Bourque (wbourque@gmail.com) - Initial API and implementation
- *******************************************************************************/
-
-import org.eclipse.linuxtools.lttng.jni.JniParser;
-
-/**
- * <b><u>JniParser_v2_3</u></b>
- * <p>
- * JniParser version to support Lttng traceformat of version 2.3<br>
- * This class extend abstract class JniParser with (possibly) version specific implementation.<br>
- * <p>
- */
-public class JniParser_v2_3 extends JniParser {
-
- /*
- * Forbid access to the default constructor
- */
- protected JniParser_v2_3() {
- super();
- }
-}
+++ /dev/null
-package org.eclipse.linuxtools.lttng.jni_v2_3;
-/*******************************************************************************
- * Copyright (c) 2009, 2011 Ericsson, MontaVista Software
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * William Bourque (wbourque@gmail.com) - Initial API and implementation
- * Yufen Kuo (ykuo@mvista.com) - add support to allow user specify trace library path
- * Yufen Kuo (ykuo@mvista.com) - bug 340341: handle gracefully when native library failed to initialize
- *******************************************************************************/
-
-import org.eclipse.linuxtools.lttng.jni.JniTrace;
-import org.eclipse.linuxtools.lttng.jni.JniTracefile;
-import org.eclipse.linuxtools.lttng.jni.common.Jni_C_Pointer_And_Library_Id;
-import org.eclipse.linuxtools.lttng.jni.exception.JniException;
-
-/**
- * <b><u>JniTrace_v2_3</u></b>
- * <p>
- * JniTrace version to support Lttng traceformat of version 2.3.<br>
- * This class extend abstract class JniTrace with (possibly) version specific implementation.<br>
- *
- * It also make sure the correct library is loaded by liblttvlibraryloader.so
- * <p>
- */
-public class JniTrace_v2_3 extends JniTrace {
-
- // This is the dynamic library name that is passed to the library loader (liblttvlibraryloader.so) to load.
- // It needs to be a complete name, like "libXYZ.so", unlike java that would take "XYZ". It could also take a complete path.
- // The library need to be accessible, i.e. LD_LIBRARY_PATH need to be set correctly.
- private static final String LIBRARY_NAME = "liblttvtraceread-2.3.so"; //$NON-NLS-1$
-
- /*
- * Forbid access to the default constructor
- */
- protected JniTrace_v2_3() {
- super();
- }
-
-
- public JniTrace_v2_3(String newpath) throws JniException {
- super(newpath);
- }
-
- public JniTrace_v2_3(String newpath, boolean newPrintDebug) throws JniException {
- super(newpath, newPrintDebug);
- }
-
-
- public JniTrace_v2_3(JniTrace_v2_3 oldTrace) {
- super(oldTrace);
- }
-
- public JniTrace_v2_3(Jni_C_Pointer_And_Library_Id newPtr, boolean newPrintDebug) throws JniException {
- super(newPtr, newPrintDebug);
- }
-
- /**
- * Get the trace library name
- * <p>
- *
- * Get the version specific native trace library name
- *
- * @return The native trace library name
- */
- @Override
- public String getTraceLibName() {
- return LIBRARY_NAME;
- }
-
- /**
- * Allocate (call constructor for) a new JniTracefile.<p>
- *
- * This method is made to bypass limitation related to abstract class, see comment in JniTrace
- *
- * @return JniTracefile a newly allocated JniTracefile
- *
- * @see org.eclipse.linuxtools.lttng.jni.JniTrace
- */
- @Override
- public JniTracefile allocateNewJniTracefile(Jni_C_Pointer_And_Library_Id newPtr, JniTrace newParentTrace) throws JniException {
- return new JniTracefile_v2_3(newPtr, newParentTrace);
- }
-
-}
+++ /dev/null
-package org.eclipse.linuxtools.lttng.jni_v2_3;
-/*******************************************************************************
- * Copyright (c) 2009 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * William Bourque (wbourque@gmail.com) - Initial API and implementation
- *******************************************************************************/
-
-import java.util.HashMap;
-
-import org.eclipse.linuxtools.lttng.jni.JniEvent;
-import org.eclipse.linuxtools.lttng.jni.JniMarker;
-import org.eclipse.linuxtools.lttng.jni.JniTrace;
-import org.eclipse.linuxtools.lttng.jni.JniTracefile;
-import org.eclipse.linuxtools.lttng.jni.common.Jni_C_Pointer_And_Library_Id;
-import org.eclipse.linuxtools.lttng.jni.exception.JniException;
-
-/**
- * <b><u>JniTracefile_v2_3</u></b>
- * <p>
- * JniTracefile version to support Lttng traceformat of version 2.3<br>
- * This class extend abstract class JniTracefile with (possibly) version specific implementation.<br>
- * <p>
- */
-public class JniTracefile_v2_3 extends JniTracefile {
-
- /*
- * Forbid access to the default constructor
- */
- protected JniTracefile_v2_3() {
- super();
- }
-
-
- public JniTracefile_v2_3(JniTracefile_v2_3 oldTracefile) {
- super(oldTracefile);
- }
-
- public JniTracefile_v2_3(Jni_C_Pointer_And_Library_Id newPtr, JniTrace newParentTrace) throws JniException {
- super(newPtr, newParentTrace);
- }
-
-
- /**
- * Allocate (call constructor for) a new JniEvent.<p>
- *
- * This method is made to bypass limitation related to abstract class, see comment in JniTracefile
- *
- * @return JniEvent a newly allocated JniEvent
- *
- * @see org.eclipse.linuxtools.lttng.jni.JniTracefile
- */
- @Override
- public JniEvent allocateNewJniEvent(Jni_C_Pointer_And_Library_Id newEventPtr, HashMap<Integer, JniMarker> newMarkersMap, JniTracefile newParentTracefile) throws JniException {
- return new JniEvent_v2_3(newEventPtr, newMarkersMap, newParentTracefile);
- }
-
-
- /**
- * Allocate (call constructor for) a new JniMarker.<p>
- *
- * This method is made to bypass limitation related to abstract class, see comment in JniTracefile
- *
- * @return JniMarker a newly allocated JniMarker
- *
- * @see org.eclipse.linuxtools.lttng.jni.JniTracefile
- */
- @Override
- public JniMarker allocateNewJniMarker(Jni_C_Pointer_And_Library_Id newMarkerPtr) throws JniException {
- return new JniMarker_v2_3(newMarkerPtr);
- }
-}
+++ /dev/null
-package org.eclipse.linuxtools.lttng.jni_v2_5;
-/*******************************************************************************
- * Copyright (c) 2009 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * William Bourque (wbourque@gmail.com) - Initial API and implementation
- *******************************************************************************/
-
-import java.util.HashMap;
-
-import org.eclipse.linuxtools.lttng.jni.JniEvent;
-import org.eclipse.linuxtools.lttng.jni.JniMarker;
-import org.eclipse.linuxtools.lttng.jni.JniTracefile;
-import org.eclipse.linuxtools.lttng.jni.common.Jni_C_Pointer_And_Library_Id;
-import org.eclipse.linuxtools.lttng.jni.exception.JniException;
-
-/**
- * <b><u>JniEvent_v2_5</u></b>
- * <p>
- * JniEvent version to support Lttng traceformat of version 2.5<br>
- * This class extend abstract class JniEvent with (possibly) version specific implementation.<br>
- * <p>
- */
-public class JniEvent_v2_5 extends JniEvent {
-
- /*
- * Forbid access to the default constructor
- */
- protected JniEvent_v2_5() {
- super();
- }
-
- public JniEvent_v2_5(JniEvent_v2_5 oldEvent) {
- super(oldEvent);
- }
-
- public JniEvent_v2_5(Jni_C_Pointer_And_Library_Id newEventPtr, HashMap<Integer, JniMarker> newMarkersMap, JniTracefile newParentTracefile) throws JniException {
- super(newEventPtr, newMarkersMap, newParentTracefile);
- }
-
-}
+++ /dev/null
-package org.eclipse.linuxtools.lttng.jni_v2_5;
-/*******************************************************************************
- * Copyright (c) 2009 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * William Bourque (wbourque@gmail.com) - Initial API and implementation
- *******************************************************************************/
-
-import org.eclipse.linuxtools.lttng.jni.JniMarkerField;
-import org.eclipse.linuxtools.lttng.jni.common.Jni_C_Pointer_And_Library_Id;
-import org.eclipse.linuxtools.lttng.jni.exception.JniException;
-
-/**
- * <b><u>JniMarkerField_v2_5</u></b>
- * <p>
- * JniMarkerField version to support Lttng traceformat of version 2.5<br>
- * This class extend abstract class JniMarkerField with (possibly) version specific implementation.<br>
- * <p>
- */
-public class JniMarkerField_v2_5 extends JniMarkerField {
-
- /*
- * Forbid access to the default constructor
- */
- protected JniMarkerField_v2_5() {
- super();
- }
-
-
- public JniMarkerField_v2_5(JniMarkerField_v2_5 oldMarkerField) {
- super(oldMarkerField);
- }
-
- public JniMarkerField_v2_5(Jni_C_Pointer_And_Library_Id newMarkerFieldPtr) throws JniException {
- super(newMarkerFieldPtr);
- }
-}
+++ /dev/null
-package org.eclipse.linuxtools.lttng.jni_v2_5;
-/*******************************************************************************
- * Copyright (c) 2009 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * William Bourque (wbourque@gmail.com) - Initial API and implementation
- *******************************************************************************/
-
-import org.eclipse.linuxtools.lttng.jni.JniMarker;
-import org.eclipse.linuxtools.lttng.jni.JniMarkerField;
-import org.eclipse.linuxtools.lttng.jni.common.Jni_C_Pointer_And_Library_Id;
-import org.eclipse.linuxtools.lttng.jni.exception.JniException;
-
-/**
- * <b><u>JniMarker_v2_5</u></b>
- * <p>
- * JniMarker version to support Lttng traceformat of version 2.5<br>
- * This class extend abstract class JniMarker with (possibly) version specific implementation.<br>
- * <p>
- */
-public class JniMarker_v2_5 extends JniMarker {
-
- /*
- * Forbid access to the default constructor
- */
- protected JniMarker_v2_5() {
- super();
- }
-
-
- public JniMarker_v2_5(JniMarker_v2_5 oldMarker) {
- super(oldMarker);
- }
-
- public JniMarker_v2_5(Jni_C_Pointer_And_Library_Id newMarkerPtr) throws JniException {
- super(newMarkerPtr);
- }
-
-
- /**
- * Allocate (call constructor for) a new JniMarkerField.<p>
- *
- * This method is made to bypass limitation related to abstract class, see comment in JniMarker
- *
- * @return JniMarkerField a newly allocated JniMarkerField
- *
- * @see org.eclipse.linuxtools.lttng.jni.JniMarker
- */
- @Override
- public JniMarkerField allocateNewJniMarkerField(Jni_C_Pointer_And_Library_Id newMarkerFieldPtr) throws JniException {
- return new JniMarkerField_v2_5(newMarkerFieldPtr);
- }
-
-}
+++ /dev/null
-package org.eclipse.linuxtools.lttng.jni_v2_5;
-/*******************************************************************************
- * Copyright (c) 2009 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * William Bourque (wbourque@gmail.com) - Initial API and implementation
- *******************************************************************************/
-
-import org.eclipse.linuxtools.lttng.jni.JniParser;
-
-/**
- * <b><u>JniParser_v2_5</u></b>
- * <p>
- * JniParser version to support Lttng traceformat of version 2.5<br>
- * This class extend abstract class JniParser with (possibly) version specific implementation.<br>
- * <p>
- */
-public class JniParser_v2_5 extends JniParser {
-
- /*
- * Forbid access to the default constructor
- */
- protected JniParser_v2_5() {
- super();
- }
-}
+++ /dev/null
-package org.eclipse.linuxtools.lttng.jni_v2_5;
-/*******************************************************************************
- * Copyright (c) 2009, 2011 Ericsson, MontaVista Software
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * William Bourque (wbourque@gmail.com) - Initial API and implementation
- * Yufen Kuo (ykuo@mvista.com) - add support to allow user specify trace library path
- * Yufen Kuo (ykuo@mvista.com) - bug 340341: handle gracefully when native library failed to initialize
- *******************************************************************************/
-
-import org.eclipse.linuxtools.lttng.jni.JniTrace;
-import org.eclipse.linuxtools.lttng.jni.JniTracefile;
-import org.eclipse.linuxtools.lttng.jni.common.Jni_C_Pointer_And_Library_Id;
-import org.eclipse.linuxtools.lttng.jni.exception.JniException;
-
-/**
- * <b><u>JniTrace_v2_5</u></b>
- * <p>
- * JniTrace version to support Lttng traceformat of version 2.5.<br>
- * This class extend abstract class JniTrace with (possibly) version specific implementation (none yet).<br>
- *
- * It also make sure the correct library is loaded by liblttvlibraryloader.so
- * <p>
- */
-public class JniTrace_v2_5 extends JniTrace {
-
- // This is the dynamic library name that is passed to the library loader (liblttvlibraryloader.so) to load.
- // It needs to be a complete name, like "libXYZ.so", unlike java that would take "XYZ". It could also take a complete path.
- // The library need to be accessible, i.e. LD_LIBRARY_PATH need to be set correctly.
- private static final String LIBRARY_NAME = "liblttvtraceread-2.5.so"; //$NON-NLS-1$
-
- /*
- * Forbid access to the default constructor
- */
- protected JniTrace_v2_5() {
- super();
- }
-
-
- public JniTrace_v2_5(String newpath) throws JniException {
- super(newpath);
- }
-
- public JniTrace_v2_5(String newpath, boolean newPrintDebug) throws JniException {
- super(newpath, newPrintDebug);
- }
-
-
- public JniTrace_v2_5(JniTrace_v2_5 oldTrace) {
- super(oldTrace);
- }
-
- public JniTrace_v2_5(Jni_C_Pointer_And_Library_Id newPtr, boolean newPrintDebug) throws JniException {
- super(newPtr, newPrintDebug);
- }
-
-
- /**
- * Get the trace library name
- * <p>
- *
- * Get the version specific native trace library name
- *
- * @return The native trace library name
- */
- @Override
- public String getTraceLibName() {
- return LIBRARY_NAME;
- }
-
- /**
- * Allocate (call constructor for) a new JniTracefile.<p>
- *
- * This method is made to bypass limitation related to abstract class, see comment in JniTrace
- *
- * @return JniTracefile a newly allocated JniTracefile
- *
- * @see org.eclipse.linuxtools.lttng.jni.JniTrace
- */
- @Override
- public JniTracefile allocateNewJniTracefile(Jni_C_Pointer_And_Library_Id newPtr, JniTrace newParentTrace) throws JniException {
- return new JniTracefile_v2_5(newPtr, newParentTrace);
- }
-
-
-
-}
+++ /dev/null
-package org.eclipse.linuxtools.lttng.jni_v2_5;
-/*******************************************************************************
- * Copyright (c) 2009 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * William Bourque (wbourque@gmail.com) - Initial API and implementation
- *******************************************************************************/
-
-import java.util.HashMap;
-
-import org.eclipse.linuxtools.lttng.jni.JniEvent;
-import org.eclipse.linuxtools.lttng.jni.JniMarker;
-import org.eclipse.linuxtools.lttng.jni.JniTrace;
-import org.eclipse.linuxtools.lttng.jni.JniTracefile;
-import org.eclipse.linuxtools.lttng.jni.common.Jni_C_Pointer_And_Library_Id;
-import org.eclipse.linuxtools.lttng.jni.exception.JniException;
-
-/**
- * <b><u>JniTracefile_v2_5</u></b>
- * <p>
- * JniTracefile version to support Lttng traceformat of version 2.5<br>
- * This class extend abstract class JniTracefile with (possibly) version specific implementation.<br>
- * <p>
- */
-public class JniTracefile_v2_5 extends JniTracefile {
-
- /*
- * Forbid access to the default constructor
- */
- protected JniTracefile_v2_5() {
- super();
- }
-
-
- public JniTracefile_v2_5(JniTracefile_v2_5 oldTracefile) {
- super(oldTracefile);
- }
-
- public JniTracefile_v2_5(Jni_C_Pointer_And_Library_Id newPtr, JniTrace newParentTrace) throws JniException {
- super(newPtr, newParentTrace);
- }
-
-
- /**
- * Allocate (call constructor for) a new JniEvent.<p>
- *
- * This method is made to bypass limitation related to abstract class, see comment in JniTracefile
- *
- * @return JniEvent a newly allocated JniEvent
- *
- * @see org.eclipse.linuxtools.lttng.jni.JniTracefile
- */
- @Override
- public JniEvent allocateNewJniEvent(Jni_C_Pointer_And_Library_Id newEventPtr, HashMap<Integer, JniMarker> newMarkersMap, JniTracefile newParentTracefile) throws JniException {
- return new JniEvent_v2_5(newEventPtr, newMarkersMap, newParentTracefile);
- }
-
-
- /**
- * Allocate (call constructor for) a new JniMarker.<p>
- *
- * This method is made to bypass limitation related to abstract class, see comment in JniTracefile
- *
- * @return JniMarker a newly allocated JniMarker
- *
- * @see org.eclipse.linuxtools.lttng.jni.JniTracefile
- */
- @Override
- public JniMarker allocateNewJniMarker(Jni_C_Pointer_And_Library_Id newMarkerPtr) throws JniException {
- return new JniMarker_v2_5(newMarkerPtr);
- }
-
-}
+++ /dev/null
-package org.eclipse.linuxtools.lttng.jni_v2_6;
-/*******************************************************************************
- * Copyright (c) 2009 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * William Bourque (wbourque@gmail.com) - Initial API and implementation
- *******************************************************************************/
-
-import java.util.HashMap;
-
-import org.eclipse.linuxtools.lttng.jni.JniEvent;
-import org.eclipse.linuxtools.lttng.jni.JniMarker;
-import org.eclipse.linuxtools.lttng.jni.JniTracefile;
-import org.eclipse.linuxtools.lttng.jni.common.Jni_C_Pointer_And_Library_Id;
-import org.eclipse.linuxtools.lttng.jni.exception.JniException;
-
-/**
- * <b><u>JniEvent_v2_6</u></b>
- * <p>
- * JniEvent version to support Lttng traceformat of version 2.6<br>
- * This class extend abstract class JniEvent with (possibly) version specific implementation.<br>
- * <p>
- */
-public class JniEvent_v2_6 extends JniEvent {
-
- /*
- * Forbid access to the default constructor
- */
- protected JniEvent_v2_6() {
- super();
- }
-
- public JniEvent_v2_6(JniEvent_v2_6 oldEvent) {
- super(oldEvent);
- }
-
- public JniEvent_v2_6(Jni_C_Pointer_And_Library_Id newEventPtr, HashMap<Integer, JniMarker> newMarkersMap, JniTracefile newParentTracefile) throws JniException {
- super(newEventPtr, newMarkersMap, newParentTracefile);
- }
-
-}
+++ /dev/null
-package org.eclipse.linuxtools.lttng.jni_v2_6;
-/*******************************************************************************
- * Copyright (c) 2009 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * William Bourque (wbourque@gmail.com) - Initial API and implementation
- *******************************************************************************/
-
-import org.eclipse.linuxtools.lttng.jni.JniMarkerField;
-import org.eclipse.linuxtools.lttng.jni.common.Jni_C_Pointer_And_Library_Id;
-import org.eclipse.linuxtools.lttng.jni.exception.JniException;
-
-/**
- * <b><u>JniMarkerField_v2_6</u></b>
- * <p>
- * JniMarkerField version to support Lttng traceformat of version 2.6<br>
- * This class extend abstract class JniMarkerField with (possibly) version specific implementation.<br>
- * <p>
- */
-public class JniMarkerField_v2_6 extends JniMarkerField {
-
- /*
- * Forbid access to the default constructor
- */
- protected JniMarkerField_v2_6() {
- super();
- }
-
-
- public JniMarkerField_v2_6(JniMarkerField_v2_6 oldMarkerField) {
- super(oldMarkerField);
- }
-
- public JniMarkerField_v2_6(Jni_C_Pointer_And_Library_Id newMarkerFieldPtr) throws JniException {
- super(newMarkerFieldPtr);
- }
-}
+++ /dev/null
-package org.eclipse.linuxtools.lttng.jni_v2_6;
-/*******************************************************************************
- * Copyright (c) 2009 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * William Bourque (wbourque@gmail.com) - Initial API and implementation
- *******************************************************************************/
-
-import org.eclipse.linuxtools.lttng.jni.JniMarker;
-import org.eclipse.linuxtools.lttng.jni.JniMarkerField;
-import org.eclipse.linuxtools.lttng.jni.common.Jni_C_Pointer_And_Library_Id;
-import org.eclipse.linuxtools.lttng.jni.exception.JniException;
-
-/**
- * <b><u>JniMarker_v2_6</u></b>
- * <p>
- * JniMarker version to support Lttng traceformat of version 2.6<br>
- * This class extend abstract class JniMarker with (possibly) version specific implementation.<br>
- * <p>
- */
-public class JniMarker_v2_6 extends JniMarker {
-
- /*
- * Forbid access to the default constructor
- */
- protected JniMarker_v2_6() {
- super();
- }
-
-
- public JniMarker_v2_6(JniMarker_v2_6 oldMarker) {
- super(oldMarker);
- }
-
- public JniMarker_v2_6(Jni_C_Pointer_And_Library_Id newMarkerPtr) throws JniException {
- super(newMarkerPtr);
- }
-
-
- /**
- * Allocate (call constructor for) a new JniMarkerField.<p>
- *
- * This method is made to bypass limitation related to abstract class, see comment in JniMarker
- *
- * @return JniMarkerField a newly allocated JniMarkerField
- *
- * @see org.eclipse.linuxtools.lttng.jni.JniMarker
- */
- @Override
- public JniMarkerField allocateNewJniMarkerField(Jni_C_Pointer_And_Library_Id newMarkerFieldPtr) throws JniException {
- return new JniMarkerField_v2_6(newMarkerFieldPtr);
- }
-}
+++ /dev/null
-package org.eclipse.linuxtools.lttng.jni_v2_6;
-/*******************************************************************************
- * Copyright (c) 2009 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * William Bourque (wbourque@gmail.com) - Initial API and implementation
- *******************************************************************************/
-
-import org.eclipse.linuxtools.lttng.jni.JniParser;
-
-/**
- * <b><u>JniParser_v2_6</u></b>
- * <p>
- * JniParser version to support Lttng traceformat of version 2.6<br>
- * This class extend abstract class JniParser with (possibly) version specific implementation.<br>
- * <p>
- */
-public class JniParser_v2_6 extends JniParser {
-
- /*
- * Forbid access to the default constructor
- */
- protected JniParser_v2_6() {
- super();
- }
-}
+++ /dev/null
-package org.eclipse.linuxtools.lttng.jni_v2_6;
-/*******************************************************************************
- * Copyright (c) 2009, 2011 Ericsson, MontaVista Software
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * William Bourque (wbourque@gmail.com) - Initial API and implementation
- * Yufen Kuo (ykuo@mvista.com) - add support to allow user specify trace library path
- * Yufen Kuo (ykuo@mvista.com) - bug 340341: handle gracefully when native library failed to initialize
- *******************************************************************************/
-
-import org.eclipse.linuxtools.lttng.jni.JniTrace;
-import org.eclipse.linuxtools.lttng.jni.JniTracefile;
-import org.eclipse.linuxtools.lttng.jni.common.Jni_C_Pointer_And_Library_Id;
-import org.eclipse.linuxtools.lttng.jni.exception.JniException;
-
-/**
- * <b><u>JniTrace_v2_6</u></b>
- * <p>
- * JniTrace version to support Lttng traceformat of version 2.6.<br>
- * This class extend abstract class JniTrace with (possibly) version specific implementation (none yet).<br>
- *
- * It also make sure the correct library is loaded by liblttvlibraryloader.so
- * <p>
- */
-public class JniTrace_v2_6 extends JniTrace {
-
- // This is the dynamic library name that is passed to the library loader (liblttvlibraryloader.so) to load.
- // It needs to be a complete name, like "libXYZ.so", unlike java that would take "XYZ". It could also take a complete path.
- // The library need to be accessible, i.e. LD_LIBRARY_PATH need to be set correctly.
- private static final String LIBRARY_NAME = "liblttvtraceread-2.6.so"; //$NON-NLS-1$
-
- /*
- * Forbid access to the default constructor
- */
- protected JniTrace_v2_6() {
- super();
- }
-
- public JniTrace_v2_6(String newpath) throws JniException {
- super(newpath);
- }
-
- public JniTrace_v2_6(String newpath, boolean newPrintDebug) throws JniException {
- super(newpath, newPrintDebug);
- }
-
- public JniTrace_v2_6(JniTrace_v2_6 oldTrace) {
- super(oldTrace);
- }
-
- public JniTrace_v2_6(Jni_C_Pointer_And_Library_Id newPtr, boolean newPrintDebug) throws JniException {
- super(newPtr, newPrintDebug);
- }
-
- /**
- * Get the trace library name
- * <p>
- *
- * Get the version specific native trace library name
- *
- * @return The native trace library name
- */
- @Override
- public String getTraceLibName() {
- return LIBRARY_NAME;
- }
-
- /**
- * Allocate (call constructor for) a new JniTracefile.<p>
- *
- * This method is made to bypass limitation related to abstract class, see comment in JniTrace
- *
- * @return JniTracefile a newly allocated JniTracefile
- *
- * @see org.eclipse.linuxtools.lttng.jni.JniTrace
- */
- @Override
- public JniTracefile allocateNewJniTracefile(Jni_C_Pointer_And_Library_Id newPtr, JniTrace newParentTrace) throws JniException {
- return new JniTracefile_v2_6(newPtr, newParentTrace);
- }
-}
+++ /dev/null
-package org.eclipse.linuxtools.lttng.jni_v2_6;
-/*******************************************************************************
- * Copyright (c) 2009 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * William Bourque (wbourque@gmail.com) - Initial API and implementation
- *******************************************************************************/
-
-import java.util.HashMap;
-
-import org.eclipse.linuxtools.lttng.jni.JniEvent;
-import org.eclipse.linuxtools.lttng.jni.JniMarker;
-import org.eclipse.linuxtools.lttng.jni.JniTrace;
-import org.eclipse.linuxtools.lttng.jni.JniTracefile;
-import org.eclipse.linuxtools.lttng.jni.common.Jni_C_Pointer_And_Library_Id;
-import org.eclipse.linuxtools.lttng.jni.exception.JniException;
-
-/**
- * <b><u>JniTracefile_v2_6</u></b>
- * <p>
- * JniTracefile version to support Lttng traceformat of version 2.6<br>
- * This class extend abstract class JniTracefile with (possibly) version specific implementation.<br>
- * <p>
- */
-public class JniTracefile_v2_6 extends JniTracefile {
-
- /*
- * Forbid access to the default constructor
- */
- protected JniTracefile_v2_6() {
- super();
- }
-
-
- public JniTracefile_v2_6(JniTracefile_v2_6 oldTracefile) {
- super(oldTracefile);
- }
-
- public JniTracefile_v2_6(Jni_C_Pointer_And_Library_Id newPtr, JniTrace newParentTrace) throws JniException {
- super(newPtr, newParentTrace);
- }
-
-
- /**
- * Allocate (call constructor for) a new JniEvent.<p>
- *
- * This method is made to bypass limitation related to abstract class, see comment in JniTracefile
- *
- * @return JniEvent a newly allocated JniEvent
- *
- * @see org.eclipse.linuxtools.lttng.jni.JniTracefile
- */
- @Override
- public JniEvent allocateNewJniEvent(Jni_C_Pointer_And_Library_Id newEventPtr, HashMap<Integer, JniMarker> newMarkersMap, JniTracefile newParentTracefile) throws JniException {
- return new JniEvent_v2_6(newEventPtr, newMarkersMap, newParentTracefile);
- }
-
-
- /**
- * Allocate (call constructor for) a new JniMarker.<p>
- *
- * This method is made to bypass limitation related to abstract class, see comment in JniTracefile
- *
- * @return JniMarker a newly allocated JniMarker
- *
- * @see org.eclipse.linuxtools.lttng.jni.JniTracefile
- */
- @Override
- public JniMarker allocateNewJniMarker(Jni_C_Pointer_And_Library_Id newMarkerPtr) throws JniException {
- return new JniMarker_v2_6(newMarkerPtr);
- }
-
-}