Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeneviève Bastien2018-05-02 23:00:36 -0400
committerGenevieve Bastien2018-05-03 10:28:26 -0400
commit7f239ef7f403777f484bc21d55732ad84a966c6c (patch)
tree42d4ecfa9b86f536abf07c14e587ad677412e1d8
parentf429bde3e40c8ccc297b81cc343546c6b03c7ebf (diff)
downloadorg.eclipse.tracecompass.incubator-7f239ef7f403777f484bc21d55732ad84a966c6c.tar.gz
org.eclipse.tracecompass.incubator-7f239ef7f403777f484bc21d55732ad84a966c6c.tar.xz
org.eclipse.tracecompass.incubator-7f239ef7f403777f484bc21d55732ad84a966c6c.zip
fix deprecated methods
Recent changes in Trace Compass broke a lot of APIs in the incubator. Change-Id: I249fe4e57131ee51e2844507e9a72d159fcb4786 Signed-off-by: Geneviève Bastien <gbastien+lttng@versatic.net> Reviewed-on: https://git.eclipse.org/r/122055 Tested-by: CI Bot Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
-rw-r--r--analyses/org.eclipse.tracecompass.incubator.xaf.ui/src/org/eclipse/tracecompass/incubator/internal/xaf/ui/statemachine/StateMachineAnalysis.java8
-rw-r--r--callstack/org.eclipse.tracecompass.incubator.callstack.core.tests/src/org/eclipse/tracecompass/incubator/callstack/core/tests/callgraph/instrumented/AggregatedCalledFunctionStatisticsTest.java54
-rw-r--r--callstack/org.eclipse.tracecompass.incubator.callstack.core.tests/src/org/eclipse/tracecompass/incubator/callstack/core/tests/callgraph/instrumented/AggregationTreeTest.java94
-rw-r--r--callstack/org.eclipse.tracecompass.incubator.callstack.core.tests/src/org/eclipse/tracecompass/incubator/callstack/core/tests/flamechart/statesystem/CallStackStateSystemTest.java1
-rw-r--r--callstack/org.eclipse.tracecompass.incubator.callstack.core.tests/stubs/org/eclipse/tracecompass/incubator/callstack/core/tests/stubs/CallStackProviderStub.java2
-rw-r--r--callstack/org.eclipse.tracecompass.incubator.callstack.core/src/org/eclipse/tracecompass/incubator/callstack/core/instrumented/statesystem/CallStackStateProvider.java25
-rw-r--r--callstack/org.eclipse.tracecompass.incubator.callstack.ui/src/org/eclipse/tracecompass/incubator/internal/callstack/ui/views/cct/CallingContextTreeViewer.java21
-rw-r--r--tracetypes/org.eclipse.tracecompass.incubator.hudson.maven.core/src/org/eclipse/tracecompass/incubator/internal/hudson/maven/core/analysis/MavenCallstackStateProvider.java11
-rw-r--r--tracetypes/org.eclipse.tracecompass.incubator.perf.profiling.core/src/org/eclipse/tracecompass/incubator/internal/perf/profiling/core/symbol/PerfMmapSymbolProvider.java7
-rw-r--r--tracetypes/org.eclipse.tracecompass.incubator.traceevent.core/src/org/eclipse/tracecompass/incubator/internal/traceevent/core/analysis/callstack/TraceEventCallStackProvider.java17
-rw-r--r--tracetypes/org.eclipse.tracecompass.incubator.uftrace.core/src/org/eclipse/tracecompass/incubator/internal/uftrace/core/analysis/UfCallstackProvider.java10
-rw-r--r--tracetypes/org.eclipse.tracecompass.incubator.uftrace.core/src/org/eclipse/tracecompass/incubator/internal/uftrace/core/trace/Uftrace.java21
-rw-r--r--vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core.tests/src/org/eclipse/tracecompass/incubator/virtual/machine/analysis/core/tests/fused/OneQemuKvmFusedTestCase.java16
-rw-r--r--vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core.tests/src/org/eclipse/tracecompass/incubator/virtual/machine/analysis/core/tests/fused/QemuContainerTestCase.java34
-rw-r--r--vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core.tests/src/org/eclipse/tracecompass/incubator/virtual/machine/analysis/core/tests/fused/SimpleContainersTestCase.java162
-rw-r--r--vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core.tests/src/org/eclipse/tracecompass/incubator/virtual/machine/analysis/core/tests/model/OneQemuKvmModelTestCase.java7
-rw-r--r--vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/META-INF/MANIFEST.MF2
-rw-r--r--vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/FusedVMInformationProvider.java24
-rw-r--r--vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/FusedVMEventHandlerUtils.java53
-rw-r--r--vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/FusedVirtualMachineStateProvider.java38
-rw-r--r--vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/IrqEntryHandler.java15
-rw-r--r--vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/IrqExitHandler.java7
-rw-r--r--vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/KvmEntryHandler.java35
-rw-r--r--vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/KvmExitHandler.java34
-rw-r--r--vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/KvmMmuGetPageHandler.java7
-rw-r--r--vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/KvmNestedVmExitInjectHandler.java7
-rw-r--r--vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/PiSetprioHandler.java5
-rw-r--r--vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/ProcessForkContainerHandler.java76
-rw-r--r--vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/SchedSwitchHandler.java55
-rw-r--r--vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/SchedWakeupHandler.java15
-rw-r--r--vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/SoftIrqEntryHandler.java10
-rw-r--r--vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/SoftIrqExitHandler.java22
-rw-r--r--vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/SoftIrqRaiseHandler.java14
-rw-r--r--vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/StateDumpContainerHandler.java58
-rw-r--r--vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/SysEntryHandler.java13
-rw-r--r--vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/SysExitHandler.java13
-rw-r--r--vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/model/VirtualCPU.java26
-rw-r--r--vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/virtual/resources/StateValues.java42
-rw-r--r--vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.ui/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/ui/views/vcpuview/VirtualMachinePresentationProvider.java2
-rw-r--r--vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.ui/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/ui/views/vresources/Machine.java13
-rw-r--r--vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.ui/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/ui/views/vresources/VirtualResourcePresentationProvider.java5
-rw-r--r--vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.ui/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/ui/views/vresources/VirtualResourcesView.java20
42 files changed, 498 insertions, 603 deletions
diff --git a/analyses/org.eclipse.tracecompass.incubator.xaf.ui/src/org/eclipse/tracecompass/incubator/internal/xaf/ui/statemachine/StateMachineAnalysis.java b/analyses/org.eclipse.tracecompass.incubator.xaf.ui/src/org/eclipse/tracecompass/incubator/internal/xaf/ui/statemachine/StateMachineAnalysis.java
index b6baf030..11c438b7 100644
--- a/analyses/org.eclipse.tracecompass.incubator.xaf.ui/src/org/eclipse/tracecompass/incubator/internal/xaf/ui/statemachine/StateMachineAnalysis.java
+++ b/analyses/org.eclipse.tracecompass.incubator.xaf.ui/src/org/eclipse/tracecompass/incubator/internal/xaf/ui/statemachine/StateMachineAnalysis.java
@@ -9,11 +9,8 @@
package org.eclipse.tracecompass.incubator.internal.xaf.ui.statemachine;
-import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
-
import java.io.FileNotFoundException;
import java.io.IOException;
-import java.io.ObjectInputStream;
import java.io.PrintWriter;
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
@@ -521,9 +518,4 @@ public class StateMachineAnalysis extends AbstractSegmentStoreAnalysisModule {
}
- @Override
- protected Object @NonNull [] readObject(@NonNull ObjectInputStream ois) throws ClassNotFoundException, IOException {
- return checkNotNull((Object[]) ois.readObject());
- }
-
}
diff --git a/callstack/org.eclipse.tracecompass.incubator.callstack.core.tests/src/org/eclipse/tracecompass/incubator/callstack/core/tests/callgraph/instrumented/AggregatedCalledFunctionStatisticsTest.java b/callstack/org.eclipse.tracecompass.incubator.callstack.core.tests/src/org/eclipse/tracecompass/incubator/callstack/core/tests/callgraph/instrumented/AggregatedCalledFunctionStatisticsTest.java
index aba05545..e9ea0b60 100644
--- a/callstack/org.eclipse.tracecompass.incubator.callstack.core.tests/src/org/eclipse/tracecompass/incubator/callstack/core/tests/callgraph/instrumented/AggregatedCalledFunctionStatisticsTest.java
+++ b/callstack/org.eclipse.tracecompass.incubator.callstack.core.tests/src/org/eclipse/tracecompass/incubator/callstack/core/tests/callgraph/instrumented/AggregatedCalledFunctionStatisticsTest.java
@@ -101,20 +101,20 @@ public class AggregatedCalledFunctionStatisticsTest {
// Build the state system
int parentQuark = fixture.getQuarkAbsoluteAndAdd(CallGraphAnalysisStub.PROCESS_PATH, CallGraphAnalysisStub.THREAD_PATH, CallGraphAnalysisStub.CALLSTACK_PATH);
int quark = fixture.getQuarkRelativeAndAdd(parentQuark, QUARK_0);
- TmfStateValue statev = TmfStateValue.newValueLong(0);
+ long statev = 0L;
fixture.modifyAttribute(0, statev, quark);
- fixture.modifyAttribute(100, TmfStateValue.nullValue(), quark);
+ fixture.modifyAttribute(100, (Object) null, quark);
quark = fixture.getQuarkRelativeAndAdd(parentQuark, QUARK_1);
- statev = TmfStateValue.newValueLong(1);
+ statev = 1L;
fixture.modifyAttribute(0, statev, quark);
- fixture.modifyAttribute(50, TmfStateValue.nullValue(), quark);
+ fixture.modifyAttribute(50, (Object) null, quark);
fixture.modifyAttribute(60, statev, quark);
- fixture.modifyAttribute(90, TmfStateValue.nullValue(), quark);
+ fixture.modifyAttribute(90, (Object) null, quark);
quark = fixture.getQuarkRelativeAndAdd(parentQuark, QUARK_2);
fixture.modifyAttribute(0, statev, quark);
- fixture.modifyAttribute(30, TmfStateValue.nullValue(), quark);
+ fixture.modifyAttribute(30, (Object) null, quark);
fixture.closeHistory(102);
// Execute the CallGraphAnalysis
@@ -186,24 +186,24 @@ public class AggregatedCalledFunctionStatisticsTest {
// Build the state system
int parentQuark = fixture.getQuarkAbsoluteAndAdd(CallGraphAnalysisStub.PROCESS_PATH, CallGraphAnalysisStub.THREAD_PATH, CallGraphAnalysisStub.CALLSTACK_PATH);
int quark = fixture.getQuarkRelativeAndAdd(parentQuark, QUARK_0);
- TmfStateValue statev = TmfStateValue.newValueLong(0);
+ Object statev = 0L;
fixture.modifyAttribute(0, statev, quark);
- fixture.modifyAttribute(100, TmfStateValue.nullValue(), quark);
+ fixture.modifyAttribute(100, (Object) null, quark);
quark = fixture.getQuarkRelativeAndAdd(parentQuark, QUARK_1);
statev = TmfStateValue.newValueLong(1);
fixture.modifyAttribute(0, statev, quark);
- fixture.modifyAttribute(50, TmfStateValue.nullValue(), quark);
+ fixture.modifyAttribute(50, (Object) null, quark);
fixture.modifyAttribute(60, statev, quark);
- fixture.modifyAttribute(90, TmfStateValue.nullValue(), quark);
+ fixture.modifyAttribute(90, (Object) null, quark);
quark = fixture.getQuarkRelativeAndAdd(parentQuark, QUARK_2);
statev = TmfStateValue.newValueLong(2);
fixture.modifyAttribute(0, statev, quark);
- fixture.modifyAttribute(30, TmfStateValue.nullValue(), quark);
+ fixture.modifyAttribute(30, (Object) null, quark);
statev = TmfStateValue.newValueLong(3);
fixture.modifyAttribute(60, statev, quark);
- fixture.modifyAttribute(80, TmfStateValue.nullValue(), quark);
+ fixture.modifyAttribute(80, (Object) null, quark);
fixture.closeHistory(102);
// Execute the CallGraphAnalysis
@@ -287,21 +287,21 @@ public class AggregatedCalledFunctionStatisticsTest {
int parentQuark = fixture.getQuarkAbsoluteAndAdd(CallGraphAnalysisStub.PROCESS_PATH, CallGraphAnalysisStub.THREAD_PATH, CallGraphAnalysisStub.CALLSTACK_PATH);
// Create the first root function
int quark = fixture.getQuarkRelativeAndAdd(parentQuark, QUARK_0);
- TmfStateValue statev = TmfStateValue.newValueLong(1);
+ Object statev = 1L;
fixture.modifyAttribute(0, statev, quark);
- fixture.modifyAttribute(20, TmfStateValue.nullValue(), quark);
+ fixture.modifyAttribute(20, (Object) null, quark);
// Create the second root function
fixture.modifyAttribute(30, statev, quark);
- fixture.modifyAttribute(80, TmfStateValue.nullValue(), quark);
+ fixture.modifyAttribute(80, (Object) null, quark);
// Create the first root function's callee
quark = fixture.getQuarkRelativeAndAdd(parentQuark, QUARK_1);
statev = TmfStateValue.newValueLong(2);
fixture.modifyAttribute(0, statev, quark);
- fixture.modifyAttribute(10, TmfStateValue.nullValue(), quark);
+ fixture.modifyAttribute(10, (Object) null, quark);
// Create the second root function's callee
statev = TmfStateValue.newValueLong(3);
fixture.modifyAttribute(30, statev, quark);
- fixture.modifyAttribute(40, TmfStateValue.nullValue(), quark);
+ fixture.modifyAttribute(40, (Object) null, quark);
fixture.closeHistory(81);
// Execute the callGraphAnalysis
@@ -370,39 +370,39 @@ public class AggregatedCalledFunctionStatisticsTest {
int parentQuark = fixture.getQuarkAbsoluteAndAdd(CallGraphAnalysisStub.PROCESS_PATH, CallGraphAnalysisStub.THREAD_PATH, CallGraphAnalysisStub.CALLSTACK_PATH);
// Create the first function
int quark = fixture.getQuarkRelativeAndAdd(parentQuark, QUARK_0);
- TmfStateValue statev = TmfStateValue.newValueLong(0);
+ Object statev = 0L;
fixture.modifyAttribute(0, statev, quark);
- fixture.modifyAttribute(150, TmfStateValue.nullValue(), quark);
+ fixture.modifyAttribute(150, (Object) null, quark);
// Create the first level functions
quark = fixture.getQuarkRelativeAndAdd(parentQuark, QUARK_1);
statev = TmfStateValue.newValueLong(1);
fixture.modifyAttribute(0, statev, quark);
- fixture.modifyAttribute(50, TmfStateValue.nullValue(), quark);
+ fixture.modifyAttribute(50, (Object) null, quark);
fixture.modifyAttribute(60, statev, quark);
- fixture.modifyAttribute(100, TmfStateValue.nullValue(), quark);
+ fixture.modifyAttribute(100, (Object) null, quark);
fixture.modifyAttribute(130, statev, quark);
- fixture.modifyAttribute(150, TmfStateValue.nullValue(), quark);
+ fixture.modifyAttribute(150, (Object) null, quark);
// Create the third function
quark = fixture.getQuarkRelativeAndAdd(parentQuark, QUARK_2);
statev = TmfStateValue.newValueLong(2);
fixture.modifyAttribute(0, statev, quark);
- fixture.modifyAttribute(10, TmfStateValue.nullValue(), quark);
+ fixture.modifyAttribute(10, (Object) null, quark);
statev = TmfStateValue.newValueLong(3);
fixture.modifyAttribute(20, statev, quark);
- fixture.modifyAttribute(30, TmfStateValue.nullValue(), quark);
+ fixture.modifyAttribute(30, (Object) null, quark);
statev = TmfStateValue.newValueLong(2);
fixture.modifyAttribute(60, statev, quark);
- fixture.modifyAttribute(90, TmfStateValue.nullValue(), quark);
+ fixture.modifyAttribute(90, (Object) null, quark);
quark = fixture.getQuarkRelativeAndAdd(parentQuark, QUARK_3);
statev = TmfStateValue.newValueLong(4);
fixture.modifyAttribute(0, statev, quark);
- fixture.modifyAttribute(10, TmfStateValue.nullValue(), quark);
+ fixture.modifyAttribute(10, (Object) null, quark);
fixture.modifyAttribute(60, statev, quark);
- fixture.modifyAttribute(80, TmfStateValue.nullValue(), quark);
+ fixture.modifyAttribute(80, (Object) null, quark);
fixture.closeHistory(151);
}
diff --git a/callstack/org.eclipse.tracecompass.incubator.callstack.core.tests/src/org/eclipse/tracecompass/incubator/callstack/core/tests/callgraph/instrumented/AggregationTreeTest.java b/callstack/org.eclipse.tracecompass.incubator.callstack.core.tests/src/org/eclipse/tracecompass/incubator/callstack/core/tests/callgraph/instrumented/AggregationTreeTest.java
index c0939b75..c92608ee 100644
--- a/callstack/org.eclipse.tracecompass.incubator.callstack.core.tests/src/org/eclipse/tracecompass/incubator/callstack/core/tests/callgraph/instrumented/AggregationTreeTest.java
+++ b/callstack/org.eclipse.tracecompass.incubator.callstack.core.tests/src/org/eclipse/tracecompass/incubator/callstack/core/tests/callgraph/instrumented/AggregationTreeTest.java
@@ -125,10 +125,10 @@ public class AggregationTreeTest {
fixture.updateOngoingState(TmfStateValue.newValueLong(100), threadQuark);
for (int i = 1; i <= SMALL_AMOUNT_OF_SEGMENT; i++) {
int quark = fixture.getQuarkRelativeAndAdd(parentQuark, Integer.toString(i));
- TmfStateValue statev = TmfStateValue.newValueLong(i);
- fixture.modifyAttribute(start, TmfStateValue.nullValue(), quark);
+ long statev = i;
+ fixture.modifyAttribute(start, (Object) null, quark);
fixture.modifyAttribute(start + i, statev, quark);
- fixture.modifyAttribute(end - i, TmfStateValue.nullValue(), quark);
+ fixture.modifyAttribute(end - i, (Object) null, quark);
}
fixture.closeHistory(1002);
@@ -188,20 +188,20 @@ public class AggregationTreeTest {
int parentQuark = fixture.getQuarkRelativeAndAdd(threadQuark, CallGraphAnalysisStub.CALLSTACK_PATH);
fixture.updateOngoingState(TmfStateValue.newValueDouble(0.001), threadQuark);
int quark = fixture.getQuarkRelativeAndAdd(parentQuark, QUARK_0);
- TmfStateValue statev = TmfStateValue.newValueLong(0);
+ long statev = 0L;
fixture.modifyAttribute(0, statev, quark);
- fixture.modifyAttribute(100, TmfStateValue.nullValue(), quark);
+ fixture.modifyAttribute(100, (Object) null, quark);
quark = fixture.getQuarkRelativeAndAdd(parentQuark, QUARK_1);
- statev = TmfStateValue.newValueLong(1);
+ statev = 1L;
fixture.modifyAttribute(0, statev, quark);
- fixture.modifyAttribute(50, TmfStateValue.nullValue(), quark);
+ fixture.modifyAttribute(50, (Object) null, quark);
fixture.modifyAttribute(60, statev, quark);
- fixture.modifyAttribute(90, TmfStateValue.nullValue(), quark);
+ fixture.modifyAttribute(90, (Object) null, quark);
quark = fixture.getQuarkRelativeAndAdd(parentQuark, QUARK_2);
fixture.modifyAttribute(0, statev, quark);
- fixture.modifyAttribute(30, TmfStateValue.nullValue(), quark);
+ fixture.modifyAttribute(30, (Object) null, quark);
fixture.closeHistory(102);
// Execute the CallGraphAnalysis
@@ -256,24 +256,24 @@ public class AggregationTreeTest {
int parentQuark = fixture.getQuarkRelativeAndAdd(threadQuark, CallGraphAnalysisStub.CALLSTACK_PATH);
fixture.updateOngoingState(TmfStateValue.newValueDouble(0.001), threadQuark);
int quark = fixture.getQuarkRelativeAndAdd(parentQuark, QUARK_0);
- TmfStateValue statev = TmfStateValue.newValueLong(0);
+ Long statev = 0L;
fixture.modifyAttribute(0, statev, quark);
- fixture.modifyAttribute(100, TmfStateValue.nullValue(), quark);
+ fixture.modifyAttribute(100, (Object) null, quark);
quark = fixture.getQuarkRelativeAndAdd(parentQuark, QUARK_1);
- statev = TmfStateValue.newValueLong(1);
+ statev = 1L;
fixture.modifyAttribute(0, statev, quark);
- fixture.modifyAttribute(50, TmfStateValue.nullValue(), quark);
+ fixture.modifyAttribute(50, (Object) null, quark);
fixture.modifyAttribute(60, statev, quark);
- fixture.modifyAttribute(90, TmfStateValue.nullValue(), quark);
+ fixture.modifyAttribute(90, (Object) null, quark);
quark = fixture.getQuarkRelativeAndAdd(parentQuark, QUARK_2);
- statev = TmfStateValue.newValueLong(2);
+ statev = 2L;
fixture.modifyAttribute(0, statev, quark);
- fixture.modifyAttribute(30, TmfStateValue.nullValue(), quark);
- statev = TmfStateValue.newValueLong(3);
+ fixture.modifyAttribute(30, (Object) null, quark);
+ statev = 3L;
fixture.modifyAttribute(60, statev, quark);
- fixture.modifyAttribute(80, TmfStateValue.nullValue(), quark);
+ fixture.modifyAttribute(80, (Object) null, quark);
fixture.closeHistory(102);
// Execute the CallGraphAnalysis
@@ -336,37 +336,37 @@ public class AggregationTreeTest {
int parentQuark = fixture.getQuarkAbsoluteAndAdd(CallGraphAnalysisStub.PROCESS_PATH, CallGraphAnalysisStub.THREAD_PATH, CallGraphAnalysisStub.CALLSTACK_PATH);
// Create the first function
int quark = fixture.getQuarkRelativeAndAdd(parentQuark, QUARK_0);
- TmfStateValue statev = TmfStateValue.newValueLong(0);
+ Long statev = 0L;
fixture.modifyAttribute(0, statev, quark);
- fixture.modifyAttribute(100, TmfStateValue.nullValue(), quark);
+ fixture.modifyAttribute(100, (Object) null, quark);
// Create the first level functions
quark = fixture.getQuarkRelativeAndAdd(parentQuark, QUARK_1);
- statev = TmfStateValue.newValueLong(1);
+ statev = 1L;
fixture.modifyAttribute(0, statev, quark);
- fixture.modifyAttribute(50, TmfStateValue.nullValue(), quark);
+ fixture.modifyAttribute(50, (Object) null, quark);
fixture.modifyAttribute(60, statev, quark);
- fixture.modifyAttribute(100, TmfStateValue.nullValue(), quark);
+ fixture.modifyAttribute(100, (Object) null, quark);
// Create the third function
quark = fixture.getQuarkRelativeAndAdd(parentQuark, QUARK_2);
- statev = TmfStateValue.newValueLong(2);
+ statev = 2L;
fixture.modifyAttribute(0, statev, quark);
- fixture.modifyAttribute(10, TmfStateValue.nullValue(), quark);
+ fixture.modifyAttribute(10, (Object) null, quark);
- statev = TmfStateValue.newValueLong(3);
+ statev = 3L;
fixture.modifyAttribute(20, statev, quark);
- fixture.modifyAttribute(30, TmfStateValue.nullValue(), quark);
+ fixture.modifyAttribute(30, (Object) null, quark);
- statev = TmfStateValue.newValueLong(2);
+ statev = 2L;
fixture.modifyAttribute(60, statev, quark);
- fixture.modifyAttribute(90, TmfStateValue.nullValue(), quark);
+ fixture.modifyAttribute(90, (Object) null, quark);
quark = fixture.getQuarkRelativeAndAdd(parentQuark, QUARK_3);
- statev = TmfStateValue.newValueLong(4);
+ statev = 4L;
fixture.modifyAttribute(0, statev, quark);
- fixture.modifyAttribute(10, TmfStateValue.nullValue(), quark);
+ fixture.modifyAttribute(10, (Object) null, quark);
fixture.modifyAttribute(60, statev, quark);
- fixture.modifyAttribute(80, TmfStateValue.nullValue(), quark);
+ fixture.modifyAttribute(80, (Object) null, quark);
fixture.closeHistory(102);
}
@@ -451,7 +451,7 @@ public class AggregationTreeTest {
ITmfStateSystemBuilder fixture = createFixture();
int parentQuark = fixture.getQuarkAbsoluteAndAdd(CallGraphAnalysisStub.PROCESS_PATH, CallGraphAnalysisStub.THREAD_PATH, CallGraphAnalysisStub.CALLSTACK_PATH);
for (int i = 0; i < LARGE_AMOUNT_OF_SEGMENTS; i++) {
- TmfStateValue statev = TmfStateValue.newValueLong(i);
+ Long statev = (long) i;
fixture.pushAttribute(0, statev, parentQuark);
}
for (int i = 0; i < LARGE_AMOUNT_OF_SEGMENTS; i++) {
@@ -492,21 +492,21 @@ public class AggregationTreeTest {
int parentQuark = fixture.getQuarkAbsoluteAndAdd(CallGraphAnalysisStub.PROCESS_PATH, CallGraphAnalysisStub.THREAD_PATH, CallGraphAnalysisStub.CALLSTACK_PATH);
// Create the first root function
int quark = fixture.getQuarkRelativeAndAdd(parentQuark, QUARK_0);
- TmfStateValue statev = TmfStateValue.newValueLong(1);
+ Long statev = 1L;
fixture.modifyAttribute(0, statev, quark);
- fixture.modifyAttribute(20, TmfStateValue.nullValue(), quark);
+ fixture.modifyAttribute(20, (Object) null, quark);
// Create the second root function
fixture.modifyAttribute(30, statev, quark);
- fixture.modifyAttribute(50, TmfStateValue.nullValue(), quark);
+ fixture.modifyAttribute(50, (Object) null, quark);
// Create the first root function's callee
quark = fixture.getQuarkRelativeAndAdd(parentQuark, QUARK_1);
- statev = TmfStateValue.newValueLong(2);
+ statev = 2L;
fixture.modifyAttribute(0, statev, quark);
- fixture.modifyAttribute(10, TmfStateValue.nullValue(), quark);
+ fixture.modifyAttribute(10, (Object) null, quark);
// Create the second root function's callee
- statev = TmfStateValue.newValueLong(3);
+ statev = 3L;
fixture.modifyAttribute(30, statev, quark);
- fixture.modifyAttribute(40, TmfStateValue.nullValue(), quark);
+ fixture.modifyAttribute(40, (Object) null, quark);
fixture.closeHistory(51);
// Execute the callGraphAnalysis
@@ -561,21 +561,21 @@ public class AggregationTreeTest {
int parentQuark = fixture.getQuarkAbsoluteAndAdd(CallGraphAnalysisStub.PROCESS_PATH, CallGraphAnalysisStub.THREAD_PATH, CallGraphAnalysisStub.CALLSTACK_PATH);
// Create the first root function
int quark = fixture.getQuarkRelativeAndAdd(parentQuark, QUARK_0);
- TmfStateValue statev = TmfStateValue.newValueLong(0);
+ Long statev = 0L;
fixture.modifyAttribute(0, statev, quark);
- fixture.modifyAttribute(20, TmfStateValue.nullValue(), quark);
+ fixture.modifyAttribute(20, (Object) null, quark);
// Create the second root function
- statev = TmfStateValue.newValueLong(1);
+ statev = 1L;
fixture.modifyAttribute(30, statev, quark);
- fixture.modifyAttribute(50, TmfStateValue.nullValue(), quark);
+ fixture.modifyAttribute(50, (Object) null, quark);
// Create the first root function's callee
quark = fixture.getQuarkRelativeAndAdd(parentQuark, QUARK_1);
- statev = TmfStateValue.newValueLong(2);
+ statev = 2L;
fixture.modifyAttribute(0, statev, quark);
- fixture.modifyAttribute(10, TmfStateValue.nullValue(), quark);
+ fixture.modifyAttribute(10, (Object) null, quark);
// Create the second root function's callee
fixture.modifyAttribute(30, statev, quark);
- fixture.modifyAttribute(40, TmfStateValue.nullValue(), quark);
+ fixture.modifyAttribute(40, (Object) null, quark);
fixture.closeHistory(51);
// Execute the callGraphAnalysis
diff --git a/callstack/org.eclipse.tracecompass.incubator.callstack.core.tests/src/org/eclipse/tracecompass/incubator/callstack/core/tests/flamechart/statesystem/CallStackStateSystemTest.java b/callstack/org.eclipse.tracecompass.incubator.callstack.core.tests/src/org/eclipse/tracecompass/incubator/callstack/core/tests/flamechart/statesystem/CallStackStateSystemTest.java
index a8a93cd9..7741ceda 100644
--- a/callstack/org.eclipse.tracecompass.incubator.callstack.core.tests/src/org/eclipse/tracecompass/incubator/callstack/core/tests/flamechart/statesystem/CallStackStateSystemTest.java
+++ b/callstack/org.eclipse.tracecompass.incubator.callstack.core.tests/src/org/eclipse/tracecompass/incubator/callstack/core/tests/flamechart/statesystem/CallStackStateSystemTest.java
@@ -22,7 +22,6 @@ import java.util.List;
import org.eclipse.tracecompass.incubator.callstack.core.base.ICallStackGroupDescriptor;
import org.eclipse.tracecompass.incubator.callstack.core.instrumented.statesystem.CallStackSeries;
-import org.eclipse.tracecompass.incubator.callstack.core.instrumented.statesystem.CallStackStateProvider;
import org.eclipse.tracecompass.incubator.callstack.core.instrumented.statesystem.InstrumentedCallStackAnalysis;
import org.eclipse.tracecompass.incubator.callstack.core.tests.flamechart.CallStackTestBase;
import org.eclipse.tracecompass.incubator.callstack.core.tests.stubs.CallStackAnalysisStub;
diff --git a/callstack/org.eclipse.tracecompass.incubator.callstack.core.tests/stubs/org/eclipse/tracecompass/incubator/callstack/core/tests/stubs/CallStackProviderStub.java b/callstack/org.eclipse.tracecompass.incubator.callstack.core.tests/stubs/org/eclipse/tracecompass/incubator/callstack/core/tests/stubs/CallStackProviderStub.java
index 0789c0e5..b8351317 100644
--- a/callstack/org.eclipse.tracecompass.incubator.callstack.core.tests/stubs/org/eclipse/tracecompass/incubator/callstack/core/tests/stubs/CallStackProviderStub.java
+++ b/callstack/org.eclipse.tracecompass.incubator.callstack.core.tests/stubs/org/eclipse/tracecompass/incubator/callstack/core/tests/stubs/CallStackProviderStub.java
@@ -11,9 +11,9 @@ package org.eclipse.tracecompass.incubator.callstack.core.tests.stubs;
import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.tracecompass.incubator.callstack.core.instrumented.statesystem.CallStackStateProvider;
import org.eclipse.tracecompass.statesystem.core.statevalue.ITmfStateValue;
import org.eclipse.tracecompass.statesystem.core.statevalue.TmfStateValue;
+import org.eclipse.tracecompass.tmf.core.callstack.CallStackStateProvider;
import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
import org.eclipse.tracecompass.tmf.core.event.ITmfEventField;
import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
diff --git a/callstack/org.eclipse.tracecompass.incubator.callstack.core/src/org/eclipse/tracecompass/incubator/callstack/core/instrumented/statesystem/CallStackStateProvider.java b/callstack/org.eclipse.tracecompass.incubator.callstack.core/src/org/eclipse/tracecompass/incubator/callstack/core/instrumented/statesystem/CallStackStateProvider.java
index 2dbff54d..835e492f 100644
--- a/callstack/org.eclipse.tracecompass.incubator.callstack.core/src/org/eclipse/tracecompass/incubator/callstack/core/instrumented/statesystem/CallStackStateProvider.java
+++ b/callstack/org.eclipse.tracecompass.incubator.callstack.core/src/org/eclipse/tracecompass/incubator/callstack/core/instrumented/statesystem/CallStackStateProvider.java
@@ -31,8 +31,8 @@ import org.eclipse.tracecompass.tmf.core.trace.TmfTraceUtils;
/**
* The default base state provider for traces that implement the default
- * {@link InstrumentedCallStackAnalysis} with a process / thread grouping, using the default
- * values.
+ * {@link InstrumentedCallStackAnalysis} with a process / thread grouping, using
+ * the default values.
*
* Specific analyses will need to override it to specify the function
* entry/exit, as well as how to get the process ID and thread ID.
@@ -78,6 +78,9 @@ import org.eclipse.tracecompass.tmf.core.trace.TmfTraceUtils;
* type of value used must be constant for a particular CallStack.</li>
* </ul>
*
+ * TODO: Use the same state provider as the one currently in trace Compass. It
+ * just needs the ProcessName and ThreadName Aspects.
+ *
* @author Patrick Tasse
*/
public abstract class CallStackStateProvider extends AbstractTmfStateProvider {
@@ -130,7 +133,7 @@ public abstract class CallStackStateProvider extends AbstractTmfStateProvider {
private void handleFunctionEntry(ITmfStateSystemBuilder ss, ITmfEvent event) {
/* Check if the event is a function entry */
- ITmfStateValue functionEntryName = functionEntry(event);
+ Object functionEntryName = functionEntry(event);
if (functionEntryName != null) {
long timestamp = event.getTimestamp().toNanos();
@@ -151,15 +154,15 @@ public abstract class CallStackStateProvider extends AbstractTmfStateProvider {
ss.updateOngoingState(TmfStateValue.newValueLong(threadId), threadQuark);
int callStackQuark = ss.getQuarkRelativeAndAdd(threadQuark, InstrumentedCallStackAnalysis.CALL_STACK);
- ITmfStateValue value = functionEntryName;
- ss.pushAttribute(timestamp, value, callStackQuark);
+ ss.pushAttribute(timestamp, functionEntryName, callStackQuark);
return;
}
}
private void handleFunctionExit(ITmfStateSystemBuilder ss, ITmfEvent event) {
/* Check if the event is a function exit */
- ITmfStateValue functionExitState = functionExit(event);
+ Object functionExitState = functionExit(event);
+ // FIXME: since
if (functionExitState != null) {
long timestamp = event.getTimestamp().toNanos();
String processName = getProcessName(event);
@@ -177,7 +180,7 @@ public abstract class CallStackStateProvider extends AbstractTmfStateProvider {
* Verify that the value we are popping matches the one in the
* event field, unless the latter is undefined.
*/
- if (!functionExitState.isNull() && !functionExitState.equals(poppedValue)) {
+ if (!functionExitState.equals(poppedValue)) {
Activator.getInstance().logWarning(NLS.bind(Messages.CallStackStateProvider_EventDescription, event.getName(),
event.getTimestamp().getValue()) + ": " + NLS.bind( //$NON-NLS-1$
Messages.CallStackStateProvider_UnmatchedPoppedValue,
@@ -213,23 +216,23 @@ public abstract class CallStackStateProvider extends AbstractTmfStateProvider {
*
* @param event
* An event to check for function entry
- * @return The state value representing the function being entered, or null
+ * @return The object representing the function being entered, or null
* if not a function entry
* @since 2.0
*/
- protected abstract @Nullable ITmfStateValue functionEntry(ITmfEvent event);
+ protected abstract @Nullable Object functionEntry(ITmfEvent event);
/**
* Check an event if it indicates a function exit.
*
* @param event
* An event to check for function exit
- * @return The state value representing the function being exited, or
+ * @return The object representing the function being exited, or
* TmfStateValue#nullValue() if the exited function is undefined,
* or null if not a function exit.
* @since 2.0
*/
- protected abstract @Nullable ITmfStateValue functionExit(ITmfEvent event);
+ protected abstract @Nullable Object functionExit(ITmfEvent event);
/**
* Return the process ID of a function entry event.
diff --git a/callstack/org.eclipse.tracecompass.incubator.callstack.ui/src/org/eclipse/tracecompass/incubator/internal/callstack/ui/views/cct/CallingContextTreeViewer.java b/callstack/org.eclipse.tracecompass.incubator.callstack.ui/src/org/eclipse/tracecompass/incubator/internal/callstack/ui/views/cct/CallingContextTreeViewer.java
index 86e06fd1..72d7ef04 100644
--- a/callstack/org.eclipse.tracecompass.incubator.callstack.ui/src/org/eclipse/tracecompass/incubator/internal/callstack/ui/views/cct/CallingContextTreeViewer.java
+++ b/callstack/org.eclipse.tracecompass.incubator.callstack.ui/src/org/eclipse/tracecompass/incubator/internal/callstack/ui/views/cct/CallingContextTreeViewer.java
@@ -358,18 +358,15 @@ public class CallingContextTreeViewer extends AbstractTmfTreeViewer {
}
@Override
- public void initializeDataSource() {
- ITmfTrace trace = getTrace();
- if (trace != null) {
- Set<ICallGraphProvider> modules = getCallGraphs();
+ public void initializeDataSource(ITmfTrace trace) {
+ Set<ICallGraphProvider> modules = getCallGraphs();
- fSymbolProviders = SymbolProviderManager.getInstance().getSymbolProviders(trace);
- modules.forEach(m -> {
- if (m instanceof IAnalysisModule) {
- ((IAnalysisModule) m).schedule();
- }
- });
- }
+ fSymbolProviders = SymbolProviderManager.getInstance().getSymbolProviders(trace);
+ modules.forEach(m -> {
+ if (m instanceof IAnalysisModule) {
+ ((IAnalysisModule) m).schedule();
+ }
+ });
}
/**
@@ -541,7 +538,7 @@ public class CallingContextTreeViewer extends AbstractTmfTreeViewer {
}
@Override
- protected @Nullable ITmfTreeViewerEntry updateElements(long start, long end, boolean isSelection) {
+ protected @Nullable ITmfTreeViewerEntry updateElements(ITmfTrace trace, long start, long end, boolean isSelection) {
Set<ICallGraphProvider> modules = getCallGraphs();
diff --git a/tracetypes/org.eclipse.tracecompass.incubator.hudson.maven.core/src/org/eclipse/tracecompass/incubator/internal/hudson/maven/core/analysis/MavenCallstackStateProvider.java b/tracetypes/org.eclipse.tracecompass.incubator.hudson.maven.core/src/org/eclipse/tracecompass/incubator/internal/hudson/maven/core/analysis/MavenCallstackStateProvider.java
index f6a8a5e4..85c55998 100644
--- a/tracetypes/org.eclipse.tracecompass.incubator.hudson.maven.core/src/org/eclipse/tracecompass/incubator/internal/hudson/maven/core/analysis/MavenCallstackStateProvider.java
+++ b/tracetypes/org.eclipse.tracecompass.incubator.hudson.maven.core/src/org/eclipse/tracecompass/incubator/internal/hudson/maven/core/analysis/MavenCallstackStateProvider.java
@@ -16,7 +16,6 @@ import org.eclipse.jdt.annotation.Nullable;
import org.eclipse.tracecompass.incubator.internal.hudson.maven.core.trace.MavenEvent;
import org.eclipse.tracecompass.statesystem.core.ITmfStateSystemBuilder;
import org.eclipse.tracecompass.statesystem.core.statevalue.ITmfStateValue;
-import org.eclipse.tracecompass.statesystem.core.statevalue.TmfStateValue;
import org.eclipse.tracecompass.tmf.core.callstack.CallStackStateProvider;
import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
@@ -101,7 +100,7 @@ public class MavenCallstackStateProvider extends CallStackStateProvider {
int threadQuark = ssb.getQuarkRelativeAndAdd(processQuark, getThreadName(event));
int callStackQuark = ssb.getQuarkRelativeAndAdd(threadQuark, CALL_STACK);
- TmfStateValue stateValue = TmfStateValue.newValueString(MavenEvent.GROUP_ASPECT.resolve(event));
+ String groupAspect = MavenEvent.GROUP_ASPECT.resolve(event);
if (event.getType().equals(MavenEvent.GOAL_TYPE)) {
fSafeTime = Math.max(fSafeTime + 1, event.getTimestamp().toNanos());
if (fDepth == 2) {
@@ -113,7 +112,7 @@ public class MavenCallstackStateProvider extends CallStackStateProvider {
ssb.popAttribute(fSafeTime, callStackQuark);
}
ssb.popAttribute(fSafeTime - 1, callStackQuark);
- ssb.pushAttribute(fSafeTime, stateValue, callStackQuark);
+ ssb.pushAttribute(fSafeTime, groupAspect, callStackQuark);
fNextClose = Long.MAX_VALUE;
fDepth = 1;
} else if (event.getType().equals(MavenEvent.SUMMARY_TYPE)) {
@@ -122,18 +121,18 @@ public class MavenCallstackStateProvider extends CallStackStateProvider {
}
fSafeTime = fNextClose != Long.MAX_VALUE ? fNextClose + 1 : fSafeTime;
long duration = (long) Math.ceil(Objects.requireNonNull(MavenEvent.DURATION_ASPECT.resolve(event)) * NANOS_IN_SEC);
- ssb.pushAttribute(fSafeTime, stateValue, callStackQuark);
+ ssb.pushAttribute(fSafeTime, groupAspect, callStackQuark);
fNextClose = fSafeTime + duration;
fDepth = 2;
} else if (event.getType().equals(MavenEvent.TEST_TYPE)) {
if (fDepth == 1) {
// attempt to re-create a group
String fullGroup = Objects.requireNonNull(MavenEvent.FULL_GROUP_ASPECT.resolve(event));
- ssb.pushAttribute(fSafeTime, TmfStateValue.newValueString(fullGroup.substring(fullGroup.indexOf('(') + 1, fullGroup.length() - 1)), callStackQuark);
+ ssb.pushAttribute(fSafeTime, fullGroup.substring(fullGroup.indexOf('(') + 1, fullGroup.length() - 1), callStackQuark);
}
long testDuration = (long) Math.ceil(Objects.requireNonNull(MavenEvent.DURATION_ASPECT.resolve(event)) * NANOS_IN_SEC);
fSafeTime++;
- ssb.pushAttribute(fSafeTime, stateValue, callStackQuark);
+ ssb.pushAttribute(fSafeTime, groupAspect, callStackQuark);
fSafeTime += testDuration;
ssb.popAttribute(fSafeTime, callStackQuark);
fDepth = 2;
diff --git a/tracetypes/org.eclipse.tracecompass.incubator.perf.profiling.core/src/org/eclipse/tracecompass/incubator/internal/perf/profiling/core/symbol/PerfMmapSymbolProvider.java b/tracetypes/org.eclipse.tracecompass.incubator.perf.profiling.core/src/org/eclipse/tracecompass/incubator/internal/perf/profiling/core/symbol/PerfMmapSymbolProvider.java
index 19b689d5..0957fa16 100644
--- a/tracetypes/org.eclipse.tracecompass.incubator.perf.profiling.core/src/org/eclipse/tracecompass/incubator/internal/perf/profiling/core/symbol/PerfMmapSymbolProvider.java
+++ b/tracetypes/org.eclipse.tracecompass.incubator.perf.profiling.core/src/org/eclipse/tracecompass/incubator/internal/perf/profiling/core/symbol/PerfMmapSymbolProvider.java
@@ -138,11 +138,4 @@ public class PerfMmapSymbolProvider implements ISymbolProvider {
return null;
}
- @Deprecated
- @Override
- public @Nullable String getSymbolText(long address) {
- // Need to implement this unfortunately
- return null;
- }
-
}
diff --git a/tracetypes/org.eclipse.tracecompass.incubator.traceevent.core/src/org/eclipse/tracecompass/incubator/internal/traceevent/core/analysis/callstack/TraceEventCallStackProvider.java b/tracetypes/org.eclipse.tracecompass.incubator.traceevent.core/src/org/eclipse/tracecompass/incubator/internal/traceevent/core/analysis/callstack/TraceEventCallStackProvider.java
index fd79a094..65a19423 100644
--- a/tracetypes/org.eclipse.tracecompass.incubator.traceevent.core/src/org/eclipse/tracecompass/incubator/internal/traceevent/core/analysis/callstack/TraceEventCallStackProvider.java
+++ b/tracetypes/org.eclipse.tracecompass.incubator.traceevent.core/src/org/eclipse/tracecompass/incubator/internal/traceevent/core/analysis/callstack/TraceEventCallStackProvider.java
@@ -33,8 +33,6 @@ import org.eclipse.tracecompass.incubator.internal.traceevent.core.event.ITraceE
import org.eclipse.tracecompass.incubator.internal.traceevent.core.event.TraceEventAspects;
import org.eclipse.tracecompass.incubator.internal.traceevent.core.event.TraceEventPhases;
import org.eclipse.tracecompass.statesystem.core.ITmfStateSystemBuilder;
-import org.eclipse.tracecompass.statesystem.core.statevalue.ITmfStateValue;
-import org.eclipse.tracecompass.statesystem.core.statevalue.TmfStateValue;
import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
import org.eclipse.tracecompass.tmf.core.event.aspect.ITmfEventAspect;
import org.eclipse.tracecompass.tmf.core.statesystem.TmfAttributePool;
@@ -166,9 +164,9 @@ public class TraceEventCallStackProvider extends CallStackStateProvider {
}
@Override
- protected @Nullable ITmfStateValue functionEntry(@NonNull ITmfEvent event) {
+ protected @Nullable Object functionEntry(@NonNull ITmfEvent event) {
if (isEntry(event)) {
- return TmfStateValue.newValueString(event.getName());
+ return event.getName();
}
return null;
}
@@ -179,9 +177,9 @@ public class TraceEventCallStackProvider extends CallStackStateProvider {
}
@Override
- protected @Nullable ITmfStateValue functionExit(@NonNull ITmfEvent event) {
+ protected @Nullable Object functionExit(@NonNull ITmfEvent event) {
if (isExit(event)) {
- return TmfStateValue.newValueString(event.getName());
+ return event.getName();
}
return null;
}
@@ -320,7 +318,7 @@ public class TraceEventCallStackProvider extends CallStackStateProvider {
}
private void handleStart(@NonNull ITmfEvent event, ITmfStateSystemBuilder ss, long timestamp, String processName) {
- ITmfStateValue functionBeginName = functionEntry(event);
+ Object functionBeginName = functionEntry(event);
if (functionBeginName != null) {
int processQuark = ss.getQuarkAbsoluteAndAdd(PROCESSES, processName);
@@ -333,14 +331,13 @@ public class TraceEventCallStackProvider extends CallStackStateProvider {
ss.modifyAttribute(event.getTimestamp().toNanos(), threadId, threadQuark);
int callStackQuark = ss.getQuarkRelativeAndAdd(threadQuark, InstrumentedCallStackAnalysis.CALL_STACK);
- ITmfStateValue value = functionBeginName;
- ss.pushAttribute(timestamp, value, callStackQuark);
+ ss.pushAttribute(timestamp, functionBeginName, callStackQuark);
}
}
private void handleEnd(@NonNull ITmfEvent event, ITmfStateSystemBuilder ss, long timestamp, String processName) {
/* Check if the event is a function exit */
- ITmfStateValue functionExitState = functionExit(event);
+ Object functionExitState = functionExit(event);
if (functionExitState != null) {
String pName = processName;
diff --git a/tracetypes/org.eclipse.tracecompass.incubator.uftrace.core/src/org/eclipse/tracecompass/incubator/internal/uftrace/core/analysis/UfCallstackProvider.java b/tracetypes/org.eclipse.tracecompass.incubator.uftrace.core/src/org/eclipse/tracecompass/incubator/internal/uftrace/core/analysis/UfCallstackProvider.java
index 04e0f52a..9d7e8275 100644
--- a/tracetypes/org.eclipse.tracecompass.incubator.uftrace.core/src/org/eclipse/tracecompass/incubator/internal/uftrace/core/analysis/UfCallstackProvider.java
+++ b/tracetypes/org.eclipse.tracecompass.incubator.uftrace.core/src/org/eclipse/tracecompass/incubator/internal/uftrace/core/analysis/UfCallstackProvider.java
@@ -17,8 +17,6 @@ import org.eclipse.tracecompass.incubator.internal.uftrace.core.trace.DatEvent;
import org.eclipse.tracecompass.incubator.internal.uftrace.core.trace.UfEventType;
import org.eclipse.tracecompass.incubator.internal.uftrace.core.trace.Uftrace.ExecAspect;
import org.eclipse.tracecompass.incubator.internal.uftrace.core.trace.Uftrace.PidAspect;
-import org.eclipse.tracecompass.statesystem.core.statevalue.ITmfStateValue;
-import org.eclipse.tracecompass.statesystem.core.statevalue.TmfStateValue;
import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
import org.eclipse.tracecompass.tmf.core.event.ITmfEventField;
import org.eclipse.tracecompass.tmf.core.event.aspect.ITmfEventAspect;
@@ -67,26 +65,26 @@ public class UfCallstackProvider extends CallStackStateProvider {
}
@Override
- protected @Nullable ITmfStateValue functionEntry(@NonNull ITmfEvent event) {
+ protected @Nullable Object functionEntry(@NonNull ITmfEvent event) {
ITmfEventField content = event.getContent();
Object payload = content.getValue();
if (payload instanceof DatEvent) {
DatEvent ev = (DatEvent) payload;
if (event.getType().equals(UfEventType.ENTRY)) {
- return TmfStateValue.newValueLong(ev.getAddress());
+ return ev.getAddress();
}
}
return null;
}
@Override
- protected @Nullable ITmfStateValue functionExit(@NonNull ITmfEvent event) {
+ protected @Nullable Object functionExit(@NonNull ITmfEvent event) {
ITmfEventField content = event.getContent();
Object payload = content.getValue();
if (payload instanceof DatEvent) {
DatEvent ev = (DatEvent) payload;
if (event.getType().equals(UfEventType.EXIT)) {
- return TmfStateValue.newValueLong(ev.getAddress());
+ return ev.getAddress();
}
}
return null;
diff --git a/tracetypes/org.eclipse.tracecompass.incubator.uftrace.core/src/org/eclipse/tracecompass/incubator/internal/uftrace/core/trace/Uftrace.java b/tracetypes/org.eclipse.tracecompass.incubator.uftrace.core/src/org/eclipse/tracecompass/incubator/internal/uftrace/core/trace/Uftrace.java
index c4b615bb..9ff0dcdf 100644
--- a/tracetypes/org.eclipse.tracecompass.incubator.uftrace.core/src/org/eclipse/tracecompass/incubator/internal/uftrace/core/trace/Uftrace.java
+++ b/tracetypes/org.eclipse.tracecompass.incubator.uftrace.core/src/org/eclipse/tracecompass/incubator/internal/uftrace/core/trace/Uftrace.java
@@ -464,16 +464,6 @@ public class Uftrace extends TmfTrace implements ITmfPropertiesProvider,
return new TmfResolvedSymbol(address, "0x" + Long.toHexString(address)); //$NON-NLS-1$
}
- @Deprecated
- @Override
- public @Nullable String getSymbolText(int pid, long timestamp, long address) {
- TmfResolvedSymbol symbol = getSymbol(pid, timestamp, address);
- if (symbol != null) {
- return symbol.getSymbolName();
- }
- return ""; //$NON-NLS-1$
- }
-
/* needed for ISymbolProvider */
@Override
public @NonNull ITmfTrace getTrace() {
@@ -485,16 +475,9 @@ public class Uftrace extends TmfTrace implements ITmfPropertiesProvider,
// do nothing
}
- @Deprecated
@Override
- public @Nullable String getSymbolText(long address) {
- if (fTasks.getTids().size() == 1) {
- TmfResolvedSymbol symbol = getSymbol(Iterables.getFirst(fTasks.getTids(), -1), 0, address);
- if (symbol != null) {
- return symbol.getSymbolName();
- }
- }
- return ""; //$NON-NLS-1$
+ public @Nullable TmfResolvedSymbol getSymbol(long address) {
+ return getSymbol(Iterables.getFirst(fTasks.getTids(), -1), 0, address);
}
}
diff --git a/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core.tests/src/org/eclipse/tracecompass/incubator/virtual/machine/analysis/core/tests/fused/OneQemuKvmFusedTestCase.java b/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core.tests/src/org/eclipse/tracecompass/incubator/virtual/machine/analysis/core/tests/fused/OneQemuKvmFusedTestCase.java
index f2999879..a4b7c95f 100644
--- a/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core.tests/src/org/eclipse/tracecompass/incubator/virtual/machine/analysis/core/tests/fused/OneQemuKvmFusedTestCase.java
+++ b/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core.tests/src/org/eclipse/tracecompass/incubator/virtual/machine/analysis/core/tests/fused/OneQemuKvmFusedTestCase.java
@@ -85,14 +85,14 @@ public class OneQemuKvmFusedTestCase extends VmTestCase {
// Check the 'Machines' sub-tree towards the end of the trace
PunctualInfo oneInfo = new PunctualInfo(300L);
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.HOST_ONE_QEMUKVM.getHostId(), FusedAttributes.CPUS, "0"), TmfStateValue.nullValue());
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.HOST_ONE_QEMUKVM.getHostId(), FusedAttributes.PARENT), TmfStateValue.nullValue());
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.HOST_ONE_QEMUKVM.getHostId(), FusedAttributes.CONTAINERS), TmfStateValue.nullValue());
-
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.GUEST_ONE_QEMUKVM.getHostId(), FusedAttributes.CPUS, "0"), TmfStateValue.newValueInt(31));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.GUEST_ONE_QEMUKVM.getHostId(), FusedAttributes.PARENT), HOST_SV_STRING);
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.GUEST_ONE_QEMUKVM.getHostId(), FusedAttributes.PCPUS, "0"), TmfStateValue.nullValue());
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.GUEST_ONE_QEMUKVM.getHostId(), FusedAttributes.CONTAINERS), TmfStateValue.nullValue());
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.HOST_ONE_QEMUKVM.getHostId(), FusedAttributes.CPUS, "0"), null);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.HOST_ONE_QEMUKVM.getHostId(), FusedAttributes.PARENT), null);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.HOST_ONE_QEMUKVM.getHostId(), FusedAttributes.CONTAINERS), null);
+
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.GUEST_ONE_QEMUKVM.getHostId(), FusedAttributes.CPUS, "0"), 31);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.GUEST_ONE_QEMUKVM.getHostId(), FusedAttributes.PARENT), VmTraces.HOST_ONE_QEMUKVM.getHostId());
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.GUEST_ONE_QEMUKVM.getHostId(), FusedAttributes.PCPUS, "0"), null);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.GUEST_ONE_QEMUKVM.getHostId(), FusedAttributes.CONTAINERS), null);
info.add(oneInfo);
return info;
diff --git a/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core.tests/src/org/eclipse/tracecompass/incubator/virtual/machine/analysis/core/tests/fused/QemuContainerTestCase.java b/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core.tests/src/org/eclipse/tracecompass/incubator/virtual/machine/analysis/core/tests/fused/QemuContainerTestCase.java
index d726a125..ca1bcb33 100644
--- a/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core.tests/src/org/eclipse/tracecompass/incubator/virtual/machine/analysis/core/tests/fused/QemuContainerTestCase.java
+++ b/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core.tests/src/org/eclipse/tracecompass/incubator/virtual/machine/analysis/core/tests/fused/QemuContainerTestCase.java
@@ -89,23 +89,23 @@ public class QemuContainerTestCase extends VmTestCase {
// Check the 'Machines' sub-tree towards the end of the trace
PunctualInfo oneInfo = new PunctualInfo(300L);
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.HOST_QEMUKVM_CONTAINER.getHostId(), FusedAttributes.CPUS, "0"), TmfStateValue.nullValue());
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.HOST_QEMUKVM_CONTAINER.getHostId(), FusedAttributes.PARENT), TmfStateValue.nullValue());
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.HOST_QEMUKVM_CONTAINER.getHostId(), FusedAttributes.CONTAINERS), TmfStateValue.nullValue());
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.HOST_QEMUKVM_CONTAINER.getHostId(), FusedAttributes.MACHINE_NAME), TmfStateValue.newValueString(VmTraces.HOST_QEMUKVM_CONTAINER.getFileName()));
-
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.GUEST_QEMUKVM_CONTAINER.getHostId(), FusedAttributes.CPUS, "0"), TmfStateValue.newValueInt(31));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.GUEST_QEMUKVM_CONTAINER.getHostId(), FusedAttributes.PARENT), HOST_SV_STRING);
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.GUEST_QEMUKVM_CONTAINER.getHostId(), FusedAttributes.PCPUS, "0"), TmfStateValue.nullValue());
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.GUEST_QEMUKVM_CONTAINER.getHostId(), FusedAttributes.MACHINE_NAME), TmfStateValue.newValueString(VmTraces.GUEST_QEMUKVM_CONTAINER.getFileName()));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.GUEST_QEMUKVM_CONTAINER.getHostId(), FusedAttributes.CONTAINERS), TmfStateValue.nullValue());
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.GUEST_QEMUKVM_CONTAINER.getHostId(), FusedAttributes.CONTAINERS, String.valueOf(NS1)), TmfStateValue.nullValue());
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.GUEST_QEMUKVM_CONTAINER.getHostId(), FusedAttributes.CONTAINERS, String.valueOf(NS1), FusedAttributes.THREADS, "131"), TmfStateValue.newValueInt(4));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.GUEST_QEMUKVM_CONTAINER.getHostId(), FusedAttributes.CONTAINERS, String.valueOf(NS1), FusedAttributes.THREADS, "132"), TmfStateValue.newValueInt(5));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.GUEST_QEMUKVM_CONTAINER.getHostId(), FusedAttributes.CONTAINERS, String.valueOf(NS0)), TmfStateValue.nullValue());
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.GUEST_QEMUKVM_CONTAINER.getHostId(), FusedAttributes.CONTAINERS, String.valueOf(NS0), FusedAttributes.THREADS, "130"), TmfStateValue.newValueInt(130));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.GUEST_QEMUKVM_CONTAINER.getHostId(), FusedAttributes.CONTAINERS, String.valueOf(NS0), FusedAttributes.THREADS, "131"), TmfStateValue.newValueInt(131));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.GUEST_QEMUKVM_CONTAINER.getHostId(), FusedAttributes.CONTAINERS, String.valueOf(NS0), FusedAttributes.THREADS, "132"), TmfStateValue.newValueInt(132));
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.HOST_QEMUKVM_CONTAINER.getHostId(), FusedAttributes.CPUS, "0"), null);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.HOST_QEMUKVM_CONTAINER.getHostId(), FusedAttributes.PARENT), null);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.HOST_QEMUKVM_CONTAINER.getHostId(), FusedAttributes.CONTAINERS), null);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.HOST_QEMUKVM_CONTAINER.getHostId(), FusedAttributes.MACHINE_NAME), VmTraces.HOST_QEMUKVM_CONTAINER.getFileName());
+
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.GUEST_QEMUKVM_CONTAINER.getHostId(), FusedAttributes.CPUS, "0"), 31);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.GUEST_QEMUKVM_CONTAINER.getHostId(), FusedAttributes.PARENT), VmTraces.HOST_QEMUKVM_CONTAINER.getHostId());
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.GUEST_QEMUKVM_CONTAINER.getHostId(), FusedAttributes.PCPUS, "0"), null);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.GUEST_QEMUKVM_CONTAINER.getHostId(), FusedAttributes.MACHINE_NAME), VmTraces.GUEST_QEMUKVM_CONTAINER.getFileName());
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.GUEST_QEMUKVM_CONTAINER.getHostId(), FusedAttributes.CONTAINERS), null);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.GUEST_QEMUKVM_CONTAINER.getHostId(), FusedAttributes.CONTAINERS, String.valueOf(NS1)), null);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.GUEST_QEMUKVM_CONTAINER.getHostId(), FusedAttributes.CONTAINERS, String.valueOf(NS1), FusedAttributes.THREADS, "131"), 4);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.GUEST_QEMUKVM_CONTAINER.getHostId(), FusedAttributes.CONTAINERS, String.valueOf(NS1), FusedAttributes.THREADS, "132"), 5);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.GUEST_QEMUKVM_CONTAINER.getHostId(), FusedAttributes.CONTAINERS, String.valueOf(NS0)), null);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.GUEST_QEMUKVM_CONTAINER.getHostId(), FusedAttributes.CONTAINERS, String.valueOf(NS0), FusedAttributes.THREADS, "130"), 130);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.GUEST_QEMUKVM_CONTAINER.getHostId(), FusedAttributes.CONTAINERS, String.valueOf(NS0), FusedAttributes.THREADS, "131"), 131);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.GUEST_QEMUKVM_CONTAINER.getHostId(), FusedAttributes.CONTAINERS, String.valueOf(NS0), FusedAttributes.THREADS, "132"), 132);
info.add(oneInfo);
return info;
diff --git a/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core.tests/src/org/eclipse/tracecompass/incubator/virtual/machine/analysis/core/tests/fused/SimpleContainersTestCase.java b/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core.tests/src/org/eclipse/tracecompass/incubator/virtual/machine/analysis/core/tests/fused/SimpleContainersTestCase.java
index 0c808683..74f4404e 100644
--- a/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core.tests/src/org/eclipse/tracecompass/incubator/virtual/machine/analysis/core/tests/fused/SimpleContainersTestCase.java
+++ b/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core.tests/src/org/eclipse/tracecompass/incubator/virtual/machine/analysis/core/tests/fused/SimpleContainersTestCase.java
@@ -77,89 +77,89 @@ public class SimpleContainersTestCase extends VmTestCase {
// Check the 'Machines' sub-tree towards the end of the trace
PunctualInfo oneInfo = new PunctualInfo(34L);
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.ONE_CONTAINER.getHostId(), FusedAttributes.CPUS, "0"), TmfStateValue.nullValue());
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.ONE_CONTAINER.getHostId(), FusedAttributes.CPUS, "1"), TmfStateValue.nullValue());
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.ONE_CONTAINER.getHostId(), FusedAttributes.PARENT), TmfStateValue.nullValue());
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.ONE_CONTAINER.getHostId(), FusedAttributes.CONTAINERS), TmfStateValue.nullValue());
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.ONE_CONTAINER.getHostId(), FusedAttributes.CONTAINERS, String.valueOf(NS_LV1)), TmfStateValue.nullValue());
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.ONE_CONTAINER.getHostId(), FusedAttributes.CONTAINERS, String.valueOf(NS_LV0)), TmfStateValue.nullValue());
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.ONE_CONTAINER.getHostId(), FusedAttributes.CONTAINERS, String.valueOf(NS_LV2)), TmfStateValue.nullValue());
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.ONE_CONTAINER.getHostId(), FusedAttributes.CONTAINERS, String.valueOf(NS_LV1), FusedAttributes.PARENT), TmfStateValue.newValueLong(NS_LV0));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.ONE_CONTAINER.getHostId(), FusedAttributes.CONTAINERS, String.valueOf(NS_LV0), FusedAttributes.PARENT), TmfStateValue.newValueLong(-1L));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.ONE_CONTAINER.getHostId(), FusedAttributes.CONTAINERS, String.valueOf(NS_LV2), FusedAttributes.PARENT), TmfStateValue.newValueLong(NS_LV1));
-
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.ONE_CONTAINER.getHostId(), FusedAttributes.CONTAINERS, String.valueOf(NS_LV1), FusedAttributes.THREADS, "40"), TmfStateValue.newValueInt(1));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.ONE_CONTAINER.getHostId(), FusedAttributes.CONTAINERS, String.valueOf(NS_LV1), FusedAttributes.THREADS, "41"), TmfStateValue.newValueInt(2));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.ONE_CONTAINER.getHostId(), FusedAttributes.CONTAINERS, String.valueOf(NS_LV1), FusedAttributes.THREADS, "42"), TmfStateValue.newValueInt(3));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.ONE_CONTAINER.getHostId(), FusedAttributes.CONTAINERS, String.valueOf(NS_LV1), FusedAttributes.THREADS, "43"), TmfStateValue.newValueInt(4));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.ONE_CONTAINER.getHostId(), FusedAttributes.CONTAINERS, String.valueOf(NS_LV1), FusedAttributes.THREADS, "44"), TmfStateValue.newValueInt(5));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.ONE_CONTAINER.getHostId(), FusedAttributes.CONTAINERS, String.valueOf(NS_LV1), FusedAttributes.PCPUS, "0"), TmfStateValue.nullValue());
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.ONE_CONTAINER.getHostId(), FusedAttributes.CONTAINERS, String.valueOf(NS_LV1), FusedAttributes.PCPUS, "1"), TmfStateValue.nullValue());
-
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.ONE_CONTAINER.getHostId(), FusedAttributes.CONTAINERS, String.valueOf(NS_LV0), FusedAttributes.THREADS, "40"), TmfStateValue.newValueInt(40));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.ONE_CONTAINER.getHostId(), FusedAttributes.CONTAINERS, String.valueOf(NS_LV0), FusedAttributes.THREADS, "41"), TmfStateValue.newValueInt(41));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.ONE_CONTAINER.getHostId(), FusedAttributes.CONTAINERS, String.valueOf(NS_LV0), FusedAttributes.THREADS, "42"), TmfStateValue.newValueInt(42));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.ONE_CONTAINER.getHostId(), FusedAttributes.CONTAINERS, String.valueOf(NS_LV0), FusedAttributes.THREADS, "43"), TmfStateValue.newValueInt(43));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.ONE_CONTAINER.getHostId(), FusedAttributes.CONTAINERS, String.valueOf(NS_LV0), FusedAttributes.THREADS, "44"), TmfStateValue.newValueInt(44));
-
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.ONE_CONTAINER.getHostId(), FusedAttributes.CONTAINERS, String.valueOf(NS_LV2), FusedAttributes.THREADS, "42"), TmfStateValue.newValueInt(1));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.ONE_CONTAINER.getHostId(), FusedAttributes.CONTAINERS, String.valueOf(NS_LV2), FusedAttributes.THREADS, "43"), TmfStateValue.newValueInt(2));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.ONE_CONTAINER.getHostId(), FusedAttributes.CONTAINERS, String.valueOf(NS_LV2), FusedAttributes.THREADS, "44"), TmfStateValue.newValueInt(3));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.ONE_CONTAINER.getHostId(), FusedAttributes.CONTAINERS, String.valueOf(NS_LV2), FusedAttributes.PCPUS, "0"), TmfStateValue.nullValue());
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.ONE_CONTAINER.getHostId(), FusedAttributes.CONTAINERS, String.valueOf(NS_LV2), FusedAttributes.PCPUS, "1"), TmfStateValue.nullValue());
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.ONE_CONTAINER.getHostId(), FusedAttributes.CPUS, "0"), null);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.ONE_CONTAINER.getHostId(), FusedAttributes.CPUS, "1"), null);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.ONE_CONTAINER.getHostId(), FusedAttributes.PARENT), null);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.ONE_CONTAINER.getHostId(), FusedAttributes.CONTAINERS), null);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.ONE_CONTAINER.getHostId(), FusedAttributes.CONTAINERS, String.valueOf(NS_LV1)), null);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.ONE_CONTAINER.getHostId(), FusedAttributes.CONTAINERS, String.valueOf(NS_LV0)), null);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.ONE_CONTAINER.getHostId(), FusedAttributes.CONTAINERS, String.valueOf(NS_LV2)), null);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.ONE_CONTAINER.getHostId(), FusedAttributes.CONTAINERS, String.valueOf(NS_LV1), FusedAttributes.PARENT), NS_LV0);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.ONE_CONTAINER.getHostId(), FusedAttributes.CONTAINERS, String.valueOf(NS_LV0), FusedAttributes.PARENT), -1L);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.ONE_CONTAINER.getHostId(), FusedAttributes.CONTAINERS, String.valueOf(NS_LV2), FusedAttributes.PARENT), NS_LV1);
+
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.ONE_CONTAINER.getHostId(), FusedAttributes.CONTAINERS, String.valueOf(NS_LV1), FusedAttributes.THREADS, "40"), 1);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.ONE_CONTAINER.getHostId(), FusedAttributes.CONTAINERS, String.valueOf(NS_LV1), FusedAttributes.THREADS, "41"), 2);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.ONE_CONTAINER.getHostId(), FusedAttributes.CONTAINERS, String.valueOf(NS_LV1), FusedAttributes.THREADS, "42"), 3);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.ONE_CONTAINER.getHostId(), FusedAttributes.CONTAINERS, String.valueOf(NS_LV1), FusedAttributes.THREADS, "43"), 4);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.ONE_CONTAINER.getHostId(), FusedAttributes.CONTAINERS, String.valueOf(NS_LV1), FusedAttributes.THREADS, "44"), 5);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.ONE_CONTAINER.getHostId(), FusedAttributes.CONTAINERS, String.valueOf(NS_LV1), FusedAttributes.PCPUS, "0"), null);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.ONE_CONTAINER.getHostId(), FusedAttributes.CONTAINERS, String.valueOf(NS_LV1), FusedAttributes.PCPUS, "1"), null);
+
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.ONE_CONTAINER.getHostId(), FusedAttributes.CONTAINERS, String.valueOf(NS_LV0), FusedAttributes.THREADS, "40"), 40);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.ONE_CONTAINER.getHostId(), FusedAttributes.CONTAINERS, String.valueOf(NS_LV0), FusedAttributes.THREADS, "41"), 41);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.ONE_CONTAINER.getHostId(), FusedAttributes.CONTAINERS, String.valueOf(NS_LV0), FusedAttributes.THREADS, "42"), 42);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.ONE_CONTAINER.getHostId(), FusedAttributes.CONTAINERS, String.valueOf(NS_LV0), FusedAttributes.THREADS, "43"), 43);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.ONE_CONTAINER.getHostId(), FusedAttributes.CONTAINERS, String.valueOf(NS_LV0), FusedAttributes.THREADS, "44"), 44);
+
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.ONE_CONTAINER.getHostId(), FusedAttributes.CONTAINERS, String.valueOf(NS_LV2), FusedAttributes.THREADS, "42"), 1);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.ONE_CONTAINER.getHostId(), FusedAttributes.CONTAINERS, String.valueOf(NS_LV2), FusedAttributes.THREADS, "43"), 2);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.ONE_CONTAINER.getHostId(), FusedAttributes.CONTAINERS, String.valueOf(NS_LV2), FusedAttributes.THREADS, "44"), 3);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.ONE_CONTAINER.getHostId(), FusedAttributes.CONTAINERS, String.valueOf(NS_LV2), FusedAttributes.PCPUS, "0"), null);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.HOSTS, VmTraces.ONE_CONTAINER.getHostId(), FusedAttributes.CONTAINERS, String.valueOf(NS_LV2), FusedAttributes.PCPUS, "1"), null);
// Check the 'Threads' sub-tree and VTID informations
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "40", FusedAttributes.NS_MAX_LEVEL), TmfStateValue.newValueInt(2));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "40", FusedAttributes.NS_INUM), TmfStateValue.newValueLong(NS_LV0));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "40", FusedAttributes.NS_LEVEL), TmfStateValue.newValueInt(0));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "40", FusedAttributes.VTID), TmfStateValue.newValueInt(1));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "40", FusedAttributes.VTID, FusedAttributes.VPPID), TmfStateValue.newValueInt(0));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "40", FusedAttributes.VTID, FusedAttributes.NS_INUM), TmfStateValue.newValueLong(NS_LV1));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "40", FusedAttributes.VTID, FusedAttributes.NS_LEVEL), TmfStateValue.newValueInt(1));
-
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "41", FusedAttributes.NS_MAX_LEVEL), TmfStateValue.newValueInt(2));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "41", FusedAttributes.NS_INUM), TmfStateValue.newValueLong(NS_LV0));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "41", FusedAttributes.NS_LEVEL), TmfStateValue.newValueInt(0));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "41", FusedAttributes.VTID), TmfStateValue.newValueInt(2));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "41", FusedAttributes.VTID, FusedAttributes.VPPID), TmfStateValue.newValueInt(1));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "41", FusedAttributes.VTID, FusedAttributes.NS_INUM), TmfStateValue.newValueLong(NS_LV1));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "41", FusedAttributes.VTID, FusedAttributes.NS_LEVEL), TmfStateValue.newValueInt(1));
-
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "42", FusedAttributes.NS_MAX_LEVEL), TmfStateValue.newValueInt(3));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "42", FusedAttributes.NS_INUM), TmfStateValue.newValueLong(NS_LV0));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "42", FusedAttributes.NS_LEVEL), TmfStateValue.newValueInt(0));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "42", FusedAttributes.VTID), TmfStateValue.newValueInt(3));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "42", FusedAttributes.VTID, FusedAttributes.VPPID), TmfStateValue.newValueInt(2));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "42", FusedAttributes.VTID, FusedAttributes.NS_INUM), TmfStateValue.newValueLong(NS_LV1));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "42", FusedAttributes.VTID, FusedAttributes.NS_LEVEL), TmfStateValue.newValueInt(1));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "42", FusedAttributes.VTID, FusedAttributes.VTID), TmfStateValue.newValueInt(1));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "42", FusedAttributes.VTID, FusedAttributes.VTID, FusedAttributes.VPPID), TmfStateValue.newValueInt(0));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "42", FusedAttributes.VTID, FusedAttributes.VTID, FusedAttributes.NS_INUM), TmfStateValue.newValueLong(NS_LV2));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "42", FusedAttributes.VTID, FusedAttributes.VTID, FusedAttributes.NS_LEVEL), TmfStateValue.newValueInt(2));
-
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "43", FusedAttributes.NS_MAX_LEVEL), TmfStateValue.newValueInt(3));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "43", FusedAttributes.NS_INUM), TmfStateValue.newValueLong(NS_LV0));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "43", FusedAttributes.NS_LEVEL), TmfStateValue.newValueInt(0));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "43", FusedAttributes.VTID), TmfStateValue.newValueInt(4));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "43", FusedAttributes.VTID, FusedAttributes.VPPID), TmfStateValue.newValueInt(3));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "43", FusedAttributes.VTID, FusedAttributes.NS_INUM), TmfStateValue.newValueLong(NS_LV1));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "43", FusedAttributes.VTID, FusedAttributes.NS_LEVEL), TmfStateValue.newValueInt(1));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "43", FusedAttributes.VTID, FusedAttributes.VTID), TmfStateValue.newValueInt(2));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "43", FusedAttributes.VTID, FusedAttributes.VTID, FusedAttributes.VPPID), TmfStateValue.newValueInt(1));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "43", FusedAttributes.VTID, FusedAttributes.VTID, FusedAttributes.NS_INUM), TmfStateValue.newValueLong(NS_LV2));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "43", FusedAttributes.VTID, FusedAttributes.VTID, FusedAttributes.NS_LEVEL), TmfStateValue.newValueInt(2));
-
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "44", FusedAttributes.NS_MAX_LEVEL), TmfStateValue.newValueInt(3));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "44", FusedAttributes.NS_INUM), TmfStateValue.newValueLong(NS_LV0));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "44", FusedAttributes.NS_LEVEL), TmfStateValue.newValueInt(0));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "44", FusedAttributes.VTID), TmfStateValue.newValueInt(5));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "44", FusedAttributes.VTID, FusedAttributes.VPPID), TmfStateValue.newValueInt(3));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "44", FusedAttributes.VTID, FusedAttributes.NS_INUM), TmfStateValue.newValueLong(NS_LV1));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "44", FusedAttributes.VTID, FusedAttributes.NS_LEVEL), TmfStateValue.newValueInt(1));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "44", FusedAttributes.VTID, FusedAttributes.VTID), TmfStateValue.newValueInt(3));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "44", FusedAttributes.VTID, FusedAttributes.VTID, FusedAttributes.VPPID), TmfStateValue.newValueInt(1));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "44", FusedAttributes.VTID, FusedAttributes.VTID, FusedAttributes.NS_INUM), TmfStateValue.newValueLong(NS_LV2));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "44", FusedAttributes.VTID, FusedAttributes.VTID, FusedAttributes.NS_LEVEL), TmfStateValue.newValueInt(2));
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "40", FusedAttributes.NS_MAX_LEVEL), 2);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "40", FusedAttributes.NS_INUM), NS_LV0);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "40", FusedAttributes.NS_LEVEL), 0);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "40", FusedAttributes.VTID), 1);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "40", FusedAttributes.VTID, FusedAttributes.VPPID), 0);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "40", FusedAttributes.VTID, FusedAttributes.NS_INUM), NS_LV1);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "40", FusedAttributes.VTID, FusedAttributes.NS_LEVEL), 1);
+
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "41", FusedAttributes.NS_MAX_LEVEL), 2);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "41", FusedAttributes.NS_INUM), NS_LV0);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "41", FusedAttributes.NS_LEVEL), 0);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "41", FusedAttributes.VTID), 2);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "41", FusedAttributes.VTID, FusedAttributes.VPPID), 1);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "41", FusedAttributes.VTID, FusedAttributes.NS_INUM), NS_LV1);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "41", FusedAttributes.VTID, FusedAttributes.NS_LEVEL), 1);
+
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "42", FusedAttributes.NS_MAX_LEVEL), 3);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "42", FusedAttributes.NS_INUM), NS_LV0);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "42", FusedAttributes.NS_LEVEL), 0);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "42", FusedAttributes.VTID), 3);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "42", FusedAttributes.VTID, FusedAttributes.VPPID), 2);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "42", FusedAttributes.VTID, FusedAttributes.NS_INUM), NS_LV1);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "42", FusedAttributes.VTID, FusedAttributes.NS_LEVEL), 1);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "42", FusedAttributes.VTID, FusedAttributes.VTID), 1);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "42", FusedAttributes.VTID, FusedAttributes.VTID, FusedAttributes.VPPID), 0);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "42", FusedAttributes.VTID, FusedAttributes.VTID, FusedAttributes.NS_INUM), NS_LV2);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "42", FusedAttributes.VTID, FusedAttributes.VTID, FusedAttributes.NS_LEVEL), 2);
+
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "43", FusedAttributes.NS_MAX_LEVEL), 3);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "43", FusedAttributes.NS_INUM), NS_LV0);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "43", FusedAttributes.NS_LEVEL), 0);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "43", FusedAttributes.VTID), 4);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "43", FusedAttributes.VTID, FusedAttributes.VPPID), 3);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "43", FusedAttributes.VTID, FusedAttributes.NS_INUM), NS_LV1);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "43", FusedAttributes.VTID, FusedAttributes.NS_LEVEL), 1);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "43", FusedAttributes.VTID, FusedAttributes.VTID), 2);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "43", FusedAttributes.VTID, FusedAttributes.VTID, FusedAttributes.VPPID), 1);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "43", FusedAttributes.VTID, FusedAttributes.VTID, FusedAttributes.NS_INUM), NS_LV2);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "43", FusedAttributes.VTID, FusedAttributes.VTID, FusedAttributes.NS_LEVEL), 2);
+
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "44", FusedAttributes.NS_MAX_LEVEL), 3);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "44", FusedAttributes.NS_INUM), NS_LV0);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "44", FusedAttributes.NS_LEVEL), 0);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "44", FusedAttributes.VTID), 5);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "44", FusedAttributes.VTID, FusedAttributes.VPPID), 3);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "44", FusedAttributes.VTID, FusedAttributes.NS_INUM), NS_LV1);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "44", FusedAttributes.VTID, FusedAttributes.NS_LEVEL), 1);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "44", FusedAttributes.VTID, FusedAttributes.VTID), 3);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "44", FusedAttributes.VTID, FusedAttributes.VTID, FusedAttributes.VPPID), 1);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "44", FusedAttributes.VTID, FusedAttributes.VTID, FusedAttributes.NS_INUM), NS_LV2);
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(FusedAttributes.THREADS, VmTraces.ONE_CONTAINER.getHostId(), "44", FusedAttributes.VTID, FusedAttributes.VTID, FusedAttributes.NS_LEVEL), 2);
info.add(oneInfo);
diff --git a/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core.tests/src/org/eclipse/tracecompass/incubator/virtual/machine/analysis/core/tests/model/OneQemuKvmModelTestCase.java b/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core.tests/src/org/eclipse/tracecompass/incubator/virtual/machine/analysis/core/tests/model/OneQemuKvmModelTestCase.java
index 76f43e16..a5beedac 100644
--- a/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core.tests/src/org/eclipse/tracecompass/incubator/virtual/machine/analysis/core/tests/model/OneQemuKvmModelTestCase.java
+++ b/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core.tests/src/org/eclipse/tracecompass/incubator/virtual/machine/analysis/core/tests/model/OneQemuKvmModelTestCase.java
@@ -18,7 +18,6 @@ import org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core
import org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core.model.analysis.VirtualMachineModelAnalysis;
import org.eclipse.tracecompass.incubator.virtual.machine.analysis.core.tests.shared.vm.VmTestExperiment;
import org.eclipse.tracecompass.incubator.virtual.machine.analysis.core.tests.shared.vm.VmTraces;
-import org.eclipse.tracecompass.statesystem.core.statevalue.TmfStateValue;
import org.eclipse.tracecompass.statesystem.core.tests.shared.utils.StateSystemTestUtils;
import com.google.common.collect.ImmutableList;
@@ -51,9 +50,9 @@ public class OneQemuKvmModelTestCase extends VmModelTestCase {
// Check the 'Machines' sub-tree towards the end of the trace
PunctualInfo oneInfo = new PunctualInfo(300L);
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(HOST_ID), TmfStateValue.newValueString(VmTraces.HOST_ONE_QEMUKVM.getFileName()));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(HOST_ID, VirtualMachineModelAnalysis.GUEST_VMS, GUEST_ID), TmfStateValue.newValueString(VmTraces.GUEST_ONE_QEMUKVM.getFileName()));
- oneInfo.addValue(StateSystemTestUtils.makeAttribute(HOST_ID, VirtualMachineModelAnalysis.GUEST_VMS, GUEST_ID, VirtualMachineModelAnalysis.CPUS, "0"), TmfStateValue.newValueInt(31));
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(HOST_ID), VmTraces.HOST_ONE_QEMUKVM.getFileName());
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(HOST_ID, VirtualMachineModelAnalysis.GUEST_VMS, GUEST_ID), VmTraces.GUEST_ONE_QEMUKVM.getFileName());
+ oneInfo.addValue(StateSystemTestUtils.makeAttribute(HOST_ID, VirtualMachineModelAnalysis.GUEST_VMS, GUEST_ID, VirtualMachineModelAnalysis.CPUS, "0"), 31);
info.add(oneInfo);
return info;
diff --git a/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/META-INF/MANIFEST.MF b/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/META-INF/MANIFEST.MF
index 20d66399..05e34cb3 100644
--- a/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/META-INF/MANIFEST.MF
+++ b/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/META-INF/MANIFEST.MF
@@ -30,7 +30,7 @@ Export-Package: org.eclipse.tracecompass.incubator.internal.virtual.machine.anal
org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core.model.qemukvm;x-friends:="org.eclipse.tracecompass.incubator.virtual.machine.analysis.core.tests,org.eclipse.tracecompass.incubator.virtual.machine.analysis.ui",
org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core.overhead;x-friends:="org.eclipse.tracecompass.incubator.virtual.machine.analysis.core.tests",
org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core.trace;x-internal:=true,
- org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core.virtual.resources;x-internal:=true,
+ org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core.virtual.resources;x-friends:="org.eclipse.tracecompass.incubator.virtual.machine.analysis.core.tests,org.eclipse.tracecompass.incubator.virtual.machine.analysis.ui",
org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core.virtual.resources.handlers;x-internal:=true
Import-Package: com.google.common.collect,
com.google.common.hash,
diff --git a/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/FusedVMInformationProvider.java b/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/FusedVMInformationProvider.java
index 7e09d1d0..87fb4bbc 100644
--- a/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/FusedVMInformationProvider.java
+++ b/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/FusedVMInformationProvider.java
@@ -24,7 +24,6 @@ import org.eclipse.tracecompass.statesystem.core.exceptions.AttributeNotFoundExc
import org.eclipse.tracecompass.statesystem.core.exceptions.StateSystemDisposedException;
import org.eclipse.tracecompass.statesystem.core.interval.ITmfStateInterval;
import org.eclipse.tracecompass.statesystem.core.statevalue.ITmfStateValue;
-import org.eclipse.tracecompass.statesystem.core.statevalue.TmfStateValue;
/**
* Utility methods to retrieve information from the virtual machine analysis
@@ -140,20 +139,21 @@ public final class FusedVMInformationProvider {
* The state system
* @param hostId
* The host ID of the machine
- * @return The state value corresponding to this machine's type
+ * @return The type of the host machine. A negative value means the machine is
+ * not a known machine
*/
- public static ITmfStateValue getTypeMachine(ITmfStateSystem ssq, String hostId) {
+ public static int getTypeMachine(ITmfStateSystem ssq, String hostId) {
int quark;
try {
quark = ssq.optQuarkAbsolute(FusedAttributes.HOSTS, hostId);
if (quark == ITmfStateSystem.INVALID_ATTRIBUTE) {
- return TmfStateValue.nullValue();
+ return -1;
}
- return ssq.querySingleState(ssq.getStartTime(), quark).getStateValue();
+ return ssq.querySingleState(ssq.getStartTime(), quark).getStateValue().unboxInt();
} catch (StateSystemDisposedException e) {
// About to close, ignore
}
- return TmfStateValue.nullValue();
+ return -1;
}
public static int getNodeNsInum(ITmfStateSystem ssq, long time, String machineName, int threadID) throws AttributeNotFoundException, StateSystemDisposedException {
@@ -333,13 +333,13 @@ public final class FusedVMInformationProvider {
public static Collection<String> getPhysicalCpusUsedByMachine(ITmfStateSystem ssq, String hostId) {
List<String> pcpus = new LinkedList<>();
List<Integer> pCpuquarks = new LinkedList<>();
- ITmfStateValue type = getTypeMachine(ssq, hostId);
- if (type.isNull()) {
+ int type = getTypeMachine(ssq, hostId);
+ if (type < 0) {
return pcpus;
}
- if ((type.unboxInt() & StateValues.MACHINE_GUEST) == StateValues.MACHINE_GUEST) {
+ if ((type & StateValues.MACHINE_GUEST) == StateValues.MACHINE_GUEST) {
pCpuquarks = ssq.getQuarks(FusedAttributes.HOSTS, hostId, FusedAttributes.PCPUS, "*"); //$NON-NLS-1$
- } else if (type.unboxInt() == StateValues.MACHINE_HOST) {
+ } else if (type == StateValues.MACHINE_HOST) {
pCpuquarks = ssq.getQuarks(FusedAttributes.HOSTS, hostId, FusedAttributes.CPUS, "*"); //$NON-NLS-1$
}
for (Integer quark : pCpuquarks) {
@@ -361,8 +361,8 @@ public final class FusedVMInformationProvider {
public static Collection<String> getCpusUsedByMachine(ITmfStateSystem ssq, String hostId) {
List<String> cpus = new LinkedList<>();
List<Integer> cpuQuarks = new LinkedList<>();
- ITmfStateValue type = getTypeMachine(ssq, hostId);
- if (type.isNull()) {
+ int type = getTypeMachine(ssq, hostId);
+ if (type < 0) {
return cpus;
}
cpuQuarks = ssq.getQuarks(FusedAttributes.HOSTS, hostId, FusedAttributes.CPUS, "*"); //$NON-NLS-1$
diff --git a/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/FusedVMEventHandlerUtils.java b/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/FusedVMEventHandlerUtils.java
index 24bc60c6..11d7eeb2 100644
--- a/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/FusedVMEventHandlerUtils.java
+++ b/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/FusedVMEventHandlerUtils.java
@@ -21,8 +21,6 @@ import org.eclipse.tracecompass.statesystem.core.ITmfStateSystem;
import org.eclipse.tracecompass.statesystem.core.ITmfStateSystemBuilder;
import org.eclipse.tracecompass.statesystem.core.exceptions.StateValueTypeException;
import org.eclipse.tracecompass.statesystem.core.exceptions.TimeRangeException;
-import org.eclipse.tracecompass.statesystem.core.statevalue.ITmfStateValue;
-import org.eclipse.tracecompass.statesystem.core.statevalue.TmfStateValue;
import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
/**
@@ -83,11 +81,10 @@ public class FusedVMEventHandlerUtils {
* querying the current CPU's current thread.
*/
int quark = ss.getQuarkRelativeAndAdd(getCurrentCPUNode(cpuNumber, ss), FusedAttributes.CURRENT_THREAD);
- ITmfStateValue value = ss.queryOngoingState(quark);
- int thread = value.isNull() ? -1 : value.unboxInt();
+ Object value = ss.queryOngoing(quark);
+ int thread = (value instanceof Integer) ? (int) value : -1;
quark = ss.getQuarkRelativeAndAdd(getCurrentCPUNode(cpuNumber, ss), FusedAttributes.MACHINE_NAME);
- value = ss.queryOngoingState(quark);
- String machineName = value.unboxStr();
+ String machineName = (String) ss.queryOngoing(quark);
return ss.getQuarkRelativeAndAdd(getNodeThreads(ss, machineName), buildThreadAttributeName(thread, cpuNumber));
}
@@ -163,15 +160,15 @@ public class FusedVMEventHandlerUtils {
public static void setProcessToRunning(long timestamp, int currentThreadNode, ITmfStateSystemBuilder ssb)
throws TimeRangeException, StateValueTypeException {
int quark;
- ITmfStateValue value;
+ Object value;
quark = ssb.getQuarkRelativeAndAdd(currentThreadNode, FusedAttributes.SYSTEM_CALL);
if (ssb.queryOngoingState(quark).isNull()) {
/* We were in user mode before the interruption */
- value = StateValues.PROCESS_STATUS_RUN_USERMODE_VALUE;
+ value = StateValues.PROCESS_STATUS_RUN_USERMODE;
} else {
/* We were previously in kernel mode */
- value = StateValues.PROCESS_STATUS_RUN_SYSCALL_VALUE;
+ value = StateValues.PROCESS_STATUS_RUN_SYSCALL;
}
quark = ssb.getQuarkRelativeAndAdd(currentThreadNode, FusedAttributes.STATUS);
ssb.modifyAttribute(timestamp, value, quark);
@@ -198,7 +195,7 @@ public class FusedVMEventHandlerUtils {
int currentCPUNode = getCurrentCPUNode(cpuNumber, ssb);
quark = ssb.getQuarkRelativeAndAdd(currentCPUNode, FusedAttributes.STATUS);
- ITmfStateValue value = getCpuStatus(ssb, currentCPUNode);
+ Object value = getCpuStatus(ssb, currentCPUNode);
ssb.modifyAttribute(timestamp, value, quark);
}
@@ -223,15 +220,15 @@ public class FusedVMEventHandlerUtils {
* NOT the CPU number (or attribute name)!
* @return The state value that represents the status of the given CPU
*/
- private static ITmfStateValue getCpuStatus(ITmfStateSystemBuilder ssb, int cpuQuark) {
+ private static @Nullable Integer getCpuStatus(ITmfStateSystemBuilder ssb, int cpuQuark) {
/* Check if there is a IRQ running */
int irqQuarks = ssb.getQuarkRelativeAndAdd(cpuQuark, FusedAttributes.IRQS);
List<Integer> irqs = ssb.getSubAttributes(irqQuarks, false);
for (Integer quark : irqs) {
- final ITmfStateValue irqState = ssb.queryOngoingState(quark.intValue());
- if (!irqState.isNull()) {
- return irqState;
+ final Object irqState = ssb.queryOngoing(quark.intValue());
+ if (irqState instanceof Integer) {
+ return (Integer) irqState;
}
}
@@ -239,9 +236,9 @@ public class FusedVMEventHandlerUtils {
int softIrqQuarks = ssb.getQuarkRelativeAndAdd(cpuQuark, FusedAttributes.SOFT_IRQS);
List<Integer> softIrqs = ssb.getSubAttributes(softIrqQuarks, false);
for (Integer quark : softIrqs) {
- final ITmfStateValue softIrqState = ssb.queryOngoingState(quark.intValue());
- if (!softIrqState.isNull()) {
- return softIrqState;
+ final Object softIrqState = ssb.queryOngoing(quark.intValue());
+ if (softIrqState instanceof Integer) {
+ return (Integer) softIrqState;
}
}
@@ -250,18 +247,18 @@ public class FusedVMEventHandlerUtils {
* report the running state of the thread (usermode or system call).
*/
int currentThreadQuark = ssb.getQuarkRelativeAndAdd(cpuQuark, FusedAttributes.CURRENT_THREAD);
- ITmfStateValue currentThreadState = ssb.queryOngoingState(currentThreadQuark);
- if (currentThreadState.isNull()) {
- return TmfStateValue.nullValue();
+ Object currentThreadState = ssb.queryOngoing(currentThreadQuark);
+ if (!(currentThreadState instanceof Integer)) {
+ return null;
}
- int tid = currentThreadState.unboxInt();
+ int tid = (Integer) currentThreadState;
if (tid == 0) {
- return StateValues.CPU_STATUS_IDLE_VALUE;
+ return StateValues.CPU_STATUS_IDLE;
}
int currentMachineQuark = ssb.getQuarkRelativeAndAdd(cpuQuark, FusedAttributes.MACHINE_NAME);
- String machineName = ssb.queryOngoingState(currentMachineQuark).unboxStr();
+ String machineName = (String) ssb.queryOngoing(currentMachineQuark);
int threadSystemCallQuark = ssb.getQuarkRelativeAndAdd(getNodeThreads(ssb, machineName), Integer.toString(tid), FusedAttributes.SYSTEM_CALL);
- return (ssb.queryOngoingState(threadSystemCallQuark).isNull() ? StateValues.CPU_STATUS_RUN_USERMODE_VALUE : StateValues.CPU_STATUS_RUN_SYSCALL_VALUE);
+ return (ssb.queryOngoingState(threadSystemCallQuark).isNull() ? StateValues.CPU_STATUS_RUN_USERMODE : StateValues.CPU_STATUS_RUN_SYSCALL);
}
/**
@@ -336,9 +333,11 @@ public class FusedVMEventHandlerUtils {
if (maxLvQuark == ITmfStateSystem.INVALID_ATTRIBUTE) {
return namespaces;
}
- ITmfStateValue value;
- value = ss.queryOngoingState(maxLvQuark);
- int nsMaxLevel = value.unboxInt();
+ Object value = ss.queryOngoing(maxLvQuark);
+ if (value == null) {
+ return namespaces;
+ }
+ int nsMaxLevel = (int) value;
if (nsMaxLevel > 1) {
int currentLevel = 1;
int vtidQuark = threadQuark;
diff --git a/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/FusedVirtualMachineStateProvider.java b/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/FusedVirtualMachineStateProvider.java
index 544da577..876888d8 100644
--- a/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/FusedVirtualMachineStateProvider.java
+++ b/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/FusedVirtualMachineStateProvider.java
@@ -30,8 +30,6 @@ import org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core
import org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core.virtual.resources.StateValues;
import org.eclipse.tracecompass.statesystem.core.ITmfStateSystem;
import org.eclipse.tracecompass.statesystem.core.ITmfStateSystemBuilder;
-import org.eclipse.tracecompass.statesystem.core.statevalue.ITmfStateValue;
-import org.eclipse.tracecompass.statesystem.core.statevalue.TmfStateValue;
import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
import org.eclipse.tracecompass.tmf.core.event.aspect.TmfCpuAspect;
import org.eclipse.tracecompass.tmf.core.statesystem.AbstractTmfStateProvider;
@@ -260,15 +258,14 @@ public class FusedVirtualMachineStateProvider extends AbstractTmfStateProvider {
* Add in the state system the state of the cpu (in or out vm).
*/
int quarkCondition = ss.getQuarkRelativeAndAdd(currentCPUNode, FusedAttributes.CONDITION);
- ITmfStateValue valueCondition = StateValues.CONDITION_UNKNOWN_VALUE;
+ Integer valueCondition = StateValues.CONDITION_UNKNOWN;
int quarkMachines = FusedVMEventHandlerUtils.getMachinesNode(ss);
int machineHostQuark = ss.getQuarkRelativeAndAdd(quarkMachines, traceHost);
// if (inVM) {
if (host != null && host.isGuest()) {
- valueCondition = StateValues.CONDITION_IN_VM_VALUE;
+ valueCondition = StateValues.CONDITION_IN_VM;
int quarkVCpu = ss.getQuarkRelativeAndAdd(currentCPUNode, FusedAttributes.VIRTUAL_CPU);
- ITmfStateValue valueVCpu = TmfStateValue.newValueInt(currentVCpu);
- ss.modifyAttribute(ts, valueVCpu, quarkVCpu);
+ ss.modifyAttribute(ts, currentVCpu, quarkVCpu);
/*
* This part is used to remember how many cpus a machine has
@@ -291,7 +288,7 @@ public class FusedVirtualMachineStateProvider extends AbstractTmfStateProvider {
// } else {
ss.getQuarkRelativeAndAdd(quarkMachines, traceHost, FusedAttributes.CPUS, cpu.toString());
// }
- valueCondition = StateValues.CONDITION_OUT_VM_VALUE;
+ valueCondition = StateValues.CONDITION_OUT_VM;
}
/*
* Add the role of the machine in the state system
@@ -312,14 +309,14 @@ public class FusedVirtualMachineStateProvider extends AbstractTmfStateProvider {
*/
int quark = ss.getQuarkRelativeAndAdd(currentCPUNode, FusedAttributes.CURRENT_THREAD);
- ITmfStateValue value = ss.queryOngoingState(quark);
- int thread = value.isNull() ? -1 : value.unboxInt();
+ Object value = ss.queryOngoing(quark);
+ int thread = value instanceof Integer ? (int) value : -1;
fCurrentThreadNode = ss.getQuarkRelativeAndAdd(getNodeThreads(ss, traceHost), String.valueOf(thread));
/* Set the name of the machine running on the cpu */
quark = ss.getQuarkRelativeAndAdd(currentCPUNode, FusedAttributes.MACHINE_NAME);
- value = TmfStateValue.newValueString(event.getTrace().getHostId());
+ value = event.getTrace().getHostId();
if (host != null && host.isHost() && !host.isGuest()) {
ss.modifyAttribute(ts, value, quark);
}
@@ -371,11 +368,10 @@ public class FusedVirtualMachineStateProvider extends AbstractTmfStateProvider {
* querying the current CPU's current thread.
*/
int quark = ss.getQuarkRelativeAndAdd(FusedVMEventHandlerUtils.getCurrentCPUNode(cpuNumber, ss), FusedAttributes.CURRENT_THREAD);
- ITmfStateValue value = ss.queryOngoingState(quark);
- int thread = value.isNull() ? -1 : value.unboxInt();
+ Object value = ss.queryOngoing(quark);
+ int thread = (value instanceof Integer) ? (int) value : -1;
quark = ss.getQuarkRelativeAndAdd(FusedVMEventHandlerUtils.getCurrentCPUNode(cpuNumber, ss), FusedAttributes.MACHINE_NAME);
- value = ss.queryOngoingState(quark);
- String machineName = value.unboxStr();
+ String machineName = (String) ss.queryOngoing(quark);
return ss.getQuarkRelativeAndAdd(getNodeThreads(ss, machineName), String.valueOf(thread));
}
@@ -512,14 +508,14 @@ public class FusedVirtualMachineStateProvider extends AbstractTmfStateProvider {
int machineNameQuark = ss.optQuarkRelative(machineQuark, FusedAttributes.MACHINE_NAME);
if (machineNameQuark == ITmfStateSystem.INVALID_ATTRIBUTE) {
machineNameQuark = ss.getQuarkRelativeAndAdd(machineQuark, FusedAttributes.MACHINE_NAME);
- ss.updateOngoingState(TmfStateValue.newValueString(machine.getTraceName()), machineNameQuark);
+ ss.updateOngoingState(machine.getTraceName(), machineNameQuark);
}
// Set the type
- ITmfStateValue machineType = ss.queryOngoingState(machineQuark);
- if (!machineType.isNull()) {
+ Object machineType = ss.queryOngoing(machineQuark);
+ if (!(machineType instanceof Integer)) {
continue;
}
- ss.updateOngoingState(TmfStateValue.newValueInt(machine.getType()), machineQuark);
+ ss.updateOngoingState(machine.getType(), machineQuark);
}
}
@@ -528,13 +524,13 @@ public class FusedVirtualMachineStateProvider extends AbstractTmfStateProvider {
for (VirtualMachine machine : knownMachines.values()) {
String machineName = machine.getHostId();
int parentQuark = ss.getQuarkAbsoluteAndAdd(FusedAttributes.HOSTS, machineName, FusedAttributes.PARENT);
- ITmfStateValue parent = ss.queryOngoingState(parentQuark);
- if (!parent.isNull()) {
+ Object parent = ss.queryOngoing(parentQuark);
+ if (parent != null) {
return;
}
VirtualMachine parentMachine = machine.getParent();
if (parentMachine != null) {
- ss.modifyAttribute(getStartTime(), TmfStateValue.newValueString(parentMachine.getHostId()), parentQuark);
+ ss.modifyAttribute(getStartTime(), parentMachine.getHostId(), parentQuark);
}
}
}
diff --git a/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/IrqEntryHandler.java b/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/IrqEntryHandler.java
index e4e41985..d969663c 100644
--- a/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/IrqEntryHandler.java
+++ b/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/IrqEntryHandler.java
@@ -15,8 +15,6 @@ import org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core
import org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core.model.VirtualMachine;
import org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core.virtual.resources.StateValues;
import org.eclipse.tracecompass.statesystem.core.ITmfStateSystemBuilder;
-import org.eclipse.tracecompass.statesystem.core.statevalue.ITmfStateValue;
-import org.eclipse.tracecompass.statesystem.core.statevalue.TmfStateValue;
import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
import org.eclipse.tracecompass.tmf.core.event.aspect.TmfCpuAspect;
import org.eclipse.tracecompass.tmf.core.trace.TmfTraceUtils;
@@ -64,20 +62,23 @@ public class IrqEntryHandler extends VMKernelEventHandler {
*/
int quark = ss.getQuarkRelativeAndAdd(FusedVMEventHandlerUtils.getNodeIRQs(cpu, ss), irqId.toString());
- ITmfStateValue value = TmfStateValue.newValueInt(cpu.intValue());
+ Object value = cpu.intValue();
long timestamp = FusedVMEventHandlerUtils.getTimestamp(event);
ss.modifyAttribute(timestamp, value, quark);
/* Change the status of the running process to interrupted */
quark = ss.getQuarkRelativeAndAdd(FusedVMEventHandlerUtils.getCurrentThreadNode(cpu, ss), FusedAttributes.STATUS);
- value = StateValues.PROCESS_STATUS_INTERRUPTED_VALUE;
+ value = StateValues.PROCESS_STATUS_INTERRUPTED;
ss.modifyAttribute(timestamp, value, quark);
/* Change the status of the CPU to be interrupted */
quark = ss.getQuarkRelativeAndAdd(FusedVMEventHandlerUtils.getCurrentCPUNode(cpu, ss), FusedAttributes.STATUS);
- value = ss.queryOngoingState(quark);
- cpuObject.setStateBeforeIRQ(value);
- value = StateValues.CPU_STATUS_IRQ_VALUE;
+ value = ss.queryOngoing(quark);
+ if (value == null) {
+ return;
+ }
+ cpuObject.setStateBeforeIRQ((int) value);
+ value = StateValues.CPU_STATUS_IRQ;
ss.modifyAttribute(timestamp, value, quark);
}
diff --git a/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/IrqExitHandler.java b/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/IrqExitHandler.java
index 3431f84b..f379a0c2 100644
--- a/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/IrqExitHandler.java
+++ b/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/IrqExitHandler.java
@@ -15,8 +15,6 @@ import org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core
import org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core.model.VirtualCPU;
import org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core.model.VirtualMachine;
import org.eclipse.tracecompass.statesystem.core.ITmfStateSystemBuilder;
-import org.eclipse.tracecompass.statesystem.core.statevalue.ITmfStateValue;
-import org.eclipse.tracecompass.statesystem.core.statevalue.TmfStateValue;
import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
import org.eclipse.tracecompass.tmf.core.event.aspect.TmfCpuAspect;
import org.eclipse.tracecompass.tmf.core.trace.TmfTraceUtils;
@@ -51,9 +49,8 @@ public class IrqExitHandler extends VMKernelEventHandler {
Integer irqId = ((Long) event.getContent().getField(getLayout().fieldIrq()).getValue()).intValue();
/* Put this IRQ back to inactive in the resource tree */
int quark = ss.getQuarkRelativeAndAdd(FusedVMEventHandlerUtils.getNodeIRQs(cpu, ss), irqId.toString());
- ITmfStateValue value = TmfStateValue.nullValue();
long timestamp = FusedVMEventHandlerUtils.getTimestamp(event);
- ss.modifyAttribute(timestamp, value, quark);
+ ss.modifyAttribute(timestamp, (Object) null, quark);
/* Set the previous process back to running */
FusedVMEventHandlerUtils.setProcessToRunning(timestamp, currentThreadNode, ss);
@@ -61,7 +58,7 @@ public class IrqExitHandler extends VMKernelEventHandler {
/* Set the CPU status back to running or "idle" */
FusedVMEventHandlerUtils.cpuExitInterrupt(timestamp, cpu, ss);
quark = ss.getQuarkRelativeAndAdd(FusedVMEventHandlerUtils.getCurrentCPUNode(cpu, ss), FusedAttributes.STATUS);
- value = cpuObject.getStateBeforeIRQ();
+ Integer value = cpuObject.getStateBeforeIRQ();
ss.modifyAttribute(timestamp, value, quark);
}
diff --git a/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/KvmEntryHandler.java b/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/KvmEntryHandler.java
index 48f4c388..d15c54e4 100644
--- a/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/KvmEntryHandler.java
+++ b/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/KvmEntryHandler.java
@@ -16,8 +16,6 @@ import org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core
import org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core.model.VirtualMachine;
import org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core.virtual.resources.StateValues;
import org.eclipse.tracecompass.statesystem.core.ITmfStateSystemBuilder;
-import org.eclipse.tracecompass.statesystem.core.statevalue.ITmfStateValue;
-import org.eclipse.tracecompass.statesystem.core.statevalue.TmfStateValue;
import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
import org.eclipse.tracecompass.tmf.core.event.aspect.TmfCpuAspect;
import org.eclipse.tracecompass.tmf.core.trace.TmfTraceUtils;
@@ -51,10 +49,10 @@ public class KvmEntryHandler extends VMKernelEventHandler {
*/
int quark = ss.getQuarkRelativeAndAdd(currentCPUNode, FusedAttributes.CURRENT_THREAD);
- ITmfStateValue value = ss.queryOngoingState(quark);
- int thread = value.isNull() ? -1 : value.unboxInt();
+ Object value = ss.queryOngoing(quark);
+ int thread = (value instanceof Integer) ? (int) value : -1;
- thread = VirtualCPU.getVirtualCPU(host, cpu.longValue()).getCurrentThread().unboxInt();
+ thread = VirtualCPU.getVirtualCPU(host, cpu.longValue()).getCurrentThread();
if (thread == -1) {
return;
}
@@ -88,7 +86,7 @@ public class KvmEntryHandler extends VMKernelEventHandler {
int quarkVCPUs = FusedVMEventHandlerUtils.getMachineCPUsNode(ss, nextLayerVM.getHostId());
int quarkVCPU = ss.getQuarkRelativeAndAdd(quarkVCPUs, nextLayerVCPU.getCpuId().toString());
if (ss.queryOngoingState(quarkVCPU).isNull()) {
- ss.modifyAttribute(sp.getStartTime(), TmfStateValue.newValueInt(thread), quarkVCPU);
+ ss.modifyAttribute(sp.getStartTime(), thread, quarkVCPU);
}
}
@@ -113,9 +111,8 @@ public class KvmEntryHandler extends VMKernelEventHandler {
/* Add the condition in_vm in the state system. */
quark = ss.getQuarkRelativeAndAdd(currentCPUNode, FusedAttributes.CONDITION);
- value = StateValues.CONDITION_IN_VM_VALUE;
long timestamp = FusedVMEventHandlerUtils.getTimestamp(event);
- ss.modifyAttribute(timestamp, value, quark);
+ ss.modifyAttribute(timestamp, StateValues.CONDITION_IN_VM, quark);
/* Get the host CPU doing the kvm_entry. */
@@ -124,8 +121,11 @@ public class KvmEntryHandler extends VMKernelEventHandler {
* Saves the state. Will be restored after a kvm_exit.
*/
quark = ss.getQuarkRelativeAndAdd(currentCPUNode, FusedAttributes.STATUS);
- ITmfStateValue ongoingState = ss.queryOngoingState(quark);
- hostCpu.setCurrentState(ongoingState);
+ Object status = ss.queryOngoing(quark);
+ if (status == null) {
+ return;
+ }
+ hostCpu.setCurrentState((int) status);
/*
* Get the host thread to get the right virtual machine.
*/
@@ -159,7 +159,7 @@ public class KvmEntryHandler extends VMKernelEventHandler {
int quarkVCPUs = FusedVMEventHandlerUtils.getMachineCPUsNode(ss, virtualMachine.getHostId());
int quarkVCPU = ss.getQuarkRelativeAndAdd(quarkVCPUs, vcpu.getCpuId().toString());
if (ss.queryOngoingState(quarkVCPU).isNull()) {
- ss.modifyAttribute(timestamp, TmfStateValue.newValueInt(thread), quarkVCPU);
+ ss.modifyAttribute(timestamp, thread, quarkVCPU);
}
}
/* Now we put this vcpu on the pcpu. */
@@ -172,15 +172,13 @@ public class KvmEntryHandler extends VMKernelEventHandler {
/* Set the value of the vcpu that is going to run. */
int quarkVCpu = ss.getQuarkRelativeAndAdd(currentCPUNode, FusedAttributes.VIRTUAL_CPU);
- ITmfStateValue valueVCpu = TmfStateValue.newValueInt(currentVCpu);
- ss.modifyAttribute(timestamp, valueVCpu, quarkVCpu);
+ ss.modifyAttribute(timestamp, currentVCpu, quarkVCpu);
/*
* Set the name of the VM that will run just after the kvm_entry
*/
int machineNameQuark = ss.getQuarkRelativeAndAdd(currentCPUNode, FusedAttributes.MACHINE_NAME);
- value = TmfStateValue.newValueString(virtualMachine.getHostId());
- ss.modifyAttribute(timestamp, value, machineNameQuark);
+ ss.modifyAttribute(timestamp, virtualMachine.getHostId(), machineNameQuark);
/*
* Then the current state of the vm is restored.
@@ -192,8 +190,11 @@ public class KvmEntryHandler extends VMKernelEventHandler {
* Save the current thread of the host that was running.
*/
quark = ss.getQuarkRelativeAndAdd(currentCPUNode, FusedAttributes.CURRENT_THREAD);
- ongoingState = ss.queryOngoingState(quark);
- hostCpu.setCurrentThread(ongoingState);
+ Object currentThread = ss.queryOngoing(quark);
+ if (!(currentThread instanceof Integer)) {
+ return;
+ }
+ hostCpu.setCurrentThread((Integer) currentThread);
/* Restore the thread of the VM that was running. */
value = vcpu.getCurrentThread();
ss.modifyAttribute(timestamp, value, quark);
diff --git a/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/KvmExitHandler.java b/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/KvmExitHandler.java
index ce049f1d..ed35ce46 100644
--- a/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/KvmExitHandler.java
+++ b/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/KvmExitHandler.java
@@ -16,8 +16,6 @@ import org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core
import org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core.model.VirtualMachine;
import org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core.virtual.resources.StateValues;
import org.eclipse.tracecompass.statesystem.core.ITmfStateSystemBuilder;
-import org.eclipse.tracecompass.statesystem.core.statevalue.ITmfStateValue;
-import org.eclipse.tracecompass.statesystem.core.statevalue.TmfStateValue;
import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
import org.eclipse.tracecompass.tmf.core.event.aspect.TmfCpuAspect;
import org.eclipse.tracecompass.tmf.core.trace.TmfTraceUtils;
@@ -41,8 +39,6 @@ public class KvmExitHandler extends VMKernelEventHandler {
int currentCPUNode = FusedVMEventHandlerUtils.getCurrentCPUNode(cpu, ss);
int quark;
- ITmfStateValue value;
-
VirtualMachine host = sp.getCurrentMachine(event);
if (host == null) {
return;
@@ -62,8 +58,8 @@ public class KvmExitHandler extends VMKernelEventHandler {
* Get the host thread to get the right virtual machine.
*/
long timestamp = FusedVMEventHandlerUtils.getTimestamp(event);
- value = hostCpu.getCurrentThread();
- HostThread ht = new HostThread(host.getHostId(), value.unboxInt());
+ Integer currentThread = hostCpu.getCurrentThread();
+ HostThread ht = new HostThread(host.getHostId(), currentThread);
VirtualCPU vcpu = sp.getVirtualCpu(ht);
if (vcpu == null) {
return;
@@ -81,35 +77,37 @@ public class KvmExitHandler extends VMKernelEventHandler {
/* Save the state of the VCpu. */
quark = ss.getQuarkRelativeAndAdd(currentCPUNode, FusedAttributes.STATUS);
- ITmfStateValue ongoingState = ss.queryOngoingState(quark);
- vcpu.setCurrentState(ongoingState);
+ Object status = ss.queryOngoing(quark);
+ if (!(status instanceof Integer)) {
+ return;
+ }
+ vcpu.setCurrentState((Integer) status);
/* Then the current state of the host is restored. */
- value = hostCpu.getCurrentState();
- ss.modifyAttribute(timestamp, value, quark);
+ ss.modifyAttribute(timestamp, hostCpu.getCurrentState(), quark);
/*
* Save the current thread of the vm that was running.
*/
quark = ss.getQuarkRelativeAndAdd(currentCPUNode, FusedAttributes.CURRENT_THREAD);
- ongoingState = ss.queryOngoingState(quark);
- vcpu.setCurrentThread(ongoingState);
+ status = ss.queryOngoing(quark);
+ if (!(status instanceof Integer)) {
+ return;
+ }
+ vcpu.setCurrentThread((Integer) status);
/* Restore the thread of the host that was running. */
- value = hostCpu.getCurrentThread();
- ss.modifyAttribute(timestamp, value, quark);
+ ss.modifyAttribute(timestamp, hostCpu.getCurrentThread(), quark);
/* Add the condition out_vm in the state system. */
quark = ss.getQuarkRelativeAndAdd(currentCPUNode, FusedAttributes.CONDITION);
- value = StateValues.CONDITION_OUT_VM_VALUE;
- ss.modifyAttribute(timestamp, value, quark);
+ ss.modifyAttribute(timestamp, StateValues.CONDITION_OUT_VM, quark);
/*
* Set the name of the VM that will run just after the kvm_entry
*/
int machineNameQuark = ss.getQuarkRelativeAndAdd(currentCPUNode, FusedAttributes.MACHINE_NAME);
- value = TmfStateValue.newValueString(event.getTrace().getHostId());
- ss.modifyAttribute(timestamp, value, machineNameQuark);
+ ss.modifyAttribute(timestamp, event.getTrace().getHostId(), machineNameQuark);
}
}
diff --git a/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/KvmMmuGetPageHandler.java b/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/KvmMmuGetPageHandler.java
index 7368d199..a1e8405d 100644
--- a/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/KvmMmuGetPageHandler.java
+++ b/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/KvmMmuGetPageHandler.java
@@ -15,7 +15,6 @@ import org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core
import org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core.model.VirtualCPU;
import org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core.model.VirtualMachine;
import org.eclipse.tracecompass.statesystem.core.ITmfStateSystemBuilder;
-import org.eclipse.tracecompass.statesystem.core.statevalue.ITmfStateValue;
import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
import org.eclipse.tracecompass.tmf.core.event.aspect.TmfCpuAspect;
import org.eclipse.tracecompass.tmf.core.trace.TmfTraceUtils;
@@ -53,10 +52,10 @@ public class KvmMmuGetPageHandler extends VMKernelEventHandler {
*/
int quark = ss.getQuarkRelativeAndAdd(currentCPUNode, FusedAttributes.CURRENT_THREAD);
- ITmfStateValue value = ss.queryOngoingState(quark);
- int thread = value.isNull() ? -1 : value.unboxInt();
+ Object value = ss.queryOngoing(quark);
+ int thread = (value instanceof Integer) ? (int) value : -1;
- thread = VirtualCPU.getVirtualCPU(host, cpu.longValue()).getCurrentThread().unboxInt();
+ thread = VirtualCPU.getVirtualCPU(host, cpu.longValue()).getCurrentThread();
if (thread == -1) {
return;
}
diff --git a/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/KvmNestedVmExitInjectHandler.java b/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/KvmNestedVmExitInjectHandler.java
index e9687866..51b2fa6c 100644
--- a/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/KvmNestedVmExitInjectHandler.java
+++ b/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/KvmNestedVmExitInjectHandler.java
@@ -15,7 +15,6 @@ import org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core
import org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core.model.VirtualCPU;
import org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core.model.VirtualMachine;
import org.eclipse.tracecompass.statesystem.core.ITmfStateSystemBuilder;
-import org.eclipse.tracecompass.statesystem.core.statevalue.ITmfStateValue;
import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
import org.eclipse.tracecompass.tmf.core.event.aspect.TmfCpuAspect;
import org.eclipse.tracecompass.tmf.core.trace.TmfTraceUtils;
@@ -53,10 +52,10 @@ public class KvmNestedVmExitInjectHandler extends VMKernelEventHandler {
*/
int quark = ss.getQuarkRelativeAndAdd(currentCPUNode, FusedAttributes.CURRENT_THREAD);
- ITmfStateValue value = ss.queryOngoingState(quark);
- int thread = value.isNull() ? -1 : value.unboxInt();
+ Object value = ss.queryOngoing(quark);
+ int thread = (value instanceof Integer) ? (int) value : -1;
- thread = VirtualCPU.getVirtualCPU(host, cpu.longValue()).getCurrentThread().unboxInt();
+ thread = VirtualCPU.getVirtualCPU(host, cpu.longValue()).getCurrentThread();
if (thread == -1) {
return;
}
diff --git a/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/PiSetprioHandler.java b/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/PiSetprioHandler.java
index 5f6c53e5..024eada9 100644
--- a/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/PiSetprioHandler.java
+++ b/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/PiSetprioHandler.java
@@ -13,8 +13,6 @@ import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelAnalysisEven
import org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core.fused.FusedAttributes;
import org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core.model.VirtualMachine;
import org.eclipse.tracecompass.statesystem.core.ITmfStateSystemBuilder;
-import org.eclipse.tracecompass.statesystem.core.statevalue.ITmfStateValue;
-import org.eclipse.tracecompass.statesystem.core.statevalue.TmfStateValue;
import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
import org.eclipse.tracecompass.tmf.core.event.ITmfEventField;
import org.eclipse.tracecompass.tmf.core.event.aspect.TmfCpuAspect;
@@ -59,7 +57,6 @@ public class PiSetprioHandler extends VMKernelEventHandler {
/* Set the current prio for the new process */
int quark = ss.getQuarkRelativeAndAdd(updateThreadNode, FusedAttributes.PRIO);
- ITmfStateValue value = TmfStateValue.newValueInt(prio);
- ss.modifyAttribute(FusedVMEventHandlerUtils.getTimestamp(event), value, quark);
+ ss.modifyAttribute(FusedVMEventHandlerUtils.getTimestamp(event), prio, quark);
}
}
diff --git a/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/ProcessForkContainerHandler.java b/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/ProcessForkContainerHandler.java
index 0653ebc4..c78d2403 100644
--- a/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/ProcessForkContainerHandler.java
+++ b/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/ProcessForkContainerHandler.java
@@ -14,8 +14,6 @@ import org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core
import org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core.virtual.resources.StateValues;
import org.eclipse.tracecompass.statesystem.core.ITmfStateSystem;
import org.eclipse.tracecompass.statesystem.core.ITmfStateSystemBuilder;
-import org.eclipse.tracecompass.statesystem.core.statevalue.ITmfStateValue;
-import org.eclipse.tracecompass.statesystem.core.statevalue.TmfStateValue;
import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
import org.eclipse.tracecompass.tmf.core.event.ITmfEventField;
@@ -64,26 +62,23 @@ public class ProcessForkContainerHandler extends VMKernelEventHandler {
/* Assign the PPID to the new process */
int quark = ss.getQuarkRelativeAndAdd(childTidNode, FusedAttributes.PPID);
- ITmfStateValue value = TmfStateValue.newValueInt(parentTid);
long timestamp = FusedVMEventHandlerUtils.getTimestamp(event);
- ss.modifyAttribute(timestamp, value, quark);
+ ss.modifyAttribute(timestamp, parentTid, quark);
/* Set the new process' exec_name */
quark = ss.getQuarkRelativeAndAdd(childTidNode, FusedAttributes.EXEC_NAME);
- value = TmfStateValue.newValueString(childProcessName);
- ss.modifyAttribute(timestamp, value, quark);
+ ss.modifyAttribute(timestamp, childProcessName, quark);
/* Set the new process' status */
quark = ss.getQuarkRelativeAndAdd(childTidNode, FusedAttributes.STATUS);
- value = StateValues.PROCESS_STATUS_WAIT_FOR_CPU_VALUE;
- ss.modifyAttribute(timestamp, value, quark);
+ ss.modifyAttribute(timestamp, StateValues.PROCESS_STATUS_WAIT_FOR_CPU, quark);
/* Set the process' syscall name, to be the same as the parent's */
quark = ss.getQuarkRelativeAndAdd(parentTidNode, FusedAttributes.SYSTEM_CALL);
- value = ss.queryOngoingState(quark);
- if (!value.isNull()) {
+ Object syscall = ss.queryOngoing(quark);
+ if (syscall != null) {
quark = ss.getQuarkRelativeAndAdd(childTidNode, FusedAttributes.SYSTEM_CALL);
- ss.modifyAttribute(timestamp, value, quark);
+ ss.modifyAttribute(timestamp, syscall, quark);
}
Integer level = 0;
@@ -94,15 +89,13 @@ public class ProcessForkContainerHandler extends VMKernelEventHandler {
* hierarchy
*/
quark = ss.getQuarkRelativeAndAdd(childTidNode, FusedAttributes.NS_MAX_LEVEL);
- value = TmfStateValue.newValueInt(maxLevel);
- ss.modifyAttribute(timestamp, value, quark);
+ ss.modifyAttribute(timestamp, maxLevel, quark);
for (long vtid : childVTIDs) {
if (vtid == childTid) {
/* Set the namespace level */
quark = ss.getQuarkRelativeAndAdd(childTidNode, FusedAttributes.NS_LEVEL);
- value = TmfStateValue.newValueInt(level);
- ss.modifyAttribute(timestamp, value, quark);
+ ss.modifyAttribute(timestamp, level, quark);
/* Set the namespace ID */
quark = ss.optQuarkRelative(parentTidNode, FusedAttributes.NS_INUM);
@@ -110,14 +103,16 @@ public class ProcessForkContainerHandler extends VMKernelEventHandler {
continue;
}
- value = ss.queryOngoingState(quark);
+ Object nsInum = ss.queryOngoing(quark);
quark = ss.getQuarkRelativeAndAdd(childTidNode, FusedAttributes.NS_INUM);
- ss.modifyAttribute(timestamp, value, quark);
+ ss.modifyAttribute(timestamp, nsInum, quark);
/* Save the tid */
- quark = ss.getQuarkRelativeAndAdd(FusedVMEventHandlerUtils.getMachinesNode(ss), machineHost, FusedAttributes.CONTAINERS, Long.toString(value.unboxLong()));
- quark = FusedVMEventHandlerUtils.saveContainerThreadID(ss, quark, childTid);
- ss.modifyAttribute(timestamp, TmfStateValue.newValueInt((int) vtid), quark);
+ if (nsInum instanceof Long) {
+ quark = ss.getQuarkRelativeAndAdd(FusedVMEventHandlerUtils.getMachinesNode(ss), machineHost, FusedAttributes.CONTAINERS, String.valueOf((long) nsInum));
+ quark = FusedVMEventHandlerUtils.saveContainerThreadID(ss, quark, childTid);
+ ss.modifyAttribute(timestamp, (int) vtid, quark);
+ }
/* Nothing else to do at the level 0 */
continue;
@@ -133,42 +128,43 @@ public class ProcessForkContainerHandler extends VMKernelEventHandler {
/* Create a new level for the current vtid */
childTidNode = ss.getQuarkRelativeAndAdd(childTidNode, FusedAttributes.VTID);
- value = TmfStateValue.newValueInt((int) vtid);
- ss.modifyAttribute(timestamp, value, childTidNode);
+ ss.modifyAttribute(timestamp, (int) vtid, childTidNode);
/* Set the VPPID attribute for the child */
parentTidNode = ss.getQuarkRelativeAndAdd(parentTidNode, FusedAttributes.VTID);
// When a process is forked but the parent was not state dumped,
// we do not know the vppid
- value = ss.queryOngoingState(parentTidNode);
+ Object parentVtid = ss.queryOngoing(parentTidNode);
quark = ss.getQuarkRelativeAndAdd(childTidNode, FusedAttributes.VPPID);
- ss.modifyAttribute(timestamp, value, quark);
+ ss.modifyAttribute(timestamp, parentVtid, quark);
/* Set the ns_inum attribute for the child */
quark = ss.optQuarkRelative(parentTidNode, FusedAttributes.NS_INUM);
// We do not have namespace information for the parent, we only
// know the last of the child
if (quark == ITmfStateSystem.INVALID_ATTRIBUTE) {
- value = TmfStateValue.nullValue();
+ Object value = null;
if (level == maxLevel - 1) {
- value = TmfStateValue.newValueLong(childNSInum);
+ value = childNSInum;
/* Save the tid */
- quark = ss.getQuarkRelativeAndAdd(FusedVMEventHandlerUtils.getMachinesNode(ss), machineHost, FusedAttributes.CONTAINERS, Long.toString(value.unboxLong()));
+ quark = ss.getQuarkRelativeAndAdd(FusedVMEventHandlerUtils.getMachinesNode(ss), machineHost, FusedAttributes.CONTAINERS, Long.toString((long) value));
quark = FusedVMEventHandlerUtils.saveContainerThreadID(ss, quark, childTid);
- ss.modifyAttribute(timestamp, TmfStateValue.newValueInt((int) vtid), quark);
+ ss.modifyAttribute(timestamp, (int) vtid, quark);
}
quark = ss.getQuarkRelativeAndAdd(childTidNode, FusedAttributes.NS_INUM);
ss.modifyAttribute(timestamp, value, quark);
} else {
- value = ss.queryOngoingState(quark);
+ Object value = ss.queryOngoing(quark);
quark = ss.getQuarkRelativeAndAdd(childTidNode, FusedAttributes.NS_INUM);
ss.modifyAttribute(timestamp, value, quark);
/* Save the tid */
- quark = ss.getQuarkRelativeAndAdd(FusedVMEventHandlerUtils.getMachinesNode(ss), machineHost, FusedAttributes.CONTAINERS, Long.toString(value.unboxLong()));
- quark = FusedVMEventHandlerUtils.saveContainerThreadID(ss, quark, childTid);
- ss.modifyAttribute(timestamp, TmfStateValue.newValueInt((int) vtid), quark);
+ if (value instanceof Long) {
+ quark = ss.getQuarkRelativeAndAdd(FusedVMEventHandlerUtils.getMachinesNode(ss), machineHost, FusedAttributes.CONTAINERS, Long.toString((long) value));
+ quark = FusedVMEventHandlerUtils.saveContainerThreadID(ss, quark, childTid);
+ ss.modifyAttribute(timestamp, (int) vtid, quark);
+ }
}
} else {
@@ -176,35 +172,31 @@ public class ProcessForkContainerHandler extends VMKernelEventHandler {
/* Create a new level for the current vtid */
childTidNode = ss.getQuarkRelativeAndAdd(childTidNode, FusedAttributes.VTID);
- value = TmfStateValue.newValueInt((int) vtid);
- ss.modifyAttribute(timestamp, value, childTidNode);
+ ss.modifyAttribute(timestamp, (int) vtid, childTidNode);
/* Set the VPPID attribute for the child */
- value = TmfStateValue.newValueInt(0);
quark = ss.getQuarkRelativeAndAdd(childTidNode, FusedAttributes.VPPID);
- ss.modifyAttribute(timestamp, value, quark);
+ ss.modifyAttribute(timestamp, 0, quark);
/* Set the ns_inum attribute for the child */
- value = TmfStateValue.newValueLong(childNSInum);
quark = ss.getQuarkRelativeAndAdd(childTidNode, FusedAttributes.NS_INUM);
- ss.modifyAttribute(timestamp, value, quark);
+ ss.modifyAttribute(timestamp, childNSInum, quark);
/* Save the tid */
int quarkContainer = ss.getQuarkRelativeAndAdd(FusedVMEventHandlerUtils.getMachinesNode(ss), machineHost, FusedAttributes.CONTAINERS, Long.toString(childNSInum));
quark = FusedVMEventHandlerUtils.saveContainerThreadID(ss, quarkContainer, childTid);
- ss.modifyAttribute(timestamp, TmfStateValue.newValueInt((int) vtid), quark);
+ ss.modifyAttribute(timestamp, (int) vtid, quark);
/* Save the parent's namespace ID */
quark = ss.getQuarkRelativeAndAdd(quarkContainer, FusedAttributes.PARENT);
if (ss.queryOngoingState(quark).isNull() && parentNSInum != null) {
- ss.modifyAttribute(ss.getStartTime(), TmfStateValue.newValueLong(parentNSInum), quark);
+ ss.modifyAttribute(ss.getStartTime(), parentNSInum, quark);
}
}
/* Set the ns_level attribute for the child */
quark = ss.getQuarkRelativeAndAdd(childTidNode, FusedAttributes.NS_LEVEL);
- value = TmfStateValue.newValueInt(level);
- ss.modifyAttribute(timestamp, value, quark);
+ ss.modifyAttribute(timestamp, level, quark);
}
}
diff --git a/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/SchedSwitchHandler.java b/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/SchedSwitchHandler.java
index f22d3120..367cc8cb 100644
--- a/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/SchedSwitchHandler.java
+++ b/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/SchedSwitchHandler.java
@@ -21,8 +21,6 @@ import org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core
import org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core.virtual.resources.StateValues;
import org.eclipse.tracecompass.statesystem.core.ITmfStateSystemBuilder;
import org.eclipse.tracecompass.statesystem.core.exceptions.StateSystemDisposedException;
-import org.eclipse.tracecompass.statesystem.core.statevalue.ITmfStateValue;
-import org.eclipse.tracecompass.statesystem.core.statevalue.TmfStateValue;
import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
import org.eclipse.tracecompass.tmf.core.event.ITmfEventField;
import org.eclipse.tracecompass.tmf.core.event.aspect.TmfCpuAspect;
@@ -113,10 +111,10 @@ public class SchedSwitchHandler extends VMKernelEventHandler {
e.printStackTrace();
}
- ITmfStateValue stateProcess = setCpuProcess(ss, nextTid, timestamp, currentCPUNode, modify);
+ setCpuProcess(ss, nextTid, timestamp, currentCPUNode, modify);
/* Set the status of the CPU itself */
- ITmfStateValue stateCpu = setCpuStatus(ss, nextTid, newCurrentThreadNode, timestamp, currentCPUNode, modify);
+ int stateCpu = setCpuStatus(ss, nextTid, newCurrentThreadNode, timestamp, currentCPUNode, modify);
/* Remember the cpu used by the namespaces containing the next thread */
if (nextTid != 0) {
@@ -128,11 +126,11 @@ public class SchedSwitchHandler extends VMKernelEventHandler {
}
cpuObject.setCurrentState(stateCpu);
- cpuObject.setCurrentThread(stateProcess);
+ cpuObject.setCurrentThread(nextTid);
}
private static void setOldProcessStatus(ITmfStateSystemBuilder ss, Long prevState, Integer formerThreadNode, long timestamp) {
- ITmfStateValue value;
+ Integer status;
/*
* Empirical observations and look into the linux code have shown that
* the TASK_STATE_MAX flag is used internally and |'ed with other
@@ -146,16 +144,16 @@ public class SchedSwitchHandler extends VMKernelEventHandler {
int state = (int) (prevState & (LinuxValues.TASK_NOLOAD - 1));
if (isRunning(state)) {
- value = StateValues.PROCESS_STATUS_WAIT_FOR_CPU_VALUE;
+ status = StateValues.PROCESS_STATUS_WAIT_FOR_CPU;
} else if (isWaiting(state)) {
- value = StateValues.PROCESS_STATUS_WAIT_BLOCKED_VALUE;
+ status = StateValues.PROCESS_STATUS_WAIT_BLOCKED;
} else if (isDead(state)) {
- value = TmfStateValue.nullValue();
+ status = null;
} else {
- value = StateValues.PROCESS_STATUS_WAIT_UNKNOWN_VALUE;
+ status = StateValues.PROCESS_STATUS_WAIT_UNKNOWN;
}
int quark = ss.getQuarkRelativeAndAdd(formerThreadNode, FusedAttributes.STATUS);
- ss.modifyAttribute(timestamp, value, quark);
+ ss.modifyAttribute(timestamp, status, quark);
}
@@ -173,58 +171,51 @@ public class SchedSwitchHandler extends VMKernelEventHandler {
return state == 0;
}
- private static ITmfStateValue setCpuStatus(ITmfStateSystemBuilder ss, Integer nextTid, Integer newCurrentThreadNode, long timestamp, int currentCPUNode, boolean modify) {
+ private static int setCpuStatus(ITmfStateSystemBuilder ss, Integer nextTid, Integer newCurrentThreadNode, long timestamp, int currentCPUNode, boolean modify) {
int quark;
- ITmfStateValue value;
+ int status;
if (nextTid > 0) {
/* Check if the entering process is in kernel or user mode */
quark = ss.getQuarkRelativeAndAdd(newCurrentThreadNode, FusedAttributes.SYSTEM_CALL);
- ITmfStateValue queryOngoingState = ss.queryOngoingState(quark);
- if (queryOngoingState.isNull()) {
- value = StateValues.CPU_STATUS_RUN_USERMODE_VALUE;
+ Object syscall = ss.queryOngoing(quark);
+ if (syscall == null) {
+ status = StateValues.CPU_STATUS_RUN_USERMODE;
} else {
- value = StateValues.CPU_STATUS_RUN_SYSCALL_VALUE;
+ status = StateValues.CPU_STATUS_RUN_SYSCALL;
}
if (modify) {
quark = ss.getQuarkRelativeAndAdd(currentCPUNode, FusedAttributes.STATUS);
- ss.modifyAttribute(timestamp, value, quark);
+ ss.modifyAttribute(timestamp, status, quark);
}
} else {
- value = StateValues.CPU_STATUS_IDLE_VALUE;
+ status = StateValues.CPU_STATUS_IDLE;
if (modify) {
quark = ss.getQuarkRelativeAndAdd(currentCPUNode, FusedAttributes.STATUS);
- ss.modifyAttribute(timestamp, value, quark);
+ ss.modifyAttribute(timestamp, status, quark);
}
}
- return value;
+ return status;
}
- private static ITmfStateValue setCpuProcess(ITmfStateSystemBuilder ss, Integer nextTid, long timestamp, int currentCPUNode, boolean modify) {
+ private static void setCpuProcess(ITmfStateSystemBuilder ss, Integer nextTid, long timestamp, int currentCPUNode, boolean modify) {
int quark;
- ITmfStateValue value;
quark = ss.getQuarkRelativeAndAdd(currentCPUNode, FusedAttributes.CURRENT_THREAD);
- value = TmfStateValue.newValueInt(nextTid);
if (modify) {
- ss.modifyAttribute(timestamp, value, quark);
+ ss.modifyAttribute(timestamp, nextTid, quark);
}
- return value;
}
private static void setNewProcessPio(ITmfStateSystemBuilder ss, Integer nextPrio, Integer newCurrentThreadNode, long timestamp) {
int quark;
- ITmfStateValue value;
quark = ss.getQuarkRelativeAndAdd(newCurrentThreadNode, FusedAttributes.PRIO);
- value = TmfStateValue.newValueInt(nextPrio);
- ss.modifyAttribute(timestamp, value, quark);
+ ss.modifyAttribute(timestamp, nextPrio, quark);
}
private static void setNewProcessExecName(ITmfStateSystemBuilder ss, String nextProcessName, Integer newCurrentThreadNode, long timestamp) {
int quark;
- ITmfStateValue value;
quark = ss.getQuarkRelativeAndAdd(newCurrentThreadNode, FusedAttributes.EXEC_NAME);
- value = TmfStateValue.newValueString(nextProcessName);
- ss.modifyAttribute(timestamp, value, quark);
+ ss.modifyAttribute(timestamp, nextProcessName, quark);
}
}
diff --git a/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/SchedWakeupHandler.java b/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/SchedWakeupHandler.java
index f6c79018..5fef5b92 100644
--- a/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/SchedWakeupHandler.java
+++ b/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/SchedWakeupHandler.java
@@ -14,8 +14,6 @@ import org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core
import org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core.model.VirtualMachine;
import org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core.virtual.resources.StateValues;
import org.eclipse.tracecompass.statesystem.core.ITmfStateSystemBuilder;
-import org.eclipse.tracecompass.statesystem.core.statevalue.ITmfStateValue;
-import org.eclipse.tracecompass.statesystem.core.statevalue.TmfStateValue;
import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
import org.eclipse.tracecompass.tmf.core.event.aspect.TmfCpuAspect;
import org.eclipse.tracecompass.tmf.core.trace.TmfTraceUtils;
@@ -62,13 +60,15 @@ public class SchedWakeupHandler extends VMKernelEventHandler {
* running.
*/
int quark = ss.getQuarkRelativeAndAdd(threadNode, FusedAttributes.STATUS);
- int status = ss.queryOngoingState(quark).unboxInt();
- ITmfStateValue value = null;
+ Object value = ss.queryOngoing(quark);
+ if (!(value instanceof Integer)) {
+ return;
+ }
+ int status = (int) value;
long timestamp = FusedVMEventHandlerUtils.getTimestamp(event);
if (status != StateValues.PROCESS_STATUS_RUN_SYSCALL &&
status != StateValues.PROCESS_STATUS_RUN_USERMODE) {
- value = StateValues.PROCESS_STATUS_WAIT_FOR_CPU_VALUE;
- ss.modifyAttribute(timestamp, value, quark);
+ ss.modifyAttribute(timestamp, StateValues.PROCESS_STATUS_WAIT_FOR_CPU, quark);
}
/*
@@ -76,7 +76,6 @@ public class SchedWakeupHandler extends VMKernelEventHandler {
* it shows in ftrace with a sched_wakeup.
*/
quark = ss.getQuarkRelativeAndAdd(threadNode, FusedAttributes.PRIO);
- value = TmfStateValue.newValueInt(prio);
- ss.modifyAttribute(timestamp, value, quark);
+ ss.modifyAttribute(timestamp, prio, quark);
}
}
diff --git a/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/SoftIrqEntryHandler.java b/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/SoftIrqEntryHandler.java
index 98470db9..20324cfa 100644
--- a/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/SoftIrqEntryHandler.java
+++ b/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/SoftIrqEntryHandler.java
@@ -16,7 +16,6 @@ import org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core
import org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core.virtual.resources.StateValues;
import org.eclipse.tracecompass.statesystem.core.ITmfStateSystemBuilder;
import org.eclipse.tracecompass.statesystem.core.exceptions.StateSystemDisposedException;
-import org.eclipse.tracecompass.statesystem.core.statevalue.ITmfStateValue;
import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
import org.eclipse.tracecompass.tmf.core.event.aspect.TmfCpuAspect;
import org.eclipse.tracecompass.tmf.core.trace.TmfTraceUtils;
@@ -72,24 +71,23 @@ public class SoftIrqEntryHandler extends VMKernelEventHandler {
* the CPU on which this SoftIRQ is processed
*/
int quark = ss.getQuarkRelativeAndAdd(FusedVMEventHandlerUtils.getNodeSoftIRQs(cpu, ss), softIrqId.toString());
- ITmfStateValue value = StateValues.CPU_STATUS_SOFTIRQ_VALUE;
+ int value = StateValues.CPU_STATUS_SOFTIRQ;
ss.modifyAttribute(timestamp, value, quark);
/* Change the status of the running process to interrupted */
quark = ss.getQuarkRelativeAndAdd(currentThreadNode, FusedAttributes.STATUS);
- value = StateValues.PROCESS_STATUS_INTERRUPTED_VALUE;
+ value = StateValues.PROCESS_STATUS_INTERRUPTED;
ss.modifyAttribute(timestamp, value, quark);
/* Change the status of the CPU to interrupted */
quark = ss.getQuarkRelativeAndAdd(currentCPUNode, FusedAttributes.STATUS);
- value = ss.queryOngoingState(quark);
value = cpuObject.getCurrentState();
// cpuObject.setCurrentState(value);
- if (value != StateValues.CPU_STATUS_SOFTIRQ_VALUE && value != StateValues.SOFT_IRQ_RAISED_VALUE) {
+ if (value != StateValues.CPU_STATUS_SOFTIRQ && value != StateValues.CPU_STATUS_SOFT_IRQ_RAISED) {
/* Save only if we are not doing multiple soft irqs */
cpuObject.setStateBeforeIRQ(value);
}
- value = StateValues.CPU_STATUS_SOFTIRQ_VALUE;
+ value = StateValues.CPU_STATUS_SOFTIRQ;
cpuObject.setCurrentState(value);
if (modify) {
ss.modifyAttribute(timestamp, value, quark);
diff --git a/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/SoftIrqExitHandler.java b/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/SoftIrqExitHandler.java
index 38fad100..4a75f3e8 100644
--- a/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/SoftIrqExitHandler.java
+++ b/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/SoftIrqExitHandler.java
@@ -11,7 +11,6 @@ package org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.cor
import java.util.List;
-import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.jdt.annotation.Nullable;
import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelAnalysisEventLayout;
import org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core.fused.FusedAttributes;
@@ -20,8 +19,6 @@ import org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core
import org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core.virtual.resources.StateValues;
import org.eclipse.tracecompass.statesystem.core.ITmfStateSystemBuilder;
import org.eclipse.tracecompass.statesystem.core.exceptions.StateSystemDisposedException;
-import org.eclipse.tracecompass.statesystem.core.statevalue.ITmfStateValue;
-import org.eclipse.tracecompass.statesystem.core.statevalue.TmfStateValue;
import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
import org.eclipse.tracecompass.tmf.core.event.aspect.TmfCpuAspect;
import org.eclipse.tracecompass.tmf.core.trace.TmfTraceUtils;
@@ -60,16 +57,16 @@ public class SoftIrqExitHandler extends VMKernelEventHandler {
int quark = ss.getQuarkRelativeAndAdd(FusedVMEventHandlerUtils.getNodeSoftIRQs(cpu, ss), softIrqId.toString());
long timestamp = FusedVMEventHandlerUtils.getTimestamp(event);
- if (isSoftIrqRaised(ss.queryOngoingState(quark))) {
- ss.modifyAttribute(timestamp, StateValues.SOFT_IRQ_RAISED_VALUE, quark);
+ if (isSoftIrqRaised(ss.queryOngoing(quark))) {
+ ss.modifyAttribute(timestamp, StateValues.CPU_STATUS_SOFT_IRQ_RAISED, quark);
} else {
- ss.modifyAttribute(timestamp, TmfStateValue.nullValue(), quark);
+ ss.modifyAttribute(timestamp, (Object) null, quark);
}
List<Integer> softIrqs = ss.getSubAttributes(ss.getParentAttributeQuark(quark), false);
/* Only set status to running and no exit if ALL softirqs are exited. */
for (Integer softIrq : softIrqs) {
- @NonNull ITmfStateValue irqStateValue = ss.queryOngoingState(softIrq);
- if (!irqStateValue.isNull()) { // && !(irqStateValue.unboxInt() == StateValues.CPU_STATUS_IRQ)) {
+ Object irqStateValue = ss.queryOngoing(softIrq);
+ if (irqStateValue != null) { // && !(irqStateValue.unboxInt() == StateValues.CPU_STATUS_IRQ)) {
return;
}
}
@@ -93,7 +90,7 @@ public class SoftIrqExitHandler extends VMKernelEventHandler {
/* Set the CPU status back to "busy" or "idle" */
quark = ss.getQuarkRelativeAndAdd(currentCPUNode, FusedAttributes.STATUS);
- ITmfStateValue value = cpuObject.getStateBeforeIRQ();
+ Integer value = cpuObject.getStateBeforeIRQ();
cpuObject.setCurrentState(value);
if (modify) {
ss.modifyAttribute(timestamp, value, quark);
@@ -108,10 +105,9 @@ public class SoftIrqExitHandler extends VMKernelEventHandler {
* the state to check
* @return true if in a softirq. The softirq may be pre-empted by an irq
*/
- private static boolean isSoftIrqRaised(@Nullable ITmfStateValue state) {
- return (state != null &&
- !state.isNull() &&
- (state.unboxInt() & StateValues.CPU_STATUS_SOFT_IRQ_RAISED) == StateValues.CPU_STATUS_SOFT_IRQ_RAISED);
+ private static boolean isSoftIrqRaised(@Nullable Object state) {
+ return ((state instanceof Integer) &&
+ ((int) state & StateValues.CPU_STATUS_SOFT_IRQ_RAISED) == StateValues.CPU_STATUS_SOFT_IRQ_RAISED);
}
}
diff --git a/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/SoftIrqRaiseHandler.java b/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/SoftIrqRaiseHandler.java
index 8b44ce25..d6549aaa 100644
--- a/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/SoftIrqRaiseHandler.java
+++ b/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/SoftIrqRaiseHandler.java
@@ -15,7 +15,6 @@ import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelAnalysisEven
import org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core.model.VirtualMachine;
import org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core.virtual.resources.StateValues;
import org.eclipse.tracecompass.statesystem.core.ITmfStateSystemBuilder;
-import org.eclipse.tracecompass.statesystem.core.statevalue.ITmfStateValue;
import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
import org.eclipse.tracecompass.tmf.core.event.aspect.TmfCpuAspect;
import org.eclipse.tracecompass.tmf.core.trace.TmfTraceUtils;
@@ -51,16 +50,15 @@ public class SoftIrqRaiseHandler extends VMKernelEventHandler {
*/
int quark = ss.getQuarkRelativeAndAdd(FusedVMEventHandlerUtils.getNodeSoftIRQs(cpu, ss), softIrqId.toString());
- ITmfStateValue value = (isInSoftirq(ss.queryOngoingState(quark)) ?
- StateValues.SOFT_IRQ_RAISED_RUNNING_VALUE :
- StateValues.SOFT_IRQ_RAISED_VALUE);
+ int value = (isInSoftirq(ss.queryOngoingState(quark)) ?
+ StateValues.CPU_STATUS_SOFT_IRQ_RAISED_RUNNING :
+ StateValues.CPU_STATUS_SOFT_IRQ_RAISED);
ss.modifyAttribute(FusedVMEventHandlerUtils.getTimestamp(event), value, quark);
}
- private static boolean isInSoftirq(@Nullable ITmfStateValue state) {
- return (state != null &&
- !state.isNull() &&
- (state.unboxInt() & StateValues.CPU_STATUS_SOFTIRQ) == StateValues.CPU_STATUS_SOFTIRQ);
+ private static boolean isInSoftirq(@Nullable Object state) {
+ return ((state instanceof Integer) &&
+ ((int) state & StateValues.CPU_STATUS_SOFTIRQ) == StateValues.CPU_STATUS_SOFTIRQ);
}
}
diff --git a/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/StateDumpContainerHandler.java b/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/StateDumpContainerHandler.java
index 60b04a0f..05569ce8 100644
--- a/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/StateDumpContainerHandler.java
+++ b/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/StateDumpContainerHandler.java
@@ -15,8 +15,6 @@ import org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core
import org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core.virtual.resources.StateValues;
import org.eclipse.tracecompass.statesystem.core.ITmfStateSystem;
import org.eclipse.tracecompass.statesystem.core.ITmfStateSystemBuilder;
-import org.eclipse.tracecompass.statesystem.core.statevalue.ITmfStateValue;
-import org.eclipse.tracecompass.statesystem.core.statevalue.TmfStateValue;
import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
import org.eclipse.tracecompass.tmf.core.event.ITmfEventField;
import org.eclipse.tracecompass.tmf.core.event.aspect.TmfCpuAspect;
@@ -96,13 +94,13 @@ public class StateDumpContainerHandler extends VMKernelEventHandler {
* If the next layer is the last we can add the info contained
* in the event
*/
- ss.modifyAttribute(ts, TmfStateValue.newValueInt(vtid.intValue()), layerQuark);
+ ss.modifyAttribute(ts, vtid.intValue(), layerQuark);
}
ss.getQuarkRelativeAndAdd(layerQuark, FusedAttributes.VPPID);
int quark = ss.getQuarkRelativeAndAdd(layerQuark, FusedAttributes.NS_LEVEL);
if (ss.queryOngoingState(quark).isNull()) {
/* If the value didn't exist previously, set it */
- ss.modifyAttribute(ts, TmfStateValue.newValueInt(i + 1), quark);
+ ss.modifyAttribute(ts, i + 1, quark);
}
}
return layerQuark;
@@ -123,7 +121,6 @@ public class StateDumpContainerHandler extends VMKernelEventHandler {
ITmfEventField content = event.getContent();
long ts = event.getTimestamp().getValue();
int quark;
- ITmfStateValue value;
String hostId = event.getTrace().getHostId();
Long tid = content.getFieldValue(Long.class, TID_FIELD);
Long pid = content.getFieldValue(Long.class, PID_FIELD);
@@ -159,8 +156,7 @@ public class StateDumpContainerHandler extends VMKernelEventHandler {
* Events are coming from the deepest layers first so no need to
* update the ns_max_level.
*/
- value = TmfStateValue.newValueInt(nsLevel.intValue() + 1);
- ss.modifyAttribute(ts, value, quark);
+ ss.modifyAttribute(ts, nsLevel.intValue() + 1, quark);
}
int maxLevel = ss.queryOngoingState(quark).unboxInt();
@@ -168,10 +164,11 @@ public class StateDumpContainerHandler extends VMKernelEventHandler {
* Set the process' status. Only for level 0.
*/
quark = ss.getQuarkRelativeAndAdd(threadNode, FusedAttributes.STATUS);
- if (ss.queryOngoingState(quark).isNull()) {
+ int processStatus = StateValues.PROCESS_STATUS_UNKNOWN;
+ if (ss.queryOngoing(quark) == null) {
switch (status.intValue()) {
case LinuxValues.STATEDUMP_PROCESS_STATUS_WAIT_CPU:
- value = StateValues.PROCESS_STATUS_WAIT_FOR_CPU_VALUE;
+ processStatus = StateValues.PROCESS_STATUS_WAIT_FOR_CPU;
break;
case LinuxValues.STATEDUMP_PROCESS_STATUS_WAIT:
/*
@@ -180,22 +177,21 @@ public class StateDumpContainerHandler extends VMKernelEventHandler {
* WAIT_UNKNOWN state instead of the "normal" WAIT_BLOCKED
* state.
*/
- value = StateValues.PROCESS_STATUS_WAIT_UNKNOWN_VALUE;
+ processStatus = StateValues.PROCESS_STATUS_WAIT_UNKNOWN;
break;
default:
- value = StateValues.PROCESS_STATUS_UNKNOWN_VALUE;
+ processStatus = StateValues.PROCESS_STATUS_UNKNOWN;
}
- ss.modifyAttribute(ts, value, quark);
+ ss.modifyAttribute(ts, processStatus, quark);
}
/*
* Set the process' name. Only for level 0.
*/
quark = ss.getQuarkRelativeAndAdd(threadNode, FusedAttributes.EXEC_NAME);
- if (ss.queryOngoingState(quark).isNull()) {
+ if (ss.queryOngoing(quark) == null) {
/* If the value didn't exist previously, set it */
- value = TmfStateValue.newValueString(name);
- ss.modifyAttribute(ts, value, quark);
+ ss.modifyAttribute(ts, name, quark);
}
String attributePpid = FusedAttributes.PPID;
@@ -206,25 +202,27 @@ public class StateDumpContainerHandler extends VMKernelEventHandler {
/* Set the process' PPID */
quark = ss.getQuarkRelativeAndAdd(layerNode, attributePpid);
- ITmfStateValue valuePpid;
- if (ss.queryOngoingState(quark).isNull()) {
+
+ if (ss.queryOngoing(quark) == null) {
+ int setPpid;
+ int setVppid;
if (vpid.equals(vtid)) {
/* We have a process. Use the 'PPID' field. */
- value = TmfStateValue.newValueInt(vppid.intValue());
- valuePpid = TmfStateValue.newValueInt(ppid.intValue());
+ setVppid = vppid.intValue();
+ setPpid = ppid.intValue();
} else {
/*
* We have a thread, use the 'PID' field for the parent.
*/
- value = TmfStateValue.newValueInt(vpid.intValue());
- valuePpid = TmfStateValue.newValueInt(pid.intValue());
+ setVppid = vpid.intValue();
+ setPpid = pid.intValue();
}
- ss.modifyAttribute(ts, value, quark);
+ ss.modifyAttribute(ts, setVppid, quark);
if (nsLevel != 0) {
/* Set also for the root layer */
quark = ss.getQuarkRelativeAndAdd(threadNode, FusedAttributes.PPID);
- if (ss.queryOngoingState(quark).isNull()) {
- ss.modifyAttribute(ts, valuePpid, quark);
+ if (ss.queryOngoing(quark) == null) {
+ ss.modifyAttribute(ts, setPpid, quark);
}
}
}
@@ -233,16 +231,14 @@ public class StateDumpContainerHandler extends VMKernelEventHandler {
quark = ss.getQuarkRelativeAndAdd(layerNode, FusedAttributes.NS_LEVEL);
if (ss.queryOngoingState(quark).isNull()) {
/* If the value didn't exist previously, set it */
- value = TmfStateValue.newValueInt(nsLevel.intValue());
- ss.modifyAttribute(ts, value, quark);
+ ss.modifyAttribute(ts, nsLevel.intValue(), quark);
}
/* Set the namespace identification number */
quark = ss.getQuarkRelativeAndAdd(layerNode, FusedAttributes.NS_INUM);
if (ss.queryOngoingState(quark).isNull()) {
/* If the value didn't exist previously, set it */
- value = TmfStateValue.newValueLong(nsInum);
- ss.modifyAttribute(ts, value, quark);
+ ss.modifyAttribute(ts, nsInum, quark);
}
/* Save the namespace id somewhere so it can be reused */
@@ -250,7 +246,7 @@ public class StateDumpContainerHandler extends VMKernelEventHandler {
/* Save the tid in the container. We also keep the vtid */
quark = ss.getQuarkRelativeAndAdd(quark, FusedAttributes.THREADS, String.valueOf(tid));
- ss.modifyAttribute(ts, TmfStateValue.newValueInt(vtid.intValue()), quark);
+ ss.modifyAttribute(ts, vtid.intValue(), quark);
if (nsLevel != maxLevel - 1) {
/*
@@ -262,14 +258,14 @@ public class StateDumpContainerHandler extends VMKernelEventHandler {
Long childNSInum = ss.queryOngoingState(quark).unboxLong();
if (childNSInum > 0) {
quark = ss.getQuarkRelativeAndAdd(FusedVMEventHandlerUtils.getMachinesNode(ss), hostId, FusedAttributes.CONTAINERS, Long.toString(childNSInum), FusedAttributes.PARENT);
- ss.modifyAttribute(ss.getStartTime(), TmfStateValue.newValueLong(nsInum), quark);
+ ss.modifyAttribute(ss.getStartTime(), nsInum, quark);
}
}
if (nsLevel == 0) {
/* Root namespace => no parent */
quark = ss.getQuarkRelativeAndAdd(FusedVMEventHandlerUtils.getMachinesNode(ss), hostId, FusedAttributes.CONTAINERS, Long.toString(nsInum), FusedAttributes.PARENT);
- ss.modifyAttribute(ss.getStartTime(), TmfStateValue.newValueLong(-1), quark);
+ ss.modifyAttribute(ss.getStartTime(), -1L, quark);
}
}
diff --git a/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/SysEntryHandler.java b/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/SysEntryHandler.java
index 520692fb..336cda14 100644
--- a/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/SysEntryHandler.java
+++ b/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/SysEntryHandler.java
@@ -16,8 +16,6 @@ import org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core
import org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core.virtual.resources.StateValues;
import org.eclipse.tracecompass.statesystem.core.ITmfStateSystemBuilder;
import org.eclipse.tracecompass.statesystem.core.exceptions.StateSystemDisposedException;
-import org.eclipse.tracecompass.statesystem.core.statevalue.ITmfStateValue;
-import org.eclipse.tracecompass.statesystem.core.statevalue.TmfStateValue;
import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
import org.eclipse.tracecompass.tmf.core.event.aspect.TmfCpuAspect;
import org.eclipse.tracecompass.tmf.core.trace.TmfTraceUtils;
@@ -51,14 +49,12 @@ public class SysEntryHandler extends VMKernelEventHandler {
/* Assign the new system call to the process */
int currentThreadNode = FusedVMEventHandlerUtils.getCurrentThreadNode(cpu, ss);
int quark = ss.getQuarkRelativeAndAdd(currentThreadNode, FusedAttributes.SYSTEM_CALL);
- ITmfStateValue value = TmfStateValue.newValueString(event.getName());
long timestamp = FusedVMEventHandlerUtils.getTimestamp(event);
- ss.modifyAttribute(timestamp, value, quark);
+ ss.modifyAttribute(timestamp, event.getName(), quark);
/* Put the process in system call mode */
quark = ss.getQuarkRelativeAndAdd(currentThreadNode, FusedAttributes.STATUS);
- value = StateValues.PROCESS_STATUS_RUN_SYSCALL_VALUE;
- ss.modifyAttribute(timestamp, value, quark);
+ ss.modifyAttribute(timestamp, StateValues.PROCESS_STATUS_RUN_SYSCALL, quark);
/* Put the CPU in system call (kernel) mode */
int currentCPUNode = FusedVMEventHandlerUtils.getCurrentCPUNode(cpu, ss);
@@ -78,11 +74,10 @@ public class SysEntryHandler extends VMKernelEventHandler {
}
quark = ss.getQuarkRelativeAndAdd(currentCPUNode, FusedAttributes.STATUS);
- value = StateValues.CPU_STATUS_RUN_SYSCALL_VALUE;
if (modify) {
- ss.modifyAttribute(timestamp, value, quark);
+ ss.modifyAttribute(timestamp, StateValues.CPU_STATUS_RUN_SYSCALL, quark);
}
- cpuObject.setCurrentState(value);
+ cpuObject.setCurrentState(StateValues.CPU_STATUS_RUN_SYSCALL);
}
}
diff --git a/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/SysExitHandler.java b/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/SysExitHandler.java
index af039bba..a1302fd7 100644
--- a/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/SysExitHandler.java
+++ b/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/fused/handlers/SysExitHandler.java
@@ -16,8 +16,6 @@ import org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core
import org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core.virtual.resources.StateValues;
import org.eclipse.tracecompass.statesystem.core.ITmfStateSystemBuilder;
import org.eclipse.tracecompass.statesystem.core.exceptions.StateSystemDisposedException;
-import org.eclipse.tracecompass.statesystem.core.statevalue.ITmfStateValue;
-import org.eclipse.tracecompass.statesystem.core.statevalue.TmfStateValue;
import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
import org.eclipse.tracecompass.tmf.core.event.aspect.TmfCpuAspect;
import org.eclipse.tracecompass.tmf.core.trace.TmfTraceUtils;
@@ -51,14 +49,12 @@ public class SysExitHandler extends VMKernelEventHandler {
/* Assign the new system call to the process */
int currentThreadNode = FusedVMEventHandlerUtils.getCurrentThreadNode(cpu, ss);
int quark = ss.getQuarkRelativeAndAdd(currentThreadNode, FusedAttributes.SYSTEM_CALL);
- ITmfStateValue value = TmfStateValue.nullValue();
long timestamp = FusedVMEventHandlerUtils.getTimestamp(event);
- ss.modifyAttribute(timestamp, value, quark);
+ ss.modifyAttribute(timestamp, (Object) null, quark);
/* Put the process in user mode */
quark = ss.getQuarkRelativeAndAdd(currentThreadNode, FusedAttributes.STATUS);
- value = StateValues.PROCESS_STATUS_RUN_USERMODE_VALUE;
- ss.modifyAttribute(timestamp, value, quark);
+ ss.modifyAttribute(timestamp, StateValues.PROCESS_STATUS_RUN_USERMODE, quark);
/*
* If the trace that generates the event doesn't match the currently
@@ -77,11 +73,10 @@ public class SysExitHandler extends VMKernelEventHandler {
/* Put the CPU in user mode */
quark = ss.getQuarkRelativeAndAdd(currentCPUNode, FusedAttributes.STATUS);
- value = StateValues.CPU_STATUS_RUN_USERMODE_VALUE;
if (modify) {
- ss.modifyAttribute(timestamp, value, quark);
+ ss.modifyAttribute(timestamp, StateValues.CPU_STATUS_RUN_USERMODE, quark);
}
- cpuObject.setCurrentState(value);
+ cpuObject.setCurrentState(StateValues.CPU_STATUS_RUN_USERMODE);
}
}
diff --git a/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/model/VirtualCPU.java b/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/model/VirtualCPU.java
index 2f8acf2a..64ab43a8 100644
--- a/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/model/VirtualCPU.java
+++ b/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/model/VirtualCPU.java
@@ -16,8 +16,6 @@ import java.util.Map;
import org.eclipse.jdt.annotation.Nullable;
import org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core.virtual.resources.StateValues;
-import org.eclipse.tracecompass.statesystem.core.statevalue.ITmfStateValue;
-import org.eclipse.tracecompass.statesystem.core.statevalue.TmfStateValue;
import com.google.common.collect.HashBasedTable;
import com.google.common.collect.Table;
@@ -37,10 +35,10 @@ public final class VirtualCPU {
private final VirtualMachine fVm;
private final Long fCpuId;
/* Current state of the cpu. */
- private ITmfStateValue fCurrentState;
+ private Integer fCurrentState;
/* Current thread of the cpu. */
- private ITmfStateValue fCurrentThread;
- private ITmfStateValue fStateBeforeIRQ;
+ private Integer fCurrentThread;
+ private Integer fStateBeforeIRQ;
private @Nullable VirtualCPU fNextLayerVCPU;
/**
@@ -75,9 +73,9 @@ public final class VirtualCPU {
private VirtualCPU(VirtualMachine vm, Long cpu) {
fVm = vm;
fCpuId = cpu;
- fCurrentState = StateValues.CPU_STATUS_IDLE_VALUE;
- fCurrentThread = TmfStateValue.newValueInt(-1);
- fStateBeforeIRQ = StateValues.CPU_STATUS_IDLE_VALUE;
+ fCurrentState = StateValues.CPU_STATUS_IDLE;
+ fCurrentThread = -1;
+ fStateBeforeIRQ = StateValues.CPU_STATUS_IDLE;
fNextLayerVCPU = null;
}
@@ -109,7 +107,7 @@ public final class VirtualCPU {
*
* @return the currentState
*/
- public ITmfStateValue getCurrentState() {
+ public Integer getCurrentState() {
return fCurrentState;
}
@@ -119,7 +117,7 @@ public final class VirtualCPU {
* @param currentState
* the currentState to set
*/
- public void setCurrentState(ITmfStateValue currentState) {
+ public void setCurrentState(Integer currentState) {
this.fCurrentState = currentState;
}
@@ -128,7 +126,7 @@ public final class VirtualCPU {
*
* @return the currentThread
*/
- public ITmfStateValue getCurrentThread() {
+ public Integer getCurrentThread() {
return fCurrentThread;
}
@@ -138,14 +136,14 @@ public final class VirtualCPU {
* @param currentThread
* the currentThread to set
*/
- public void setCurrentThread(ITmfStateValue currentThread) {
+ public void setCurrentThread(Integer currentThread) {
this.fCurrentThread = currentThread;
}
/**
* @return the stateBeforeIRQ
*/
- public ITmfStateValue getStateBeforeIRQ() {
+ public Integer getStateBeforeIRQ() {
return fStateBeforeIRQ;
}
@@ -153,7 +151,7 @@ public final class VirtualCPU {
* @param state
* the stateBeforeIRQ to set
*/
- public void setStateBeforeIRQ(ITmfStateValue state) {
+ public void setStateBeforeIRQ(Integer state) {
fStateBeforeIRQ = state;
}
diff --git a/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/virtual/resources/StateValues.java b/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/virtual/resources/StateValues.java
index d25879c6..600e8925 100644
--- a/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/virtual/resources/StateValues.java
+++ b/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/virtual/resources/StateValues.java
@@ -28,12 +28,6 @@ public interface StateValues {
int MACHINE_CONTAINER = (1 << 2);
int MACHINE_UNKNOWN = (1 << 3);
- ITmfStateValue MACHINE_HOST_VALUE = TmfStateValue.newValueInt(MACHINE_HOST);
- ITmfStateValue MACHINE_GUEST_VALUE = TmfStateValue.newValueInt(MACHINE_GUEST);
- ITmfStateValue MACHINE_HOST_AND_GUEST_VALUE = TmfStateValue.newValueInt(MACHINE_HOST + MACHINE_GUEST);
- ITmfStateValue MACHINE_CONTAINER_VALUE = TmfStateValue.newValueInt(MACHINE_CONTAINER);
- ITmfStateValue MACHINE_UNKNOWN_VALUE = TmfStateValue.newValueInt(MACHINE_UNKNOWN);
-
/* CPU Status */
int CPU_STATUS_IDLE = 0;
/**
@@ -59,9 +53,9 @@ public interface StateValues {
int CONDITION_OUT_VM = 1;
int CONDITION_UNKNOWN = 3;
- ITmfStateValue CONDITION_IN_VM_VALUE = TmfStateValue.newValueInt(CONDITION_IN_VM);
- ITmfStateValue CONDITION_OUT_VM_VALUE = TmfStateValue.newValueInt(CONDITION_OUT_VM);
- ITmfStateValue CONDITION_UNKNOWN_VALUE = TmfStateValue.newValueInt(CONDITION_UNKNOWN);
+// ITmfStateValue CONDITION_IN_VM_VALUE = TmfStateValue.newValueInt(CONDITION_IN_VM);
+// ITmfStateValue CONDITION_OUT_VM_VALUE = TmfStateValue.newValueInt(CONDITION_OUT_VM);
+// ITmfStateValue CONDITION_UNKNOWN_VALUE = TmfStateValue.newValueInt(CONDITION_UNKNOWN);
/* Process status */
int PROCESS_STATUS_UNKNOWN = 0;
@@ -71,21 +65,21 @@ public interface StateValues {
int PROCESS_STATUS_INTERRUPTED = 4;
int PROCESS_STATUS_WAIT_FOR_CPU = 5;
int PROCESS_STATUS_WAIT_UNKNOWN = 6;
-
- ITmfStateValue PROCESS_STATUS_UNKNOWN_VALUE = TmfStateValue.newValueInt(PROCESS_STATUS_UNKNOWN);
- /**
- * @since 1.0
- */
- ITmfStateValue PROCESS_STATUS_WAIT_UNKNOWN_VALUE = TmfStateValue.newValueInt(PROCESS_STATUS_WAIT_UNKNOWN);
- ITmfStateValue PROCESS_STATUS_WAIT_BLOCKED_VALUE = TmfStateValue.newValueInt(PROCESS_STATUS_WAIT_BLOCKED);
- ITmfStateValue PROCESS_STATUS_RUN_USERMODE_VALUE = TmfStateValue.newValueInt(PROCESS_STATUS_RUN_USERMODE);
- ITmfStateValue PROCESS_STATUS_RUN_SYSCALL_VALUE = TmfStateValue.newValueInt(PROCESS_STATUS_RUN_SYSCALL);
- ITmfStateValue PROCESS_STATUS_INTERRUPTED_VALUE = TmfStateValue.newValueInt(PROCESS_STATUS_INTERRUPTED);
- ITmfStateValue PROCESS_STATUS_WAIT_FOR_CPU_VALUE = TmfStateValue.newValueInt(PROCESS_STATUS_WAIT_FOR_CPU);
-
- /** Soft IRQ is raised, CPU is in user mode */
- ITmfStateValue SOFT_IRQ_RAISED_VALUE = TmfStateValue.newValueInt(CPU_STATUS_SOFT_IRQ_RAISED);
+//
+// ITmfStateValue PROCESS_STATUS_UNKNOWN_VALUE = TmfStateValue.newValueInt(PROCESS_STATUS_UNKNOWN);
+// /**
+// * @since 1.0
+// */
+// ITmfStateValue PROCESS_STATUS_WAIT_UNKNOWN_VALUE = TmfStateValue.newValueInt(PROCESS_STATUS_WAIT_UNKNOWN);
+// ITmfStateValue PROCESS_STATUS_WAIT_BLOCKED_VALUE = TmfStateValue.newValueInt(PROCESS_STATUS_WAIT_BLOCKED);
+// ITmfStateValue PROCESS_STATUS_RUN_USERMODE_VALUE = TmfStateValue.newValueInt(PROCESS_STATUS_RUN_USERMODE);
+// ITmfStateValue PROCESS_STATUS_RUN_SYSCALL_VALUE = TmfStateValue.newValueInt(PROCESS_STATUS_RUN_SYSCALL);
+// ITmfStateValue PROCESS_STATUS_INTERRUPTED_VALUE = TmfStateValue.newValueInt(PROCESS_STATUS_INTERRUPTED);
+// ITmfStateValue PROCESS_STATUS_WAIT_FOR_CPU_VALUE = TmfStateValue.newValueInt(PROCESS_STATUS_WAIT_FOR_CPU);
+//
+// /** Soft IRQ is raised, CPU is in user mode */
+// ITmfStateValue SOFT_IRQ_RAISED_VALUE = TmfStateValue.newValueInt(CPU_STATUS_SOFT_IRQ_RAISED);
/** If the softirq is running and another is raised at the same time. */
- ITmfStateValue SOFT_IRQ_RAISED_RUNNING_VALUE = TmfStateValue.newValueInt(CPU_STATUS_SOFT_IRQ_RAISED | CPU_STATUS_SOFTIRQ);
+ int CPU_STATUS_SOFT_IRQ_RAISED_RUNNING = CPU_STATUS_SOFT_IRQ_RAISED | CPU_STATUS_SOFTIRQ;
}
diff --git a/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.ui/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/ui/views/vcpuview/VirtualMachinePresentationProvider.java b/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.ui/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/ui/views/vcpuview/VirtualMachinePresentationProvider.java
index 7063b4c1..bcbc06d3 100644
--- a/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.ui/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/ui/views/vcpuview/VirtualMachinePresentationProvider.java
+++ b/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.ui/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/ui/views/vcpuview/VirtualMachinePresentationProvider.java
@@ -16,8 +16,8 @@ import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.widgets.Display;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernel.StateValues;
import org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core.data.VcpuStateValues;
+import org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core.virtual.resources.StateValues;
import org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.ui.views.vcpuview.VirtualMachineCommon.Type;
import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.StateItem;
import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.TimeGraphPresentationProvider;
diff --git a/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.ui/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/ui/views/vresources/Machine.java b/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.ui/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/ui/views/vresources/Machine.java
index b89666f1..20a49d02 100644
--- a/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.ui/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/ui/views/vresources/Machine.java
+++ b/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.ui/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/ui/views/vresources/Machine.java
@@ -18,7 +18,6 @@ import java.util.Set;
import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;
import org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core.virtual.resources.StateValues;
-import org.eclipse.tracecompass.statesystem.core.statevalue.ITmfStateValue;
/**
* Represents a machine in the ui
@@ -37,7 +36,7 @@ public class Machine {
private Set<Processor> fPcpus = new HashSet<>();
private Set<Machine> fContainers = new HashSet<>();
private Set<Machine> fVirtualMachines = new HashSet<>();
- private ITmfStateValue fMachineType;
+ private int fMachineType;
/**
* Constructor
@@ -49,7 +48,7 @@ public class Machine {
* @param type
* The type state value of the machine
*/
- public Machine(String name, String hostId, ITmfStateValue type) {
+ public Machine(String name, String hostId, int type) {
this(name, hostId, type, Collections.emptyList());
}
@@ -65,7 +64,7 @@ public class Machine {
* @param pcpus
* The list of CPUs used by this machine
*/
- public Machine(String name, String hostId, ITmfStateValue type, Collection<String> pcpus) {
+ public Machine(String name, String hostId, int type, Collection<String> pcpus) {
fMachineName = name;
fMachineType = type;
fHostId = hostId;
@@ -88,7 +87,7 @@ public class Machine {
* @return The newly created container.
*/
public Machine createContainer(String name, String hostId, List<String> physCpus) {
- Machine container = new Machine(name, hostId, StateValues.MACHINE_CONTAINER_VALUE, physCpus);
+ Machine container = new Machine(name, hostId, StateValues.MACHINE_CONTAINER, physCpus);
container.setHost(this);
fContainers.add(container);
return container;
@@ -100,7 +99,7 @@ public class Machine {
* @return whether the machine is a container
*/
public boolean isContainer() {
- return fMachineType == StateValues.MACHINE_CONTAINER_VALUE;
+ return fMachineType == StateValues.MACHINE_CONTAINER;
}
/**
@@ -186,7 +185,7 @@ public class Machine {
* The machine to add as a guest
*/
public void addVirtualMachine(Machine machine) {
- if ((machine.fMachineType.unboxInt() & StateValues.MACHINE_GUEST) != StateValues.MACHINE_GUEST) {
+ if ((machine.fMachineType & StateValues.MACHINE_GUEST) != StateValues.MACHINE_GUEST) {
return;
}
fVirtualMachines.add(machine);
diff --git a/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.ui/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/ui/views/vresources/VirtualResourcePresentationProvider.java b/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.ui/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/ui/views/vresources/VirtualResourcePresentationProvider.java
index 728c42b4..261b8993 100644
--- a/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.ui/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/ui/views/vresources/VirtualResourcePresentationProvider.java
+++ b/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.ui/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/ui/views/vresources/VirtualResourcePresentationProvider.java
@@ -41,6 +41,7 @@ import org.eclipse.tracecompass.statesystem.core.interval.ITmfStateInterval;
import org.eclipse.tracecompass.statesystem.core.statevalue.ITmfStateValue;
import org.eclipse.tracecompass.tmf.core.statesystem.TmfStateSystemAnalysisModule;
import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
+import org.eclipse.tracecompass.tmf.ui.views.FormatTimeUtils;
import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.StateItem;
import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.TimeGraphPresentationProvider;
import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.model.ITimeEvent;
@@ -50,8 +51,6 @@ import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.model.NullTimeEvent;
import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.model.TimeEvent;
import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.widgets.ITmfTimeGraphDrawingHelper;
import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.widgets.Utils;
-import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.widgets.Utils.Resolution;
-import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.widgets.Utils.TimeFormat;
import com.google.common.collect.HashMultimap;
import com.google.common.collect.ImmutableMap;
@@ -357,7 +356,7 @@ public class VirtualResourcePresentationProvider extends TimeGraphPresentationPr
} else if (status == StateValues.CPU_STATUS_RUN_USERMODE || status == StateValues.CPU_STATUS_RUN_SYSCALL) {
// In running state get the current tid
- retMap.put(Messages.FusedVMView_attributeHoverTime, Utils.formatTime(hoverTime, TimeFormat.CALENDAR, Resolution.NANOSEC));
+ retMap.put(Messages.FusedVMView_attributeHoverTime, FormatTimeUtils.formatTime(hoverTime, FormatTimeUtils.TimeFormat.CALENDAR, FormatTimeUtils.Resolution.NANOSEC));
cpuQuark = entry.getQuark();
int currentThreadQuark = ss.optQuarkRelative(cpuQuark, FusedAttributes.CURRENT_THREAD);
if (currentThreadQuark == ITmfStateSystem.INVALID_ATTRIBUTE) {
diff --git a/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.ui/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/ui/views/vresources/VirtualResourcesView.java b/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.ui/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/ui/views/vresources/VirtualResourcesView.java
index 6d4ca521..60cd7002 100644
--- a/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.ui/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/ui/views/vresources/VirtualResourcesView.java
+++ b/vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.ui/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/ui/views/vresources/VirtualResourcesView.java
@@ -52,8 +52,9 @@ import org.eclipse.tracecompass.statesystem.core.statevalue.ITmfStateValue;
import org.eclipse.tracecompass.tmf.core.signal.TmfSignalHandler;
import org.eclipse.tracecompass.tmf.core.statesystem.TmfStateSystemAnalysisModule;
import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
+import org.eclipse.tracecompass.tmf.ui.views.FormatTimeUtils;
import org.eclipse.tracecompass.tmf.ui.views.timegraph.AbstractStateSystemTimeGraphView;
-import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.ITimeGraphPresentationProvider2;
+import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.ITimeGraphPresentationProvider;
import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.ITimeGraphSelectionListener;
import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.ITimeGraphTimeListener;
import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.TimeGraphSelectionEvent;
@@ -63,9 +64,6 @@ import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.model.ITimeGraphEntry;
import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.model.NullTimeEvent;
import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.model.TimeEvent;
import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.model.TimeGraphEntry;
-import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.widgets.Utils;
-import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.widgets.Utils.Resolution;
-import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.widgets.Utils.TimeFormat;
/**
* A view showing the virtual resources / CPUs for traces and their contained
@@ -851,7 +849,7 @@ public class VirtualResourcesView extends AbstractStateSystemTimeGraphView {
* @return the FusedVMViewProvider
*/
public VirtualResourcePresentationProvider getFusedVMViewPresentationProvider() {
- ITimeGraphPresentationProvider2 pp = getPresentationProvider();
+ ITimeGraphPresentationProvider pp = getPresentationProvider();
if (!(pp instanceof VirtualResourcePresentationProvider)) {
return null;
}
@@ -862,8 +860,8 @@ public class VirtualResourcesView extends AbstractStateSystemTimeGraphView {
long begin = getBeginSelectedTime();
long end = getEndSelectedTime();
- System.out.println("Begin time: " + Utils.formatTime(begin, TimeFormat.CALENDAR, Resolution.NANOSEC)); //$NON-NLS-1$
- System.out.println("End time: " + Utils.formatTime(end, TimeFormat.CALENDAR, Resolution.NANOSEC)); //$NON-NLS-1$
+ System.out.println("Begin time: " + FormatTimeUtils.formatTime(begin, FormatTimeUtils.TimeFormat.CALENDAR, FormatTimeUtils.Resolution.NANOSEC)); //$NON-NLS-1$
+ System.out.println("End time: " + FormatTimeUtils.formatTime(end, FormatTimeUtils.TimeFormat.CALENDAR, FormatTimeUtils.Resolution.NANOSEC)); //$NON-NLS-1$
System.out.println();
}
@@ -951,18 +949,18 @@ public class VirtualResourcesView extends AbstractStateSystemTimeGraphView {
Machine host = null;
List<Machine> guests = new LinkedList<>();
for (String machineHost : FusedVMInformationProvider.getMachinesTraced(ssq)) {
- ITmfStateValue typeMachine = FusedVMInformationProvider.getTypeMachine(ssq, machineHost);
+ int typeMachine = FusedVMInformationProvider.getTypeMachine(ssq, machineHost);
- if (typeMachine.isNull()) {
+ if (typeMachine < 0) {
continue;
}
String machineName = FusedVMInformationProvider.getMachineName(ssq, machineHost);
Machine machine = null;
- if ((typeMachine.unboxInt() & StateValues.MACHINE_GUEST) == StateValues.MACHINE_GUEST) {
+ if ((typeMachine & StateValues.MACHINE_GUEST) == StateValues.MACHINE_GUEST) {
machine = new Machine(machineName, machineHost, typeMachine, FusedVMInformationProvider.getPhysicalCpusUsedByMachine(ssq, machineHost));
fMachines.put(machine.getMachineName(), machine);
guests.add(machine);
- } else if (typeMachine.unboxInt() == StateValues.MACHINE_HOST) {
+ } else if (typeMachine == StateValues.MACHINE_HOST) {
machine = new Machine(machineName, machineHost, typeMachine);
for (String cpus : FusedVMInformationProvider.getCpusUsedByMachine(ssq, machineHost)) {
machine.addPCpu(cpus);

Back to the top