Skip to content

Commit a47de98

Browse files
committed
vm: fixed review comments
Signed-off-by: philippe <beliasossim@gmail.com>
1 parent 4e9e1a1 commit a47de98

45 files changed

Lines changed: 788 additions & 2741 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

analyses/org.eclipse.tracecompass.incubator.executioncomparison.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/DifferentialSeqCallGraphAnalysis.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,6 @@ public DifferentialSeqCallGraphAnalysis() {
9797
// Adding VM/Native analysis
9898
fCallStackAnalysisMap.put("org.eclipse.linuxtools.lttng2.kernel.tracetype", //$NON-NLS-1$
9999
"org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core.flow.analysis.vm.native.callstack"); //$NON-NLS-1$
100-
101-
/*fCallStackAnalysisMap.put("org.eclipse.tracecompass.tmf.core.experiment", //$NON-NLS-1$
102-
"org.eclipse.tracecompass.incubator.overhead.core.analysis.vm.native.callstack"); //$NON-NLS-1$*/
103100
}
104101

105102
/**

analyses/org.eclipse.tracecompass.incubator.overhead.core.tests/.project

Lines changed: 0 additions & 28 deletions
This file was deleted.

analyses/org.eclipse.tracecompass.incubator.overhead.core/.project

Lines changed: 0 additions & 34 deletions
This file was deleted.

analyses/org.eclipse.tracecompass.incubator.overhead.ui.swtbot.tests/.project

Lines changed: 0 additions & 34 deletions
This file was deleted.

analyses/org.eclipse.tracecompass.incubator.overhead.ui/.project

Lines changed: 0 additions & 34 deletions
This file was deleted.

analyses/org.eclipse.tracecompass.incubator.overhead/.project

Lines changed: 0 additions & 17 deletions
This file was deleted.

callstack/org.eclipse.tracecompass.incubator.analysis.core/.settings/org.eclipse.m2e.core.prefs

Lines changed: 0 additions & 4 deletions
This file was deleted.

vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/META-INF/MANIFEST.MF

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,6 @@ Export-Package: org.eclipse.tracecompass.incubator.internal.virtual.machine.anal
3636
org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core.virtual.resources.handlers;x-internal:=true
3737
Import-Package: com.google.common.collect,
3838
com.google.common.hash,
39-
com.google.common.primitives
39+
com.google.common.primitives,
40+
org.eclipse.tracecompass.internal.lttng2.kernel.core.trace.layout
4041
Automatic-Module-Name: org.eclipse.tracecompass.incubator.virtual.machine.analysis.core

vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/plugin.xml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -63,17 +63,10 @@
6363
class="org.eclipse.tracecompass.tmf.core.trace.TmfTrace">
6464
</tracetype>
6565
</module>
66-
<module
67-
analysis_module="org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core.flow.analysis.VMNativeComparisonAnalysis"
68-
id="org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core.flow.analysis.vmcomparison"
69-
name="VM vs Native Comparison">
70-
<tracetype
71-
class="org.eclipse.tracecompass.tmf.core.trace.experiment.TmfExperiment">
72-
</tracetype>
73-
</module>
7466
<module
7567
analysis_module="org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core.flow.analysis.VMNativeCallStackAnalysis"
7668
applies_experiment="true"
69+
automatic="false"
7770
id="org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core.flow.analysis.vm.native.callstack"
7871
name="VM Native CallStack">
7972
<tracetype
@@ -84,12 +77,8 @@
8477
<extension
8578
point="org.eclipse.tracecompass.tmf.core.dataprovider">
8679
<dataProviderFactory
87-
class="org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core.flow.analysis.core.data.provider.KvmExitDataProviderFactory"
80+
class="org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core.flow.analysis.core.data.provider.KvmExitRateDataProviderFactory"
8881
id="org.eclipse.incubator.overhead.xy.rate.dataprovider">
8982
</dataProviderFactory>
90-
<dataProviderFactory
91-
class="org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core.flow.analysis.core.data.provider.VMNativeDataProviderFactory"
92-
id="org.eclipse.incubator.overhead.timegraph.dataprovider">
93-
</dataProviderFactory>
9483
</extension>
9584
</plugin>

vm/org.eclipse.tracecompass.incubator.virtual.machine.analysis.core/src/org/eclipse/tracecompass/incubator/internal/virtual/machine/analysis/core/flow/analysis/ExecutionSequence.java

Lines changed: 11 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
1+
/*******************************************************************************
2+
* Copyright (c) 2026 École Polytechnique de Montréal
3+
*
4+
* All rights reserved. This program and the accompanying materials are
5+
* made available under the terms of the Eclipse Public License 2.0 which
6+
* accompanies this distribution, and is available at
7+
* https://www.eclipse.org/legal/epl-2.0/
8+
*
9+
* SPDX-License-Identifier: EPL-2.0
10+
*******************************************************************************/
111
package org.eclipse.tracecompass.incubator.internal.virtual.machine.analysis.core.flow.analysis;
212

313
import java.util.ArrayList;
414
import java.util.List;
5-
import java.io.File;
6-
import java.io.FileOutputStream;
7-
import java.io.IOException;
8-
import java.io.PrintWriter;
915

1016
/**
1117
* Represents a complete execution sequence in a virtualized environment:
1218
* <pre>
13-
* Guest → VM Exit → Hypervisor (Host) → VM Entry
19+
* VM ENTRY → GUEST → VM EXIT → Hypervisor (Host) → VM Entry
1420
* </pre>
1521
* <p>
1622
* This class aggregates events occurring in both the guest and the hypervisor,
@@ -82,78 +88,6 @@ void setVmEntry(FlowEvent event) {
8288
this.vmEntry = event;
8389
}
8490

85-
/**
86-
* Prints the execution sequence for debugging purposes.
87-
* <p>
88-
* The sequence is printed both to the standard output and appended
89-
* to a file on disk.
90-
* </p>
91-
*
92-
* @throws IOException
93-
* if an I/O error occurs while writing to the file
94-
*/
95-
void printSequence() throws IOException {
96-
try (
97-
FileOutputStream fos = new FileOutputStream(
98-
new File("/home/philippe/Desktop/virtualized_flow.txt"), true); //$NON-NLS-1$
99-
PrintWriter writer = new PrintWriter(fos)) {
100-
101-
// Print guest events
102-
for (FlowEvent guestEvent : guestEvents) {
103-
KernelEventInfo evt = guestEvent.kernelEvent;
104-
System.out.printf(" [GUEST] %s (TID:%d, CPU:%d)\n", evt.name, evt.tid, evt.cpuid); //$NON-NLS-1$
105-
writer.printf(" [GUEST] %s (TID:%d, CPU:%d)\n", evt.name, evt.tid, evt.cpuid); //$NON-NLS-1$
106-
}
107-
108-
// Print VM exit
109-
if (vmExit != null) {
110-
System.out.printf(" ↓ [VM_EXIT] %s (CPU:%d, VCPU:%d, exit_reason:%s)\n", //$NON-NLS-1$
111-
vmExit.kernelEvent.name,
112-
vmExit.kernelEvent.cpuid,
113-
vmExit.kernelEvent.vcpuid,
114-
vmExit.kernelEvent.exitReason);
115-
116-
writer.printf(" ↓ [VM_EXIT] %s (CPU:%d, VCPU:%d, exit_reason:%s)\n", //$NON-NLS-1$
117-
vmExit.kernelEvent.name,
118-
vmExit.kernelEvent.cpuid,
119-
vmExit.kernelEvent.vcpuid,
120-
vmExit.kernelEvent.exitReason);
121-
}
122-
123-
// Print hypervisor events
124-
for (FlowEvent hypervisorEvent : hypervisorEvents) {
125-
KernelEventInfo evt = hypervisorEvent.kernelEvent;
126-
System.out.printf(" [HOST] %s (PID:%d, CPU:%d)\n", //$NON-NLS-1$
127-
evt.name, evt.pid, evt.cpuid);
128-
129-
writer.printf(" [HOST] %s (PID:%d, CPU:%d)\n", //$NON-NLS-1$
130-
evt.name, evt.pid, evt.cpuid);
131-
}
132-
133-
// Print VM entry
134-
if (vmEntry != null) {
135-
System.out.printf(" ↑ [VM_ENTRY] %s (CPU:%d, VCPU:%d)\n", //$NON-NLS-1$
136-
vmEntry.kernelEvent.name,
137-
vmEntry.kernelEvent.cpuid,
138-
vmEntry.kernelEvent.vcpuid);
139-
140-
writer.printf(" ↑ [VM_ENTRY] %s (CPU:%d, VCPU:%d)\n", //$NON-NLS-1$
141-
vmEntry.kernelEvent.name,
142-
vmEntry.kernelEvent.cpuid,
143-
vmEntry.kernelEvent.vcpuid);
144-
}
145-
146-
// Print timing summary
147-
if (!guestEvents.isEmpty() && vmEntry != null) {
148-
long totalDuration = vmEntry.kernelEvent.timestamp
149-
- guestEvents.get(0).kernelEvent.timestamp;
150-
151-
System.out.printf(" Total sequence duration: %d µs\n", totalDuration / 1000); //$NON-NLS-1$
152-
writer.printf(" Total sequence duration: %d µs\n", totalDuration / 1000); //$NON-NLS-1$
153-
}
154-
}
155-
}
156-
15791
/**
15892
* Indicates whether the execution sequence is complete.
15993
* <p>

0 commit comments

Comments
 (0)