import org.eclipse.linuxtools.internal.lttng2.kernel.core.Attributes;
import org.eclipse.linuxtools.internal.lttng2.kernel.core.LttngStrings;
import org.eclipse.linuxtools.internal.lttng2.kernel.core.StateValues;
-import org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfEvent;
-import org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTrace;
+import org.eclipse.linuxtools.statesystem.core.ITmfStateSystemBuilder;
+import org.eclipse.linuxtools.statesystem.core.exceptions.AttributeNotFoundException;
+import org.eclipse.linuxtools.statesystem.core.exceptions.StateValueTypeException;
+import org.eclipse.linuxtools.statesystem.core.exceptions.TimeRangeException;
+import org.eclipse.linuxtools.statesystem.core.statevalue.ITmfStateValue;
+import org.eclipse.linuxtools.statesystem.core.statevalue.TmfStateValue;
import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
import org.eclipse.linuxtools.tmf.core.event.ITmfEventField;
-import org.eclipse.linuxtools.tmf.core.exceptions.AttributeNotFoundException;
-import org.eclipse.linuxtools.tmf.core.exceptions.StateValueTypeException;
-import org.eclipse.linuxtools.tmf.core.exceptions.TimeRangeException;
import org.eclipse.linuxtools.tmf.core.statesystem.AbstractTmfStateProvider;
-import org.eclipse.linuxtools.tmf.core.statesystem.ITmfStateSystemBuilder;
-import org.eclipse.linuxtools.tmf.core.statevalue.ITmfStateValue;
-import org.eclipse.linuxtools.tmf.core.statevalue.TmfStateValue;
+import org.eclipse.linuxtools.tmf.ctf.core.CtfTmfEvent;
+import org.eclipse.linuxtools.tmf.ctf.core.CtfTmfTrace;
/**
* This is the state change input plugin for TMF's state system which handles
*/
final CtfTmfEvent event = (CtfTmfEvent) ev;
- final ITmfEventField content = event.getContent();
final String eventName = event.getType().getName();
final long ts = event.getTimestamp().getValue();
case LttngStrings.IRQ_HANDLER_ENTRY:
/* Fields: int32 irq, string name */
{
- Integer irqId = ((Long) content.getField(LttngStrings.IRQ).getValue()).intValue();
+ Integer irqId = ((Long) event.getContent().getField(LttngStrings.IRQ).getValue()).intValue();
/* Mark this IRQ as active in the resource tree.
* The state value = the CPU on which this IRQ is sitting */
case LttngStrings.IRQ_HANDLER_EXIT:
/* Fields: int32 irq, int32 ret */
{
- Integer irqId = ((Long) content.getField(LttngStrings.IRQ).getValue()).intValue();
+ Integer irqId = ((Long) event.getContent().getField(LttngStrings.IRQ).getValue()).intValue();
/* Put this IRQ back to inactive in the resource tree */
quark = ss.getQuarkRelativeAndAdd(getNodeIRQs(), irqId.toString());
case LttngStrings.SOFTIRQ_ENTRY:
/* Fields: int32 vec */
{
- Integer softIrqId = ((Long) content.getField(LttngStrings.VEC).getValue()).intValue();
+ Integer softIrqId = ((Long) event.getContent().getField(LttngStrings.VEC).getValue()).intValue();
/* Mark this SoftIRQ as active in the resource tree.
* The state value = the CPU on which this SoftIRQ is processed */
case LttngStrings.SOFTIRQ_EXIT:
/* Fields: int32 vec */
{
- Integer softIrqId = ((Long) content.getField(LttngStrings.VEC).getValue()).intValue();
+ Integer softIrqId = ((Long) event.getContent().getField(LttngStrings.VEC).getValue()).intValue();
/* Put this SoftIRQ back to inactive (= -1) in the resource tree */
quark = ss.getQuarkRelativeAndAdd(getNodeSoftIRQs(), softIrqId.toString());
case LttngStrings.SOFTIRQ_RAISE:
/* Fields: int32 vec */
{
- Integer softIrqId = ((Long) content.getField(LttngStrings.VEC).getValue()).intValue();
+ Integer softIrqId = ((Long) event.getContent().getField(LttngStrings.VEC).getValue()).intValue();
/* Mark this SoftIRQ as *raised* in the resource tree.
* State value = -2 */
* string next_comm, int32 next_tid, int32 next_prio
*/
{
+ ITmfEventField content = event.getContent();
Integer prevTid = ((Long) content.getField(LttngStrings.PREV_TID).getValue()).intValue();
Long prevState = (Long) content.getField(LttngStrings.PREV_STATE).getValue();
String nextProcessName = (String) content.getField(LttngStrings.NEXT_COMM).getValue();
/* Fields: string parent_comm, int32 parent_tid,
* string child_comm, int32 child_tid */
{
+ ITmfEventField content = event.getContent();
// String parentProcessName = (String) event.getFieldValue("parent_comm");
String childProcessName = (String) content.getField(LttngStrings.CHILD_COMM).getValue();
// assert ( parentProcessName.equals(childProcessName) );
* this is when we should delete everything wrt to the process.
*/
{
- Integer tid = ((Long) content.getField(LttngStrings.TID).getValue()).intValue();
+ Integer tid = ((Long) event.getContent().getField(LttngStrings.TID).getValue()).intValue();
/*
* Remove the process and all its sub-attributes from the
* current state
* int32 type, int32 mode, int32 pid, int32 submode, int32 vpid,
* int32 ppid, int32 tid, string name, int32 status, int32 vtid */
{
+ ITmfEventField content = event.getContent();
int tid = ((Long) content.getField(LttngStrings.TID).getValue()).intValue();
int pid = ((Long) content.getField(LttngStrings.PID).getValue()).intValue();
int ppid = ((Long) content.getField(LttngStrings.PPID).getValue()).intValue();
* string comm, int32 pid, int32 prio, int32 success,
* int32 target_cpu */
{
- final int tid = ((Long) content.getField(LttngStrings.TID).getValue()).intValue();
+ final int tid = ((Long) event.getContent().getField(LttngStrings.TID).getValue()).intValue();
final int threadNode = ss.getQuarkRelativeAndAdd(getNodeThreads(), String.valueOf(tid));
/*