analysis: Move plugins to their own sub-directory
authorAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Mon, 11 May 2015 21:57:57 +0000 (17:57 -0400)
committerAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Tue, 16 Jun 2015 18:40:08 +0000 (14:40 -0400)
The "analysis" component can host all analyses that do not
depend on a specific trace type.

Change-Id: I52b196e0e9ecae7e98593d5c3143996d923020dc
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
198 files changed:
analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/.classpath [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/.project [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/.settings/org.eclipse.core.resources.prefs [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/.settings/org.eclipse.core.runtime.prefs [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/.settings/org.eclipse.jdt.core.prefs [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/.settings/org.eclipse.jdt.ui.prefs [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/.settings/org.eclipse.pde.api.tools.prefs [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/.settings/org.eclipse.pde.prefs [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/META-INF/MANIFEST.MF [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/about.html [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/build.properties [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/plugin.properties [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/plugin.xml [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/pom.xml [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/Activator.java [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/AllTests.java [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/cpuusage/AllTests.java [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/cpuusage/CpuUsageStateProviderTest.java [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/kernelanalysis/AllTests.java [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/kernelanalysis/KernelStateProviderTest.java [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/kernelanalysis/KernelThreadInformationProviderTest.java [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/kernelanalysis/KernelTidAspectTest.java [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/testfiles/cpu_analysis.xml [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/testfiles/lttng_kernel_analysis.xml [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core/.classpath [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core/.project [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core/.settings/org.eclipse.core.resources.prefs [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core/.settings/org.eclipse.core.runtime.prefs [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core/.settings/org.eclipse.jdt.core.prefs [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core/.settings/org.eclipse.jdt.ui.prefs [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core/.settings/org.eclipse.pde.api.tools.prefs [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core/.settings/org.eclipse.pde.prefs [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core/META-INF/MANIFEST.MF [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core/about.html [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core/build.properties [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core/plugin.properties [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core/plugin.xml [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core/pom.xml [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/cpuusage/KernelCpuUsageAnalysis.java [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/cpuusage/KernelCpuUsageStateProvider.java [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/cpuusage/package-info.java [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/event/aspect/LinuxTidAspect.java [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/event/aspect/Messages.java [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/event/aspect/messages.properties [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/event/aspect/package-info.java [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/Attributes.java [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/KernelAnalysisModule.java [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/KernelThreadInformationProvider.java [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/KernelTidAspect.java [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/Messages.java [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/StateValues.java [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/ThreadPriorityAspect.java [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/messages.properties [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/package-info.java [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/model/HostThread.java [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/model/package-info.java [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/trace/DefaultEventLayout.java [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/trace/IKernelAnalysisEventLayout.java [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/trace/IKernelTrace.java [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/trace/package-info.java [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/internal/analysis/os/linux/core/Activator.java [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/internal/analysis/os/linux/core/kernelanalysis/KernelStateProvider.java [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/internal/analysis/os/linux/core/kernelanalysis/LinuxValues.java [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/internal/analysis/os/linux/core/kernelanalysis/package-info.java [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/internal/analysis/os/linux/core/package-info.java [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.ui/.classpath [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.ui/.project [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.ui/.settings/org.eclipse.core.resources.prefs [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.ui/.settings/org.eclipse.core.runtime.prefs [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.ui/.settings/org.eclipse.jdt.core.prefs [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.ui/.settings/org.eclipse.jdt.ui.prefs [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.ui/.settings/org.eclipse.pde.api.tools.prefs [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.ui/.settings/org.eclipse.pde.prefs [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.ui/META-INF/MANIFEST.MF [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.ui/about.html [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.ui/build.properties [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.ui/icons/eview16/control_flow_view.gif [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.ui/icons/eview16/resources_view.gif [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.ui/icons/obj16/garland16.png [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.ui/plugin.properties [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.ui/plugin.xml [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.ui/pom.xml [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/controlflow/ControlFlowCheckActiveProvider.java [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/controlflow/ControlFlowEntry.java [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/controlflow/ControlFlowPresentationProvider.java [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/controlflow/ControlFlowView.java [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/cpuusage/CpuUsageComposite.java [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/cpuusage/CpuUsageEntry.java [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/cpuusage/CpuUsageView.java [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/cpuusage/CpuUsageXYViewer.java [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/cpuusage/Messages.java [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/cpuusage/messages.properties [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/resources/ResourcesEntry.java [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/resources/ResourcesPresentationProvider.java [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/resources/ResourcesView.java [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/internal/analysis/os/linux/ui/Activator.java [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/internal/analysis/os/linux/ui/Messages.java [new file with mode: 0644]
analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/internal/analysis/os/linux/ui/messages.properties [new file with mode: 0644]
analysis/pom.xml [new file with mode: 0644]
org.eclipse.tracecompass.analysis.os.linux.core.tests/.classpath [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core.tests/.project [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core.tests/.settings/org.eclipse.core.resources.prefs [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core.tests/.settings/org.eclipse.core.runtime.prefs [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core.tests/.settings/org.eclipse.jdt.core.prefs [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core.tests/.settings/org.eclipse.jdt.ui.prefs [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core.tests/.settings/org.eclipse.pde.api.tools.prefs [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core.tests/.settings/org.eclipse.pde.prefs [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core.tests/META-INF/MANIFEST.MF [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core.tests/about.html [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core.tests/build.properties [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core.tests/plugin.properties [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core.tests/plugin.xml [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core.tests/pom.xml [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/Activator.java [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/AllTests.java [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/cpuusage/AllTests.java [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/cpuusage/CpuUsageStateProviderTest.java [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/kernelanalysis/AllTests.java [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/kernelanalysis/KernelStateProviderTest.java [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/kernelanalysis/KernelThreadInformationProviderTest.java [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/kernelanalysis/KernelTidAspectTest.java [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core.tests/testfiles/cpu_analysis.xml [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core.tests/testfiles/lttng_kernel_analysis.xml [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core/.classpath [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core/.project [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core/.settings/org.eclipse.core.resources.prefs [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core/.settings/org.eclipse.core.runtime.prefs [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core/.settings/org.eclipse.jdt.core.prefs [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core/.settings/org.eclipse.jdt.ui.prefs [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core/.settings/org.eclipse.pde.api.tools.prefs [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core/.settings/org.eclipse.pde.prefs [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core/META-INF/MANIFEST.MF [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core/about.html [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core/build.properties [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core/plugin.properties [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core/plugin.xml [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core/pom.xml [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/cpuusage/KernelCpuUsageAnalysis.java [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/cpuusage/KernelCpuUsageStateProvider.java [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/cpuusage/package-info.java [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/event/aspect/LinuxTidAspect.java [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/event/aspect/Messages.java [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/event/aspect/messages.properties [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/event/aspect/package-info.java [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/Attributes.java [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/KernelAnalysisModule.java [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/KernelThreadInformationProvider.java [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/KernelTidAspect.java [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/Messages.java [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/StateValues.java [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/ThreadPriorityAspect.java [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/messages.properties [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/package-info.java [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/model/HostThread.java [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/model/package-info.java [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/trace/DefaultEventLayout.java [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/trace/IKernelAnalysisEventLayout.java [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/trace/IKernelTrace.java [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/trace/package-info.java [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/internal/analysis/os/linux/core/Activator.java [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/internal/analysis/os/linux/core/kernelanalysis/KernelStateProvider.java [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/internal/analysis/os/linux/core/kernelanalysis/LinuxValues.java [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/internal/analysis/os/linux/core/kernelanalysis/package-info.java [deleted file]
org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/internal/analysis/os/linux/core/package-info.java [deleted file]
org.eclipse.tracecompass.analysis.os.linux.ui/.classpath [deleted file]
org.eclipse.tracecompass.analysis.os.linux.ui/.project [deleted file]
org.eclipse.tracecompass.analysis.os.linux.ui/.settings/org.eclipse.core.resources.prefs [deleted file]
org.eclipse.tracecompass.analysis.os.linux.ui/.settings/org.eclipse.core.runtime.prefs [deleted file]
org.eclipse.tracecompass.analysis.os.linux.ui/.settings/org.eclipse.jdt.core.prefs [deleted file]
org.eclipse.tracecompass.analysis.os.linux.ui/.settings/org.eclipse.jdt.ui.prefs [deleted file]
org.eclipse.tracecompass.analysis.os.linux.ui/.settings/org.eclipse.pde.api.tools.prefs [deleted file]
org.eclipse.tracecompass.analysis.os.linux.ui/.settings/org.eclipse.pde.prefs [deleted file]
org.eclipse.tracecompass.analysis.os.linux.ui/META-INF/MANIFEST.MF [deleted file]
org.eclipse.tracecompass.analysis.os.linux.ui/about.html [deleted file]
org.eclipse.tracecompass.analysis.os.linux.ui/build.properties [deleted file]
org.eclipse.tracecompass.analysis.os.linux.ui/icons/eview16/control_flow_view.gif [deleted file]
org.eclipse.tracecompass.analysis.os.linux.ui/icons/eview16/resources_view.gif [deleted file]
org.eclipse.tracecompass.analysis.os.linux.ui/icons/obj16/garland16.png [deleted file]
org.eclipse.tracecompass.analysis.os.linux.ui/plugin.properties [deleted file]
org.eclipse.tracecompass.analysis.os.linux.ui/plugin.xml [deleted file]
org.eclipse.tracecompass.analysis.os.linux.ui/pom.xml [deleted file]
org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/controlflow/ControlFlowCheckActiveProvider.java [deleted file]
org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/controlflow/ControlFlowEntry.java [deleted file]
org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/controlflow/ControlFlowPresentationProvider.java [deleted file]
org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/controlflow/ControlFlowView.java [deleted file]
org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/cpuusage/CpuUsageComposite.java [deleted file]
org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/cpuusage/CpuUsageEntry.java [deleted file]
org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/cpuusage/CpuUsageView.java [deleted file]
org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/cpuusage/CpuUsageXYViewer.java [deleted file]
org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/cpuusage/Messages.java [deleted file]
org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/cpuusage/messages.properties [deleted file]
org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/resources/ResourcesEntry.java [deleted file]
org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/resources/ResourcesPresentationProvider.java [deleted file]
org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/resources/ResourcesView.java [deleted file]
org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/internal/analysis/os/linux/ui/Activator.java [deleted file]
org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/internal/analysis/os/linux/ui/Messages.java [deleted file]
org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/internal/analysis/os/linux/ui/messages.properties [deleted file]
pom.xml

diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/.classpath b/analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/.classpath
new file mode 100644 (file)
index 0000000..098194c
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+       <classpathentry kind="src" path="src"/>
+       <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/.project b/analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/.project
new file mode 100644 (file)
index 0000000..e27d0cb
--- /dev/null
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.eclipse.tracecompass.analysis.os.linux.core.tests</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.jdt.core.javabuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.PluginNature</nature>
+               <nature>org.eclipse.jdt.core.javanature</nature>
+               <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+       </natures>
+</projectDescription>
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/.settings/org.eclipse.core.resources.prefs b/analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/.settings/org.eclipse.core.resources.prefs
new file mode 100644 (file)
index 0000000..99f26c0
--- /dev/null
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/.settings/org.eclipse.core.runtime.prefs b/analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/.settings/org.eclipse.core.runtime.prefs
new file mode 100644 (file)
index 0000000..5a0ad22
--- /dev/null
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/.settings/org.eclipse.jdt.core.prefs b/analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100644 (file)
index 0000000..0409c61
--- /dev/null
@@ -0,0 +1,403 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.codeComplete.argumentPrefixes=
+org.eclipse.jdt.core.codeComplete.argumentSuffixes=
+org.eclipse.jdt.core.codeComplete.fieldPrefixes=f
+org.eclipse.jdt.core.codeComplete.fieldSuffixes=
+org.eclipse.jdt.core.codeComplete.localPrefixes=
+org.eclipse.jdt.core.codeComplete.localSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes=
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
+org.eclipse.jdt.core.compiler.problem.deadCode=error
+org.eclipse.jdt.core.compiler.problem.deprecation=error
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=error
+org.eclipse.jdt.core.compiler.problem.emptyStatement=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=error
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=error
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=error
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=error
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=error
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=enabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=error
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=error
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=error
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=error
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=error
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=error
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=error
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=error
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=error
+org.eclipse.jdt.core.compiler.problem.unusedLabel=error
+org.eclipse.jdt.core.compiler.problem.unusedLocal=error
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=error
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
+org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=0
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=250
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=space
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/.settings/org.eclipse.jdt.ui.prefs b/analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644 (file)
index 0000000..232a3fd
--- /dev/null
@@ -0,0 +1,60 @@
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_tmf-style
+formatter_settings_version=12
+org.eclipse.jdt.ui.exception.name=e
+org.eclipse.jdt.ui.gettersetter.use.is=true
+org.eclipse.jdt.ui.keywordthis=false
+org.eclipse.jdt.ui.overrideannotation=true
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=false
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=false
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=false
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=false
+sp_cleanup.remove_unnecessary_nls_tags=false
+sp_cleanup.remove_unused_imports=false
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_blocks=true
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/.settings/org.eclipse.pde.api.tools.prefs b/analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100644 (file)
index 0000000..acc3abd
--- /dev/null
@@ -0,0 +1,97 @@
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+API_USE_SCAN_FIELD_SEVERITY=Error
+API_USE_SCAN_METHOD_SEVERITY=Error
+API_USE_SCAN_TYPE_SEVERITY=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_JAVADOC_TAG=Warning
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Warning
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+MISSING_EE_DESCRIPTIONS=Ignore
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=false
+eclipse.preferences.version=1
+incompatible_api_component_version=Error
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Error
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/.settings/org.eclipse.pde.prefs b/analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/.settings/org.eclipse.pde.prefs
new file mode 100644 (file)
index 0000000..62cfa90
--- /dev/null
@@ -0,0 +1,32 @@
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
+compilers.incompatible-environment=1
+compilers.p.build=1
+compilers.p.build.bin.includes=1
+compilers.p.build.encodings=2
+compilers.p.build.java.compiler=2
+compilers.p.build.java.compliance=1
+compilers.p.build.missing.output=2
+compilers.p.build.output.library=1
+compilers.p.build.source.library=1
+compilers.p.build.src.includes=1
+compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.internal=1
+compilers.p.missing-packages=2
+compilers.p.missing-version-export-package=2
+compilers.p.missing-version-import-package=2
+compilers.p.missing-version-require-bundle=2
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=2
+compilers.p.unknown-attribute=1
+compilers.p.unknown-class=1
+compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=1
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+eclipse.preferences.version=1
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/META-INF/MANIFEST.MF b/analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..a55e8d7
--- /dev/null
@@ -0,0 +1,22 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-Vendor: %Bundle-Vendor
+Bundle-Version: 1.0.0.qualifier
+Bundle-Localization: plugin
+Bundle-SymbolicName: org.eclipse.tracecompass.analysis.os.linux.core.tests;singleton:=true
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Require-Bundle: org.junit;bundle-version="4.0.0",
+ org.eclipse.core.runtime,
+ org.eclipse.tracecompass.common.core,
+ org.eclipse.tracecompass.analysis.os.linux.core,
+ org.eclipse.tracecompass.tmf.core,
+ org.eclipse.tracecompass.tmf.core.tests,
+ org.eclipse.tracecompass.tmf.ctf.core,
+ org.eclipse.tracecompass.tmf.ctf.core.tests,
+ org.eclipse.core.resources
+Import-Package: com.google.common.collect
+Export-Package: org.eclipse.tracecompass.analysis.os.linux.core.tests,
+ org.eclipse.tracecompass.analysis.os.linux.core.tests.cpuusage
+Bundle-Activator: org.eclipse.tracecompass.analysis.os.linux.core.tests.Activator
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/about.html b/analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/about.html
new file mode 100644 (file)
index 0000000..c258ef5
--- /dev/null
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+<p>June 5, 2006</p>    
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;).  Unless otherwise 
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;).  A copy of the EPL is available 
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is 
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content.  Check the Redistributor's license that was 
+provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/build.properties b/analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/build.properties
new file mode 100644 (file)
index 0000000..0f70a06
--- /dev/null
@@ -0,0 +1,22 @@
+###############################################################################
+# Copyright (c) 2015 Ericsson
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     Ericsson - Initial API and implementation
+###############################################################################
+
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               plugin.properties,\
+               plugin.xml,\
+               about.html
+src.includes = about.html
+additional.bundles = org.eclipse.jdt.annotation
+jars.extra.classpath = platform:/plugin/org.eclipse.jdt.annotation
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/plugin.properties b/analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/plugin.properties
new file mode 100644 (file)
index 0000000..2e4b796
--- /dev/null
@@ -0,0 +1,14 @@
+###############################################################################
+# Copyright (c) 2015 Ericsson
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     Ericsson - Initial API and implementation
+###############################################################################
+
+Bundle-Vendor = Eclipse Trace Compass
+Bundle-Name = Trace Compass Linux Kernel Analysis Core Tests Plug-in
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/plugin.xml b/analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/plugin.xml
new file mode 100644 (file)
index 0000000..162b33f
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+   <extension
+         point="org.eclipse.linuxtools.tmf.core.analysis">
+      <module
+            analysis_module="org.eclipse.tracecompass.analysis.os.linux.core.cpuusage.KernelCpuUsageAnalysis"
+            automatic="false"
+            id="org.eclipse.tracecompass.analysis.os.linux.cpuusage"
+            name="CPU Usage Test Analysis">
+         <tracetype
+               applies="true"
+               class="org.eclipse.tracecompass.tmf.tests.stubs.trace.xml.TmfXmlTraceStub">
+         </tracetype>
+      </module>
+      <module
+            analysis_module="org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelAnalysisModule"
+            automatic="false"
+            id="org.eclipse.tracecompass.analysis.os.linux.kernel"
+            name="Linux Kernel Test Analysis">
+         <tracetype
+               applies="true"
+               class="org.eclipse.tracecompass.tmf.tests.stubs.trace.xml.TmfXmlTraceStub">
+         </tracetype>
+      </module>
+   </extension>
+
+</plugin>
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/pom.xml b/analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/pom.xml
new file mode 100644 (file)
index 0000000..f4044ef
--- /dev/null
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+   Copyright (C) 2011, Red Hat, Inc.
+
+   All rights reserved. This program and the accompanying materials
+   are made available under the terms of the Eclipse Public License v1.0
+   which accompanies this distribution, and is available at
+   http://www.eclipse.org/legal/epl-v10.html
+-->
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <artifactId>org.eclipse.tracecompass.analysis-parent</artifactId>
+    <groupId>org.eclipse.tracecompass</groupId>
+    <version>1.0.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>org.eclipse.tracecompass.analysis.os.linux.core.tests</artifactId>
+  <groupId>org.eclipse.tracecompass</groupId>
+  <version>1.0.0-SNAPSHOT</version>
+  <packaging>eclipse-test-plugin</packaging>
+
+  <name>Trace Compass Linux Kernel Analysis Core Tests Plug-in</name>
+
+  <build>
+    <plugins>
+        <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-antrun-plugin</artifactId>
+            <version>1.8</version>
+            <executions>
+                <execution>
+                    <id>prepare</id>
+                    <phase>validate</phase>
+                    <configuration>
+                    <target>
+                        <echo message="prepare phase" />
+                    </target>
+                    </configuration>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                </execution>
+            </executions>
+        </plugin>
+        <plugin>
+            <groupId>org.eclipse.tycho</groupId>
+            <artifactId>tycho-surefire-plugin</artifactId>
+            <version>${tycho-version}</version>
+            <configuration>
+                <includes>
+                    <include>**/AllTests.*</include>
+                </includes>
+                <useUIHarness>false</useUIHarness>
+                <useUIThread>false</useUIThread>
+                <product>org.eclipse.platform.ide</product>
+            </configuration>
+        </plugin>
+    </plugins>
+  </build>
+
+</project>
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/Activator.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/Activator.java
new file mode 100644 (file)
index 0000000..46eba8a
--- /dev/null
@@ -0,0 +1,106 @@
+/*******************************************************************************
+ * Copyright (c) 2014, 2015 Ã‰cole Polytechnique de Montréal
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Geneviève Bastien - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.analysis.os.linux.core.tests;
+
+import java.io.IOException;
+import java.net.URL;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Plugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * Activator for this plugin
+ *
+ * @author Geneviève Bastien
+ */
+public class Activator extends Plugin {
+    // ------------------------------------------------------------------------
+    // Attributes
+    // ------------------------------------------------------------------------
+
+    /**
+     * The plug-in ID
+     */
+    public static final String PLUGIN_ID = "org.eclipse.tracecompass.analysis.linux.core.tests"; //$NON-NLS-1$
+
+    /**
+     * The shared instance
+     */
+    private static Activator PLUGIN;
+
+    // ------------------------------------------------------------------------
+    // Constructors
+    // ------------------------------------------------------------------------
+
+    /**
+     * The constructor
+     */
+    public Activator() {
+    }
+
+    // ------------------------------------------------------------------------
+    // Accessors
+    // ------------------------------------------------------------------------
+
+    /**
+     * Returns the shared instance
+     *
+     * @return the shared instance
+     */
+    public static Activator getDefault() {
+        return PLUGIN;
+    }
+
+    // ------------------------------------------------------------------------
+    // Operators
+    // ------------------------------------------------------------------------
+
+    @Override
+    public void start(BundleContext context) throws Exception {
+        super.start(context);
+        PLUGIN = this;
+    }
+
+    @Override
+    public void stop(BundleContext context) throws Exception {
+        PLUGIN = null;
+        super.stop(context);
+    }
+
+    /**
+     * Return a path to a file relative to this plugin's base directory
+     *
+     * @param relativePath
+     *            The path relative to the plugin's root directory
+     * @return The path corresponding to the relative path in parameter
+     */
+    public static IPath getAbsoluteFilePath(String relativePath) {
+        Activator plugin = Activator.getDefault();
+        if (plugin == null) {
+            /*
+             * Shouldn't happen but at least throw something to get the test to
+             * fail early
+             */
+            throw new IllegalStateException();
+        }
+        URL location = FileLocator.find(plugin.getBundle(), new Path(relativePath), null);
+        try {
+            return new Path(FileLocator.toFileURL(location).getPath());
+        } catch (IOException e) {
+            throw new IllegalStateException();
+        }
+    }
+}
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/AllTests.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/AllTests.java
new file mode 100644 (file)
index 0000000..9d353ae
--- /dev/null
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2012, 2015 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Francois Chouinard - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.analysis.os.linux.core.tests;
+
+import org.eclipse.tracecompass.tmf.core.tests.shared.DebugSuite;
+import org.junit.runner.RunWith;
+
+/**
+ * Runner for the unit tests of this plugin
+ */
+@RunWith(DebugSuite.class)
+@DebugSuite.SuiteClasses({
+    org.eclipse.tracecompass.analysis.os.linux.core.tests.cpuusage.AllTests.class,
+    org.eclipse.tracecompass.analysis.os.linux.core.tests.kernelanalysis.AllTests.class
+})
+public class AllTests {
+
+}
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/cpuusage/AllTests.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/cpuusage/AllTests.java
new file mode 100644 (file)
index 0000000..3f74b64
--- /dev/null
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2014, 2015 Ã‰cole Polytechnique de Montréal
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Geneviève Bastien - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.analysis.os.linux.core.tests.cpuusage;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+/**
+ * Test suite for the CPU usage package
+ */
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+    CpuUsageStateProviderTest.class
+})
+public class AllTests {
+
+}
\ No newline at end of file
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/cpuusage/CpuUsageStateProviderTest.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/cpuusage/CpuUsageStateProviderTest.java
new file mode 100644 (file)
index 0000000..51b4b70
--- /dev/null
@@ -0,0 +1,272 @@
+/*******************************************************************************
+ * Copyright (c) 2014, 2015 Ã‰cole Polytechnique de Montréal
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Geneviève Bastien - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.analysis.os.linux.core.tests.cpuusage;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.io.File;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.tracecompass.analysis.os.linux.core.cpuusage.KernelCpuUsageAnalysis;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.Attributes;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelAnalysisModule;
+import org.eclipse.tracecompass.analysis.os.linux.core.tests.Activator;
+import org.eclipse.tracecompass.statesystem.core.ITmfStateSystem;
+import org.eclipse.tracecompass.statesystem.core.exceptions.AttributeNotFoundException;
+import org.eclipse.tracecompass.statesystem.core.exceptions.StateSystemDisposedException;
+import org.eclipse.tracecompass.statesystem.core.interval.ITmfStateInterval;
+import org.eclipse.tracecompass.tmf.core.analysis.IAnalysisModule;
+import org.eclipse.tracecompass.tmf.core.event.TmfEvent;
+import org.eclipse.tracecompass.tmf.core.exceptions.TmfTraceException;
+import org.eclipse.tracecompass.tmf.core.signal.TmfTraceOpenedSignal;
+import org.eclipse.tracecompass.tmf.core.tests.shared.TmfTestHelper;
+import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
+import org.eclipse.tracecompass.tmf.core.trace.TmfTrace;
+import org.eclipse.tracecompass.tmf.core.trace.TmfTraceManager;
+import org.eclipse.tracecompass.tmf.core.trace.TmfTraceUtils;
+import org.eclipse.tracecompass.tmf.tests.stubs.trace.xml.TmfXmlTraceStub;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Test suite for the {@link KernelCpuUsageAnalysis} class
+ *
+ * @author Geneviève Bastien
+ */
+public class CpuUsageStateProviderTest {
+
+    private static final String CPU_USAGE_FILE = "testfiles/cpu_analysis.xml";
+
+    private ITmfTrace fTrace;
+    private KernelCpuUsageAnalysis fModule;
+
+    private static void deleteSuppFiles(ITmfTrace trace) {
+        /* Remove supplementary files */
+        File suppDir = new File(TmfTraceManager.getSupplementaryFileDir(trace));
+        for (File file : suppDir.listFiles()) {
+            file.delete();
+        }
+    }
+
+    /**
+     * Setup the trace for the tests
+     */
+    @Before
+    public void setUp() {
+        ITmfTrace trace = new TmfXmlTraceStub();
+        IPath filePath = Activator.getAbsoluteFilePath(CPU_USAGE_FILE);
+        IStatus status = trace.validate(null, filePath.toOSString());
+        if (!status.isOK()) {
+            fail(status.getException().getMessage());
+        }
+        try {
+            trace.initTrace(null, filePath.toOSString(), TmfEvent.class);
+        } catch (TmfTraceException e) {
+            fail(e.getMessage());
+        }
+        deleteSuppFiles(trace);
+        ((TmfTrace) trace).traceOpened(new TmfTraceOpenedSignal(this, trace, null));
+        /*
+         * FIXME: Make sure this analysis is finished before running the CPU
+         * analysis. This block can be removed once analysis dependency and
+         * request precedence is implemented
+         */
+        IAnalysisModule module = null;
+        for (IAnalysisModule mod : TmfTraceUtils.getAnalysisModulesOfClass(trace, KernelAnalysisModule.class)) {
+            module = mod;
+        }
+        assertNotNull(module);
+        module.schedule();
+        module.waitForCompletion();
+        /* End of the FIXME block */
+
+        fModule = TmfTraceUtils.getAnalysisModuleOfClass(trace, KernelCpuUsageAnalysis.class, KernelCpuUsageAnalysis.ID);
+        assertNotNull(fModule);
+        fTrace = trace;
+    }
+
+    /**
+     * Clean up
+     */
+    @After
+    public void tearDown() {
+        deleteSuppFiles(fTrace);
+        fTrace.dispose();
+    }
+
+    /**
+     * Test that the analysis executes without problems
+     */
+    @Test
+    public void testAnalysisExecution() {
+        /* Make sure the analysis hasn't run yet */
+        assertNull(fModule.getStateSystem());
+
+        /* Execute the analysis */
+        assertTrue(TmfTestHelper.executeAnalysis(fModule));
+        assertNotNull(fModule.getStateSystem());
+    }
+
+    /**
+     * Test that the state system is returned with the expected results
+     */
+    @Test
+    public void testReturnedStateSystem() {
+        fModule.schedule();
+        fModule.waitForCompletion();
+        ITmfStateSystem ss = fModule.getStateSystem();
+        assertNotNull(ss);
+        assertEquals(1L, ss.getStartTime());
+        assertEquals(25L, ss.getCurrentEndTime());
+
+        try {
+            int cpusQuark = ss.getQuarkAbsolute(Attributes.CPUS);
+
+            /*
+             * There should be 2 CPU entries: 0 and 1 and 3 process entries
+             * under each
+             */
+            List<Integer> cpuQuarks = ss.getSubAttributes(cpusQuark, false);
+            assertEquals(2, cpuQuarks.size());
+            for (Integer cpuQuark : cpuQuarks) {
+                assertEquals(3, ss.getSubAttributes(cpuQuark, false).size());
+            }
+
+            /* Proc 2 on CPU 0 should run from 1 to 20 seconds */
+            int proc2Quark = ss.getQuarkAbsolute(Attributes.CPUS, "0", "2");
+            ITmfStateInterval interval = ss.querySingleState(2L, proc2Quark);
+            assertEquals(1L, interval.getStartTime());
+            assertEquals(19L, interval.getEndTime());
+
+            /*
+             * Query at the end and make sure all processes on all CPU have the
+             * expected values
+             */
+            List<ITmfStateInterval> state = ss.queryFullState(25L);
+
+            int quark = ss.getQuarkAbsolute("CPUs", "0", "1");
+            assertEquals(0L, state.get(quark).getStateValue().unboxLong());
+
+            quark = ss.getQuarkAbsolute("CPUs", "0", "2");
+            assertEquals(19L, state.get(quark).getStateValue().unboxLong());
+
+            quark = ss.getQuarkAbsolute("CPUs", "0", "3");
+            assertEquals(5L, state.get(quark).getStateValue().unboxLong());
+
+            quark = ss.getQuarkAbsolute("CPUs", "1", "1");
+            assertEquals(5L, state.get(quark).getStateValue().unboxLong());
+
+            quark = ss.getQuarkAbsolute("CPUs", "1", "3");
+            assertEquals(6L, state.get(quark).getStateValue().unboxLong());
+
+            quark = ss.getQuarkAbsolute("CPUs", "1", "4");
+            assertEquals(8L, state.get(quark).getStateValue().unboxLong());
+
+        } catch (AttributeNotFoundException | StateSystemDisposedException e) {
+            fail(e.getMessage());
+        }
+    }
+
+    /**
+     * Test the
+     * {@link KernelCpuUsageAnalysis#getCpuUsageInRange(long, long)}
+     * method.
+     */
+    @Test
+    public void testUsageInRange() {
+        fModule.schedule();
+        fModule.waitForCompletion();
+
+        /* This range should query the total range */
+        Map<String, Long> expected = new HashMap<>();
+        expected.put("0/1", 0L);
+        expected.put("0/2", 19L);
+        expected.put("0/3", 5L);
+        expected.put("1/1", 5L);
+        expected.put("1/3", 6L);
+        expected.put("1/4", 13L);
+        expected.put("total", 48L);
+        expected.put("total/1", 5L);
+        expected.put("total/2", 19L);
+        expected.put("total/3", 11L);
+        expected.put("total/4", 13L);
+        expected.put("0", 24L);
+        expected.put("1", 24L);
+        Map<String, Long> resultMap = fModule.getCpuUsageInRange(0L, 30L);
+        assertEquals(expected, resultMap);
+
+        /* Verify a range when a process runs at the start */
+        expected.clear();
+        expected.put("0/1", 0L);
+        expected.put("0/2", 0L);
+        expected.put("0/3", 3L);
+        expected.put("1/1", 0L);
+        expected.put("1/3", 0L);
+        expected.put("1/4", 3L);
+        expected.put("total", 6L);
+        expected.put("total/1", 0L);
+        expected.put("total/2", 0L);
+        expected.put("total/3", 3L);
+        expected.put("total/4", 3L);
+        expected.put("0", 3L);
+        expected.put("1", 3L);
+        resultMap = fModule.getCpuUsageInRange(22L, 25L);
+        assertEquals(expected, resultMap);
+
+        /* Verify a range when a process runs at the end */
+        expected.clear();
+        expected.put("0/1", 0L);
+        expected.put("0/2", 3L);
+        expected.put("0/3", 0L);
+        expected.put("1/1", 0L);
+        expected.put("1/3", 1L);
+        expected.put("1/4", 2L);
+        expected.put("total", 6L);
+        expected.put("total/1", 0L);
+        expected.put("total/2", 3L);
+        expected.put("total/3", 1L);
+        expected.put("total/4", 2L);
+        expected.put("0", 3L);
+        expected.put("1", 3L);
+        resultMap = fModule.getCpuUsageInRange(1L, 4L);
+        assertEquals(expected, resultMap);
+
+        /* Verify a range when a process runs at start and at the end */
+        expected.clear();
+        expected.put("0/1", 0L);
+        expected.put("0/2", 9L);
+        expected.put("0/3", 0L);
+        expected.put("1/1", 0L);
+        expected.put("1/3", 5L);
+        expected.put("1/4", 4L);
+        expected.put("total", 18L);
+        expected.put("total/1", 0L);
+        expected.put("total/2", 9L);
+        expected.put("total/3", 5L);
+        expected.put("total/4", 4L);
+        expected.put("0", 9L);
+        expected.put("1", 9L);
+        resultMap = fModule.getCpuUsageInRange(4L, 13L);
+        assertEquals(expected, resultMap);
+
+    }
+}
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/kernelanalysis/AllTests.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/kernelanalysis/AllTests.java
new file mode 100644 (file)
index 0000000..781e2f3
--- /dev/null
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2015 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Alexandre Montplaisir - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.analysis.os.linux.core.tests.kernelanalysis;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+/**
+ * Test suite
+ */
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+        KernelStateProviderTest.class,
+        KernelThreadInformationProviderTest.class,
+        KernelTidAspectTest.class
+})
+public class AllTests {
+
+}
\ No newline at end of file
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/kernelanalysis/KernelStateProviderTest.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/kernelanalysis/KernelStateProviderTest.java
new file mode 100644 (file)
index 0000000..4f53a3d
--- /dev/null
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2012, 2015 Ericsson
+ * Copyright (c) 2010, 2011 Ã‰cole Polytechnique de Montréal
+ * Copyright (c) 2010, 2011 Alexandre Montplaisir <alexandre.montplaisir@gmail.com>
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.analysis.os.linux.core.tests.kernelanalysis;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assume.assumeTrue;
+
+import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelAnalysisEventLayout;
+import org.eclipse.tracecompass.internal.analysis.os.linux.core.kernelanalysis.KernelStateProvider;
+import org.eclipse.tracecompass.tmf.core.statesystem.ITmfStateProvider;
+import org.eclipse.tracecompass.tmf.ctf.core.tests.shared.CtfTmfTestTrace;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * Tests for the {@link KernelStateProvider}
+ *
+ * @author Alexandre Montplaisir
+ */
+public class KernelStateProviderTest {
+
+    private static final CtfTmfTestTrace testTrace = CtfTmfTestTrace.TRACE2;
+
+    private static ITmfStateProvider input;
+
+    /**
+     * Set-up.
+     */
+    @BeforeClass
+    public static void initialize() {
+        assumeTrue(testTrace.exists());
+        input = new KernelStateProvider(testTrace.getTrace(), IKernelAnalysisEventLayout.DEFAULT_LAYOUT);
+    }
+
+    /**
+     * Test loading the state provider.
+     */
+    @Test
+    public void testOpening() {
+        long testStartTime;
+        testStartTime = input.getStartTime();
+        /* Expected start time of "trace2" */
+        assertEquals(testStartTime, 1331668247314038062L);
+    }
+
+}
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/kernelanalysis/KernelThreadInformationProviderTest.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/kernelanalysis/KernelThreadInformationProviderTest.java
new file mode 100644 (file)
index 0000000..987d5fc
--- /dev/null
@@ -0,0 +1,311 @@
+/*******************************************************************************
+ * Copyright (c) 2014, 2015 Ã‰cole Polytechnique de Montréal
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Geneviève Bastien - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.analysis.os.linux.core.tests.kernelanalysis;
+
+import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.io.File;
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelAnalysisModule;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelThreadInformationProvider;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.StateValues;
+import org.eclipse.tracecompass.analysis.os.linux.core.tests.Activator;
+import org.eclipse.tracecompass.statesystem.core.interval.ITmfStateInterval;
+import org.eclipse.tracecompass.statesystem.core.statevalue.ITmfStateValue;
+import org.eclipse.tracecompass.statesystem.core.statevalue.TmfStateValue;
+import org.eclipse.tracecompass.tmf.core.analysis.IAnalysisModule;
+import org.eclipse.tracecompass.tmf.core.event.TmfEvent;
+import org.eclipse.tracecompass.tmf.core.exceptions.TmfTraceException;
+import org.eclipse.tracecompass.tmf.core.signal.TmfTraceOpenedSignal;
+import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
+import org.eclipse.tracecompass.tmf.core.trace.TmfTrace;
+import org.eclipse.tracecompass.tmf.core.trace.TmfTraceManager;
+import org.eclipse.tracecompass.tmf.core.trace.TmfTraceUtils;
+import org.eclipse.tracecompass.tmf.tests.stubs.trace.xml.TmfXmlTraceStub;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Test analysis-specific methods for the {@link KernelAnalysisModule} class.
+ *
+ * @author Geneviève Bastien
+ */
+public class KernelThreadInformationProviderTest {
+
+    private static final @NonNull String LTTNG_KERNEL_FILE = "testfiles/lttng_kernel_analysis.xml";
+
+    private ITmfTrace fTrace;
+    private KernelAnalysisModule fModule;
+
+    private static void deleteSuppFiles(ITmfTrace trace) {
+        /* Remove supplementary files */
+        File suppDir = new File(TmfTraceManager.getSupplementaryFileDir(trace));
+        for (File file : suppDir.listFiles()) {
+            file.delete();
+        }
+    }
+
+    /**
+     * Setup the trace for the tests
+     */
+    @Before
+    public void setUp() {
+        ITmfTrace trace = new TmfXmlTraceStub();
+        IPath filePath = Activator.getAbsoluteFilePath(LTTNG_KERNEL_FILE);
+        IStatus status = trace.validate(null, filePath.toOSString());
+        if (!status.isOK()) {
+            fail(status.getException().getMessage());
+        }
+        try {
+            trace.initTrace(null, filePath.toOSString(), TmfEvent.class);
+        } catch (TmfTraceException e) {
+            fail(e.getMessage());
+        }
+        deleteSuppFiles(trace);
+        ((TmfTrace) trace).traceOpened(new TmfTraceOpenedSignal(this, trace, null));
+        IAnalysisModule module = null;
+        for (IAnalysisModule mod : TmfTraceUtils.getAnalysisModulesOfClass(trace, KernelAnalysisModule.class)) {
+            module = mod;
+        }
+        assertNotNull(module);
+        module.schedule();
+        module.waitForCompletion();
+        fModule = TmfTraceUtils.getAnalysisModuleOfClass(trace, KernelAnalysisModule.class, KernelAnalysisModule.ID);
+        fTrace = trace;
+    }
+
+    /**
+     * Clean up
+     */
+    @After
+    public void tearDown() {
+        deleteSuppFiles(fTrace);
+        fTrace.dispose();
+    }
+
+    /**
+     * Test the
+     * {@link KernelThreadInformationProvider#getThreadIds(KernelAnalysisModule)}
+     * method
+     */
+    @Test
+    public void testGetThreadQuarks() {
+        KernelAnalysisModule module = checkNotNull(fModule);
+        Collection<Integer> threadIds = KernelThreadInformationProvider.getThreadIds(module);
+        assertEquals(7, threadIds.size());
+    }
+
+    /**
+     * Test the
+     * {@link KernelThreadInformationProvider#getThreadOnCpu(KernelAnalysisModule, long, long)}
+     * method
+     */
+    @Test
+    public void testGetThreadOnCpu() {
+        KernelAnalysisModule module = checkNotNull(fModule);
+
+        /* Check with invalid timestamps */
+        Integer tid = KernelThreadInformationProvider.getThreadOnCpu(module, 0, -1);
+        assertNull(tid);
+
+        tid = KernelThreadInformationProvider.getThreadOnCpu(module, 0, 80);
+        assertNull(tid);
+
+        /* Check with invalid cpus */
+        tid = KernelThreadInformationProvider.getThreadOnCpu(module, 2, 20);
+        assertNull(tid);
+
+        tid = KernelThreadInformationProvider.getThreadOnCpu(module, -1, 20);
+        assertNull(tid);
+
+        /* Check valid values */
+        tid = KernelThreadInformationProvider.getThreadOnCpu(module, 0, 4);
+        assertNull(tid);
+
+        tid = KernelThreadInformationProvider.getThreadOnCpu(module, 0, 15);
+        assertNull(tid);
+
+        tid = KernelThreadInformationProvider.getThreadOnCpu(module, 1, 15);
+        assertEquals(Integer.valueOf(11), tid);
+
+        tid = KernelThreadInformationProvider.getThreadOnCpu(module, 1, 29);
+        assertEquals(Integer.valueOf(20), tid);
+
+        tid = KernelThreadInformationProvider.getThreadOnCpu(module, 1, 30);
+        assertEquals(Integer.valueOf(21), tid);
+
+        tid = KernelThreadInformationProvider.getThreadOnCpu(module, 0, 59);
+        assertEquals(Integer.valueOf(11), tid);
+
+        tid = KernelThreadInformationProvider.getThreadOnCpu(module, 1, 59);
+        assertEquals(Integer.valueOf(30), tid);
+
+        tid = KernelThreadInformationProvider.getThreadOnCpu(module, 0, 60);
+        assertEquals(Integer.valueOf(11), tid);
+
+        tid = KernelThreadInformationProvider.getThreadOnCpu(module, 1, 60);
+        assertEquals(Integer.valueOf(21), tid);
+
+    }
+
+    /**
+     * Test the
+     * {@link KernelThreadInformationProvider#getParentPid(KernelAnalysisModule, Integer, long)}
+     * method
+     */
+    @Test
+    public void testGetPpid() {
+        KernelAnalysisModule module = checkNotNull(fModule);
+
+        /* Check with invalid timestamps */
+        Integer ppid = KernelThreadInformationProvider.getParentPid(module, 11, -1);
+        assertNull(ppid);
+
+        ppid = KernelThreadInformationProvider.getParentPid(module, 11, 80);
+        assertNull(ppid);
+
+        /* Check with invalid cpus */
+        ppid = KernelThreadInformationProvider.getParentPid(module, -4, 20);
+        assertNull(ppid);
+
+        ppid = KernelThreadInformationProvider.getParentPid(module, 12, 20);
+        assertNull(ppid);
+
+        /* Check values with no parent */
+        ppid = KernelThreadInformationProvider.getParentPid(module, 10, 20);
+        assertEquals(Integer.valueOf(0), ppid);
+
+        ppid = KernelThreadInformationProvider.getParentPid(module, 30, 60);
+        assertEquals(Integer.valueOf(0), ppid);
+
+        /* Check parent determined at statedump */
+        ppid = KernelThreadInformationProvider.getParentPid(module, 11, 4);
+        assertNull(ppid);
+
+        ppid = KernelThreadInformationProvider.getParentPid(module, 11, 5);
+        assertEquals(Integer.valueOf(10), ppid);
+
+        /* Check parent after process fork */
+        ppid = KernelThreadInformationProvider.getParentPid(module, 21, 25);
+        assertEquals(Integer.valueOf(20), ppid);
+
+        ppid = KernelThreadInformationProvider.getParentPid(module, 21, 70);
+        assertEquals(Integer.valueOf(20), ppid);
+
+    }
+
+    /**
+     * Test the {@link KernelThreadInformationProvider#getExecutableName(KernelAnalysisModule, Integer)} method
+     */
+    @Test
+    public void testGetExecutableName() {
+        KernelAnalysisModule module = checkNotNull(fModule);
+
+        /* Check with invalid threads */
+        String execName = KernelThreadInformationProvider.getExecutableName(module, 101);
+        assertNull(execName);
+
+        execName = KernelThreadInformationProvider.getExecutableName(module, -2);
+        assertNull(execName);
+
+        /* Check valid value */
+        execName = KernelThreadInformationProvider.getExecutableName(module, 20);
+        assertEquals("proc20", execName);
+
+        /* Check valid value with process name change in history */
+        execName = KernelThreadInformationProvider.getExecutableName(module, 21);
+        assertEquals("proc21", execName);
+
+    }
+
+    private static void testIntervals(String info, List<ITmfStateInterval> intervals, ITmfStateValue[] values) {
+        assertEquals(info + " interval count", values.length, intervals.size());
+        for (int i = 0; i < values.length; i++) {
+            assertEquals(info + " interval " + i, values[i], intervals.get(i).getStateValue());
+        }
+    }
+
+    /**
+     * Test the
+     * {@link KernelThreadInformationProvider#getStatusIntervalsForThread(KernelAnalysisModule, Integer, long, long, long, IProgressMonitor)}
+     * method
+     */
+    @Test
+    public void testGetStatusIntervalsForThread() {
+        KernelAnalysisModule module = checkNotNull(fModule);
+
+        IProgressMonitor monitor = new NullProgressMonitor();
+        Integer process21 = 21;
+        Integer process20 = 20;
+
+        /* Check invalid time ranges */
+        List<ITmfStateInterval> intervals = KernelThreadInformationProvider.getStatusIntervalsForThread(module, process21, -15, -5, 3, monitor);
+        assertTrue(intervals.isEmpty());
+
+        intervals = KernelThreadInformationProvider.getStatusIntervalsForThread(module, process21, 80, 1500000000L, 50, monitor);
+        assertTrue(intervals.isEmpty());
+
+        /* Check invalid quarks */
+        intervals = KernelThreadInformationProvider.getStatusIntervalsForThread(module, -1, 0, 70L, 3, monitor);
+        assertTrue(intervals.isEmpty());
+
+        intervals = KernelThreadInformationProvider.getStatusIntervalsForThread(module, 0, 0, 70L, 3, monitor);
+        assertTrue(intervals.isEmpty());
+
+        /* Check different time ranges and resolutions */
+        ITmfStateValue[] values = { TmfStateValue.nullValue(), StateValues.PROCESS_STATUS_WAIT_FOR_CPU_VALUE,
+                StateValues.PROCESS_STATUS_RUN_SYSCALL_VALUE, StateValues.PROCESS_STATUS_WAIT_FOR_CPU_VALUE,
+                StateValues.PROCESS_STATUS_RUN_SYSCALL_VALUE };
+        intervals = KernelThreadInformationProvider.getStatusIntervalsForThread(module, process21, 0, 70L, 3, monitor);
+        testIntervals("tid 21 [0,70,3]", intervals, values);
+
+        ITmfStateValue[] values2 = { TmfStateValue.nullValue(), StateValues.PROCESS_STATUS_RUN_SYSCALL_VALUE,
+                StateValues.PROCESS_STATUS_RUN_SYSCALL_VALUE };
+        intervals = KernelThreadInformationProvider.getStatusIntervalsForThread(module, process21, 1, 70L, 30, monitor);
+        testIntervals("tid 21 [0,70,30]", intervals, values2);
+
+        ITmfStateValue[] values3 = { StateValues.PROCESS_STATUS_WAIT_FOR_CPU_VALUE,
+                StateValues.PROCESS_STATUS_RUN_SYSCALL_VALUE };
+        intervals = KernelThreadInformationProvider.getStatusIntervalsForThread(module, process21, 25, 50L, 3, monitor);
+        testIntervals("tid 21 [25,50,3]", intervals, values3);
+
+        ITmfStateValue[] values4 = { TmfStateValue.nullValue(), StateValues.PROCESS_STATUS_WAIT_UNKNOWN_VALUE,
+                StateValues.PROCESS_STATUS_RUN_USERMODE_VALUE, StateValues.PROCESS_STATUS_WAIT_FOR_CPU_VALUE };
+        intervals = KernelThreadInformationProvider.getStatusIntervalsForThread(module, process20, 0, 70L, 3, monitor);
+        testIntervals("tid 20 [0,70,3]", intervals, values4);
+
+        ITmfStateValue[] values5 = { TmfStateValue.nullValue(), StateValues.PROCESS_STATUS_WAIT_FOR_CPU_VALUE };
+        intervals = KernelThreadInformationProvider.getStatusIntervalsForThread(module, process20, 1, 70L, 30, monitor);
+        testIntervals("tid 20 [0,70,30]", intervals, values5);
+
+        ITmfStateValue[] values6 = { StateValues.PROCESS_STATUS_RUN_USERMODE_VALUE,
+                StateValues.PROCESS_STATUS_WAIT_FOR_CPU_VALUE };
+        intervals = KernelThreadInformationProvider.getStatusIntervalsForThread(module, process20, 25, 50L, 3, monitor);
+        testIntervals("tid 20 [25,50,3]", intervals, values6);
+
+    }
+
+}
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/kernelanalysis/KernelTidAspectTest.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/kernelanalysis/KernelTidAspectTest.java
new file mode 100644 (file)
index 0000000..9617287
--- /dev/null
@@ -0,0 +1,161 @@
+/*******************************************************************************
+ * Copyright (c) 2015 Ã‰cole Polytechnique de Montréal
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Geneviève Bastien - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.analysis.os.linux.core.tests.kernelanalysis;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.fail;
+
+import java.io.File;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelAnalysisModule;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.ThreadPriorityAspect;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelTidAspect;
+import org.eclipse.tracecompass.analysis.os.linux.core.tests.Activator;
+import org.eclipse.tracecompass.common.core.NonNullUtils;
+import org.eclipse.tracecompass.tmf.core.analysis.IAnalysisModule;
+import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
+import org.eclipse.tracecompass.tmf.core.event.TmfEvent;
+import org.eclipse.tracecompass.tmf.core.event.aspect.ITmfEventAspect;
+import org.eclipse.tracecompass.tmf.core.exceptions.TmfTraceException;
+import org.eclipse.tracecompass.tmf.core.signal.TmfTraceOpenedSignal;
+import org.eclipse.tracecompass.tmf.core.trace.ITmfContext;
+import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
+import org.eclipse.tracecompass.tmf.core.trace.TmfTrace;
+import org.eclipse.tracecompass.tmf.core.trace.TmfTraceManager;
+import org.eclipse.tracecompass.tmf.core.trace.TmfTraceUtils;
+import org.eclipse.tracecompass.tmf.tests.stubs.trace.xml.TmfXmlTraceStub;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import com.google.common.collect.ImmutableSet;
+
+/**
+ * Test the {@link KernelTidAspect} class
+ *
+ * @author Geneviève Bastien
+ */
+public class KernelTidAspectTest {
+
+    private static final @NonNull String LTTNG_KERNEL_FILE = "testfiles/lttng_kernel_analysis.xml";
+
+    // ------------------------------------------------------------------------
+    // Test trace class definition
+    // ------------------------------------------------------------------------
+
+    private static class TmfXmlTraceStubWithTidAspects extends TmfXmlTraceStub {
+
+        public TmfXmlTraceStubWithTidAspects() {
+            super();
+        }
+
+        @Override
+        public Iterable<ITmfEventAspect> getEventAspects() {
+            ImmutableSet.Builder<ITmfEventAspect> builder = ImmutableSet.builder();
+            builder.addAll(super.getEventAspects());
+            builder.add(KernelTidAspect.INSTANCE);
+            builder.add(ThreadPriorityAspect.INSTANCE);
+            return NonNullUtils.checkNotNull(builder.build());
+        }
+
+    }
+
+    private ITmfTrace fTrace;
+
+    private static void deleteSuppFiles(ITmfTrace trace) {
+        /* Remove supplementary files */
+        File suppDir = new File(TmfTraceManager.getSupplementaryFileDir(trace));
+        for (File file : suppDir.listFiles()) {
+            file.delete();
+        }
+    }
+
+    /**
+     * Test setup
+     */
+    @Before
+    public void setUp() {
+        ITmfTrace trace = new TmfXmlTraceStubWithTidAspects();
+        IPath filePath = Activator.getAbsoluteFilePath(LTTNG_KERNEL_FILE);
+        IStatus status = trace.validate(null, filePath.toOSString());
+        if (!status.isOK()) {
+            fail(status.getException().getMessage());
+        }
+        try {
+            trace.initTrace(null, filePath.toOSString(), TmfEvent.class);
+        } catch (TmfTraceException e) {
+            fail(e.getMessage());
+        }
+        deleteSuppFiles(trace);
+        /* Make sure the Kernel analysis has run */
+        ((TmfTrace) trace).traceOpened(new TmfTraceOpenedSignal(this, trace, null));
+        IAnalysisModule module = null;
+        for (IAnalysisModule mod : TmfTraceUtils.getAnalysisModulesOfClass(trace, KernelAnalysisModule.class)) {
+            module = mod;
+        }
+        assertNotNull(module);
+        module.schedule();
+        module.waitForCompletion();
+        fTrace = trace;
+    }
+
+    /**
+     * Test clean up
+     */
+    @After
+    public void tearDown() {
+        fTrace.dispose();
+    }
+
+    private void resolveNextEvent(ITmfContext context, Integer tid) {
+        ITmfTrace trace = fTrace;
+        ITmfEvent event = trace.getNext(context);
+        assertNotNull(event);
+
+        Object tidObj = TmfTraceUtils.resolveEventAspectOfClassForEvent(trace, KernelTidAspect.class, event);
+        if (tid == null) {
+            assertNull(tidObj);
+        } else {
+            assertNotNull(tidObj);
+            assertEquals(tid, tidObj);
+        }
+    }
+
+    /**
+     * Test the {@link KernelTidAspect#resolve(ITmfEvent)} method method
+     */
+    @Test
+    public void testResolveTidAspect() {
+
+        ITmfContext context = fTrace.seekEvent(0L);
+        resolveNextEvent(context, null);
+        resolveNextEvent(context, null);
+        resolveNextEvent(context, null);
+        resolveNextEvent(context, 11);
+        resolveNextEvent(context, null);
+        resolveNextEvent(context, null);
+        resolveNextEvent(context, 20);
+        resolveNextEvent(context, 20);
+        resolveNextEvent(context, 21);
+        resolveNextEvent(context, 11);
+        resolveNextEvent(context, 30);
+        resolveNextEvent(context, 21);
+        resolveNextEvent(context, 20);
+    }
+
+}
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/testfiles/cpu_analysis.xml b/analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/testfiles/cpu_analysis.xml
new file mode 100644 (file)
index 0000000..01faef4
--- /dev/null
@@ -0,0 +1,85 @@
+<trace>
+<event timestamp="0" name="set_aspects">
+<field name="cpu" value="1" type="int" />
+</event>
+<event timestamp="1" name="sched_switch">
+<field name="cpu" value="0" type="int" />
+<field name="prev_comm" value="proc1" type="string" />
+<field name="prev_tid" value="1" type="long" />
+<field name="prev_prio" value="20" type="long" />
+<field name="prev_state" value="0" type="long" />
+<field name="next_comm" value="proc2" type="string" />
+<field name="next_tid" value="2" type="long" />
+<field name="next_prio" value="20" type="long" />
+</event>
+<event timestamp="2" name="sched_switch">
+<field name="cpu" value="1" type="int" />
+<field name="prev_comm" value="proc3" type="string" />
+<field name="prev_tid" value="3" type="long" />
+<field name="prev_prio" value="20" type="long" />
+<field name="prev_state" value="0" type="long" />
+<field name="next_comm" value="proc4" type="string" />
+<field name="next_tid" value="4" type="long" />
+<field name="next_prio" value="20" type="long" />
+</event>
+<event timestamp="5" name="sched_switch">
+<field name="cpu" value="1" type="int" />
+<field name="prev_comm" value="proc4" type="string" />
+<field name="prev_tid" value="4" type="long" />
+<field name="prev_prio" value="20" type="long" />
+<field name="prev_state" value="0" type="long" />
+<field name="next_comm" value="proc3" type="string" />
+<field name="next_tid" value="3" type="long" />
+<field name="next_prio" value="20" type="long" />
+</event>
+<event timestamp="10" name="sched_switch">
+<field name="cpu" value="1" type="int" />
+<field name="prev_comm" value="proc3" type="string" />
+<field name="prev_tid" value="3" type="long" />
+<field name="prev_prio" value="20" type="long" />
+<field name="prev_state" value="0" type="long" />
+<field name="next_comm" value="proc4" type="string" />
+<field name="next_tid" value="4" type="long" />
+<field name="next_prio" value="20" type="long" />
+</event>
+<event timestamp="15" name="sched_switch">
+<field name="cpu" value="1" type="int" />
+<field name="prev_comm" value="proc4" type="string" />
+<field name="prev_tid" value="4" type="long" />
+<field name="prev_prio" value="20" type="long" />
+<field name="prev_state" value="0" type="long" />
+<field name="next_comm" value="proc1" type="string" />
+<field name="next_tid" value="1" type="long" />
+<field name="next_prio" value="20" type="long" />
+</event>
+<event timestamp="20" name="sched_switch">
+<field name="cpu" value="1" type="int" />
+<field name="prev_comm" value="proc1" type="string" />
+<field name="prev_tid" value="1" type="long" />
+<field name="prev_prio" value="20" type="long" />
+<field name="prev_state" value="0" type="long" />
+<field name="next_comm" value="proc4" type="string" />
+<field name="next_tid" value="4" type="long" />
+<field name="next_prio" value="20" type="long" />
+</event>
+<event timestamp="20" name="sched_switch">
+<field name="cpu" value="0" type="int" />
+<field name="prev_comm" value="proc2" type="string" />
+<field name="prev_tid" value="2" type="long" />
+<field name="prev_prio" value="20" type="long" />
+<field name="prev_state" value="0" type="long" />
+<field name="next_comm" value="proc3" type="string" />
+<field name="next_tid" value="3" type="long" />
+<field name="next_prio" value="20" type="long" />
+</event>
+<event timestamp="25" name="sched_switch">
+<field name="cpu" value="0" type="int" />
+<field name="prev_comm" value="proc3" type="string" />
+<field name="prev_tid" value="3" type="long" />
+<field name="prev_prio" value="20" type="long" />
+<field name="prev_state" value="0" type="long" />
+<field name="next_comm" value="proc2" type="string" />
+<field name="next_tid" value="2" type="long" />
+<field name="next_prio" value="20" type="long" />
+</event>
+</trace>
\ No newline at end of file
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/testfiles/lttng_kernel_analysis.xml b/analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/testfiles/lttng_kernel_analysis.xml
new file mode 100644 (file)
index 0000000..40f7efc
--- /dev/null
@@ -0,0 +1,151 @@
+<!-- ***************************************************************************
+* Simple LTTng Kernel trace, with simple process statedumps,
+* sched_switches and a process forking
+*************************************************************************** -->
+<trace>
+<event timestamp="0" name="set_aspects">
+<field name="cpu" value="1" type="int" />
+</event>
+<event timestamp="1" name="lttng_statedump_process_state">
+<field name="cpu" value="0" type="int" />
+<field name="tid" value="10" type="long" />
+<field name="vtid" value="10" type="long" />
+<field name="pid" value="10" type="long" />
+<field name="vpid" value="10" type="long" />
+<field name="ppid" value="0" type="long" />
+<field name="vppid" value="0" type="long" />
+<field name="type" value="1" type="int" />
+<field name="mode" value="5" type="int" />
+<field name="submode" value="0" type="int" />
+<field name="status" value="5" type="long" />
+<field name="ns_level" value="0" type="int" />
+<field name="name" value="proc10" type="string" />
+</event>
+<event timestamp="5" name="lttng_statedump_process_state">
+<field name="cpu" value="0" type="int" />
+<field name="tid" value="11" type="long" />
+<field name="vtid" value="11" type="long" />
+<field name="pid" value="11" type="long" />
+<field name="vpid" value="11" type="long" />
+<field name="ppid" value="10" type="long" />
+<field name="vppid" value="10" type="long" />
+<field name="type" value="1" type="int" />
+<field name="mode" value="5" type="int" />
+<field name="submode" value="0" type="int" />
+<field name="status" value="5" type="long" />
+<field name="ns_level" value="0" type="int" />
+<field name="name" value="proc11" type="string" />
+</event>
+<event timestamp="10" name="lttng_statedump_process_state">
+<field name="cpu" value="0" type="int" />
+<field name="tid" value="20" type="long" />
+<field name="vtid" value="20" type="long" />
+<field name="pid" value="20" type="long" />
+<field name="vpid" value="20" type="long" />
+<field name="ppid" value="0" type="long" />
+<field name="vppid" value="0" type="long" />
+<field name="type" value="1" type="int" />
+<field name="mode" value="5" type="int" />
+<field name="submode" value="0" type="int" />
+<field name="status" value="5" type="long" />
+<field name="ns_level" value="0" type="int" />
+<field name="name" value="proc20" type="string" />
+</event>
+<event timestamp="12" name="sched_switch">
+<field name="cpu" value="1" type="int" />
+<field name="prev_comm" value="proc3" type="string" />
+<field name="prev_tid" value="30" type="long" />
+<field name="prev_prio" value="20" type="long" />
+<field name="prev_state" value="0" type="long" />
+<field name="next_comm" value="proc11" type="string" />
+<field name="next_tid" value="11" type="long" />
+<field name="next_prio" value="20" type="long" />
+</event>
+<event timestamp="15" name="lttng_statedump_process_state">
+<field name="cpu" value="0" type="int" />
+<field name="tid" value="30" type="long" />
+<field name="vtid" value="30" type="long" />
+<field name="pid" value="30" type="long" />
+<field name="vpid" value="30" type="long" />
+<field name="ppid" value="0" type="long" />
+<field name="vppid" value="0" type="long" />
+<field name="type" value="1" type="int" />
+<field name="mode" value="5" type="int" />
+<field name="submode" value="0" type="int" />
+<field name="status" value="5" type="long" />
+<field name="ns_level" value="0" type="int" />
+<field name="name" value="proc30" type="string" />
+</event>
+<event timestamp="17" name="lttng_statedump_end">
+<field name="cpu" value="0" type="int" />
+</event>
+<event timestamp="20" name="sched_switch">
+<field name="cpu" value="1" type="int" />
+<field name="prev_comm" value="proc11" type="string" />
+<field name="prev_tid" value="10" type="long" />
+<field name="prev_prio" value="20" type="long" />
+<field name="prev_state" value="0" type="long" />
+<field name="next_comm" value="proc20" type="string" />
+<field name="next_tid" value="20" type="long" />
+<field name="next_prio" value="20" type="long" />
+</event>
+<event timestamp="25" name="sched_process_fork">
+<field name="cpu" value="1" type="int" />
+<field name="parent_comm" value="proc20" type="string" />
+<field name="parent_tid" value="20" type="long" />
+<field name="parent_pid" value="20" type="int" />
+<field name="child_comm" value="proc20" type="string" />
+<field name="child_tid" value="21" type="long" />
+<field name="child_pid" value="20" type="int" />
+</event>
+<event timestamp="30" name="sched_switch">
+<field name="cpu" value="1" type="int" />
+<field name="prev_comm" value="proc20" type="string" />
+<field name="prev_tid" value="20" type="long" />
+<field name="prev_prio" value="20" type="long" />
+<field name="prev_state" value="0" type="long" />
+<field name="next_comm" value="proc21" type="string" />
+<field name="next_tid" value="21" type="long" />
+<field name="next_prio" value="20" type="long" />
+</event>
+<event timestamp="35" name="sched_switch">
+<field name="cpu" value="0" type="int" />
+<field name="prev_comm" value="lttng-sessiond" type="string" />
+<field name="prev_tid" value="100" type="long" />
+<field name="prev_prio" value="20" type="long" />
+<field name="prev_state" value="0" type="long" />
+<field name="next_comm" value="proc11" type="string" />
+<field name="next_tid" value="11" type="long" />
+<field name="next_prio" value="20" type="long" />
+</event>
+<event timestamp="50" name="sched_switch">
+<field name="cpu" value="1" type="int" />
+<field name="prev_comm" value="proc21" type="string" />
+<field name="prev_tid" value="21" type="long" />
+<field name="prev_prio" value="20" type="long" />
+<field name="prev_state" value="0" type="long" />
+<field name="next_comm" value="proc30" type="string" />
+<field name="next_tid" value="30" type="long" />
+<field name="next_prio" value="20" type="long" />
+</event>
+<event timestamp="60" name="sched_switch">
+<field name="cpu" value="1" type="int" />
+<field name="prev_comm" value="proc30" type="string" />
+<field name="prev_tid" value="30" type="long" />
+<field name="prev_prio" value="20" type="long" />
+<field name="prev_state" value="0" type="long" />
+<field name="next_comm" value="proc21" type="string" />
+<field name="next_tid" value="21" type="long" />
+<field name="next_prio" value="20" type="long" />
+</event>
+<event timestamp="70" name="sched_switch">
+<field name="cpu" value="1" type="int" />
+<field name="prev_comm" value="proc21" type="string" />
+<field name="prev_tid" value="21" type="long" />
+<field name="prev_prio" value="20" type="long" />
+<field name="prev_state" value="0" type="long" />
+<field name="next_comm" value="proc20" type="string" />
+<field name="next_tid" value="20" type="long" />
+<field name="next_prio" value="20" type="long" />
+</event>
+</trace>
\ No newline at end of file
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/.classpath b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/.classpath
new file mode 100644 (file)
index 0000000..098194c
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+       <classpathentry kind="src" path="src"/>
+       <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/.project b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/.project
new file mode 100644 (file)
index 0000000..106b248
--- /dev/null
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.eclipse.tracecompass.analysis.os.linux.core</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.jdt.core.javabuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.PluginNature</nature>
+               <nature>org.eclipse.jdt.core.javanature</nature>
+               <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+       </natures>
+</projectDescription>
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/.settings/org.eclipse.core.resources.prefs b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/.settings/org.eclipse.core.resources.prefs
new file mode 100644 (file)
index 0000000..99f26c0
--- /dev/null
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/.settings/org.eclipse.core.runtime.prefs b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/.settings/org.eclipse.core.runtime.prefs
new file mode 100644 (file)
index 0000000..5a0ad22
--- /dev/null
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/.settings/org.eclipse.jdt.core.prefs b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/.settings/org.eclipse.jdt.core.prefs
new file mode 100644 (file)
index 0000000..a2b5e6b
--- /dev/null
@@ -0,0 +1,405 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.codeComplete.argumentPrefixes=
+org.eclipse.jdt.core.codeComplete.argumentSuffixes=
+org.eclipse.jdt.core.codeComplete.fieldPrefixes=f
+org.eclipse.jdt.core.codeComplete.fieldSuffixes=
+org.eclipse.jdt.core.codeComplete.localPrefixes=
+org.eclipse.jdt.core.codeComplete.localSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes=
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
+org.eclipse.jdt.core.compiler.problem.deadCode=error
+org.eclipse.jdt.core.compiler.problem.deprecation=error
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=error
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=error
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=error
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=error
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=error
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=enabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=error
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=error
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=error
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=error
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=error
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedImport=error
+org.eclipse.jdt.core.compiler.problem.unusedLabel=error
+org.eclipse.jdt.core.compiler.problem.unusedLocal=error
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=error
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=error
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=error
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
+org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=0
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=250
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=space
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/.settings/org.eclipse.jdt.ui.prefs b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644 (file)
index 0000000..232a3fd
--- /dev/null
@@ -0,0 +1,60 @@
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_tmf-style
+formatter_settings_version=12
+org.eclipse.jdt.ui.exception.name=e
+org.eclipse.jdt.ui.gettersetter.use.is=true
+org.eclipse.jdt.ui.keywordthis=false
+org.eclipse.jdt.ui.overrideannotation=true
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=false
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=false
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=false
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=false
+sp_cleanup.remove_unnecessary_nls_tags=false
+sp_cleanup.remove_unused_imports=false
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_blocks=true
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/.settings/org.eclipse.pde.api.tools.prefs b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100644 (file)
index 0000000..acc3abd
--- /dev/null
@@ -0,0 +1,97 @@
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+API_USE_SCAN_FIELD_SEVERITY=Error
+API_USE_SCAN_METHOD_SEVERITY=Error
+API_USE_SCAN_TYPE_SEVERITY=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_JAVADOC_TAG=Warning
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Warning
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+MISSING_EE_DESCRIPTIONS=Ignore
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=false
+eclipse.preferences.version=1
+incompatible_api_component_version=Error
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Error
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/.settings/org.eclipse.pde.prefs b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/.settings/org.eclipse.pde.prefs
new file mode 100644 (file)
index 0000000..d92b94f
--- /dev/null
@@ -0,0 +1,32 @@
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
+compilers.incompatible-environment=1
+compilers.p.build=1
+compilers.p.build.bin.includes=1
+compilers.p.build.encodings=2
+compilers.p.build.java.compiler=2
+compilers.p.build.java.compliance=1
+compilers.p.build.missing.output=2
+compilers.p.build.output.library=1
+compilers.p.build.source.library=1
+compilers.p.build.src.includes=1
+compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.internal=1
+compilers.p.missing-packages=1
+compilers.p.missing-version-export-package=2
+compilers.p.missing-version-import-package=2
+compilers.p.missing-version-require-bundle=2
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=1
+compilers.p.unknown-attribute=1
+compilers.p.unknown-class=1
+compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=1
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+eclipse.preferences.version=1
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/META-INF/MANIFEST.MF b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..0a76920
--- /dev/null
@@ -0,0 +1,23 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-Vendor: %Bundle-Vendor
+Bundle-Version: 1.0.0.qualifier
+Bundle-Localization: plugin
+Bundle-SymbolicName: org.eclipse.tracecompass.analysis.os.linux.core;singleton:=true
+Bundle-Activator: org.eclipse.tracecompass.internal.analysis.os.linux.core.Activator
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.core.resources,
+ org.eclipse.tracecompass.common.core,
+ org.eclipse.tracecompass.tmf.core
+Import-Package: com.google.common.collect,
+ com.google.common.hash;version="15.0.0"
+Export-Package: org.eclipse.tracecompass.analysis.os.linux.core.cpuusage,
+ org.eclipse.tracecompass.analysis.os.linux.core.event.aspect,
+ org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis,
+ org.eclipse.tracecompass.analysis.os.linux.core.model,
+ org.eclipse.tracecompass.analysis.os.linux.core.trace,
+ org.eclipse.tracecompass.internal.analysis.os.linux.core;x-internal:=true,
+ org.eclipse.tracecompass.internal.analysis.os.linux.core.kernelanalysis;x-friends:="org.eclipse.tracecompass.analysis.os.linux.core.tests"
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/about.html b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/about.html
new file mode 100644 (file)
index 0000000..c258ef5
--- /dev/null
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+<p>June 5, 2006</p>    
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;).  Unless otherwise 
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;).  A copy of the EPL is available 
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is 
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content.  Check the Redistributor's license that was 
+provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/build.properties b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/build.properties
new file mode 100644 (file)
index 0000000..ae8fab7
--- /dev/null
@@ -0,0 +1,22 @@
+###############################################################################
+# Copyright (c) 2015 Ericsson
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     Ericsson - Initial API and implementation
+###############################################################################
+
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               about.html,\
+               plugin.properties,\
+               plugin.xml
+src.includes = about.html
+additional.bundles = org.eclipse.jdt.annotation
+jars.extra.classpath = platform:/plugin/org.eclipse.jdt.annotation
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/plugin.properties b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/plugin.properties
new file mode 100644 (file)
index 0000000..8d0a7f4
--- /dev/null
@@ -0,0 +1,20 @@
+###############################################################################
+# Copyright (c) 2015 Ericsson
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     Ericsson - Initial API and implementation
+###############################################################################
+
+Bundle-Vendor = Eclipse Trace Compass
+Bundle-Name = Trace Compass Linux Kernel Analysis Core Plug-in
+
+tracetype.type.kernel = Linux Kernel Trace
+analysis.linuxkernel = Linux Kernel Analysis
+
+analysis.cpuusage = CPU usage
+
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/plugin.xml b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/plugin.xml
new file mode 100644 (file)
index 0000000..46b9a63
--- /dev/null
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+   <extension
+         point="org.eclipse.linuxtools.tmf.core.analysis">
+      <module
+            analysis_module="org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelAnalysisModule"
+            automatic="true"
+            id="org.eclipse.tracecompass.analysis.os.linux.kernel"
+            name="%analysis.linuxkernel">
+         <tracetype
+               applies="true"
+               class="org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelTrace">
+         </tracetype>
+      </module>
+      <module
+            analysis_module="org.eclipse.tracecompass.analysis.os.linux.core.cpuusage.KernelCpuUsageAnalysis"
+            automatic="false"
+            id="org.eclipse.tracecompass.analysis.os.linux.cpuusage"
+            name="%analysis.cpuusage">
+         <tracetype
+               applies="true"
+               class="org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelTrace">
+         </tracetype>
+      </module>
+   </extension>
+</plugin>
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/pom.xml b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/pom.xml
new file mode 100644 (file)
index 0000000..bcbf18e
--- /dev/null
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+   Copyright (C) 2011, Red Hat, Inc.
+
+   All rights reserved. This program and the accompanying materials
+   are made available under the terms of the Eclipse Public License v1.0
+   which accompanies this distribution, and is available at
+   http://www.eclipse.org/legal/epl-v10.html
+-->
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <artifactId>org.eclipse.tracecompass.analysis-parent</artifactId>
+    <groupId>org.eclipse.tracecompass</groupId>
+    <version>1.0.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>org.eclipse.tracecompass.analysis.os.linux.core</artifactId>
+  <groupId>org.eclipse.tracecompass</groupId>
+  <version>1.0.0-SNAPSHOT</version>
+  <packaging>eclipse-plugin</packaging>
+
+  <name>Trace Compass Linux Kernel Analysis Core Plug-in</name>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.eclipse.tycho</groupId>
+        <artifactId>tycho-source-plugin</artifactId>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/cpuusage/KernelCpuUsageAnalysis.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/cpuusage/KernelCpuUsageAnalysis.java
new file mode 100644 (file)
index 0000000..7d713e6
--- /dev/null
@@ -0,0 +1,278 @@
+/*******************************************************************************
+ * Copyright (c) 2014, 2015 Ã‰cole Polytechnique de Montréal and others.
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Geneviève Bastien - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.analysis.os.linux.core.cpuusage;
+
+import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+
+import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.Attributes;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelAnalysisModule;
+import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelAnalysisEventLayout;
+import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelTrace;
+import org.eclipse.tracecompass.internal.analysis.os.linux.core.Activator;
+import org.eclipse.tracecompass.statesystem.core.ITmfStateSystem;
+import org.eclipse.tracecompass.statesystem.core.exceptions.AttributeNotFoundException;
+import org.eclipse.tracecompass.statesystem.core.exceptions.StateSystemDisposedException;
+import org.eclipse.tracecompass.statesystem.core.exceptions.StateValueTypeException;
+import org.eclipse.tracecompass.statesystem.core.exceptions.TimeRangeException;
+import org.eclipse.tracecompass.statesystem.core.interval.ITmfStateInterval;
+import org.eclipse.tracecompass.tmf.core.analysis.IAnalysisModule;
+import org.eclipse.tracecompass.tmf.core.statesystem.ITmfStateProvider;
+import org.eclipse.tracecompass.tmf.core.statesystem.TmfStateSystemAnalysisModule;
+import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
+import org.eclipse.tracecompass.tmf.core.trace.TmfTraceUtils;
+
+/**
+ * This analysis module computes the CPU usage of a system from a kernel trace.
+ * It requires the LTTng Kernel analysis module to have accurate CPU usage data.
+ *
+ * @author Geneviève Bastien
+ */
+public class KernelCpuUsageAnalysis extends TmfStateSystemAnalysisModule {
+
+    /** The ID of this analysis */
+    public static final String ID = "org.eclipse.tracecompass.analysis.os.linux.cpuusage"; //$NON-NLS-1$
+
+    /** Text used to identify 'total' entries in the returned maps */
+    public static final String TOTAL = "total"; //$NON-NLS-1$
+    /** String used to separate elements in the returned maps */
+    public static final String SPLIT_STRING = "/"; //$NON-NLS-1$
+    /** Idle process thread ID */
+    public static final String TID_ZERO = "0"; //$NON-NLS-1$
+
+    @Override
+    protected ITmfStateProvider createStateProvider() {
+        ITmfTrace trace = checkNotNull(getTrace());
+        IKernelAnalysisEventLayout layout;
+
+        if (trace instanceof IKernelTrace) {
+            layout = ((IKernelTrace) trace).getKernelEventLayout();
+        } else {
+            /* Fall-back to the base LttngEventLayout */
+            layout = IKernelAnalysisEventLayout.DEFAULT_LAYOUT;
+        }
+
+        return new KernelCpuUsageStateProvider(trace, layout);
+    }
+
+    @Override
+    protected StateSystemBackendType getBackendType() {
+        return StateSystemBackendType.FULL;
+    }
+
+    @Override
+    protected Iterable<IAnalysisModule> getDependentAnalyses() {
+        Set<IAnalysisModule> modules = new HashSet<>();
+
+        ITmfTrace trace = getTrace();
+        if (trace == null) {
+            throw new IllegalStateException();
+        }
+        /*
+         * This analysis depends on the LTTng kernel analysis, so it's added to
+         * dependent modules.
+         */
+        Iterable<KernelAnalysisModule> kernelModules = TmfTraceUtils.getAnalysisModulesOfClass(trace, KernelAnalysisModule.class);
+        for (KernelAnalysisModule kernelModule : kernelModules) {
+            /* Only add the first one we find, if there is one */
+            modules.add(kernelModule);
+            break;
+        }
+        return modules;
+    }
+
+    /**
+     * Get a map of time spent on CPU by various threads during a time range.
+     *
+     * @param start
+     *            Start time of requested range
+     * @param end
+     *            End time of requested range
+     * @return A map of TID -> time spent on CPU in the [start, end] interval
+     */
+    public Map<String, Long> getCpuUsageInRange(long start, long end) {
+        Map<String, Long> map = new HashMap<>();
+        Map<String, Long> totalMap = new HashMap<>();
+
+        ITmfTrace trace = getTrace();
+        ITmfStateSystem cpuSs = getStateSystem();
+        if (trace == null || cpuSs == null) {
+            return map;
+        }
+        ITmfStateSystem kernelSs = TmfStateSystemAnalysisModule.getStateSystem(trace, KernelAnalysisModule.ID);
+        if (kernelSs == null) {
+            return map;
+        }
+
+        /*
+         * Make sure the start/end times are within the state history, so we
+         * don't get TimeRange exceptions.
+         */
+        long startTime = Math.max(start, cpuSs.getStartTime());
+        startTime = Math.max(startTime, kernelSs.getStartTime());
+        long endTime = Math.min(end, cpuSs.getCurrentEndTime());
+        endTime = Math.min(endTime, kernelSs.getCurrentEndTime());
+        long totalTime = 0;
+        if (endTime < startTime) {
+            return map;
+        }
+
+        try {
+            /* Get the list of quarks for each CPU and CPU's TIDs */
+            int cpusNode = cpuSs.getQuarkAbsolute(Attributes.CPUS);
+            Map<Integer, List<Integer>> tidsPerCpu = new HashMap<>();
+            for (int cpuNode : cpuSs.getSubAttributes(cpusNode, false)) {
+                tidsPerCpu.put(cpuNode, cpuSs.getSubAttributes(cpuNode, false));
+            }
+
+            /* Query full states at start and end times */
+            List<ITmfStateInterval> kernelEndState = kernelSs.queryFullState(endTime);
+            List<ITmfStateInterval> endState = cpuSs.queryFullState(endTime);
+            List<ITmfStateInterval> kernelStartState = kernelSs.queryFullState(startTime);
+            List<ITmfStateInterval> startState = cpuSs.queryFullState(startTime);
+
+            long countAtStart, countAtEnd;
+
+            for (Entry<Integer, List<Integer>> entry : tidsPerCpu.entrySet()) {
+                int cpuNode = entry.getKey();
+                List<Integer> tidNodes = entry.getValue();
+
+                String curCpuName = cpuSs.getAttributeName(cpuNode);
+                long cpuTotal = 0;
+
+                /* Get the quark of the thread running on this CPU */
+                int currentThreadQuark = kernelSs.getQuarkAbsolute(Attributes.CPUS, curCpuName, Attributes.CURRENT_THREAD);
+                /* Get the currently running thread on this CPU */
+                int startThread = kernelStartState.get(currentThreadQuark).getStateValue().unboxInt();
+                int endThread = kernelEndState.get(currentThreadQuark).getStateValue().unboxInt();
+
+                for (int tidNode : tidNodes) {
+                    String curTidName = cpuSs.getAttributeName(tidNode);
+                    int tid = Integer.parseInt(curTidName);
+
+                    countAtEnd = endState.get(tidNode).getStateValue().unboxLong();
+                    countAtStart = startState.get(tidNode).getStateValue().unboxLong();
+                    if (countAtStart == -1) {
+                        countAtStart = 0;
+                    }
+                    if (countAtEnd == -1) {
+                        countAtEnd = 0;
+                    }
+
+                    /*
+                     * Interpolate start and end time of threads running at
+                     * those times
+                     */
+                    if (tid == startThread || startThread == -1) {
+                        long runningTime = kernelStartState.get(currentThreadQuark).getEndTime() - kernelStartState.get(currentThreadQuark).getStartTime();
+                        long runningEnd = kernelStartState.get(currentThreadQuark).getEndTime();
+
+                        countAtStart = interpolateCount(countAtStart, startTime, runningEnd, runningTime);
+                    }
+                    if (tid == endThread) {
+                        long runningTime = kernelEndState.get(currentThreadQuark).getEndTime() - kernelEndState.get(currentThreadQuark).getStartTime();
+                        long runningEnd = kernelEndState.get(currentThreadQuark).getEndTime();
+
+                        countAtEnd = interpolateCount(countAtEnd, endTime, runningEnd, runningTime);
+                    }
+                    /*
+                     * If startThread is -1, we made the hypothesis that the
+                     * process running at start was the current one. If the
+                     * count is negative, we were wrong in this hypothesis. Also
+                     * if the time at end is 0, it either means the process
+                     * hasn't been on the CPU or that we still don't know who is
+                     * running. In both cases, that invalidates the hypothesis.
+                     */
+                    if ((startThread == -1) && ((countAtEnd - countAtStart < 0) || (countAtEnd == 0))) {
+                        countAtStart = 0;
+                    }
+
+                    long currentCount = countAtEnd - countAtStart;
+                    if (currentCount < 0) {
+                        Activator.getDefault().logWarning(checkNotNull(String.format("Negative count: start %d, end %d", countAtStart, countAtEnd))); //$NON-NLS-1$
+                        currentCount = 0;
+                    } else if (currentCount > endTime - startTime) {
+                        Activator.getDefault().logWarning(checkNotNull(String.format("CPU Usage: Spent more time on CPU than allowed: %s spent %d when max should be %d", curTidName, currentCount, endTime - startTime))); //$NON-NLS-1$
+                        currentCount = 0;
+                    }
+                    cpuTotal += currentCount;
+                    map.put(curCpuName + SPLIT_STRING + curTidName, currentCount);
+                    addToMap(totalMap, curTidName, currentCount);
+                    totalTime += (currentCount);
+                }
+                map.put(curCpuName, cpuTotal);
+            }
+
+            /* Add the totals to the map */
+            for (Entry<String, Long> entry : totalMap.entrySet()) {
+                map.put(TOTAL + SPLIT_STRING + entry.getKey(), entry.getValue());
+            }
+            map.put(TOTAL, totalTime);
+
+        } catch (TimeRangeException | AttributeNotFoundException e) {
+            /*
+             * Assume there is no events or the attribute does not exist yet,
+             * nothing will be put in the map.
+             */
+        } catch (StateValueTypeException | StateSystemDisposedException e) {
+            /*
+             * These other exception types would show a logic problem, so they
+             * should not happen.
+             */
+            Activator.getDefault().logError("Error getting CPU usage in a time range", e); //$NON-NLS-1$
+        }
+
+        return map;
+    }
+
+    private static long interpolateCount(long count, long ts, long runningEnd, long runningTime) {
+        long newCount = count;
+
+        /* sanity check */
+        if (runningTime > 0) {
+
+            long runningStart = runningEnd - runningTime;
+
+            if (ts < runningStart) {
+                /*
+                 * This interval was not started, this can happen if the current
+                 * running thread is unknown and we execute this method. It just
+                 * means that this process was not the one running
+                 */
+                return newCount;
+            }
+            newCount += (ts - runningStart);
+        }
+        return newCount;
+    }
+
+    /*
+     * Add the value to the previous value in the map. If the key was not set,
+     * assume 0
+     */
+    private static void addToMap(Map<String, Long> map, String key, Long value) {
+        Long addTo = map.get(key);
+        if (addTo == null) {
+            map.put(key, value);
+        } else {
+            map.put(key, addTo + value);
+        }
+    }
+
+}
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/cpuusage/KernelCpuUsageStateProvider.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/cpuusage/KernelCpuUsageStateProvider.java
new file mode 100644 (file)
index 0000000..3de7339
--- /dev/null
@@ -0,0 +1,159 @@
+/*******************************************************************************
+ * Copyright (c) 2014, 2015 Ã‰cole Polytechnique de Montréal
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   François Rajotte - Initial API and implementation
+ *   Geneviève Bastien - Revision of the initial implementation
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.analysis.os.linux.core.cpuusage;
+
+import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.Attributes;
+import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelAnalysisEventLayout;
+import org.eclipse.tracecompass.internal.analysis.os.linux.core.Activator;
+import org.eclipse.tracecompass.statesystem.core.ITmfStateSystemBuilder;
+import org.eclipse.tracecompass.statesystem.core.exceptions.AttributeNotFoundException;
+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;
+import org.eclipse.tracecompass.tmf.core.statesystem.AbstractTmfStateProvider;
+import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
+import org.eclipse.tracecompass.tmf.core.trace.TmfTraceUtils;
+
+/**
+ * Creates a state system with the total time spent on CPU for each thread and
+ * for each CPU from a kernel trace.
+ *
+ * This state system in itself keeps the total time on CPU since last time the
+ * process was scheduled out. The state system queries will only be accurate
+ * when the process is not in a running state. To have exact CPU usage when
+ * running, this state system needs to be used along the LTTng Kernel analysis.
+ *
+ * It requires only the 'sched_switch' events enabled on the trace.
+ *
+ * @author François Rajotte
+ */
+public class KernelCpuUsageStateProvider extends AbstractTmfStateProvider {
+
+    private static final int VERSION = 2;
+
+    /* For each CPU, maps the last time a thread was scheduled in */
+    private final Map<Integer, Long> fLastStartTimes = new HashMap<>();
+    private final long fTraceStart;
+    private final IKernelAnalysisEventLayout fLayout;
+
+    /**
+     * Constructor
+     *
+     * @param trace
+     *            The trace from which to get the CPU usage
+     * @param layout
+     *            The event layout to use for this state provider.
+     */
+    public KernelCpuUsageStateProvider(ITmfTrace trace, IKernelAnalysisEventLayout layout) {
+        super(trace, "Kernel CPU usage"); //$NON-NLS-1$
+        fTraceStart = trace.getStartTime().getValue();
+        fLayout = layout;
+    }
+
+    // ------------------------------------------------------------------------
+    // ITmfStateProvider
+    // ------------------------------------------------------------------------
+
+    @Override
+    public int getVersion() {
+        return VERSION;
+    }
+
+    @Override
+    public KernelCpuUsageStateProvider getNewInstance() {
+        return new KernelCpuUsageStateProvider(this.getTrace(), this.fLayout);
+    }
+
+    @Override
+    protected void eventHandle(@Nullable ITmfEvent event) {
+        if (event == null) {
+            return;
+        }
+        final String eventName = event.getName();
+
+        if (eventName.equals(fLayout.eventSchedSwitch())) {
+            Object cpuObj = TmfTraceUtils.resolveEventAspectOfClassForEvent(event.getTrace(), TmfCpuAspect.class, event);
+            if (cpuObj == null) {
+                /* We couldn't find any CPU information, ignore this event */
+                return;
+            }
+            Integer cpu = (Integer) cpuObj;
+
+            /*
+             * Fields: string prev_comm, int32 prev_tid, int32 prev_prio, int64
+             * prev_state, string next_comm, int32 next_tid, int32 next_prio
+             */
+            ITmfEventField content = event.getContent();
+            long ts = event.getTimestamp().getValue();
+
+            Long prevTid = (Long) content.getField(fLayout.fieldPrevTid()).getValue();
+
+            try {
+                final ITmfStateSystemBuilder ss = checkNotNull(getStateSystemBuilder());
+
+                Integer currentCPUNode = ss.getQuarkRelativeAndAdd(getNodeCPUs(ss), cpu.toString());
+
+                /*
+                 * This quark contains the value of the cumulative time spent on
+                 * the source CPU by the currently running thread
+                 */
+                Integer cumulativeTimeQuark = ss.getQuarkRelativeAndAdd(currentCPUNode, prevTid.toString());
+                Long startTime = fLastStartTimes.get(cpu);
+                /*
+                 * If start time is null, we haven't seen the start of the
+                 * process, so we assume beginning of the trace
+                 */
+                if (startTime == null) {
+                    startTime = fTraceStart;
+                }
+
+                /*
+                 * We add the time from startTime until now to the cumulative
+                 * time of the thread
+                 */
+                ITmfStateValue value = ss.queryOngoingState(cumulativeTimeQuark);
+
+                /*
+                 * Modify cumulative time for this CPU/TID combo: The total time
+                 * changes when the process is scheduled out. Nothing happens
+                 * when the process is scheduled in.
+                 */
+                long prevCumulativeTime = Math.max(0, value.unboxLong());
+                long newCumulativeTime = prevCumulativeTime + (ts - startTime);
+
+                value = TmfStateValue.newValueLong(newCumulativeTime);
+                ss.modifyAttribute(ts, value, cumulativeTimeQuark);
+                fLastStartTimes.put(cpu, ts);
+
+            } catch (AttributeNotFoundException e) {
+                Activator.getDefault().logError("Attribute not found in LttngKernelCpuStateProvider", e); //$NON-NLS-1$
+            }
+
+        }
+    }
+
+    /* Shortcut for the "current CPU" attribute node */
+    private static int getNodeCPUs(ITmfStateSystemBuilder ssb) {
+        return ssb.getQuarkAbsoluteAndAdd(Attributes.CPUS);
+    }
+
+}
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/cpuusage/package-info.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/cpuusage/package-info.java
new file mode 100644 (file)
index 0000000..53f049e
--- /dev/null
@@ -0,0 +1,14 @@
+/*******************************************************************************
+ * Copyright (c) 2015 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Ericsson - Initial API and implementation
+ *******************************************************************************/
+
+@org.eclipse.jdt.annotation.NonNullByDefault
+package org.eclipse.tracecompass.analysis.os.linux.core.cpuusage;
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/event/aspect/LinuxTidAspect.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/event/aspect/LinuxTidAspect.java
new file mode 100644 (file)
index 0000000..4f8fbfd
--- /dev/null
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2015 Ã‰cole Polytechnique de Montréal
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Geneviève Bastien - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.analysis.os.linux.core.event.aspect;
+
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
+import org.eclipse.tracecompass.tmf.core.event.aspect.ITmfEventAspect;
+
+/**
+ * This aspect finds the ID of the thread that is running when the event
+ * occurred.
+ *
+ * @author Geneviève Bastien
+ * @since 1.0
+ */
+public abstract class LinuxTidAspect implements ITmfEventAspect {
+
+    @Override
+    public final String getName() {
+        return Messages.getMessage(Messages.AspectName_Tid);
+    }
+
+    @Override
+    public final String getHelpText() {
+        return Messages.getMessage(Messages.AspectHelpText_Tid);
+    }
+
+    @Override
+    public abstract @Nullable Integer resolve(ITmfEvent event);
+
+}
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/event/aspect/Messages.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/event/aspect/Messages.java
new file mode 100644 (file)
index 0000000..49a9b11
--- /dev/null
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2015  Ã‰cole Polytechnique de Montréal
+ *
+ * All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Geneviève Bastien - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.analysis.os.linux.core.event.aspect;
+
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * @since 1.0
+ */
+@SuppressWarnings("javadoc")
+public class Messages extends NLS {
+
+    private static final String BUNDLE_NAME = "org.eclipse.tracecompass.analysis.os.linux.core.event.aspect.messages"; //$NON-NLS-1$
+
+    public static @Nullable String AspectName_Tid;
+
+    public static @Nullable String AspectHelpText_Tid;
+
+    static {
+        NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+    }
+
+    private Messages() {
+    }
+
+    /**
+     * Helper method to expose externalized strings as non-null objects.
+     */
+    static String getMessage(@Nullable String msg) {
+        if (msg == null) {
+            return ""; //$NON-NLS-1$
+        }
+        return msg;
+    }
+}
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/event/aspect/messages.properties b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/event/aspect/messages.properties
new file mode 100644 (file)
index 0000000..6ebad6f
--- /dev/null
@@ -0,0 +1,14 @@
+###############################################################################
+# Copyright (c) 2015 Ã‰cole Polytechnique de Montréal
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     Ã‰cole Polytechnique de Montréal - Initial API and implementation
+###############################################################################
+
+AspectName_Tid=TID
+AspectHelpText_Tid=The ID of the thread this event belongs to
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/event/aspect/package-info.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/event/aspect/package-info.java
new file mode 100644 (file)
index 0000000..fb9676d
--- /dev/null
@@ -0,0 +1,14 @@
+/*******************************************************************************
+ * Copyright (c) 2015 Ã‰cole Polytechnique de Montréal
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Ã‰cole Polytechnique de Montréal - Initial API and implementation
+ *******************************************************************************/
+
+@org.eclipse.jdt.annotation.NonNullByDefault
+package org.eclipse.tracecompass.analysis.os.linux.core.event.aspect;
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/Attributes.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/Attributes.java
new file mode 100644 (file)
index 0000000..520b1bb
--- /dev/null
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2012, 2015 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Alexandre Montplaisir - Initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis;
+
+/**
+ * This file defines all the attribute names used in the handler. Both the
+ * construction and query steps should use them.
+ *
+ * These should not be externalized! The values here are used as-is in the
+ * history file on disk, so they should be kept the same to keep the file format
+ * compatible. If a view shows attribute names directly, the localization should
+ * be done on the viewer side.
+ *
+ * @author alexmont
+ *
+ */
+@SuppressWarnings({"nls", "javadoc"})
+public interface Attributes {
+
+    /* First-level attributes */
+    String CPUS = "CPUs";
+    String THREADS = "Threads";
+    String RESOURCES = "Resources";
+
+    /* Sub-attributes of the CPU nodes */
+    String CURRENT_THREAD = "Current_thread";
+    String STATUS = "Status";
+
+    /* Sub-attributes of the Thread nodes */
+    String PPID = "PPID";
+    //static final String STATUS = "Status"
+    String EXEC_NAME = "Exec_name";
+
+    /** @since 1.0 */
+    String PRIO = "Prio";
+    String SYSTEM_CALL = "System_call";
+
+    /* Attributes under "Resources" */
+    String IRQS = "IRQs";
+    String SOFT_IRQS = "Soft_IRQs";
+
+    /* Misc stuff */
+    String UNKNOWN = "Unknown";
+}
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/KernelAnalysisModule.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/KernelAnalysisModule.java
new file mode 100644 (file)
index 0000000..984a330
--- /dev/null
@@ -0,0 +1,119 @@
+/*******************************************************************************
+ * Copyright (c) 2013, 2015 Ã‰cole Polytechnique de Montréal
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Geneviève Bastien - Initial API and implementation
+ *   Mathieu Rail - Provide the requirements of the analysis
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis;
+
+import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
+
+import java.util.Collections;
+import java.util.Set;
+
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.tracecompass.common.core.NonNullUtils;
+import org.eclipse.tracecompass.internal.analysis.os.linux.core.kernelanalysis.KernelStateProvider;
+import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelAnalysisEventLayout;
+import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelTrace;
+import org.eclipse.tracecompass.tmf.core.analysis.TmfAnalysisRequirement;
+import org.eclipse.tracecompass.tmf.core.statesystem.ITmfStateProvider;
+import org.eclipse.tracecompass.tmf.core.statesystem.TmfStateSystemAnalysisModule;
+import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
+
+/**
+ * State System Module for lttng kernel traces
+ *
+ * @author Geneviève Bastien
+ * @since 1.0
+ */
+public class KernelAnalysisModule extends TmfStateSystemAnalysisModule {
+
+    /**
+     * The file name of the History Tree
+     */
+    public static final String HISTORY_TREE_FILE_NAME = "stateHistory.ht"; //$NON-NLS-1$
+
+    /** The ID of this analysis module */
+    public static final String ID = "org.eclipse.tracecompass.analysis.os.linux.kernel"; //$NON-NLS-1$
+
+    /*
+     * TODO: Decide which events should be mandatory for the analysis, once the
+     * appropriate error messages and session setup are in place.
+     */
+//    private static final ImmutableSet<String> REQUIRED_EVENTS = ImmutableSet.of();
+//
+//    private static final ImmutableSet<String> OPTIONAL_EVENTS = ImmutableSet.of(
+            // FIXME These cannot be declared statically anymore, they depend on
+            // the OriginTracer of the kernel trace.
+            // LttngStrings.EXIT_SYSCALL,
+            // LttngStrings.IRQ_HANDLER_ENTRY,
+            // LttngStrings.IRQ_HANDLER_EXIT,
+            // LttngStrings.SOFTIRQ_ENTRY,
+            // LttngStrings.SOFTIRQ_EXIT,
+            // LttngStrings.SOFTIRQ_RAISE,
+            // LttngStrings.SCHED_PROCESS_FORK,
+            // LttngStrings.SCHED_PROCESS_EXIT,
+            // LttngStrings.SCHED_PROCESS_FREE,
+            // LttngStrings.SCHED_SWITCH,
+            // LttngStrings.STATEDUMP_PROCESS_STATE,
+            // LttngStrings.SCHED_WAKEUP,
+            // LttngStrings.SCHED_WAKEUP_NEW,
+            //
+            // /* FIXME Add the prefix for syscalls */
+            // LttngStrings.SYSCALL_PREFIX
+            // );
+
+    /** The requirements as an immutable set */
+    private static final Set<TmfAnalysisRequirement> REQUIREMENTS;
+
+    static {
+//        /* initialize the requirement: domain and events */
+//        TmfAnalysisRequirement domainReq = new TmfAnalysisRequirement(SessionConfigStrings.CONFIG_ELEMENT_DOMAIN);
+//        domainReq.addValue(SessionConfigStrings.CONFIG_DOMAIN_TYPE_KERNEL, ValuePriorityLevel.MANDATORY);
+//
+//        TmfAnalysisRequirement eventReq = new TmfAnalysisRequirement(SessionConfigStrings.CONFIG_ELEMENT_EVENT, REQUIRED_EVENTS, ValuePriorityLevel.MANDATORY);
+//        eventReq.addValues(OPTIONAL_EVENTS, ValuePriorityLevel.OPTIONAL);
+//
+//        REQUIREMENTS = checkNotNull(ImmutableSet.of(domainReq, eventReq));
+        REQUIREMENTS = checkNotNull(Collections.EMPTY_SET);
+    }
+
+    @Override
+    protected @NonNull ITmfStateProvider createStateProvider() {
+        ITmfTrace trace = checkNotNull(getTrace());
+        IKernelAnalysisEventLayout layout;
+
+        if (trace instanceof IKernelTrace) {
+            layout = ((IKernelTrace) trace).getKernelEventLayout();
+        } else {
+            /* Fall-back to the base LttngEventLayout */
+            layout = IKernelAnalysisEventLayout.DEFAULT_LAYOUT;
+        }
+
+        return new KernelStateProvider(trace, layout);
+    }
+
+    @Override
+    @NonNull
+    protected String getSsFileName() {
+        return HISTORY_TREE_FILE_NAME;
+    }
+
+    @Override
+    protected String getFullHelpText() {
+        return NonNullUtils.nullToEmptyString(Messages.LttngKernelAnalysisModule_Help);
+    }
+
+    @Override
+    public Iterable<TmfAnalysisRequirement> getAnalysisRequirements() {
+        return REQUIREMENTS;
+    }
+}
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/KernelThreadInformationProvider.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/KernelThreadInformationProvider.java
new file mode 100644 (file)
index 0000000..ab96926
--- /dev/null
@@ -0,0 +1,260 @@
+/*******************************************************************************
+ * Copyright (c) 2014, 2015 Ã‰cole Polytechnique de Montréal
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Geneviève Bastien - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.Set;
+import java.util.TreeSet;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.tracecompass.common.core.NonNullUtils;
+import org.eclipse.tracecompass.statesystem.core.ITmfStateSystem;
+import org.eclipse.tracecompass.statesystem.core.StateSystemUtils;
+import org.eclipse.tracecompass.statesystem.core.exceptions.AttributeNotFoundException;
+import org.eclipse.tracecompass.statesystem.core.exceptions.StateSystemDisposedException;
+import org.eclipse.tracecompass.statesystem.core.exceptions.TimeRangeException;
+import org.eclipse.tracecompass.statesystem.core.interval.ITmfStateInterval;
+import org.eclipse.tracecompass.statesystem.core.statevalue.ITmfStateValue;
+
+/**
+ * Information provider utility class that retrieves thread-related information
+ * from a Linux Kernel Analysis
+ *
+ * @author Geneviève Bastien
+ */
+public final class KernelThreadInformationProvider {
+
+    private KernelThreadInformationProvider() {
+    }
+
+    /**
+     * Get the ID of the thread running on the CPU at time ts
+     *
+     * TODO: This method may later be replaced by an aspect, when the aspect can
+     * resolve to something that is not an event
+     *
+     * @param module
+     *            The lttng kernel analysis instance to run this method on
+     * @param cpuId
+     *            The CPU number the process is running on
+     * @param ts
+     *            The timestamp at which we want the running process
+     * @return The TID of the thread running on CPU cpuId at time ts or
+     *         {@code null} if either no thread is running or we do not know.
+     * @since 1.0
+     */
+    public static @Nullable Integer getThreadOnCpu(KernelAnalysisModule module, long cpuId, long ts) {
+        ITmfStateSystem ss = module.getStateSystem();
+        if (ss == null) {
+            return null;
+        }
+        try {
+            int cpuQuark = ss.getQuarkAbsolute(Attributes.CPUS, Long.toString(cpuId), Attributes.CURRENT_THREAD);
+            ITmfStateInterval interval = ss.querySingleState(ts, cpuQuark);
+            ITmfStateValue val = interval.getStateValue();
+            switch (val.getType()) {
+            case INTEGER:
+                return val.unboxInt();
+            case LONG:
+            case DOUBLE:
+            case NULL:
+            case STRING:
+            default:
+                break;
+            }
+        } catch (AttributeNotFoundException | StateSystemDisposedException | TimeRangeException e) {
+        }
+        return null;
+    }
+
+    /**
+     * Get the TIDs of the threads from an analysis
+     *
+     * @param module
+     *            The lttng kernel analysis instance to run this method on
+     * @return The set of TIDs corresponding to the threads
+     * @since 1.0
+     */
+    public static Collection<Integer> getThreadIds(KernelAnalysisModule module) {
+        ITmfStateSystem ss = module.getStateSystem();
+        if (ss == null) {
+            return NonNullUtils.checkNotNull(Collections.EMPTY_SET);
+        }
+        int threadQuark;
+        try {
+            threadQuark = ss.getQuarkAbsolute(Attributes.THREADS);
+            Set<Integer> tids = new TreeSet<>();
+            for (Integer quark : ss.getSubAttributes(threadQuark, false)) {
+                tids.add(Integer.parseInt(ss.getAttributeName(quark)));
+            }
+            return tids;
+        } catch (AttributeNotFoundException e) {
+        }
+        return NonNullUtils.checkNotNull(Collections.EMPTY_SET);
+    }
+
+    /**
+     * Get the parent process ID of a thread
+     *
+     * @param module
+     *            The lttng kernel analysis instance to run this method on
+     * @param threadId
+     *            The thread ID of the process for which to get the parent
+     * @param ts
+     *            The timestamp at which to get the parent
+     * @return The parent PID or {@code null} if the PPID is not found.
+     * @since 1.0
+     */
+    public static @Nullable Integer getParentPid(KernelAnalysisModule module, Integer threadId, long ts) {
+        Integer ppid = null;
+        ITmfStateSystem ss = module.getStateSystem();
+        if (ss == null) {
+            return ppid;
+        }
+        Integer ppidNode;
+        try {
+            ppidNode = ss.getQuarkAbsolute(Attributes.THREADS, threadId.toString(), Attributes.PPID);
+            ITmfStateInterval ppidInterval = ss.querySingleState(ts, ppidNode);
+            ITmfStateValue ppidValue = ppidInterval.getStateValue();
+
+            switch (ppidValue.getType()) {
+            case INTEGER:
+                ppid = NonNullUtils.checkNotNull(Integer.valueOf(ppidValue.unboxInt()));
+                break;
+            case DOUBLE:
+            case LONG:
+            case NULL:
+            case STRING:
+            default:
+                break;
+            }
+        } catch (AttributeNotFoundException | StateSystemDisposedException | TimeRangeException e) {
+        }
+        return ppid;
+    }
+
+    /**
+     * Get the executable name of the thread ID. If the thread ID was used
+     * multiple time or the name changed in between, it will return the last
+     * name the thread has taken, or {@code null} if no name is found
+     *
+     * @param module
+     *            The lttng kernel analysis instance to run this method on
+     * @param threadId
+     *            The thread ID of the process for which to get the name
+     * @return The last executable name of this process, or {@code null} if not
+     *         found
+     * @since 1.0
+     */
+    public static @Nullable String getExecutableName(KernelAnalysisModule module, Integer threadId) {
+        String execName = null;
+        ITmfStateSystem ss = module.getStateSystem();
+        if (ss == null) {
+            return execName;
+        }
+        Integer execNameNode;
+        try {
+            execNameNode = ss.getQuarkAbsolute(Attributes.THREADS, threadId.toString(), Attributes.EXEC_NAME);
+            List<ITmfStateInterval> execNameIntervals = StateSystemUtils.queryHistoryRange(ss, execNameNode, ss.getStartTime(), ss.getCurrentEndTime());
+
+            ITmfStateValue execNameValue;
+            for (ITmfStateInterval interval : execNameIntervals) {
+                execNameValue = interval.getStateValue();
+                switch (execNameValue.getType()) {
+                case STRING:
+                    execName = NonNullUtils.checkNotNull(execNameValue.unboxStr());
+                    break;
+                case DOUBLE:
+                case LONG:
+                case NULL:
+                case INTEGER:
+                default:
+                    break;
+                }
+            }
+        } catch (AttributeNotFoundException | StateSystemDisposedException | TimeRangeException e) {
+        }
+        return execName;
+    }
+
+    /**
+     * Get the priority of a thread running at a time ts.
+     *
+     * @param module
+     *            The kernel analysis instance to run this method on
+     * @param threadId
+     *            The thread ID of the target thread
+     * @param ts
+     *            The timestamp at which to get the priority
+     * @return The priority of this thread, or {@code null} if not found
+     * @since 1.0
+     */
+    public static @Nullable Integer getThreadPrio(KernelAnalysisModule module, Integer threadId, long ts) {
+        Integer execPrio = null;
+        ITmfStateSystem ss = module.getStateSystem();
+        if (ss == null) {
+            return execPrio;
+        }
+        try {
+            int execPrioQuark = ss.getQuarkAbsolute(Attributes.THREADS, threadId.toString(), Attributes.PRIO);
+            ITmfStateInterval interval = ss.querySingleState(ts, execPrioQuark);
+            ITmfStateValue prioValue = interval.getStateValue();
+            /* We know the prio must be an Integer */
+            execPrio = prioValue.unboxInt();
+        } catch (AttributeNotFoundException | StateSystemDisposedException | TimeRangeException e) {
+        }
+        return execPrio;
+    }
+
+    /**
+     * Get the status intervals for a given thread with a resolution
+     *
+     * @param module
+     *            The lttng kernel analysis instance to run this method on
+     * @param threadId
+     *            The ID of the thread to get the intervals for
+     * @param start
+     *            The start time of the requested range
+     * @param end
+     *            The end time of the requested range
+     * @param resolution
+     *            The resolution or the minimal time between the requested
+     *            intervals. If interval times are smaller than resolution, only
+     *            the first interval is returned, the others are ignored.
+     * @param monitor
+     *            A progress monitor for this task
+     * @return The list of status intervals for this thread, an empty list is
+     *         returned if either the state system is {@code null} or the quark
+     *         is not found
+     * @since 1.0
+     */
+    public static List<ITmfStateInterval> getStatusIntervalsForThread(KernelAnalysisModule module, Integer threadId, long start, long end, long resolution, IProgressMonitor monitor) {
+        ITmfStateSystem ss = module.getStateSystem();
+        if (ss == null) {
+            return NonNullUtils.checkNotNull(Collections.EMPTY_LIST);
+        }
+
+        try {
+            int threadQuark = ss.getQuarkAbsolute(Attributes.THREADS, threadId.toString());
+            int statusQuark = ss.getQuarkRelative(threadQuark, Attributes.STATUS);
+            List<ITmfStateInterval> statusIntervals = StateSystemUtils.queryHistoryRange(ss, statusQuark, Math.max(start, ss.getStartTime()), Math.min(end - 1, ss.getCurrentEndTime()), resolution, monitor);
+            return statusIntervals;
+        } catch (AttributeNotFoundException | StateSystemDisposedException | TimeRangeException e) {
+        }
+        return NonNullUtils.checkNotNull(Collections.EMPTY_LIST);
+    }
+
+}
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/KernelTidAspect.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/KernelTidAspect.java
new file mode 100644 (file)
index 0000000..d3197ff
--- /dev/null
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2015 Ã‰cole Polytechnique de Montréal
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Geneviève Bastien - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis;
+
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.tracecompass.analysis.os.linux.core.event.aspect.LinuxTidAspect;
+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;
+
+/**
+ * This aspect finds the ID of the thread running from this event using the
+ * {@link KernelAnalysisModule}.
+ *
+ * @author Geneviève Bastien
+ * @since 1.0
+ */
+public final class KernelTidAspect extends LinuxTidAspect {
+
+    /** The singleton instance */
+    public static final KernelTidAspect INSTANCE = new KernelTidAspect();
+
+    private KernelTidAspect() {
+    }
+
+    @Override
+    public @Nullable Integer resolve(ITmfEvent event) {
+        /* Find the CPU this event is run on */
+        Object cpuObj = TmfTraceUtils.resolveEventAspectOfClassForEvent(event.getTrace(),
+                TmfCpuAspect.class, event);
+        if (cpuObj == null) {
+            return null;
+        }
+        Integer cpu = (Integer) cpuObj;
+
+        /* Find the analysis module for the trace */
+        KernelAnalysisModule analysis = TmfTraceUtils.getAnalysisModuleOfClass(event.getTrace(),
+                KernelAnalysisModule.class, KernelAnalysisModule.ID);
+        if (analysis == null) {
+            return null;
+        }
+        Integer tid = KernelThreadInformationProvider.getThreadOnCpu(
+                analysis, cpu, event.getTimestamp().getValue());
+        if (tid != null) {
+            return tid;
+        }
+        return null;
+    }
+
+}
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/Messages.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/Messages.java
new file mode 100644 (file)
index 0000000..d2e8255
--- /dev/null
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2014, 2015 Ã‰cole Polytechnique de Montréal
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Geneviève Bastien - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis;
+
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * Externalized message strings from the LTTng Kernel Analysis
+ *
+ * @author Geneviève Bastien
+ */
+@SuppressWarnings("javadoc")
+public class Messages extends NLS {
+    private static final String BUNDLE_NAME = "org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.messages"; //$NON-NLS-1$
+
+    /**
+     * @since 1.0
+     */
+    public static @Nullable String AspectName_Prio;
+
+    /**
+     * @since 1.0
+     */
+    public static @Nullable String AspectHelpText_Prio;
+
+    public static @Nullable String LttngKernelAnalysisModule_Help;
+
+    static {
+        // initialize resource bundle
+        NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+    }
+
+    private Messages() {
+    }
+}
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/StateValues.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/StateValues.java
new file mode 100644 (file)
index 0000000..ff3d5ee
--- /dev/null
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2012, 2015 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Alexandre Montplaisir - Initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis;
+
+import org.eclipse.tracecompass.statesystem.core.statevalue.ITmfStateValue;
+import org.eclipse.tracecompass.statesystem.core.statevalue.TmfStateValue;
+
+/**
+ * State values that are used in the kernel event handler. It's much better to
+ * use integer values whenever possible, since those take much less space in the
+ * history file.
+ *
+ * @author Alexandre Montplaisir
+ */
+@SuppressWarnings("javadoc")
+public interface StateValues {
+
+    /* CPU Status */
+    int CPU_STATUS_IDLE = 0;
+    int CPU_STATUS_RUN_USERMODE = 1;
+    int CPU_STATUS_RUN_SYSCALL = 2;
+    int CPU_STATUS_IRQ = 3;
+    int CPU_STATUS_SOFTIRQ = 4;
+
+    ITmfStateValue CPU_STATUS_IDLE_VALUE = TmfStateValue.newValueInt(CPU_STATUS_IDLE);
+    ITmfStateValue CPU_STATUS_RUN_USERMODE_VALUE = TmfStateValue.newValueInt(CPU_STATUS_RUN_USERMODE);
+    ITmfStateValue CPU_STATUS_RUN_SYSCALL_VALUE = TmfStateValue.newValueInt(CPU_STATUS_RUN_SYSCALL);
+    ITmfStateValue CPU_STATUS_IRQ_VALUE = TmfStateValue.newValueInt(CPU_STATUS_IRQ);
+    ITmfStateValue CPU_STATUS_SOFTIRQ_VALUE = TmfStateValue.newValueInt(CPU_STATUS_SOFTIRQ);
+
+    /* Process status */
+    int PROCESS_STATUS_UNKNOWN = 0;
+    int PROCESS_STATUS_WAIT_BLOCKED = 1;
+    int PROCESS_STATUS_RUN_USERMODE = 2;
+    int PROCESS_STATUS_RUN_SYSCALL = 3;
+    int PROCESS_STATUS_INTERRUPTED = 4;
+    int PROCESS_STATUS_WAIT_FOR_CPU = 5;
+    /**
+     * @since 1.0
+     */
+    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);
+
+    /* SoftIRQ-specific stuff. -1: null/disabled, >= 0: running on that CPU */
+    int SOFT_IRQ_RAISED = -2;
+
+    ITmfStateValue SOFT_IRQ_RAISED_VALUE = TmfStateValue.newValueInt(SOFT_IRQ_RAISED);
+}
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/ThreadPriorityAspect.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/ThreadPriorityAspect.java
new file mode 100644 (file)
index 0000000..087abb4
--- /dev/null
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2015 Keba AG
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Christian Mansky - Initial implementation
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis;
+
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.tracecompass.common.core.NonNullUtils;
+import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
+import org.eclipse.tracecompass.tmf.core.event.aspect.ITmfEventAspect;
+import org.eclipse.tracecompass.tmf.core.trace.TmfTraceUtils;
+
+/**
+ * This aspect finds the priority of the thread running from this event using
+ * the {@link KernelAnalysisModule}.
+ *
+ * @author Christian Mansky
+ * @since 1.0
+ */
+public final class ThreadPriorityAspect implements ITmfEventAspect {
+
+    /** The singleton instance */
+    public static final ThreadPriorityAspect INSTANCE = new ThreadPriorityAspect();
+
+    private ThreadPriorityAspect() {
+    }
+
+    @Override
+    public final String getName() {
+        return NonNullUtils.nullToEmptyString(Messages.AspectName_Prio);
+    }
+
+    @Override
+    public final String getHelpText() {
+        return NonNullUtils.nullToEmptyString(Messages.AspectHelpText_Prio);
+    }
+
+    @Override
+    public @Nullable Integer resolve(ITmfEvent event) {
+        KernelAnalysisModule kernelAnalysis = TmfTraceUtils.getAnalysisModuleOfClass(event.getTrace(), KernelAnalysisModule.class, KernelAnalysisModule.ID);
+        if (kernelAnalysis == null) {
+            return null;
+        }
+
+        Integer tid = KernelTidAspect.INSTANCE.resolve(event);
+        if (tid == null) {
+            return null;
+        }
+
+        Integer prio = KernelThreadInformationProvider.getThreadPrio(kernelAnalysis, tid, event.getTimestamp().getValue());
+        return prio;
+    }
+
+}
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/messages.properties b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/messages.properties
new file mode 100644 (file)
index 0000000..a666ee1
--- /dev/null
@@ -0,0 +1,15 @@
+###############################################################################
+# Copyright (c) 2014, 2015 Ã‰cole Polytechnique de Montréal
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     Geneviève Bastien - Initial API and implementation
+###############################################################################
+
+AspectName_Prio=Prio
+AspectHelpText_Prio=The priority of the thread this event belongs to
+LttngKernelAnalysisModule_Help=Builds the LTTng2 kernel state system to populate the Control Flow view and the Resources View
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/package-info.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/package-info.java
new file mode 100644 (file)
index 0000000..872cd80
--- /dev/null
@@ -0,0 +1,14 @@
+/*******************************************************************************
+ * Copyright (c) 2015 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Ericsson - Initial API and implementation
+ *******************************************************************************/
+
+@org.eclipse.jdt.annotation.NonNullByDefault
+package org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis;
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/model/HostThread.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/model/HostThread.java
new file mode 100644 (file)
index 0000000..5dbb56d
--- /dev/null
@@ -0,0 +1,91 @@
+/*******************************************************************************
+ * Copyright (c) 2014 Ã‰cole Polytechnique de Montréal
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Geneviève Bastien - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.analysis.os.linux.core.model;
+
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.tracecompass.common.core.NonNullUtils;
+
+import com.google.common.hash.HashFunction;
+import com.google.common.hash.Hashing;
+
+/**
+ * This class represents a thread from a specific host. Many machines in an
+ * experiment can have the same thread IDs. This class differentiates the
+ * threads by adding the host ID it belongs to.
+ *
+ * @author Geneviève Bastien
+ * @since 1.0
+ */
+public class HostThread {
+
+    private static final HashFunction HF = NonNullUtils.checkNotNull(Hashing.goodFastHash(32));
+
+    private final String fHost;
+    private final Integer fTid;
+
+    /**
+     * Constructor
+     *
+     * @param host
+     *            The host this thread belongs to
+     * @param tid
+     *            The thread ID of this thread
+     */
+    public HostThread(String host, Integer tid) {
+        fHost = host;
+        fTid = tid;
+    }
+
+    @Override
+    public int hashCode() {
+        return HF.newHasher()
+                .putUnencodedChars(fHost)
+                .putInt(fTid).hash().asInt();
+    }
+
+    @Override
+    public boolean equals(@Nullable Object o) {
+        if (o instanceof HostThread) {
+            HostThread hostTid = (HostThread) o;
+            if (fTid.equals(hostTid.fTid) &&
+                    fHost.equals(hostTid.fHost)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    @Override
+    public String toString() {
+        return "HostTid: [" + fHost + ',' + fTid + ']'; //$NON-NLS-1$
+    }
+
+    /**
+     * Get the thread ID of this thread
+     *
+     * @return The thread ID of this thread
+     */
+    public Integer getTid() {
+        return fTid;
+    }
+
+    /**
+     * Get the host ID of the machine this thread belongs to
+     *
+     * @return The host ID this thread belongs to
+     */
+    public String getHost() {
+        return fHost;
+    }
+
+}
\ No newline at end of file
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/model/package-info.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/model/package-info.java
new file mode 100644 (file)
index 0000000..8fa2180
--- /dev/null
@@ -0,0 +1,14 @@
+/*******************************************************************************
+ * Copyright (c) 2015 Ã‰cole Polytechnique de Montréal
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Ã‰cole Polytechnique de Montréal - Initial API and implementation
+ *******************************************************************************/
+
+@org.eclipse.jdt.annotation.NonNullByDefault
+package org.eclipse.tracecompass.analysis.os.linux.core.model;
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/trace/DefaultEventLayout.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/trace/DefaultEventLayout.java
new file mode 100644 (file)
index 0000000..00d7553
--- /dev/null
@@ -0,0 +1,243 @@
+/*******************************************************************************
+ * Copyright (c) 2015 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Alexandre Montplaisir - Initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.tracecompass.analysis.os.linux.core.trace;
+
+import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
+
+import java.util.Collection;
+
+import org.eclipse.jdt.annotation.NonNull;
+
+import com.google.common.collect.ImmutableList;
+
+/**
+ * A kernel event layout to be used by default. This can be useful for
+ * data-driven traces for example, where they can provide whatever event names
+ * they want.
+ *
+ * Due to historical reasons, the definitions are the same as LTTng event names.
+ *
+ * @author Alexandre Montplaisir
+ * @since 1.0
+ */
+public class DefaultEventLayout implements IKernelAnalysisEventLayout{
+
+    /* Event names */
+    private static final String IRQ_HANDLER_ENTRY = "irq_handler_entry"; //$NON-NLS-1$
+    private static final String IRQ_HANDLER_EXIT = "irq_handler_exit"; //$NON-NLS-1$
+    private static final String SOFTIRQ_ENTRY = "softirq_entry"; //$NON-NLS-1$
+    private static final String SOFTIRQ_EXIT = "softirq_exit"; //$NON-NLS-1$
+    private static final String SOFTIRQ_RAISE = "softirq_raise"; //$NON-NLS-1$
+    private static final String SCHED_SWITCH = "sched_switch"; //$NON-NLS-1$
+    private static final String SCHED_PI_SETPRIO = "sched_pi_setprio"; //$NON-NLS-1$
+
+    private static final Collection<String> SCHED_WAKEUP_EVENTS =
+            checkNotNull(ImmutableList.of("sched_wakeup", "sched_wakeup_new")); //$NON-NLS-1$ //$NON-NLS-2$
+
+    private static final String SCHED_PROCESS_FORK = "sched_process_fork"; //$NON-NLS-1$
+    private static final String SCHED_PROCESS_EXIT = "sched_process_exit"; //$NON-NLS-1$
+    private static final String SCHED_PROCESS_FREE = "sched_process_free"; //$NON-NLS-1$
+    private static final String STATEDUMP_PROCESS_STATE = "lttng_statedump_process_state"; //$NON-NLS-1$
+
+    private static final String SYSCALL_ENTRY_PREFIX = "sys_"; //$NON-NLS-1$
+    private static final String COMPAT_SYSCALL_ENTRY_PREFIX = "compat_sys_"; //$NON-NLS-1$
+    private static final String SYSCALL_EXIT_PREFIX = "exit_syscall"; //$NON-NLS-1$
+
+    /* Field names */
+    private static final String IRQ = "irq"; //$NON-NLS-1$
+    private static final String TID = "tid"; //$NON-NLS-1$
+    private static final String VEC = "vec"; //$NON-NLS-1$
+    private static final String PREV_TID = "prev_tid"; //$NON-NLS-1$
+    private static final String PREV_STATE = "prev_state"; //$NON-NLS-1$
+    private static final String NEXT_COMM = "next_comm"; //$NON-NLS-1$
+    private static final String NEXT_TID = "next_tid"; //$NON-NLS-1$
+    private static final String PARENT_TID = "parent_tid"; //$NON-NLS-1$
+    private static final String CHILD_COMM = "child_comm"; //$NON-NLS-1$
+    private static final String CHILD_TID = "child_tid"; //$NON-NLS-1$
+    private static final String PRIO = "prio"; //$NON-NLS-1$
+    private static final String NEW_PRIO = "newprio"; //$NON-NLS-1$
+    private static final String NEXT_PRIO = "next_prio"; //$NON-NLS-1$
+
+    /** All instances are the same. Only provide a static instance getter */
+    private DefaultEventLayout() {
+    }
+
+    /**
+     * The instance of this event layout
+     *
+     * This object is completely immutable, so no need to create additional
+     * instances via the constructor.
+     */
+    static final IKernelAnalysisEventLayout INSTANCE = new DefaultEventLayout();
+
+    // ------------------------------------------------------------------------
+    // Event names
+    // ------------------------------------------------------------------------
+
+    @Override
+    public String eventIrqHandlerEntry() {
+        return IRQ_HANDLER_ENTRY;
+    }
+
+    @Override
+    public String eventIrqHandlerExit() {
+        return IRQ_HANDLER_EXIT;
+    }
+
+    @Override
+    public String eventSoftIrqEntry() {
+        return SOFTIRQ_ENTRY;
+    }
+
+    @Override
+    public String eventSoftIrqExit() {
+        return SOFTIRQ_EXIT;
+    }
+
+    @Override
+    public String eventSoftIrqRaise() {
+        return SOFTIRQ_RAISE;
+    }
+
+    @Override
+    public String eventSchedSwitch() {
+        return SCHED_SWITCH;
+    }
+
+    /**
+     * @since 1.0
+     */
+    @Override
+    public String eventSchedPiSetprio() {
+        return SCHED_PI_SETPRIO;
+    }
+
+    @Override
+    public Collection<String> eventsSchedWakeup() {
+        return SCHED_WAKEUP_EVENTS;
+    }
+
+    @Override
+    public String eventSchedProcessFork() {
+        return SCHED_PROCESS_FORK;
+    }
+
+    @Override
+    public String eventSchedProcessExit() {
+        return SCHED_PROCESS_EXIT;
+    }
+
+    @Override
+    public String eventSchedProcessFree() {
+        return SCHED_PROCESS_FREE;
+    }
+
+    @Override
+    public @NonNull String eventStatedumpProcessState() {
+        return STATEDUMP_PROCESS_STATE;
+    }
+
+    @Override
+    public String eventSyscallEntryPrefix() {
+        return SYSCALL_ENTRY_PREFIX;
+    }
+
+    @Override
+    public String eventCompatSyscallEntryPrefix() {
+        return COMPAT_SYSCALL_ENTRY_PREFIX;
+    }
+
+    @Override
+    public String eventSyscallExitPrefix() {
+        return SYSCALL_EXIT_PREFIX;
+    }
+
+    // ------------------------------------------------------------------------
+    // Event field names
+    // ------------------------------------------------------------------------
+
+    @Override
+    public String fieldIrq() {
+        return IRQ;
+    }
+
+    @Override
+    public String fieldVec() {
+        return VEC;
+    }
+
+    @Override
+    public String fieldTid() {
+        return TID;
+    }
+
+    @Override
+    public String fieldPrevTid() {
+        return PREV_TID;
+    }
+
+    @Override
+    public String fieldPrevState() {
+        return PREV_STATE;
+    }
+
+    @Override
+    public String fieldNextComm() {
+        return NEXT_COMM;
+    }
+
+    @Override
+    public String fieldNextTid() {
+        return NEXT_TID;
+    }
+
+    @Override
+    public String fieldChildComm() {
+        return CHILD_COMM;
+    }
+
+    @Override
+    public String fieldParentTid() {
+        return PARENT_TID;
+    }
+
+    @Override
+    public String fieldChildTid() {
+        return CHILD_TID;
+    }
+
+    /**
+     * @since 1.0
+     */
+    @Override
+    public String fieldPrio() {
+        return PRIO;
+    }
+
+    /**
+     * @since 1.0
+     */
+    @Override
+    public String fieldNewPrio() {
+        return NEW_PRIO;
+    }
+
+    /**
+     * @since 1.0
+     */
+    @Override
+    public String fieldNextPrio() {
+        return NEXT_PRIO;
+    }
+
+}
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/trace/IKernelAnalysisEventLayout.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/trace/IKernelAnalysisEventLayout.java
new file mode 100644 (file)
index 0000000..4310892
--- /dev/null
@@ -0,0 +1,91 @@
+/*******************************************************************************
+ * Copyright (c) 2014, 2015 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Alexandre Montplaisir - Initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.tracecompass.analysis.os.linux.core.trace;
+
+import java.util.Collection;
+
+import org.eclipse.jdt.annotation.Nullable;
+
+/**
+ * Interface to define "concepts" present in the Linux kernel (represented by
+ * its tracepoints), that can then be exposed by different tracers under
+ * different names.
+ *
+ * @author Alexandre Montplaisir
+ */
+// The methods are named after the TRACE_EVENT's, should be straightforward
+@SuppressWarnings("javadoc")
+public interface IKernelAnalysisEventLayout {
+
+    // ------------------------------------------------------------------------
+    // Common definitions
+    // ------------------------------------------------------------------------
+
+    IKernelAnalysisEventLayout DEFAULT_LAYOUT = DefaultEventLayout.INSTANCE;
+
+    /**
+     * Whenever a process appears for the first time in a trace, we assume it
+     * starts inside this system call. (The syscall prefix is defined by the
+     * implementer of this interface.)
+     *
+     * TODO Change to a default method with Java 8?
+     */
+    String INITIAL_SYSCALL_NAME = "clone"; //$NON-NLS-1$
+
+    // ------------------------------------------------------------------------
+    // Event names
+    // ------------------------------------------------------------------------
+
+    String eventIrqHandlerEntry();
+    String eventIrqHandlerExit();
+    String eventSoftIrqEntry();
+    String eventSoftIrqExit();
+    String eventSoftIrqRaise();
+    String eventSchedSwitch();
+
+    /** @since 1.0 */
+    String eventSchedPiSetprio();
+
+    Collection<String> eventsSchedWakeup();
+    String eventSchedProcessFork();
+    String eventSchedProcessExit();
+    String eventSchedProcessFree();
+    @Nullable String eventStatedumpProcessState();
+    String eventSyscallEntryPrefix();
+    String eventCompatSyscallEntryPrefix();
+    String eventSyscallExitPrefix();
+
+    // ------------------------------------------------------------------------
+    // Event field names
+    // ------------------------------------------------------------------------
+
+    String fieldIrq();
+    String fieldVec();
+    String fieldTid();
+    String fieldPrevTid();
+    String fieldPrevState();
+    String fieldNextComm();
+    String fieldNextTid();
+    String fieldChildComm();
+    String fieldParentTid();
+    String fieldChildTid();
+
+    /** @since 1.0 */
+    String fieldPrio();
+
+    /** @since 1.0 */
+    String fieldNewPrio();
+
+    /** @since 1.0 */
+    String fieldNextPrio();
+}
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/trace/IKernelTrace.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/trace/IKernelTrace.java
new file mode 100644 (file)
index 0000000..92a07bf
--- /dev/null
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2015 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Alexandre Montplaisir - Initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.tracecompass.analysis.os.linux.core.trace;
+
+import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
+
+/**
+ * Trace type that represents a Linux kernel trace.
+ *
+ * Any trace implementing the interface should be able to run the different
+ * Linux kernel analyses in this plugin.
+ *
+ * @author Alexandre Montplaisir
+ */
+public interface IKernelTrace extends ITmfTrace {
+
+    /**
+     * Get the event layout of this trace. Many known concepts from the Linux
+     * kernel may be exported under different names, depending on the tracer.
+     *
+     * @return The event layout
+     */
+    IKernelAnalysisEventLayout getKernelEventLayout();
+}
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/trace/package-info.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/trace/package-info.java
new file mode 100644 (file)
index 0000000..efbe373
--- /dev/null
@@ -0,0 +1,14 @@
+/*******************************************************************************
+ * Copyright (c) 2015 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Ericsson - Initial API and implementation
+ *******************************************************************************/
+
+@org.eclipse.jdt.annotation.NonNullByDefault
+package org.eclipse.tracecompass.analysis.os.linux.core.trace;
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/internal/analysis/os/linux/core/Activator.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/internal/analysis/os/linux/core/Activator.java
new file mode 100644 (file)
index 0000000..b513e6d
--- /dev/null
@@ -0,0 +1,142 @@
+/*******************************************************************************
+ * Copyright (c) 2015 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Alexandre Montplaisir - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.internal.analysis.os.linux.core;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Plugin;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jdt.annotation.Nullable;
+import org.osgi.framework.BundleContext;
+
+/**
+ * <b><u>Activator</u></b>
+ * <p>
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends Plugin {
+
+    // ------------------------------------------------------------------------
+    // Attributes
+    // ------------------------------------------------------------------------
+
+    /**
+     * The plug-in ID
+     */
+    public static final String PLUGIN_ID = "org.eclipse.tracecompass.analysis.linux.core"; //$NON-NLS-1$
+
+    /**
+     * The shared instance
+     */
+    private static @Nullable Activator fPlugin;
+
+    // ------------------------------------------------------------------------
+    // Constructors
+    // ------------------------------------------------------------------------
+
+    /**
+     * The constructor
+     */
+    public Activator() {
+    }
+
+    // ------------------------------------------------------------------------
+    // Accessors
+    // ------------------------------------------------------------------------
+
+    /**
+     * Returns the shared instance
+     *
+     * @return the shared instance
+     */
+    public static Activator getDefault() {
+        Activator plugin = fPlugin;
+        if (plugin == null) {
+            throw new IllegalStateException();
+        }
+        return plugin;
+    }
+
+    // ------------------------------------------------------------------------
+    // Operators
+    // ------------------------------------------------------------------------
+
+    @Override
+    public void start(@Nullable BundleContext context) throws Exception {
+        super.start(context);
+        fPlugin = this;
+    }
+
+    @Override
+    public void stop(@Nullable BundleContext context) throws Exception {
+        fPlugin = null;
+        super.stop(context);
+    }
+
+    /**
+     * Logs a message with severity INFO in the runtime log of the plug-in.
+     *
+     * @param message A message to log
+     */
+    public void logInfo(String message) {
+        getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message));
+    }
+
+    /**
+     * Logs a message and exception with severity INFO in the runtime log of the plug-in.
+     *
+     * @param message A message to log
+     * @param exception A exception to log
+     */
+    public void logInfo(String message, Throwable exception) {
+        getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message, exception));
+    }
+
+    /**
+     * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
+     *
+     * @param message A message to log
+     */
+    public void logWarning(String message) {
+        getLog().log(new Status(IStatus.WARNING, PLUGIN_ID, message));
+    }
+
+    /**
+     * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
+     *
+     * @param message A message to log
+     * @param exception A exception to log
+     */
+    public void logWarning(String message, Throwable exception) {
+        getLog().log(new Status(IStatus.WARNING, PLUGIN_ID, message, exception));
+    }
+
+    /**
+     * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
+     *
+     * @param message A message to log
+     */
+    public void logError(String message) {
+        getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message));
+    }
+
+    /**
+     * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
+     *
+     * @param message A message to log
+     * @param exception A exception to log
+     */
+    public void logError(String message, Throwable exception) {
+        getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message, exception));
+    }
+
+}
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/internal/analysis/os/linux/core/kernelanalysis/KernelStateProvider.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/internal/analysis/os/linux/core/kernelanalysis/KernelStateProvider.java
new file mode 100644 (file)
index 0000000..605e275
--- /dev/null
@@ -0,0 +1,649 @@
+/*******************************************************************************
+ * Copyright (c) 2012, 2015 Ericsson
+ * Copyright (c) 2010, 2011 Ã‰cole Polytechnique de Montréal
+ * Copyright (c) 2010, 2011 Alexandre Montplaisir <alexandre.montplaisir@gmail.com>
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.internal.analysis.os.linux.core.kernelanalysis;
+
+import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
+
+import java.util.Map;
+
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.Attributes;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.StateValues;
+import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelAnalysisEventLayout;
+import org.eclipse.tracecompass.internal.analysis.os.linux.core.kernelanalysis.LinuxValues;
+import org.eclipse.tracecompass.statesystem.core.ITmfStateSystemBuilder;
+import org.eclipse.tracecompass.statesystem.core.exceptions.AttributeNotFoundException;
+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;
+import org.eclipse.tracecompass.tmf.core.event.ITmfEventField;
+import org.eclipse.tracecompass.tmf.core.event.aspect.TmfCpuAspect;
+import org.eclipse.tracecompass.tmf.core.statesystem.AbstractTmfStateProvider;
+import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
+import org.eclipse.tracecompass.tmf.core.trace.TmfTraceUtils;
+
+import com.google.common.collect.ImmutableMap;
+
+/**
+ * This is the state change input plugin for TMF's state system which handles
+ * the LTTng 2.0 kernel traces in CTF format.
+ *
+ * It uses the reference handler defined in CTFKernelHandler.java.
+ *
+ * @author alexmont
+ *
+ */
+public class KernelStateProvider extends AbstractTmfStateProvider {
+
+    // ------------------------------------------------------------------------
+    // Static fields
+    // ------------------------------------------------------------------------
+
+    /**
+     * Version number of this state provider. Please bump this if you modify the
+     * contents of the generated state history in some way.
+     */
+    private static final int VERSION = 7;
+
+    private static final int IRQ_HANDLER_ENTRY_INDEX = 1;
+    private static final int IRQ_HANDLER_EXIT_INDEX = 2;
+    private static final int SOFT_IRQ_ENTRY_INDEX = 3;
+    private static final int SOFT_IRQ_EXIT_INDEX = 4;
+    private static final int SOFT_IRQ_RAISE_INDEX = 5;
+    private static final int SCHED_SWITCH_INDEX = 6;
+    private static final int SCHED_PROCESS_FORK_INDEX = 7;
+    private static final int SCHED_PROCESS_EXIT_INDEX = 8;
+    private static final int SCHED_PROCESS_FREE_INDEX = 9;
+    private static final int STATEDUMP_PROCESS_STATE_INDEX = 10;
+    private static final int SCHED_WAKEUP_INDEX = 11;
+    private static final int SCHED_PI_SETPRIO_INDEX = 12;
+
+
+    // ------------------------------------------------------------------------
+    // Fields
+    // ------------------------------------------------------------------------
+
+    private final Map<String, Integer> fEventNames;
+    private final IKernelAnalysisEventLayout fLayout;
+
+    // ------------------------------------------------------------------------
+    // Constructor
+    // ------------------------------------------------------------------------
+
+    /**
+     * Instantiate a new state provider plugin.
+     *
+     * @param trace
+     *            The LTTng 2.0 kernel trace directory
+     * @param layout
+     *            The event layout to use for this state provider. Usually
+     *            depending on the tracer implementation.
+     */
+    public KernelStateProvider(ITmfTrace trace, IKernelAnalysisEventLayout layout) {
+        super(trace, "Kernel"); //$NON-NLS-1$
+        fLayout = layout;
+        fEventNames = buildEventNames(layout);
+    }
+
+    // ------------------------------------------------------------------------
+    // Event names management
+    // ------------------------------------------------------------------------
+
+    private static Map<String, Integer> buildEventNames(IKernelAnalysisEventLayout layout) {
+        ImmutableMap.Builder<String, Integer> builder = ImmutableMap.builder();
+
+        builder.put(layout.eventIrqHandlerEntry(), IRQ_HANDLER_ENTRY_INDEX);
+        builder.put(layout.eventIrqHandlerExit(), IRQ_HANDLER_EXIT_INDEX);
+        builder.put(layout.eventSoftIrqEntry(), SOFT_IRQ_ENTRY_INDEX);
+        builder.put(layout.eventSoftIrqExit(), SOFT_IRQ_EXIT_INDEX);
+        builder.put(layout.eventSoftIrqRaise(), SOFT_IRQ_RAISE_INDEX);
+        builder.put(layout.eventSchedSwitch(), SCHED_SWITCH_INDEX);
+        builder.put(layout.eventSchedPiSetprio(), SCHED_PI_SETPRIO_INDEX);
+        builder.put(layout.eventSchedProcessFork(), SCHED_PROCESS_FORK_INDEX);
+        builder.put(layout.eventSchedProcessExit(), SCHED_PROCESS_EXIT_INDEX);
+        builder.put(layout.eventSchedProcessFree(), SCHED_PROCESS_FREE_INDEX);
+
+        final String eventStatedumpProcessState = layout.eventStatedumpProcessState();
+        if (eventStatedumpProcessState != null) {
+            builder.put(eventStatedumpProcessState, STATEDUMP_PROCESS_STATE_INDEX);
+        }
+
+        for (String eventSchedWakeup : layout.eventsSchedWakeup()) {
+            builder.put(eventSchedWakeup, SCHED_WAKEUP_INDEX);
+        }
+
+        return checkNotNull(builder.build());
+    }
+
+    // ------------------------------------------------------------------------
+    // IStateChangeInput
+    // ------------------------------------------------------------------------
+
+    @Override
+    public int getVersion() {
+        return VERSION;
+    }
+
+    @Override
+    public void assignTargetStateSystem(ITmfStateSystemBuilder ssb) {
+        /* We can only set up the locations once the state system is assigned */
+        super.assignTargetStateSystem(ssb);
+    }
+
+    @Override
+    public KernelStateProvider getNewInstance() {
+        return new KernelStateProvider(this.getTrace(), fLayout);
+    }
+
+    @Override
+    protected void eventHandle(@Nullable ITmfEvent event) {
+        if (event == null) {
+            return;
+        }
+
+        Object cpuObj = TmfTraceUtils.resolveEventAspectOfClassForEvent(event.getTrace(), TmfCpuAspect.class, event);
+        if (cpuObj == null) {
+            /* We couldn't find any CPU information, ignore this event */
+            return;
+        }
+        Integer cpu = (Integer) cpuObj;
+
+        final String eventName = event.getName();
+        final long ts = event.getTimestamp().getValue();
+
+        try {
+            final ITmfStateSystemBuilder ss = checkNotNull(getStateSystemBuilder());
+
+            /* Shortcut for the "current CPU" attribute node */
+            final int currentCPUNode = ss.getQuarkRelativeAndAdd(getNodeCPUs(ss), cpu.toString());
+
+            /*
+             * Shortcut for the "current thread" attribute node. It requires
+             * querying the current CPU's current thread.
+             */
+            int quark = ss.getQuarkRelativeAndAdd(currentCPUNode, Attributes.CURRENT_THREAD);
+            ITmfStateValue value = ss.queryOngoingState(quark);
+            int thread = value.isNull() ? -1 : value.unboxInt();
+            final int currentThreadNode = ss.getQuarkRelativeAndAdd(getNodeThreads(ss), String.valueOf(thread));
+
+            /*
+             * Feed event to the history system if it's known to cause a state
+             * transition.
+             */
+            Integer idx = fEventNames.get(eventName);
+            int intval = (idx == null ? -1 : idx.intValue());
+            switch (intval) {
+
+            case IRQ_HANDLER_ENTRY_INDEX:
+            {
+                Integer irqId = ((Long) event.getContent().getField(fLayout.fieldIrq()).getValue()).intValue();
+
+                /* Mark this IRQ as active in the resource tree.
+                 * The state value = the CPU on which this IRQ is sitting */
+                quark = ss.getQuarkRelativeAndAdd(getNodeIRQs(ss), irqId.toString());
+                value = TmfStateValue.newValueInt(cpu.intValue());
+                ss.modifyAttribute(ts, value, quark);
+
+                /* Change the status of the running process to interrupted */
+                quark = ss.getQuarkRelativeAndAdd(currentThreadNode, Attributes.STATUS);
+                value = StateValues.PROCESS_STATUS_INTERRUPTED_VALUE;
+                ss.modifyAttribute(ts, value, quark);
+
+                /* Change the status of the CPU to interrupted */
+                quark = ss.getQuarkRelativeAndAdd(currentCPUNode, Attributes.STATUS);
+                value = StateValues.CPU_STATUS_IRQ_VALUE;
+                ss.modifyAttribute(ts, value, quark);
+            }
+                break;
+
+            case IRQ_HANDLER_EXIT_INDEX:
+            {
+                Integer irqId = ((Long) event.getContent().getField(fLayout.fieldIrq()).getValue()).intValue();
+
+                /* Put this IRQ back to inactive in the resource tree */
+                quark = ss.getQuarkRelativeAndAdd(getNodeIRQs(ss), irqId.toString());
+                value = TmfStateValue.nullValue();
+                ss.modifyAttribute(ts, value, quark);
+
+                /* Set the previous process back to running */
+                setProcessToRunning(ss, ts, currentThreadNode);
+
+                /* Set the CPU status back to running or "idle" */
+                cpuExitInterrupt(ss, ts, currentCPUNode, currentThreadNode);
+            }
+                break;
+
+            case SOFT_IRQ_ENTRY_INDEX:
+            {
+                Integer softIrqId = ((Long) event.getContent().getField(fLayout.fieldVec()).getValue()).intValue();
+
+                /* Mark this SoftIRQ as active in the resource tree.
+                 * The state value = the CPU on which this SoftIRQ is processed */
+                quark = ss.getQuarkRelativeAndAdd(getNodeSoftIRQs(ss), softIrqId.toString());
+                value = TmfStateValue.newValueInt(cpu.intValue());
+                ss.modifyAttribute(ts, value, quark);
+
+                /* Change the status of the running process to interrupted */
+                quark = ss.getQuarkRelativeAndAdd(currentThreadNode, Attributes.STATUS);
+                value = StateValues.PROCESS_STATUS_INTERRUPTED_VALUE;
+                ss.modifyAttribute(ts, value, quark);
+
+                /* Change the status of the CPU to interrupted */
+                quark = ss.getQuarkRelativeAndAdd(currentCPUNode, Attributes.STATUS);
+                value = StateValues.CPU_STATUS_SOFTIRQ_VALUE;
+                ss.modifyAttribute(ts, value, quark);
+            }
+                break;
+
+            case SOFT_IRQ_EXIT_INDEX:
+            {
+                Integer softIrqId = ((Long) event.getContent().getField(fLayout.fieldVec()).getValue()).intValue();
+
+                /* Put this SoftIRQ back to inactive (= -1) in the resource tree */
+                quark = ss.getQuarkRelativeAndAdd(getNodeSoftIRQs(ss), softIrqId.toString());
+                value = TmfStateValue.nullValue();
+                ss.modifyAttribute(ts, value, quark);
+
+                /* Set the previous process back to running */
+                setProcessToRunning(ss, ts, currentThreadNode);
+
+                /* Set the CPU status back to "busy" or "idle" */
+                cpuExitInterrupt(ss, ts, currentCPUNode, currentThreadNode);
+            }
+                break;
+
+            case SOFT_IRQ_RAISE_INDEX:
+            /* Fields: int32 vec */
+            {
+                Integer softIrqId = ((Long) event.getContent().getField(fLayout.fieldVec()).getValue()).intValue();
+
+                /* Mark this SoftIRQ as *raised* in the resource tree.
+                 * State value = -2 */
+                quark = ss.getQuarkRelativeAndAdd(getNodeSoftIRQs(ss), softIrqId.toString());
+                value = StateValues.SOFT_IRQ_RAISED_VALUE;
+                ss.modifyAttribute(ts, value, quark);
+            }
+                break;
+
+            case SCHED_SWITCH_INDEX:
+            {
+                ITmfEventField content = event.getContent();
+                Integer prevTid = ((Long) content.getField(fLayout.fieldPrevTid()).getValue()).intValue();
+                Long prevState = (Long) content.getField(fLayout.fieldPrevState()).getValue();
+                String nextProcessName = (String) content.getField(fLayout.fieldNextComm()).getValue();
+                Integer nextTid = ((Long) content.getField(fLayout.fieldNextTid()).getValue()).intValue();
+                Integer nextPrio = ((Long) content.getField(fLayout.fieldNextPrio()).getValue()).intValue();
+
+                Integer formerThreadNode = ss.getQuarkRelativeAndAdd(getNodeThreads(ss), prevTid.toString());
+                Integer newCurrentThreadNode = ss.getQuarkRelativeAndAdd(getNodeThreads(ss), nextTid.toString());
+
+                /* Set the status of the process that got scheduled out. */
+                quark = ss.getQuarkRelativeAndAdd(formerThreadNode, Attributes.STATUS);
+                if (prevState != 0) {
+                    value = StateValues.PROCESS_STATUS_WAIT_BLOCKED_VALUE;
+                } else {
+                    value = StateValues.PROCESS_STATUS_WAIT_FOR_CPU_VALUE;
+                }
+                ss.modifyAttribute(ts, value, quark);
+
+                /* Set the status of the new scheduled process */
+                setProcessToRunning(ss, ts, newCurrentThreadNode);
+
+                /* Set the exec name of the new process */
+                quark = ss.getQuarkRelativeAndAdd(newCurrentThreadNode, Attributes.EXEC_NAME);
+                value = TmfStateValue.newValueString(nextProcessName);
+                ss.modifyAttribute(ts, value, quark);
+
+                /* Set the current prio for the new process */
+                quark = ss.getQuarkRelativeAndAdd(newCurrentThreadNode, Attributes.PRIO);
+                value = TmfStateValue.newValueInt(nextPrio);
+                ss.modifyAttribute(ts, value, quark);
+
+                /* Make sure the PPID and system_call sub-attributes exist */
+                ss.getQuarkRelativeAndAdd(newCurrentThreadNode, Attributes.SYSTEM_CALL);
+                ss.getQuarkRelativeAndAdd(newCurrentThreadNode, Attributes.PPID);
+
+                /* Set the current scheduled process on the relevant CPU */
+                quark = ss.getQuarkRelativeAndAdd(currentCPUNode, Attributes.CURRENT_THREAD);
+                value = TmfStateValue.newValueInt(nextTid);
+                ss.modifyAttribute(ts, value, quark);
+
+                /* Set the status of the CPU itself */
+                if (nextTid > 0) {
+                    /* Check if the entering process is in kernel or user mode */
+                    quark = ss.getQuarkRelativeAndAdd(newCurrentThreadNode, Attributes.SYSTEM_CALL);
+                    if (ss.queryOngoingState(quark).isNull()) {
+                        value = StateValues.CPU_STATUS_RUN_USERMODE_VALUE;
+                    } else {
+                        value = StateValues.CPU_STATUS_RUN_SYSCALL_VALUE;
+                    }
+                } else {
+                    value = StateValues.CPU_STATUS_IDLE_VALUE;
+                }
+                quark = ss.getQuarkRelativeAndAdd(currentCPUNode, Attributes.STATUS);
+                ss.modifyAttribute(ts, value, quark);
+            }
+                break;
+
+            case SCHED_PI_SETPRIO_INDEX:
+            {
+                ITmfEventField content = event.getContent();
+                Integer tid = ((Long) content.getField(fLayout.fieldTid()).getValue()).intValue();
+                Integer prio = ((Long) content.getField(fLayout.fieldNewPrio()).getValue()).intValue();
+
+                Integer updateThreadNode = ss.getQuarkRelativeAndAdd(getNodeThreads(ss), tid.toString());
+
+                /* Set the current prio for the new process */
+                quark = ss.getQuarkRelativeAndAdd(updateThreadNode, Attributes.PRIO);
+                value = TmfStateValue.newValueInt(prio);
+                ss.modifyAttribute(ts, value, quark);
+            }
+                break;
+
+            case SCHED_PROCESS_FORK_INDEX:
+            {
+                ITmfEventField content = event.getContent();
+                // String parentProcessName = (String) event.getFieldValue("parent_comm");
+                String childProcessName = (String) content.getField(fLayout.fieldChildComm()).getValue();
+                // assert ( parentProcessName.equals(childProcessName) );
+
+                Integer parentTid = ((Long) content.getField(fLayout.fieldParentTid()).getValue()).intValue();
+                Integer childTid = ((Long) content.getField(fLayout.fieldChildTid()).getValue()).intValue();
+
+                Integer parentTidNode = ss.getQuarkRelativeAndAdd(getNodeThreads(ss), parentTid.toString());
+                Integer childTidNode = ss.getQuarkRelativeAndAdd(getNodeThreads(ss), childTid.toString());
+
+                /* Assign the PPID to the new process */
+                quark = ss.getQuarkRelativeAndAdd(childTidNode, Attributes.PPID);
+                value = TmfStateValue.newValueInt(parentTid);
+                ss.modifyAttribute(ts, value, quark);
+
+                /* Set the new process' exec_name */
+                quark = ss.getQuarkRelativeAndAdd(childTidNode, Attributes.EXEC_NAME);
+                value = TmfStateValue.newValueString(childProcessName);
+                ss.modifyAttribute(ts, value, quark);
+
+                /* Set the new process' status */
+                quark = ss.getQuarkRelativeAndAdd(childTidNode, Attributes.STATUS);
+                value = StateValues.PROCESS_STATUS_WAIT_FOR_CPU_VALUE;
+                ss.modifyAttribute(ts, value, quark);
+
+                /* Set the process' syscall name, to be the same as the parent's */
+                quark = ss.getQuarkRelativeAndAdd(parentTidNode, Attributes.SYSTEM_CALL);
+                value = ss.queryOngoingState(quark);
+                if (value.isNull()) {
+                    /*
+                     * Maybe we were missing info about the parent? At least we
+                     * will set the child right. Let's suppose "sys_clone".
+                     */
+                    value = TmfStateValue.newValueString(fLayout.eventSyscallEntryPrefix() + IKernelAnalysisEventLayout.INITIAL_SYSCALL_NAME);
+                }
+                quark = ss.getQuarkRelativeAndAdd(childTidNode, Attributes.SYSTEM_CALL);
+                ss.modifyAttribute(ts, value, quark);
+            }
+                break;
+
+            case SCHED_PROCESS_EXIT_INDEX:
+                break;
+
+            case SCHED_PROCESS_FREE_INDEX:
+            {
+                Integer tid = ((Long) event.getContent().getField(fLayout.fieldTid()).getValue()).intValue();
+                /*
+                 * Remove the process and all its sub-attributes from the
+                 * current state
+                 */
+                quark = ss.getQuarkRelativeAndAdd(getNodeThreads(ss), tid.toString());
+                ss.removeAttribute(ts, quark);
+            }
+                break;
+
+            case STATEDUMP_PROCESS_STATE_INDEX:
+                /* LTTng-specific */
+            {
+                ITmfEventField content = event.getContent();
+                int tid = ((Long) content.getField("tid").getValue()).intValue(); //$NON-NLS-1$
+                int pid = ((Long) content.getField("pid").getValue()).intValue(); //$NON-NLS-1$
+                int ppid = ((Long) content.getField("ppid").getValue()).intValue(); //$NON-NLS-1$
+                int status = ((Long) content.getField("status").getValue()).intValue(); //$NON-NLS-1$
+                String name = (String) content.getField("name").getValue(); //$NON-NLS-1$
+                /*
+                 * "mode" could be interesting too, but it doesn't seem to be
+                 * populated with anything relevant for now.
+                 */
+
+                int curThreadNode = ss.getQuarkRelativeAndAdd(getNodeThreads(ss), String.valueOf(tid));
+
+                /* Set the process' name */
+                quark = ss.getQuarkRelativeAndAdd(curThreadNode, Attributes.EXEC_NAME);
+                if (ss.queryOngoingState(quark).isNull()) {
+                    /* If the value didn't exist previously, set it */
+                    value = TmfStateValue.newValueString(name);
+                    ss.modifyAttribute(ts, value, quark);
+                }
+
+                /* Set the process' PPID */
+                quark = ss.getQuarkRelativeAndAdd(curThreadNode, Attributes.PPID);
+                if (ss.queryOngoingState(quark).isNull()) {
+                    if (pid == tid) {
+                        /* We have a process. Use the 'PPID' field. */
+                        value = TmfStateValue.newValueInt(ppid);
+                    } else {
+                        /* We have a thread, use the 'PID' field for the parent. */
+                        value = TmfStateValue.newValueInt(pid);
+                    }
+                    ss.modifyAttribute(ts, value, quark);
+                }
+
+                /* Set the process' status */
+                quark = ss.getQuarkRelativeAndAdd(curThreadNode, Attributes.STATUS);
+                if (ss.queryOngoingState(quark).isNull()) {
+                    switch (status) {
+                    case LinuxValues.STATEDUMP_PROCESS_STATUS_WAIT_CPU:
+                        value = StateValues.PROCESS_STATUS_WAIT_FOR_CPU_VALUE;
+                        break;
+                    case LinuxValues.STATEDUMP_PROCESS_STATUS_WAIT:
+                        /*
+                         * We have no information on what the process is waiting
+                         * on (unlike a sched_switch for example), so we will
+                         * use the WAIT_UNKNOWN state instead of the "normal"
+                         * WAIT_BLOCKED state.
+                         */
+                        value = StateValues.PROCESS_STATUS_WAIT_UNKNOWN_VALUE;
+                        break;
+                    default:
+                        value = StateValues.PROCESS_STATUS_UNKNOWN_VALUE;
+                    }
+                    ss.modifyAttribute(ts, value, quark);
+                }
+            }
+                break;
+
+            case SCHED_WAKEUP_INDEX:
+            {
+                final int tid = ((Long) event.getContent().getField(fLayout.fieldTid()).getValue()).intValue();
+                final int prio = ((Long) event.getContent().getField(fLayout.fieldPrio()).getValue()).intValue();
+                final int threadNode = ss.getQuarkRelativeAndAdd(getNodeThreads(ss), String.valueOf(tid));
+
+                /*
+                 * The process indicated in the event's payload is now ready to
+                 * run. Assign it to the "wait for cpu" state, but only if it
+                 * was not already running.
+                 */
+                quark = ss.getQuarkRelativeAndAdd(threadNode, Attributes.STATUS);
+                int status = ss.queryOngoingState(quark).unboxInt();
+
+                if (status != StateValues.PROCESS_STATUS_RUN_SYSCALL &&
+                    status != StateValues.PROCESS_STATUS_RUN_USERMODE) {
+                    value = StateValues.PROCESS_STATUS_WAIT_FOR_CPU_VALUE;
+                    ss.modifyAttribute(ts, value, quark);
+                }
+
+                /*
+                 * When a user changes a threads prio (e.g. with pthread_setschedparam),
+                 * it shows in ftrace with a sched_wakeup.
+                 */
+                quark = ss.getQuarkRelativeAndAdd(threadNode, Attributes.PRIO);
+                value = TmfStateValue.newValueInt(prio);
+                ss.modifyAttribute(ts, value, quark);
+            }
+                break;
+
+            default:
+            /* Other event types not covered by the main switch */
+            {
+                if (eventName.startsWith(fLayout.eventSyscallEntryPrefix())
+                        || eventName.startsWith(fLayout.eventCompatSyscallEntryPrefix())) {
+
+                    /* Assign the new system call to the process */
+                    quark = ss.getQuarkRelativeAndAdd(currentThreadNode, Attributes.SYSTEM_CALL);
+                    value = TmfStateValue.newValueString(eventName);
+                    ss.modifyAttribute(ts, value, quark);
+
+                    /* Put the process in system call mode */
+                    quark = ss.getQuarkRelativeAndAdd(currentThreadNode, Attributes.STATUS);
+                    value = StateValues.PROCESS_STATUS_RUN_SYSCALL_VALUE;
+                    ss.modifyAttribute(ts, value, quark);
+
+                    /* Put the CPU in system call (kernel) mode */
+                    quark = ss.getQuarkRelativeAndAdd(currentCPUNode, Attributes.STATUS);
+                    value = StateValues.CPU_STATUS_RUN_SYSCALL_VALUE;
+                    ss.modifyAttribute(ts, value, quark);
+
+                } else if (eventName.startsWith(fLayout.eventSyscallExitPrefix())) {
+
+                    /* Clear the current system call on the process */
+                    quark = ss.getQuarkRelativeAndAdd(currentThreadNode, Attributes.SYSTEM_CALL);
+                    value = TmfStateValue.nullValue();
+                    ss.modifyAttribute(ts, value, quark);
+
+                    /* Put the process' status back to user mode */
+                    quark = ss.getQuarkRelativeAndAdd(currentThreadNode, Attributes.STATUS);
+                    value = StateValues.PROCESS_STATUS_RUN_USERMODE_VALUE;
+                    ss.modifyAttribute(ts, value, quark);
+
+                    /* Put the CPU's status back to user mode */
+                    quark = ss.getQuarkRelativeAndAdd(currentCPUNode, Attributes.STATUS);
+                    value = StateValues.CPU_STATUS_RUN_USERMODE_VALUE;
+                    ss.modifyAttribute(ts, value, quark);
+                }
+
+            }
+                break;
+            } // End of big switch
+
+        } catch (AttributeNotFoundException ae) {
+            /*
+             * This would indicate a problem with the logic of the manager here,
+             * so it shouldn't happen.
+             */
+            ae.printStackTrace();
+
+        } catch (TimeRangeException tre) {
+            /*
+             * This would happen if the events in the trace aren't ordered
+             * chronologically, which should never be the case ...
+             */
+            System.err.println("TimeRangeExcpetion caught in the state system's event manager."); //$NON-NLS-1$
+            System.err.println("Are the events in the trace correctly ordered?"); //$NON-NLS-1$
+            tre.printStackTrace();
+
+        } catch (StateValueTypeException sve) {
+            /*
+             * This would happen if we were trying to push/pop attributes not of
+             * type integer. Which, once again, should never happen.
+             */
+            sve.printStackTrace();
+        }
+    }
+
+    // ------------------------------------------------------------------------
+    // Convenience methods for commonly-used attribute tree locations
+    // ------------------------------------------------------------------------
+
+    private static int getNodeCPUs(ITmfStateSystemBuilder ssb) {
+        return ssb.getQuarkAbsoluteAndAdd(Attributes.CPUS);
+    }
+
+    private static int getNodeThreads(ITmfStateSystemBuilder ssb) {
+        return ssb.getQuarkAbsoluteAndAdd(Attributes.THREADS);
+    }
+
+    private static int getNodeIRQs(ITmfStateSystemBuilder ssb) {
+        return ssb.getQuarkAbsoluteAndAdd(Attributes.RESOURCES, Attributes.IRQS);
+    }
+
+    private static int getNodeSoftIRQs(ITmfStateSystemBuilder ssb) {
+        return ssb.getQuarkAbsoluteAndAdd(Attributes.RESOURCES, Attributes.SOFT_IRQS);
+    }
+
+    // ------------------------------------------------------------------------
+    // Advanced state-setting methods
+    // ------------------------------------------------------------------------
+
+    /**
+     * When we want to set a process back to a "running" state, first check
+     * its current System_call attribute. If there is a system call active, we
+     * put the process back in the syscall state. If not, we put it back in
+     * user mode state.
+     */
+    private static void setProcessToRunning(ITmfStateSystemBuilder ssb, long ts, int currentThreadNode)
+            throws AttributeNotFoundException, TimeRangeException,
+            StateValueTypeException {
+        int quark;
+        ITmfStateValue value;
+
+        quark = ssb.getQuarkRelativeAndAdd(currentThreadNode, Attributes.SYSTEM_CALL);
+        if (ssb.queryOngoingState(quark).isNull()) {
+            /* We were in user mode before the interruption */
+            value = StateValues.PROCESS_STATUS_RUN_USERMODE_VALUE;
+        } else {
+            /* We were previously in kernel mode */
+            value = StateValues.PROCESS_STATUS_RUN_SYSCALL_VALUE;
+        }
+        quark = ssb.getQuarkRelativeAndAdd(currentThreadNode, Attributes.STATUS);
+        ssb.modifyAttribute(ts, value, quark);
+    }
+
+    /**
+     * Similar logic as above, but to set the CPU's status when it's coming out
+     * of an interruption.
+     */
+    private static void cpuExitInterrupt(ITmfStateSystemBuilder ssb, long ts,
+            int currentCpuNode, int currentThreadNode)
+            throws StateValueTypeException, AttributeNotFoundException,
+            TimeRangeException {
+        int quark;
+        ITmfStateValue value;
+
+        quark = ssb.getQuarkRelativeAndAdd(currentCpuNode, Attributes.CURRENT_THREAD);
+        if (ssb.queryOngoingState(quark).unboxInt() > 0) {
+            /* There was a process on the CPU */
+            quark = ssb.getQuarkRelative(currentThreadNode, Attributes.SYSTEM_CALL);
+            if (ssb.queryOngoingState(quark).isNull()) {
+                /* That process was in user mode */
+                value = StateValues.CPU_STATUS_RUN_USERMODE_VALUE;
+            } else {
+                /* That process was in a system call */
+                value = StateValues.CPU_STATUS_RUN_SYSCALL_VALUE;
+            }
+        } else {
+            /* There was no real process scheduled, CPU was idle */
+            value = StateValues.CPU_STATUS_IDLE_VALUE;
+        }
+        quark = ssb.getQuarkRelativeAndAdd(currentCpuNode, Attributes.STATUS);
+        ssb.modifyAttribute(ts, value, quark);
+    }
+}
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/internal/analysis/os/linux/core/kernelanalysis/LinuxValues.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/internal/analysis/os/linux/core/kernelanalysis/LinuxValues.java
new file mode 100644 (file)
index 0000000..88c15fd
--- /dev/null
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * Copyright (c) 2015 EfficiOS Inc., Alexandre Montplaisir
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Alexandre Montplaisir - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.internal.analysis.os.linux.core.kernelanalysis;
+
+/**
+ * Definitions of values used in the Linux kernel code.
+ *
+ * Instead of using "magic numbers" in state providers, the definitions should
+ * be added here first.
+ *
+ * @author Alexandre Montplaisir
+ */
+@SuppressWarnings("javadoc")
+public interface LinuxValues {
+
+    /*
+     * Process states found in scheduler events.
+     *
+     * From include/linux/sched.h
+     *
+     * #define TASK_RUNNING 0
+     * #define TASK_INTERRUPTIBLE 1
+     * #define TASK_UNINTERRUPTIBLE 2
+     * #define __TASK_STOPPED 4
+     * #define __TASK_TRACED 8
+     * #define EXIT_DEAD 16
+     * #define EXIT_ZOMBIE 32
+     * #define EXIT_TRACE (EXIT_ZOMBIE | EXIT_DEAD)
+     * #define TASK_DEAD 64
+     * #define TASK_WAKEKILL 128
+     * #define TASK_WAKING 256
+     * #define TASK_PARKED 512
+     * #define TASK_STATE_MAX 1024
+     */
+    int TASK_STATE_RUNNING = 0;
+    int TASK_STATE_MAX = 1024;
+
+    /*
+     * Process statuses, used in LTTng statedump events.
+     *
+     * This is LTTng-specific, but the statedump are handled at this level, so
+     * it makes sense to add those definitions here.
+     *
+     * Taken from lttng-module's lttng-statedump-impl.c:
+     *
+     * enum lttng_process_status {
+     *     LTTNG_UNNAMED = 0,
+     *     LTTNG_WAIT_FORK = 1,
+     *     LTTNG_WAIT_CPU = 2,
+     *     LTTNG_EXIT = 3,
+     *     LTTNG_ZOMBIE = 4,
+     *     LTTNG_WAIT = 5,
+     *     LTTNG_RUN = 6,
+     *     LTTNG_DEAD = 7,
+     * };
+     */
+    int STATEDUMP_PROCESS_STATUS_WAIT_CPU = 2;
+    int STATEDUMP_PROCESS_STATUS_WAIT = 5;
+}
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/internal/analysis/os/linux/core/kernelanalysis/package-info.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/internal/analysis/os/linux/core/kernelanalysis/package-info.java
new file mode 100644 (file)
index 0000000..685c8f2
--- /dev/null
@@ -0,0 +1,14 @@
+/*******************************************************************************
+ * Copyright (c) 2015 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Ericsson - Initial API and implementation
+ *******************************************************************************/
+
+@org.eclipse.jdt.annotation.NonNullByDefault
+package org.eclipse.tracecompass.internal.analysis.os.linux.core.kernelanalysis;
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/internal/analysis/os/linux/core/package-info.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/internal/analysis/os/linux/core/package-info.java
new file mode 100644 (file)
index 0000000..c7ac973
--- /dev/null
@@ -0,0 +1,14 @@
+/*******************************************************************************
+ * Copyright (c) 2015 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Ericsson - Initial API and implementation
+ *******************************************************************************/
+
+@org.eclipse.jdt.annotation.NonNullByDefault
+package org.eclipse.tracecompass.internal.analysis.os.linux.core;
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/.classpath b/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/.classpath
new file mode 100644 (file)
index 0000000..098194c
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+       <classpathentry kind="src" path="src"/>
+       <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/.project b/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/.project
new file mode 100644 (file)
index 0000000..043ad99
--- /dev/null
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.eclipse.tracecompass.analysis.os.linux.ui</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.jdt.core.javabuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.PluginNature</nature>
+               <nature>org.eclipse.jdt.core.javanature</nature>
+               <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+       </natures>
+</projectDescription>
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/.settings/org.eclipse.core.resources.prefs b/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/.settings/org.eclipse.core.resources.prefs
new file mode 100644 (file)
index 0000000..99f26c0
--- /dev/null
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/.settings/org.eclipse.core.runtime.prefs b/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/.settings/org.eclipse.core.runtime.prefs
new file mode 100644 (file)
index 0000000..5a0ad22
--- /dev/null
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/.settings/org.eclipse.jdt.core.prefs b/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/.settings/org.eclipse.jdt.core.prefs
new file mode 100644 (file)
index 0000000..a2b5e6b
--- /dev/null
@@ -0,0 +1,405 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.codeComplete.argumentPrefixes=
+org.eclipse.jdt.core.codeComplete.argumentSuffixes=
+org.eclipse.jdt.core.codeComplete.fieldPrefixes=f
+org.eclipse.jdt.core.codeComplete.fieldSuffixes=
+org.eclipse.jdt.core.codeComplete.localPrefixes=
+org.eclipse.jdt.core.codeComplete.localSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes=
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
+org.eclipse.jdt.core.compiler.problem.deadCode=error
+org.eclipse.jdt.core.compiler.problem.deprecation=error
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=error
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=error
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=error
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=error
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=error
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=enabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=error
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=error
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=error
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=error
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=error
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedImport=error
+org.eclipse.jdt.core.compiler.problem.unusedLabel=error
+org.eclipse.jdt.core.compiler.problem.unusedLocal=error
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=error
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=error
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=error
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
+org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=0
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=250
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=space
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/.settings/org.eclipse.jdt.ui.prefs b/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644 (file)
index 0000000..232a3fd
--- /dev/null
@@ -0,0 +1,60 @@
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_tmf-style
+formatter_settings_version=12
+org.eclipse.jdt.ui.exception.name=e
+org.eclipse.jdt.ui.gettersetter.use.is=true
+org.eclipse.jdt.ui.keywordthis=false
+org.eclipse.jdt.ui.overrideannotation=true
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=false
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=false
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=false
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=false
+sp_cleanup.remove_unnecessary_nls_tags=false
+sp_cleanup.remove_unused_imports=false
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_blocks=true
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/.settings/org.eclipse.pde.api.tools.prefs b/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100644 (file)
index 0000000..acc3abd
--- /dev/null
@@ -0,0 +1,97 @@
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+API_USE_SCAN_FIELD_SEVERITY=Error
+API_USE_SCAN_METHOD_SEVERITY=Error
+API_USE_SCAN_TYPE_SEVERITY=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_JAVADOC_TAG=Warning
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Warning
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+MISSING_EE_DESCRIPTIONS=Ignore
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=false
+eclipse.preferences.version=1
+incompatible_api_component_version=Error
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Error
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/.settings/org.eclipse.pde.prefs b/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/.settings/org.eclipse.pde.prefs
new file mode 100644 (file)
index 0000000..d92b94f
--- /dev/null
@@ -0,0 +1,32 @@
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
+compilers.incompatible-environment=1
+compilers.p.build=1
+compilers.p.build.bin.includes=1
+compilers.p.build.encodings=2
+compilers.p.build.java.compiler=2
+compilers.p.build.java.compliance=1
+compilers.p.build.missing.output=2
+compilers.p.build.output.library=1
+compilers.p.build.source.library=1
+compilers.p.build.src.includes=1
+compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.internal=1
+compilers.p.missing-packages=1
+compilers.p.missing-version-export-package=2
+compilers.p.missing-version-import-package=2
+compilers.p.missing-version-require-bundle=2
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=1
+compilers.p.unknown-attribute=1
+compilers.p.unknown-class=1
+compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=1
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+eclipse.preferences.version=1
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/META-INF/MANIFEST.MF b/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..0748fa8
--- /dev/null
@@ -0,0 +1,24 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-Vendor: %Bundle-Vendor
+Bundle-Version: 1.0.0.qualifier
+Bundle-Localization: plugin
+Bundle-SymbolicName: org.eclipse.tracecompass.analysis.os.linux.ui;singleton:=true
+Bundle-Activator: org.eclipse.tracecompass.internal.analysis.os.linux.ui.Activator
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.ui.ide,
+ org.eclipse.core.resources,
+ org.eclipse.core.runtime,
+ org.eclipse.tracecompass.common.core,
+ org.eclipse.tracecompass.analysis.os.linux.core,
+ org.eclipse.tracecompass.tmf.core,
+ org.eclipse.tracecompass.tmf.ui,
+ org.eclipse.tracecompass.tmf.ctf.core
+Import-Package: com.google.common.collect
+Export-Package: org.eclipse.tracecompass.analysis.os.linux.ui.views.controlflow,
+ org.eclipse.tracecompass.analysis.os.linux.ui.views.cpuusage,
+ org.eclipse.tracecompass.analysis.os.linux.ui.views.resources,
+ org.eclipse.tracecompass.internal.analysis.os.linux.ui;x-internal:=true
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/about.html b/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/about.html
new file mode 100644 (file)
index 0000000..c258ef5
--- /dev/null
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+<p>June 5, 2006</p>    
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;).  Unless otherwise 
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;).  A copy of the EPL is available 
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is 
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content.  Check the Redistributor's license that was 
+provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/build.properties b/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/build.properties
new file mode 100644 (file)
index 0000000..9e536e8
--- /dev/null
@@ -0,0 +1,23 @@
+###############################################################################
+# Copyright (c) 2015 Ericsson
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     Ericsson - Initial API and implementation
+###############################################################################
+
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               plugin.xml,\
+               icons/,\
+               about.html,\
+               plugin.properties
+src.includes = about.html
+additional.bundles = org.eclipse.jdt.annotation
+jars.extra.classpath = platform:/plugin/org.eclipse.jdt.annotation
\ No newline at end of file
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/icons/eview16/control_flow_view.gif b/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/icons/eview16/control_flow_view.gif
new file mode 100644 (file)
index 0000000..3971b50
Binary files /dev/null and b/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/icons/eview16/control_flow_view.gif differ
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/icons/eview16/resources_view.gif b/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/icons/eview16/resources_view.gif
new file mode 100644 (file)
index 0000000..2344861
Binary files /dev/null and b/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/icons/eview16/resources_view.gif differ
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/icons/obj16/garland16.png b/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/icons/obj16/garland16.png
new file mode 100644 (file)
index 0000000..74f9751
Binary files /dev/null and b/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/icons/obj16/garland16.png differ
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/plugin.properties b/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/plugin.properties
new file mode 100644 (file)
index 0000000..724b0f2
--- /dev/null
@@ -0,0 +1,20 @@
+###############################################################################
+# Copyright (c) 2015 Ericsson
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     Ericsson - Initial API and implementation
+###############################################################################
+
+Bundle-Vendor = Eclipse Trace Compass
+Bundle-Name = Trace Compass Linux Kernel Analysis UI Plug-in
+
+kernel.perspective.name = LTTng Kernel
+
+controlflow.view.name = Control Flow
+resources.view.name = Resources
+cpuusage.view.name = CPU Usage
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/plugin.xml b/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/plugin.xml
new file mode 100644 (file)
index 0000000..626f274
--- /dev/null
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+   <extension
+         point="org.eclipse.ui.views">
+      <view
+            allowMultiple="false"
+            category="org.eclipse.linuxtools.lttng2.ui.views.category"
+            class="org.eclipse.tracecompass.analysis.os.linux.ui.views.controlflow.ControlFlowView"
+            icon="icons/eview16/control_flow_view.gif"
+            id="org.eclipse.tracecompass.analysis.os.linux.views.controlflow"
+            name="%controlflow.view.name"
+            restorable="true">
+      </view>
+      <view
+            allowMultiple="false"
+            category="org.eclipse.linuxtools.lttng2.ui.views.category"
+            class="org.eclipse.tracecompass.analysis.os.linux.ui.views.resources.ResourcesView"
+            icon="icons/eview16/resources_view.gif"
+            id="org.eclipse.tracecompass.analysis.os.linux.views.resources"
+            name="%resources.view.name"
+            restorable="true">
+      </view>
+      <view
+            allowMultiple="false"
+            category="org.eclipse.linuxtools.lttng2.ui.views.category"
+            class="org.eclipse.tracecompass.analysis.os.linux.ui.views.cpuusage.CpuUsageView"
+            id="org.eclipse.tracecompass.analysis.os.linux.views.cpuusage"
+            name="%cpuusage.view.name"
+            restorable="true">
+      </view>
+   </extension>
+   <extension
+         point="org.eclipse.linuxtools.tmf.core.analysis">
+      <output
+            class="org.eclipse.tracecompass.tmf.ui.analysis.TmfAnalysisViewOutput"
+            id="org.eclipse.tracecompass.analysis.os.linux.views.controlflow">
+         <analysisModuleClass
+               class="org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelAnalysisModule">
+         </analysisModuleClass>
+      </output>
+      <output
+            class="org.eclipse.tracecompass.tmf.ui.analysis.TmfAnalysisViewOutput"
+            id="org.eclipse.tracecompass.analysis.os.linux.views.resources">
+         <analysisModuleClass
+               class="org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelAnalysisModule">
+         </analysisModuleClass>
+      </output>
+      <output
+            class="org.eclipse.tracecompass.tmf.ui.analysis.TmfAnalysisViewOutput"
+            id="org.eclipse.tracecompass.analysis.os.linux.views.cpuusage">
+         <analysisModuleClass
+               class="org.eclipse.tracecompass.analysis.os.linux.core.cpuusage.KernelCpuUsageAnalysis">
+         </analysisModuleClass>
+      </output>
+   </extension>
+</plugin>
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/pom.xml b/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/pom.xml
new file mode 100644 (file)
index 0000000..665a561
--- /dev/null
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+   Copyright (C) 2011, Red Hat, Inc.
+
+   All rights reserved. This program and the accompanying materials
+   are made available under the terms of the Eclipse Public License v1.0
+   which accompanies this distribution, and is available at
+   http://www.eclipse.org/legal/epl-v10.html
+-->
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <artifactId>org.eclipse.tracecompass.analysis-parent</artifactId>
+    <groupId>org.eclipse.tracecompass</groupId>
+    <version>1.0.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>org.eclipse.tracecompass.analysis.os.linux.ui</artifactId>
+  <groupId>org.eclipse.tracecompass</groupId>
+  <version>1.0.0-SNAPSHOT</version>
+  <packaging>eclipse-plugin</packaging>
+
+  <name>Trace Compass Linux Kernel Analysis UI Plug-in</name>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.eclipse.tycho</groupId>
+        <artifactId>tycho-source-plugin</artifactId>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/controlflow/ControlFlowCheckActiveProvider.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/controlflow/ControlFlowCheckActiveProvider.java
new file mode 100644 (file)
index 0000000..2a9b420
--- /dev/null
@@ -0,0 +1,130 @@
+/*******************************************************************************
+ * Copyright (c) 2015 Keba AG
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Christian Mansky - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.analysis.os.linux.ui.views.controlflow;
+
+import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.Attributes;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelAnalysisModule;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.StateValues;
+import org.eclipse.tracecompass.statesystem.core.ITmfStateSystem;
+import org.eclipse.tracecompass.statesystem.core.exceptions.AttributeNotFoundException;
+import org.eclipse.tracecompass.statesystem.core.exceptions.StateSystemDisposedException;
+import org.eclipse.tracecompass.statesystem.core.interval.ITmfStateInterval;
+import org.eclipse.tracecompass.tmf.core.statesystem.TmfStateSystemAnalysisModule;
+import org.eclipse.tracecompass.tmf.core.timestamp.TmfTimeRange;
+import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
+import org.eclipse.tracecompass.tmf.core.trace.TmfTraceContext;
+import org.eclipse.tracecompass.tmf.core.trace.TmfTraceManager;
+import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.dialogs.ITimeGraphEntryActiveProvider;
+import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.model.ITimeGraphEntry;
+
+/**
+ * Provides Functionality for check Active / uncheck inactive
+ *
+ * @noinstantiate This class is not intended to be instantiated by clients.
+ * @noextend This class is not intended to be subclassed by clients.
+ * @since 1.0
+ */
+public class ControlFlowCheckActiveProvider implements ITimeGraphEntryActiveProvider {
+
+    String fLabel;
+    String fTooltip;
+
+    /**
+     * @param label
+     *            Button label
+     * @param tooltip
+     *            Button tooltip
+     */
+    public ControlFlowCheckActiveProvider(String label, String tooltip) {
+        fLabel = label;
+        fTooltip = tooltip;
+    }
+
+    @Override
+    public String getLabel() {
+        return fLabel;
+    }
+
+    @Override
+    public String getTooltip() {
+        return fTooltip;
+    }
+
+    @Override
+    public boolean isActive(ITimeGraphEntry element) {
+        if (element instanceof ControlFlowEntry) {
+            ControlFlowEntry cfe = (ControlFlowEntry) element;
+
+            TmfTraceManager traceManager = TmfTraceManager.getInstance();
+            TmfTraceContext traceContext = traceManager.getCurrentTraceContext();
+            TmfTimeRange winRange = traceContext.getWindowRange();
+            TmfTimeRange selRange = traceContext.getSelectionRange();
+
+            /* Take precedence of selection over window range. */
+            long beginTS = selRange.getStartTime().getValue();
+            long endTS = selRange.getEndTime().getValue();
+
+            /* No selection, take window range */
+            if (beginTS == endTS) {
+                beginTS = winRange.getStartTime().getValue();
+                endTS = winRange.getEndTime().getValue();
+            }
+
+            ITmfTrace trace = cfe.getTrace();
+            ITmfStateSystem ssq = TmfStateSystemAnalysisModule.getStateSystem(trace, KernelAnalysisModule.ID);
+            if (ssq != null) {
+                beginTS = Math.max(beginTS, ssq.getStartTime());
+                endTS = Math.min(endTS, ssq.getCurrentEndTime());
+                if (beginTS > endTS) {
+                    return false;
+                }
+                try {
+                    int statusQuark = ssq.getQuarkRelative(cfe.getThreadQuark(), Attributes.STATUS);
+
+                    /* Get the initial state at beginTS */
+                    ITmfStateInterval currentInterval = ssq.querySingleState(beginTS, statusQuark);
+                    if (isIntervalInStateActive(currentInterval)) {
+                        return true;
+                    }
+
+                    /* Get the following state changes */
+                    long ts = currentInterval.getEndTime();
+                    while (ts != -1 && ts < endTS) {
+                        ts++; /* To "jump over" to the next state in the history */
+                        currentInterval = ssq.querySingleState(ts, statusQuark);
+                        if (isIntervalInStateActive(currentInterval)) {
+                            return true;
+                        }
+                        ts = currentInterval.getEndTime();
+                    }
+                } catch (AttributeNotFoundException | StateSystemDisposedException e) {
+                    /* Ignore ... */
+                }
+            }
+        }
+
+        return false;
+    }
+
+    private static boolean isIntervalInStateActive (ITmfStateInterval ival) {
+        int value = ival.getStateValue().unboxInt();
+        /* An entry is only active when running */
+        if (value == StateValues.PROCESS_STATUS_RUN_USERMODE || value == StateValues.PROCESS_STATUS_RUN_SYSCALL ||
+                value == StateValues.PROCESS_STATUS_INTERRUPTED) {
+            return true;
+        }
+
+        return false;
+    }
+
+}
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/controlflow/ControlFlowEntry.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/controlflow/ControlFlowEntry.java
new file mode 100644 (file)
index 0000000..259452f
--- /dev/null
@@ -0,0 +1,96 @@
+/*******************************************************************************
+ * Copyright (c) 2012, 2015 Ericsson, Ã‰cole Polytechnique de Montréal
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Patrick Tasse - Initial API and implementation
+ *   Geneviève Bastien - Move code to provide base classes for time graph view
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.analysis.os.linux.ui.views.controlflow;
+
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
+import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.model.TimeGraphEntry;
+
+/**
+ * An entry in the Control Flow view
+ */
+public class ControlFlowEntry extends TimeGraphEntry {
+
+    private final @NonNull ITmfTrace fTrace;
+    private final int fThreadId;
+    private final int fParentThreadId;
+    private final int fThreadQuark;
+
+    /**
+     * Constructor
+     *
+     * @param quark
+     *            The attribute quark matching the thread
+     * @param trace
+     *            The trace on which we are working
+     * @param execName
+     *            The exec_name of this entry
+     * @param threadId
+     *            The TID of the thread
+     * @param parentThreadId
+     *            the Parent_TID of this thread
+     * @param startTime
+     *            The start time of this process's lifetime
+     * @param endTime
+     *            The end time of this process
+     */
+    public ControlFlowEntry(int quark, @NonNull ITmfTrace trace, String execName, int threadId, int parentThreadId, long startTime, long endTime) {
+        super(execName, startTime, endTime);
+        fTrace = trace;
+        fThreadId = threadId;
+        fParentThreadId = parentThreadId;
+        fThreadQuark = quark;
+    }
+
+    /**
+     * Get this entry's thread ID
+     *
+     * @return The TID
+     */
+    public int getThreadId() {
+        return fThreadId;
+    }
+
+    /**
+     * Get the entry's trace
+     *
+     * @return the entry's trace
+     */
+    public @NonNull ITmfTrace getTrace() {
+        return fTrace;
+    }
+
+    /**
+     * Get this thread's parent TID
+     *
+     * @return The "PTID"
+     */
+    public int getParentThreadId() {
+        return fParentThreadId;
+    }
+
+    /**
+     * Get the quark of the attribute matching this thread's TID
+     *
+     * @return The quark
+     */
+    public int getThreadQuark() {
+        return fThreadQuark;
+    }
+
+    @Override
+    public String toString() {
+        return getClass().getSimpleName() + '(' + getName() + '[' + fThreadId + "])"; //$NON-NLS-1$
+    }
+}
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/controlflow/ControlFlowPresentationProvider.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/controlflow/ControlFlowPresentationProvider.java
new file mode 100644 (file)
index 0000000..f41911e
--- /dev/null
@@ -0,0 +1,238 @@
+/*******************************************************************************
+ * Copyright (c) 2012, 2015 Ericsson, Ã‰cole Polytechnique de Montréal
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Patrick Tasse - Initial API and implementation
+ *   Geneviève Bastien - Move code to provide base classes for time graph view
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.analysis.os.linux.ui.views.controlflow;
+
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.Attributes;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelAnalysisModule;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.StateValues;
+import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelAnalysisEventLayout;
+import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelTrace;
+import org.eclipse.tracecompass.internal.analysis.os.linux.ui.Activator;
+import org.eclipse.tracecompass.internal.analysis.os.linux.ui.Messages;
+import org.eclipse.tracecompass.statesystem.core.ITmfStateSystem;
+import org.eclipse.tracecompass.statesystem.core.exceptions.AttributeNotFoundException;
+import org.eclipse.tracecompass.statesystem.core.exceptions.StateSystemDisposedException;
+import org.eclipse.tracecompass.statesystem.core.exceptions.StateValueTypeException;
+import org.eclipse.tracecompass.statesystem.core.exceptions.TimeRangeException;
+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.widgets.timegraph.StateItem;
+import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.TimeGraphPresentationProvider;
+import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.model.ITimeEvent;
+import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.model.TimeEvent;
+import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.widgets.Utils;
+
+/**
+ * Presentation provider for the control flow view
+ */
+public class ControlFlowPresentationProvider extends TimeGraphPresentationProvider {
+
+    private enum State {
+        UNKNOWN        (new RGB(100, 100, 100)),
+        WAIT_UNKNOWN   (new RGB(200, 200, 200)),
+        WAIT_BLOCKED   (new RGB(200, 200, 0)),
+        WAIT_FOR_CPU   (new RGB(200, 100, 0)),
+        USERMODE       (new RGB(0,   200, 0)),
+        SYSCALL        (new RGB(0,     0, 200)),
+        INTERRUPTED    (new RGB(200,   0, 100));
+
+        public final RGB rgb;
+
+        private State(RGB rgb) {
+            this.rgb = rgb;
+        }
+
+    }
+
+    /**
+     * Average width of the characters used for state labels. Is computed in the
+     * first call to postDrawEvent(). Is null before that.
+     */
+    private Integer fAverageCharacterWidth = null;
+
+    /**
+     * Default constructor
+     */
+    public ControlFlowPresentationProvider() {
+        super(Messages.ControlFlowView_stateTypeName);
+    }
+
+    private static State[] getStateValues() {
+        return State.values();
+    }
+
+    @Override
+    public StateItem[] getStateTable() {
+        State[] states = getStateValues();
+        StateItem[] stateTable = new StateItem[states.length];
+        for (int i = 0; i < stateTable.length; i++) {
+            State state = states[i];
+            stateTable[i] = new StateItem(state.rgb, state.toString());
+        }
+        return stateTable;
+    }
+
+    @Override
+    public int getStateTableIndex(ITimeEvent event) {
+        if (event instanceof TimeEvent && ((TimeEvent) event).hasValue()) {
+            int status = ((TimeEvent) event).getValue();
+            return getMatchingState(status).ordinal();
+        }
+        return TRANSPARENT;
+    }
+
+    @Override
+    public String getEventName(ITimeEvent event) {
+        if (event instanceof TimeEvent) {
+            TimeEvent ev = (TimeEvent) event;
+            if (ev.hasValue()) {
+                return getMatchingState(ev.getValue()).toString();
+            }
+        }
+        return Messages.ControlFlowView_multipleStates;
+    }
+
+    private static State getMatchingState(int status) {
+        switch (status) {
+        case StateValues.PROCESS_STATUS_WAIT_UNKNOWN:
+            return State.WAIT_UNKNOWN;
+        case StateValues.PROCESS_STATUS_WAIT_BLOCKED:
+            return State.WAIT_BLOCKED;
+        case StateValues.PROCESS_STATUS_WAIT_FOR_CPU:
+            return State.WAIT_FOR_CPU;
+        case StateValues.PROCESS_STATUS_RUN_USERMODE:
+            return State.USERMODE;
+        case StateValues.PROCESS_STATUS_RUN_SYSCALL:
+            return State.SYSCALL;
+        case StateValues.PROCESS_STATUS_INTERRUPTED:
+            return State.INTERRUPTED;
+        default:
+            return State.UNKNOWN;
+        }
+    }
+
+    @Override
+    public Map<String, String> getEventHoverToolTipInfo(ITimeEvent event) {
+        Map<String, String> retMap = new LinkedHashMap<>();
+        if (!(event instanceof TimeEvent) || !((TimeEvent) event).hasValue() ||
+                !(event.getEntry() instanceof ControlFlowEntry)) {
+            return retMap;
+        }
+        ControlFlowEntry entry = (ControlFlowEntry) event.getEntry();
+        ITmfStateSystem ssq = TmfStateSystemAnalysisModule.getStateSystem(entry.getTrace(), KernelAnalysisModule.ID);
+        if (ssq == null) {
+            return retMap;
+        }
+        int tid = entry.getThreadId();
+
+        try {
+            // Find every CPU first, then get the current thread
+            int cpusQuark = ssq.getQuarkAbsolute(Attributes.CPUS);
+            List<Integer> cpuQuarks = ssq.getSubAttributes(cpusQuark, false);
+            for (Integer cpuQuark : cpuQuarks) {
+                int currentThreadQuark = ssq.getQuarkRelative(cpuQuark, Attributes.CURRENT_THREAD);
+                ITmfStateInterval interval = ssq.querySingleState(event.getTime(), currentThreadQuark);
+                if (!interval.getStateValue().isNull()) {
+                    ITmfStateValue state = interval.getStateValue();
+                    int currentThreadId = state.unboxInt();
+                    if (tid == currentThreadId) {
+                        retMap.put(Messages.ControlFlowView_attributeCpuName, ssq.getAttributeName(cpuQuark));
+                        break;
+                    }
+                }
+            }
+
+        } catch (AttributeNotFoundException | TimeRangeException | StateValueTypeException e) {
+            Activator.getDefault().logError("Error in ControlFlowPresentationProvider", e); //$NON-NLS-1$
+        } catch (StateSystemDisposedException e) {
+            /* Ignored */
+        }
+        int status = ((TimeEvent) event).getValue();
+        if (status == StateValues.PROCESS_STATUS_RUN_SYSCALL) {
+            try {
+                int syscallQuark = ssq.getQuarkRelative(entry.getThreadQuark(), Attributes.SYSTEM_CALL);
+                ITmfStateInterval value = ssq.querySingleState(event.getTime(), syscallQuark);
+                if (!value.getStateValue().isNull()) {
+                    ITmfStateValue state = value.getStateValue();
+                    retMap.put(Messages.ControlFlowView_attributeSyscallName, state.toString());
+                }
+
+            } catch (AttributeNotFoundException | TimeRangeException e) {
+                Activator.getDefault().logError("Error in ControlFlowPresentationProvider", e); //$NON-NLS-1$
+            } catch (StateSystemDisposedException e) {
+                /* Ignored */
+            }
+        }
+
+        return retMap;
+    }
+
+    @Override
+    public void postDrawEvent(ITimeEvent event, Rectangle bounds, GC gc) {
+        if (fAverageCharacterWidth == null) {
+            fAverageCharacterWidth = gc.getFontMetrics().getAverageCharWidth();
+        }
+        if (bounds.width <= fAverageCharacterWidth) {
+            return;
+        }
+        if (!(event instanceof TimeEvent)) {
+            return;
+        }
+        ControlFlowEntry entry = (ControlFlowEntry) event.getEntry();
+        ITmfStateSystem ss = TmfStateSystemAnalysisModule.getStateSystem(entry.getTrace(), KernelAnalysisModule.ID);
+        if (ss == null) {
+            return;
+        }
+        int status = ((TimeEvent) event).getValue();
+
+        if (status != StateValues.PROCESS_STATUS_RUN_SYSCALL) {
+            return;
+        }
+        try {
+            int syscallQuark = ss.getQuarkRelative(entry.getThreadQuark(), Attributes.SYSTEM_CALL);
+            ITmfStateInterval value = ss.querySingleState(event.getTime(), syscallQuark);
+            if (!value.getStateValue().isNull()) {
+                ITmfStateValue state = value.getStateValue();
+                gc.setForeground(gc.getDevice().getSystemColor(SWT.COLOR_WHITE));
+
+                /*
+                 * Remove the "sys_" or "syscall_entry_" or similar from what we
+                 * draw in the rectangle. This depends on the trace's event layout.
+                 */
+                int beginIndex = 0;
+                ITmfTrace trace = entry.getTrace();
+                if (trace instanceof IKernelTrace) {
+                    IKernelAnalysisEventLayout layout = ((IKernelTrace) trace).getKernelEventLayout();
+                    beginIndex = layout.eventSyscallEntryPrefix().length();
+                }
+
+                Utils.drawText(gc, state.toString().substring(beginIndex), bounds.x, bounds.y - 2, bounds.width, true, true);
+            }
+        } catch (AttributeNotFoundException | TimeRangeException e) {
+            Activator.getDefault().logError("Error in ControlFlowPresentationProvider", e); //$NON-NLS-1$
+        } catch (StateSystemDisposedException e) {
+            /* Ignored */
+        }
+    }
+}
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/controlflow/ControlFlowView.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/controlflow/ControlFlowView.java
new file mode 100644 (file)
index 0000000..041ea93
--- /dev/null
@@ -0,0 +1,610 @@
+/*******************************************************************************
+ * Copyright (c) 2012, 2015 Ericsson, Ã‰cole Polytechnique de Montréal and others.
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Patrick Tasse - Initial API and implementation
+ *   Geneviève Bastien - Move code to provide base classes for time graph view
+ *   Christian Mansky - Add check active / uncheck inactive buttons
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.analysis.os.linux.ui.views.controlflow;
+
+import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
+
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.Attributes;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelAnalysisModule;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelThreadInformationProvider;
+import org.eclipse.tracecompass.internal.analysis.os.linux.ui.Activator;
+import org.eclipse.tracecompass.internal.analysis.os.linux.ui.Messages;
+import org.eclipse.tracecompass.statesystem.core.ITmfStateSystem;
+import org.eclipse.tracecompass.statesystem.core.StateSystemUtils;
+import org.eclipse.tracecompass.statesystem.core.exceptions.AttributeNotFoundException;
+import org.eclipse.tracecompass.statesystem.core.exceptions.StateSystemDisposedException;
+import org.eclipse.tracecompass.statesystem.core.exceptions.StateValueTypeException;
+import org.eclipse.tracecompass.statesystem.core.exceptions.TimeRangeException;
+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.core.trace.TmfTraceManager;
+import org.eclipse.tracecompass.tmf.core.trace.TmfTraceUtils;
+import org.eclipse.tracecompass.tmf.ui.views.timegraph.AbstractTimeGraphView;
+import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.model.ILinkEvent;
+import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.model.ITimeEvent;
+import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.model.ITimeGraphEntry;
+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.model.TimeLinkEvent;
+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;
+
+/**
+ * The Control Flow view main object
+ *
+ */
+public class ControlFlowView extends AbstractTimeGraphView {
+
+    // ------------------------------------------------------------------------
+    // Constants
+    // ------------------------------------------------------------------------
+
+    /**
+     * View ID.
+     */
+    public static final String ID = "org.eclipse.tracecompass.analysis.os.linux.views.controlflow"; //$NON-NLS-1$
+
+    private static final String PROCESS_COLUMN = Messages.ControlFlowView_processColumn;
+    private static final String TID_COLUMN = Messages.ControlFlowView_tidColumn;
+    private static final String PTID_COLUMN = Messages.ControlFlowView_ptidColumn;
+    private static final String BIRTH_TIME_COLUMN = Messages.ControlFlowView_birthTimeColumn;
+    private static final String TRACE_COLUMN = Messages.ControlFlowView_traceColumn;
+
+    private static final String[] COLUMN_NAMES = new String[] {
+            PROCESS_COLUMN,
+            TID_COLUMN,
+            PTID_COLUMN,
+            BIRTH_TIME_COLUMN,
+            TRACE_COLUMN
+    };
+
+    private static final String[] FILTER_COLUMN_NAMES = new String[] {
+            PROCESS_COLUMN,
+            TID_COLUMN
+    };
+
+    // Timeout between updates in the build thread in ms
+    private static final long BUILD_UPDATE_TIMEOUT = 500;
+
+    // ------------------------------------------------------------------------
+    // Constructors
+    // ------------------------------------------------------------------------
+
+    /**
+     * Constructor
+     */
+    public ControlFlowView() {
+        super(ID, new ControlFlowPresentationProvider());
+        setTreeColumns(COLUMN_NAMES);
+        setTreeLabelProvider(new ControlFlowTreeLabelProvider());
+        setFilterColumns(FILTER_COLUMN_NAMES);
+        setFilterLabelProvider(new ControlFlowFilterLabelProvider());
+        setEntryComparator(new ControlFlowEntryComparator());
+    }
+
+    @Override
+    public void createPartControl(Composite parent) {
+        super.createPartControl(parent);
+        // add "Check active" Button to TimeGraphFilterDialog
+        super.getTimeGraphCombo().addTimeGraphFilterCheckActiveButton(
+                new ControlFlowCheckActiveProvider(Messages.ControlFlowView_checkActiveLabel, Messages.ControlFlowView_checkActiveToolTip));
+        // add "Uncheck inactive" Button to TimeGraphFilterDialog
+        super.getTimeGraphCombo().addTimeGraphFilterUncheckInactiveButton(
+                new ControlFlowCheckActiveProvider(Messages.ControlFlowView_uncheckInactiveLabel, Messages.ControlFlowView_uncheckInactiveToolTip));
+    }
+
+    @Override
+    protected void fillLocalToolBar(IToolBarManager manager) {
+        super.fillLocalToolBar(manager);
+        IDialogSettings settings = Activator.getDefault().getDialogSettings();
+        IDialogSettings section = settings.getSection(getClass().getName());
+        if (section == null) {
+            section = settings.addNewSection(getClass().getName());
+        }
+
+        IAction hideArrowsAction = getTimeGraphCombo().getTimeGraphViewer().getHideArrowsAction(section);
+        manager.add(hideArrowsAction);
+
+        IAction followArrowBwdAction = getTimeGraphCombo().getTimeGraphViewer().getFollowArrowBwdAction();
+        followArrowBwdAction.setText(Messages.ControlFlowView_followCPUBwdText);
+        followArrowBwdAction.setToolTipText(Messages.ControlFlowView_followCPUBwdText);
+        manager.add(followArrowBwdAction);
+
+        IAction followArrowFwdAction = getTimeGraphCombo().getTimeGraphViewer().getFollowArrowFwdAction();
+        followArrowFwdAction.setText(Messages.ControlFlowView_followCPUFwdText);
+        followArrowFwdAction.setToolTipText(Messages.ControlFlowView_followCPUFwdText);
+        manager.add(followArrowFwdAction);
+    }
+
+    @Override
+    protected String getNextText() {
+        return Messages.ControlFlowView_nextProcessActionNameText;
+    }
+
+    @Override
+    protected String getNextTooltip() {
+        return Messages.ControlFlowView_nextProcessActionToolTipText;
+    }
+
+    @Override
+    protected String getPrevText() {
+        return Messages.ControlFlowView_previousProcessActionNameText;
+    }
+
+    @Override
+    protected String getPrevTooltip() {
+        return Messages.ControlFlowView_previousProcessActionToolTipText;
+    }
+
+    private static class ControlFlowEntryComparator implements Comparator<ITimeGraphEntry> {
+
+        @Override
+        public int compare(ITimeGraphEntry o1, ITimeGraphEntry o2) {
+
+            int result = 0;
+
+            if ((o1 instanceof ControlFlowEntry) && (o2 instanceof ControlFlowEntry)) {
+                ControlFlowEntry entry1 = (ControlFlowEntry) o1;
+                ControlFlowEntry entry2 = (ControlFlowEntry) o2;
+                result = entry1.getTrace().getStartTime().compareTo(entry2.getTrace().getStartTime());
+                if (result == 0) {
+                    result = entry1.getTrace().getName().compareTo(entry2.getTrace().getName());
+                }
+                if (result == 0) {
+                    result = entry1.getThreadId() < entry2.getThreadId() ? -1 : entry1.getThreadId() > entry2.getThreadId() ? 1 : 0;
+                }
+            }
+
+            if (result == 0) {
+                result = o1.getStartTime() < o2.getStartTime() ? -1 : o1.getStartTime() > o2.getStartTime() ? 1 : 0;
+            }
+
+            return result;
+        }
+    }
+
+    /**
+     * @author gbastien
+     *
+     */
+    protected static class ControlFlowTreeLabelProvider extends TreeLabelProvider {
+
+        @Override
+        public String getColumnText(Object element, int columnIndex) {
+            ControlFlowEntry entry = (ControlFlowEntry) element;
+
+            if (COLUMN_NAMES[columnIndex].equals(Messages.ControlFlowView_processColumn)) {
+                return entry.getName();
+            } else if (COLUMN_NAMES[columnIndex].equals(Messages.ControlFlowView_tidColumn)) {
+                return Integer.toString(entry.getThreadId());
+            } else if (COLUMN_NAMES[columnIndex].equals(Messages.ControlFlowView_ptidColumn)) {
+                if (entry.getParentThreadId() > 0) {
+                    return Integer.toString(entry.getParentThreadId());
+                }
+            } else if (COLUMN_NAMES[columnIndex].equals(Messages.ControlFlowView_birthTimeColumn)) {
+                return Utils.formatTime(entry.getStartTime(), TimeFormat.CALENDAR, Resolution.NANOSEC);
+            } else if (COLUMN_NAMES[columnIndex].equals(Messages.ControlFlowView_traceColumn)) {
+                return entry.getTrace().getName();
+            }
+            return ""; //$NON-NLS-1$
+        }
+
+    }
+
+    private static class ControlFlowFilterLabelProvider extends TreeLabelProvider {
+
+        @Override
+        public String getColumnText(Object element, int columnIndex) {
+            ControlFlowEntry entry = (ControlFlowEntry) element;
+
+            if (columnIndex == 0) {
+                return entry.getName();
+            } else if (columnIndex == 1) {
+                return Integer.toString(entry.getThreadId());
+            }
+            return ""; //$NON-NLS-1$
+        }
+
+    }
+
+    // ------------------------------------------------------------------------
+    // Internal
+    // ------------------------------------------------------------------------
+
+    @Override
+    protected void buildEventList(final ITmfTrace trace, ITmfTrace parentTrace, IProgressMonitor monitor) {
+        ITmfStateSystem ssq = TmfStateSystemAnalysisModule.getStateSystem(trace, KernelAnalysisModule.ID);
+        if (ssq == null) {
+            return;
+        }
+
+        List<ControlFlowEntry> entryList = new ArrayList<>();
+        Map<Integer, ControlFlowEntry> entryMap = new HashMap<>();
+
+        long start = ssq.getStartTime();
+        setStartTime(Math.min(getStartTime(), start));
+
+        boolean complete = false;
+        while (!complete) {
+            if (monitor.isCanceled()) {
+                return;
+            }
+            complete = ssq.waitUntilBuilt(BUILD_UPDATE_TIMEOUT);
+            if (ssq.isCancelled()) {
+                return;
+            }
+            long end = ssq.getCurrentEndTime();
+            if (start == end && !complete) { // when complete execute one last time regardless of end time
+                continue;
+            }
+            setEndTime(Math.max(getEndTime(), end + 1));
+            List<Integer> threadQuarks = ssq.getQuarks(Attributes.THREADS, "*"); //$NON-NLS-1$
+            for (int threadQuark : threadQuarks) {
+                if (monitor.isCanceled()) {
+                    return;
+                }
+                String threadName = ssq.getAttributeName(threadQuark);
+                int threadId = -1;
+                try {
+                    threadId = Integer.parseInt(threadName);
+                } catch (NumberFormatException e1) {
+                    continue;
+                }
+                if (threadId <= 0) { // ignore the 'unknown' (-1) and swapper (0) threads
+                    continue;
+                }
+
+                int execNameQuark;
+                List<ITmfStateInterval> execNameIntervals;
+                try {
+                    execNameQuark = ssq.getQuarkRelative(threadQuark, Attributes.EXEC_NAME);
+                    execNameIntervals = StateSystemUtils.queryHistoryRange(ssq, execNameQuark, start, end);
+                } catch (AttributeNotFoundException e) {
+                    /* No information on this thread (yet?), skip it for now */
+                    continue;
+                } catch (StateSystemDisposedException e) {
+                    /* State system is closing down, no point continuing */
+                    break;
+                }
+
+                for (ITmfStateInterval execNameInterval : execNameIntervals) {
+                    if (monitor.isCanceled()) {
+                        return;
+                    }
+                    ControlFlowEntry entry = entryMap.get(threadId);
+                    if (!execNameInterval.getStateValue().isNull() &&
+                            execNameInterval.getStateValue().getType() == ITmfStateValue.Type.STRING) {
+                        String execName = execNameInterval.getStateValue().unboxStr();
+                        long startTime = execNameInterval.getStartTime();
+                        long endTime = execNameInterval.getEndTime() + 1;
+
+                        if (entry == null) {
+                            ITmfStateInterval ppidInterval = null;
+                            try {
+                                int ppidQuark = ssq.getQuarkRelative(threadQuark, Attributes.PPID);
+                                ppidInterval = StateSystemUtils.queryUntilNonNullValue(ssq, ppidQuark, startTime, endTime);
+                            } catch (AttributeNotFoundException e) {
+                                /* No info, keep PPID at -1 */
+                            }
+
+                            int ppid = -1;
+                            if (ppidInterval != null) {
+                                ppid = ppidInterval.getStateValue().unboxInt();
+                            }
+                            entry = new ControlFlowEntry(threadQuark, trace, execName, threadId, ppid, startTime, endTime);
+                            entryList.add(entry);
+                            entryMap.put(threadId, entry);
+                        } else {
+                            // update the name of the entry to the latest
+                            // execName
+                            entry.setName(execName);
+                            entry.updateEndTime(endTime);
+                        }
+                    } else {
+                        entryMap.remove(threadId);
+                    }
+                }
+            }
+
+            updateTree(entryList, parentTrace);
+
+            if (parentTrace.equals(getTrace())) {
+                refresh();
+            }
+
+            for (ControlFlowEntry entry : entryList) {
+                if (monitor.isCanceled()) {
+                    return;
+                }
+                buildStatusEvents(entry.getTrace(), entry, monitor, start, end);
+            }
+
+            start = end;
+        }
+    }
+
+    private void updateTree(List<ControlFlowEntry> entryList, ITmfTrace parentTrace) {
+        List<TimeGraphEntry> rootListToAdd = new ArrayList<>();
+        List<TimeGraphEntry> rootListToRemove = new ArrayList<>();
+        List<TimeGraphEntry> rootList = getEntryList(parentTrace);
+
+        for (ControlFlowEntry entry : entryList) {
+            boolean root = (entry.getParent() == null);
+            if (root && entry.getParentThreadId() > 0) {
+                for (ControlFlowEntry parent : entryList) {
+                    /*
+                     * Associate the parent entry only if their time overlap. A
+                     * child entry may start before its parent, for example at
+                     * the beginning of the trace if a parent has not yet
+                     * appeared in the state system. We just want to make sure
+                     * that the entry didn't start after the parent ended or
+                     * ended before the parent started.
+                     */
+                    if (parent.getThreadId() == entry.getParentThreadId() &&
+                            !(entry.getStartTime() > parent.getEndTime() ||
+                            entry.getEndTime() < parent.getStartTime())) {
+                        parent.addChild(entry);
+                        root = false;
+                        if (rootList != null && rootList.contains(entry)) {
+                            rootListToRemove.add(entry);
+                        }
+                        break;
+                    }
+                }
+            }
+            if (root && (rootList == null || !rootList.contains(entry))) {
+                rootListToAdd.add(entry);
+            }
+        }
+
+        addToEntryList(parentTrace, rootListToAdd);
+        removeFromEntryList(parentTrace, rootListToRemove);
+    }
+
+    private void buildStatusEvents(ITmfTrace trace, ControlFlowEntry entry, @NonNull IProgressMonitor monitor, long start, long end) {
+        if (start < entry.getEndTime() && end > entry.getStartTime()) {
+            ITmfStateSystem ssq = TmfStateSystemAnalysisModule.getStateSystem(entry.getTrace(), KernelAnalysisModule.ID);
+            if (ssq == null) {
+                return;
+            }
+
+            long startTime = Math.max(start, entry.getStartTime());
+            long endTime = Math.min(end + 1, entry.getEndTime());
+            long resolution = Math.max(1, (end - ssq.getStartTime()) / getDisplayWidth());
+            List<ITimeEvent> eventList = getEventList(entry, startTime, endTime, resolution, monitor);
+            if (eventList == null) {
+                return;
+            }
+            for (ITimeEvent event : eventList) {
+                entry.addEvent(event);
+            }
+            if (trace.equals(getTrace())) {
+                redraw();
+            }
+        }
+        for (ITimeGraphEntry child : entry.getChildren()) {
+            if (monitor.isCanceled()) {
+                return;
+            }
+            buildStatusEvents(trace, (ControlFlowEntry) child, monitor, start, end);
+        }
+    }
+
+    @Override
+    protected @Nullable List<ITimeEvent> getEventList(TimeGraphEntry tgentry, long startTime, long endTime, long resolution, IProgressMonitor monitor) {
+        List<ITimeEvent> eventList = null;
+        if (!(tgentry instanceof ControlFlowEntry)) {
+            return eventList;
+        }
+        ControlFlowEntry entry = (ControlFlowEntry) tgentry;
+        final long realStart = Math.max(startTime, entry.getStartTime());
+        final long realEnd = Math.min(endTime, entry.getEndTime());
+        if (realEnd <= realStart) {
+            return null;
+        }
+        KernelAnalysisModule kernelAnalysis = TmfTraceUtils.getAnalysisModuleOfClass(entry.getTrace(), KernelAnalysisModule.class, KernelAnalysisModule.ID);
+        if (kernelAnalysis == null) {
+//        ITmfStateSystem ssq = TmfStateSystemAnalysisModule.getStateSystem(entry.getTrace(), KernelAnalysis.ID);
+//        if (ssq == null) {
+            return null;
+        }
+        try {
+            List<ITmfStateInterval> statusIntervals = KernelThreadInformationProvider.getStatusIntervalsForThread(
+                    kernelAnalysis, checkNotNull(entry.getThreadId()), realStart, realEnd, resolution, monitor);
+            eventList = new ArrayList<>(statusIntervals.size());
+            long lastEndTime = -1;
+            for (ITmfStateInterval statusInterval : statusIntervals) {
+                if (monitor.isCanceled()) {
+                    return null;
+                }
+                long time = statusInterval.getStartTime();
+                long duration = statusInterval.getEndTime() - time + 1;
+                int status = -1;
+                try {
+                    status = statusInterval.getStateValue().unboxInt();
+                } catch (StateValueTypeException e) {
+                    e.printStackTrace();
+                }
+                if (lastEndTime != time && lastEndTime != -1) {
+                    eventList.add(new TimeEvent(entry, lastEndTime, time - lastEndTime));
+                }
+                eventList.add(new TimeEvent(entry, time, duration, status));
+                lastEndTime = time + duration;
+            }
+        } catch (TimeRangeException e) {
+            Activator.getDefault().logError(e.getMessage());
+        }
+        return eventList;
+    }
+
+    /**
+     * Returns a value corresponding to the selected entry.
+     *
+     * Used in conjunction with synchingToTime to change the selected entry. If
+     * one of these methods is overridden in child class, then both should be.
+     *
+     * @param time
+     *            The currently selected time
+     * @return a value identifying the entry
+     */
+    private int getSelectionValue(long time) {
+        int thread = -1;
+        for (ITmfTrace trace : TmfTraceManager.getTraceSet(getTrace())) {
+            if (thread > 0) {
+                break;
+            }
+            if (trace == null) {
+                continue;
+            }
+            ITmfStateSystem ssq = TmfStateSystemAnalysisModule.getStateSystem(trace, KernelAnalysisModule.ID);
+            if (ssq == null) {
+                continue;
+            }
+            if (time >= ssq.getStartTime() && time <= ssq.getCurrentEndTime()) {
+                List<Integer> currentThreadQuarks = ssq.getQuarks(Attributes.CPUS, "*", Attributes.CURRENT_THREAD); //$NON-NLS-1$
+                for (int currentThreadQuark : currentThreadQuarks) {
+                    try {
+                        ITmfStateInterval currentThreadInterval = ssq.querySingleState(time, currentThreadQuark);
+                        int currentThread = currentThreadInterval.getStateValue().unboxInt();
+                        if (currentThread > 0) {
+                            int statusQuark = ssq.getQuarkAbsolute(Attributes.THREADS, Integer.toString(currentThread), Attributes.STATUS);
+                            ITmfStateInterval statusInterval = ssq.querySingleState(time, statusQuark);
+                            if (statusInterval.getStartTime() == time) {
+                                thread = currentThread;
+                                break;
+                            }
+                        }
+                    } catch (AttributeNotFoundException | TimeRangeException | StateValueTypeException e) {
+                        e.printStackTrace();
+                    } catch (StateSystemDisposedException e) {
+                        /* Ignored */
+                    }
+                }
+            }
+        }
+        return thread;
+    }
+
+    @Override
+    protected void synchingToTime(long time) {
+        int selected = getSelectionValue(time);
+        if (selected > 0) {
+            for (Object element : getTimeGraphViewer().getExpandedElements()) {
+                if (element instanceof ControlFlowEntry) {
+                    ControlFlowEntry entry = (ControlFlowEntry) element;
+                    if (entry.getThreadId() == selected) {
+                        getTimeGraphCombo().setSelection(entry);
+                        break;
+                    }
+                }
+            }
+        }
+    }
+
+    @Override
+    protected List<ILinkEvent> getLinkList(long startTime, long endTime, long resolution, IProgressMonitor monitor) {
+        List<ILinkEvent> list = new ArrayList<>();
+        List<TimeGraphEntry> entryList = getEntryList(getTrace());
+        if (entryList == null) {
+            return list;
+        }
+        for (ITmfTrace trace : TmfTraceManager.getTraceSet(getTrace())) {
+            if (trace == null) {
+                continue;
+            }
+            ITmfStateSystem ssq = TmfStateSystemAnalysisModule.getStateSystem(trace, KernelAnalysisModule.ID);
+            if (ssq == null) {
+                continue;
+            }
+            try {
+                long start = Math.max(startTime, ssq.getStartTime());
+                long end = Math.min(endTime, ssq.getCurrentEndTime());
+                if (end < start) {
+                    continue;
+                }
+                List<Integer> currentThreadQuarks = ssq.getQuarks(Attributes.CPUS, "*", Attributes.CURRENT_THREAD); //$NON-NLS-1$
+                for (int currentThreadQuark : currentThreadQuarks) {
+                    // adjust the query range to include the previous and following intervals
+                    long qstart = Math.max(ssq.querySingleState(start, currentThreadQuark).getStartTime() - 1, ssq.getStartTime());
+                    long qend = Math.min(ssq.querySingleState(end, currentThreadQuark).getEndTime() + 1, ssq.getCurrentEndTime());
+                    List<ITmfStateInterval> currentThreadIntervals = StateSystemUtils.queryHistoryRange(ssq, currentThreadQuark, qstart, qend, resolution, monitor);
+                    int prevThread = 0;
+                    long prevEnd = 0;
+                    long lastEnd = 0;
+                    for (ITmfStateInterval currentThreadInterval : currentThreadIntervals) {
+                        if (monitor.isCanceled()) {
+                            return null;
+                        }
+                        long time = currentThreadInterval.getStartTime();
+                        if (time != lastEnd) {
+                            // don't create links where there are gaps in intervals due to the resolution
+                            prevThread = 0;
+                            prevEnd = 0;
+                        }
+                        int thread = currentThreadInterval.getStateValue().unboxInt();
+                        if (thread > 0 && prevThread > 0) {
+                            ITimeGraphEntry prevEntry = findEntry(entryList, trace, prevThread);
+                            ITimeGraphEntry nextEntry = findEntry(entryList, trace, thread);
+                            list.add(new TimeLinkEvent(prevEntry, nextEntry, prevEnd, time - prevEnd, 0));
+                        }
+                        lastEnd = currentThreadInterval.getEndTime() + 1;
+                        if (thread != 0) {
+                            prevThread = thread;
+                            prevEnd = lastEnd;
+                        }
+                    }
+                }
+            } catch (TimeRangeException | AttributeNotFoundException | StateValueTypeException e) {
+                e.printStackTrace();
+            } catch (StateSystemDisposedException e) {
+                /* Ignored */
+            }
+        }
+        return list;
+    }
+
+    private ControlFlowEntry findEntry(List<? extends ITimeGraphEntry> entryList, ITmfTrace trace, int threadId) {
+        for (ITimeGraphEntry entry : entryList) {
+            if (entry instanceof ControlFlowEntry) {
+                ControlFlowEntry controlFlowEntry = (ControlFlowEntry) entry;
+                if (controlFlowEntry.getThreadId() == threadId && controlFlowEntry.getTrace() == trace) {
+                    return controlFlowEntry;
+                } else if (entry.hasChildren()) {
+                    controlFlowEntry = findEntry(entry.getChildren(), trace, threadId);
+                    if (controlFlowEntry != null) {
+                        return controlFlowEntry;
+                    }
+                }
+            }
+        }
+        return null;
+    }
+}
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/cpuusage/CpuUsageComposite.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/cpuusage/CpuUsageComposite.java
new file mode 100644 (file)
index 0000000..ec51353
--- /dev/null
@@ -0,0 +1,326 @@
+/*******************************************************************************
+ * Copyright (c) 2014, 2015 Ã‰cole Polytechnique de Montréal
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Geneviève Bastien - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.analysis.os.linux.ui.views.cpuusage;
+
+import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerComparator;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.tracecompass.analysis.os.linux.core.cpuusage.KernelCpuUsageAnalysis;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.Attributes;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelAnalysisModule;
+import org.eclipse.tracecompass.statesystem.core.ITmfStateSystem;
+import org.eclipse.tracecompass.statesystem.core.StateSystemUtils;
+import org.eclipse.tracecompass.statesystem.core.exceptions.AttributeNotFoundException;
+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.tmf.core.statesystem.TmfStateSystemAnalysisModule;
+import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
+import org.eclipse.tracecompass.tmf.core.trace.TmfTraceUtils;
+import org.eclipse.tracecompass.tmf.ui.viewers.tree.AbstractTmfTreeViewer;
+import org.eclipse.tracecompass.tmf.ui.viewers.tree.ITmfTreeColumnDataProvider;
+import org.eclipse.tracecompass.tmf.ui.viewers.tree.ITmfTreeViewerEntry;
+import org.eclipse.tracecompass.tmf.ui.viewers.tree.TmfTreeColumnData;
+import org.eclipse.tracecompass.tmf.ui.viewers.tree.TmfTreeColumnData.ITmfColumnPercentageProvider;
+import org.eclipse.tracecompass.tmf.ui.viewers.tree.TmfTreeViewerEntry;
+
+/**
+ * Tree viewer to display CPU usage information in a specified time range. It
+ * shows the process's TID, its name, the time spent on the CPU during that
+ * range, in % and absolute value.
+ *
+ * @author Geneviève Bastien
+ */
+public class CpuUsageComposite extends AbstractTmfTreeViewer {
+
+    // Timeout between to wait for in the updateElements method
+    private static final long BUILD_UPDATE_TIMEOUT = 500;
+
+    private KernelCpuUsageAnalysis fModule = null;
+    private String fSelectedThread = null;
+
+    private static final String[] COLUMN_NAMES = new String[] {
+            Messages.CpuUsageComposite_ColumnTID,
+            Messages.CpuUsageComposite_ColumnProcess,
+            Messages.CpuUsageComposite_ColumnPercent,
+            Messages.CpuUsageComposite_ColumnTime
+    };
+
+    /* A map that saves the mapping of a thread ID to its executable name */
+    private final Map<String, String> fProcessNameMap = new HashMap<>();
+
+    /** Provides label for the CPU usage tree viewer cells */
+    protected static class CpuLabelProvider extends TreeLabelProvider {
+
+        @Override
+        public String getColumnText(Object element, int columnIndex) {
+            CpuUsageEntry obj = (CpuUsageEntry) element;
+            if (columnIndex == 0) {
+                return obj.getTid();
+            } else if (columnIndex == 1) {
+                return obj.getProcessName();
+            } else if (columnIndex == 2) {
+                return String.format(Messages.CpuUsageComposite_TextPercent, obj.getPercent());
+            } else if (columnIndex == 3) {
+                return NLS.bind(Messages.CpuUsageComposite_TextTime, obj.getTime());
+            }
+
+            return element.toString();
+        }
+
+    }
+
+    /**
+     * Constructor
+     *
+     * @param parent
+     *            The parent composite that holds this viewer
+     */
+    public CpuUsageComposite(Composite parent) {
+        super(parent, false);
+        setLabelProvider(new CpuLabelProvider());
+    }
+
+    @Override
+    protected ITmfTreeColumnDataProvider getColumnDataProvider() {
+        return new ITmfTreeColumnDataProvider() {
+
+            @Override
+            public List<TmfTreeColumnData> getColumnData() {
+                /* All columns are sortable */
+                List<TmfTreeColumnData> columns = new ArrayList<>();
+                TmfTreeColumnData column = new TmfTreeColumnData(COLUMN_NAMES[0]);
+                column.setComparator(new ViewerComparator() {
+                    @Override
+                    public int compare(Viewer viewer, Object e1, Object e2) {
+                        CpuUsageEntry n1 = (CpuUsageEntry) e1;
+                        CpuUsageEntry n2 = (CpuUsageEntry) e2;
+
+                        return n1.getTid().compareTo(n2.getTid());
+
+                    }
+                });
+                columns.add(column);
+                column = new TmfTreeColumnData(COLUMN_NAMES[1]);
+                column.setComparator(new ViewerComparator() {
+                    @Override
+                    public int compare(Viewer viewer, Object e1, Object e2) {
+                        CpuUsageEntry n1 = (CpuUsageEntry) e1;
+                        CpuUsageEntry n2 = (CpuUsageEntry) e2;
+
+                        return n1.getProcessName().compareTo(n2.getProcessName());
+
+                    }
+                });
+                columns.add(column);
+                column = new TmfTreeColumnData(COLUMN_NAMES[2]);
+                column.setComparator(new ViewerComparator() {
+                    @Override
+                    public int compare(Viewer viewer, Object e1, Object e2) {
+                        CpuUsageEntry n1 = (CpuUsageEntry) e1;
+                        CpuUsageEntry n2 = (CpuUsageEntry) e2;
+
+                        return n1.getPercent().compareTo(n2.getPercent());
+
+                    }
+                });
+                column.setPercentageProvider(new ITmfColumnPercentageProvider() {
+
+                    @Override
+                    public double getPercentage(Object data) {
+                        CpuUsageEntry parent = (CpuUsageEntry) data;
+                        return parent.getPercent() / 100;
+                    }
+                });
+                columns.add(column);
+                column = new TmfTreeColumnData(COLUMN_NAMES[3]);
+                column.setComparator(new ViewerComparator() {
+                    @Override
+                    public int compare(Viewer viewer, Object e1, Object e2) {
+                        CpuUsageEntry n1 = (CpuUsageEntry) e1;
+                        CpuUsageEntry n2 = (CpuUsageEntry) e2;
+
+                        return n1.getTime().compareTo(n2.getTime());
+
+                    }
+                });
+                columns.add(column);
+
+                return columns;
+            }
+
+        };
+    }
+
+    // ------------------------------------------------------------------------
+    // Operations
+    // ------------------------------------------------------------------------
+
+    @Override
+    protected void contentChanged(ITmfTreeViewerEntry rootEntry) {
+        String selectedThread = fSelectedThread;
+        if (selectedThread != null) {
+            /* Find the selected thread among the inputs */
+            for (ITmfTreeViewerEntry entry : rootEntry.getChildren()) {
+                if (entry instanceof CpuUsageEntry) {
+                    if (selectedThread.equals(((CpuUsageEntry) entry).getTid())) {
+                        List<ITmfTreeViewerEntry> list = checkNotNull(Collections.singletonList(entry));
+                        super.setSelection(list);
+                        return;
+                    }
+                }
+            }
+        }
+    }
+
+    @Override
+    public void initializeDataSource() {
+        /* Should not be called while trace is still null */
+        ITmfTrace trace = checkNotNull(getTrace());
+
+        fModule = TmfTraceUtils.getAnalysisModuleOfClass(trace, KernelCpuUsageAnalysis.class, KernelCpuUsageAnalysis.ID);
+        if (fModule == null) {
+            return;
+        }
+        fModule.schedule();
+        fModule.waitForInitialization();
+        fProcessNameMap.clear();
+    }
+
+    @Override
+    protected ITmfTreeViewerEntry updateElements(long start, long end, boolean isSelection) {
+        if (isSelection || (start == end)) {
+            return null;
+        }
+        if (getTrace() == null || fModule == null) {
+            return null;
+        }
+        fModule.waitForInitialization();
+        ITmfStateSystem ss = fModule.getStateSystem();
+        if (ss == null) {
+            return null;
+        }
+
+        boolean complete = false;
+        long currentEnd = start;
+
+        while (!complete && currentEnd < end) {
+            complete = ss.waitUntilBuilt(BUILD_UPDATE_TIMEOUT);
+            currentEnd = ss.getCurrentEndTime();
+        }
+
+        /* Initialize the data */
+        Map<String, Long> cpuUsageMap = fModule.getCpuUsageInRange(Math.max(start, getStartTime()), Math.min(end, getEndTime()));
+
+        TmfTreeViewerEntry root = new TmfTreeViewerEntry(""); //$NON-NLS-1$
+        List<ITmfTreeViewerEntry> entryList = root.getChildren();
+
+        for (Entry<String, Long> entry : cpuUsageMap.entrySet()) {
+            /*
+             * Process only entries representing the total of all CPUs and that
+             * have time on CPU
+             */
+            if (entry.getValue() == 0) {
+                continue;
+            }
+            if (!entry.getKey().startsWith(KernelCpuUsageAnalysis.TOTAL)) {
+                continue;
+            }
+            String[] strings = entry.getKey().split(KernelCpuUsageAnalysis.SPLIT_STRING, 2);
+
+            if ((strings.length > 1) && !(strings[1].equals(KernelCpuUsageAnalysis.TID_ZERO))) {
+                CpuUsageEntry obj = new CpuUsageEntry(strings[1], getProcessName(strings[1]), (double) entry.getValue() / (double) (end - start) * 100, entry.getValue());
+                entryList.add(obj);
+            }
+        }
+
+        return root;
+    }
+
+    /*
+     * Get the process name from its TID by using the LTTng kernel analysis
+     * module
+     */
+    private String getProcessName(String tid) {
+        String execName = fProcessNameMap.get(tid);
+        if (execName != null) {
+            return execName;
+        }
+        ITmfTrace trace = getTrace();
+        if (trace == null) {
+            return tid;
+        }
+        ITmfStateSystem kernelSs = TmfStateSystemAnalysisModule.getStateSystem(trace, KernelAnalysisModule.ID);
+        if (kernelSs == null) {
+            return tid;
+        }
+
+        try {
+            int cpusNode = kernelSs.getQuarkAbsolute(Attributes.THREADS);
+
+            /* Get the quarks for each cpu */
+            List<Integer> cpuNodes = kernelSs.getSubAttributes(cpusNode, false);
+
+            for (Integer tidQuark : cpuNodes) {
+                if (kernelSs.getAttributeName(tidQuark).equals(tid)) {
+                    int execNameQuark;
+                    List<ITmfStateInterval> execNameIntervals;
+                    try {
+                        execNameQuark = kernelSs.getQuarkRelative(tidQuark, Attributes.EXEC_NAME);
+                        execNameIntervals = StateSystemUtils.queryHistoryRange(kernelSs, execNameQuark, getStartTime(), getEndTime());
+                    } catch (AttributeNotFoundException e) {
+                        /* No information on this thread (yet?), skip it for now */
+                        continue;
+                    } catch (StateSystemDisposedException e) {
+                        /* State system is closing down, no point continuing */
+                        break;
+                    }
+
+                    for (ITmfStateInterval execNameInterval : execNameIntervals) {
+                        if (!execNameInterval.getStateValue().isNull() &&
+                                execNameInterval.getStateValue().getType() == ITmfStateValue.Type.STRING) {
+                            execName = execNameInterval.getStateValue().unboxStr();
+                            fProcessNameMap.put(tid, execName);
+                            return execName;
+                        }
+                    }
+                }
+            }
+
+        } catch (AttributeNotFoundException e) {
+            /* can't find the process name, just return the tid instead */
+        }
+        return tid;
+    }
+
+    /**
+     * Set the currently selected thread ID
+     *
+     * @param tid
+     *            The selected thread ID
+     */
+    public void setSelectedThread(String tid) {
+        fSelectedThread = tid;
+    }
+
+}
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/cpuusage/CpuUsageEntry.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/cpuusage/CpuUsageEntry.java
new file mode 100644 (file)
index 0000000..94ac77a
--- /dev/null
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ * Copyright (c) 2014, 2015 Ã‰cole Polytechnique de Montréal
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Geneviève Bastien - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.analysis.os.linux.ui.views.cpuusage;
+
+import org.eclipse.tracecompass.tmf.ui.viewers.tree.TmfTreeViewerEntry;
+
+/**
+ * Represents an entry in the tree viewer of the CPU usage view. An entry is a
+ * thread that occupied part of the CPU in the selected time range.
+ *
+ * @author Geneviève Bastien
+ */
+public class CpuUsageEntry extends TmfTreeViewerEntry {
+    private final String fTid;
+    private final String fProcessName;
+    private final Double fPercent;
+    private final Long fTime;
+
+    /**
+     * Constructor
+     *
+     * @param tid
+     *            The TID of the process
+     * @param name
+     *            The thread's name
+     * @param percent
+     *            The percentage CPU usage
+     * @param time
+     *            The total amount of time spent on CPU
+     */
+    public CpuUsageEntry(String tid, String name, double percent, long time) {
+        super(tid);
+        fTid = tid;
+        fProcessName = name;
+        fPercent = percent;
+        fTime = time;
+    }
+
+    /**
+     * Get the TID of the thread represented by this entry
+     *
+     * @return The thread's TID
+     */
+    public String getTid() {
+        return fTid;
+    }
+
+    /**
+     * Get the process name
+     *
+     * @return The process name
+     */
+    public String getProcessName() {
+        return fProcessName;
+    }
+
+    /**
+     * Get the percentage of time spent on CPU in the time interval represented
+     * by this entry.
+     *
+     * @return The percentage of time spent on CPU
+     */
+    public Double getPercent() {
+        return fPercent;
+    }
+
+    /**
+     * Get the total time spent on CPU in the time interval represented by this
+     * entry.
+     *
+     * @return The total time spent on CPU
+     */
+    public Long getTime() {
+        return fTime;
+    }
+}
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/cpuusage/CpuUsageView.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/cpuusage/CpuUsageView.java
new file mode 100644 (file)
index 0000000..a2b899a
--- /dev/null
@@ -0,0 +1,218 @@
+/*******************************************************************************
+ * Copyright (c) 2014, 2015 Ã‰cole Polytechnique de Montréal
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Geneviève Bastien - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.analysis.os.linux.ui.views.cpuusage;
+
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.SashForm;
+import org.eclipse.swt.events.ControlAdapter;
+import org.eclipse.swt.events.ControlEvent;
+import org.eclipse.swt.events.PaintEvent;
+import org.eclipse.swt.events.PaintListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Sash;
+import org.eclipse.tracecompass.tmf.core.signal.TmfSignalManager;
+import org.eclipse.tracecompass.tmf.core.signal.TmfTraceSelectedSignal;
+import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
+import org.eclipse.tracecompass.tmf.core.trace.TmfTraceManager;
+import org.eclipse.tracecompass.tmf.ui.signal.TmfTimeViewAlignmentInfo;
+import org.eclipse.tracecompass.tmf.ui.signal.TmfTimeViewAlignmentSignal;
+import org.eclipse.tracecompass.tmf.ui.views.ITmfTimeAligned;
+import org.eclipse.tracecompass.tmf.ui.views.TmfView;
+
+/**
+ * CPU usage view. It contains 2 viewers: one tree viewer showing all the
+ * threads who were on the CPU in the time range, and one XY chart viewer
+ * plotting the total time spent on CPU and the time of the threads selected in
+ * the tree viewer.
+ *
+ * @author Geneviève Bastien
+ */
+public class CpuUsageView extends TmfView implements ITmfTimeAligned {
+
+    /** ID string */
+    public static final String ID = "org.eclipse.tracecompass.analysis.os.linux.views.cpuusage"; //$NON-NLS-1$
+
+    private static final int[] DEFAULT_WEIGHTS = {1, 3};
+
+    private CpuUsageComposite fTreeViewer = null;
+    private CpuUsageXYViewer fXYViewer = null;
+
+    private SashForm fSashForm;
+    private Listener fSashDragListener;
+    /** A composite that allows us to add margins */
+    private Composite fXYViewerContainer;
+
+    /**
+     * Constructor
+     */
+    public CpuUsageView() {
+        super(Messages.CpuUsageView_Title);
+    }
+
+    @Override
+    public void createPartControl(Composite parent) {
+        super.createPartControl(parent);
+
+        fSashForm = new SashForm(parent, SWT.NONE);
+
+        fTreeViewer = new CpuUsageComposite(fSashForm);
+
+        fXYViewerContainer = new Composite(fSashForm, SWT.NONE);
+        GridLayout layout = new GridLayout();
+        layout.marginHeight = 0;
+        layout.marginWidth = 0;
+        fXYViewerContainer.setLayout(layout);
+
+        /* Build the XY chart part of the view */
+        fXYViewer = new CpuUsageXYViewer(fXYViewerContainer);
+        fXYViewer.setSendTimeAlignSignals(true);
+        fXYViewer.getControl().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+
+        /* Add selection listener to tree viewer */
+        fTreeViewer.addSelectionChangeListener(new ISelectionChangedListener() {
+            @Override
+            public void selectionChanged(SelectionChangedEvent event) {
+                ISelection selection = event.getSelection();
+                if (selection instanceof IStructuredSelection) {
+                    Object structSelection = ((IStructuredSelection) selection).getFirstElement();
+                    if (structSelection instanceof CpuUsageEntry) {
+                        CpuUsageEntry entry = (CpuUsageEntry) structSelection;
+                        fTreeViewer.setSelectedThread(entry.getTid());
+                        fXYViewer.setSelectedThread(Long.valueOf(entry.getTid()));
+                    }
+                }
+            }
+        });
+
+        /* Initialize the viewers with the currently selected trace */
+        ITmfTrace trace = TmfTraceManager.getInstance().getActiveTrace();
+        if (trace != null) {
+            TmfTraceSelectedSignal signal = new TmfTraceSelectedSignal(this, trace);
+            fTreeViewer.traceSelected(signal);
+            fXYViewer.traceSelected(signal);
+        }
+        fTreeViewer.getControl().addControlListener(new ControlAdapter() {
+            @Override
+            public void controlResized(ControlEvent e) {
+                super.controlResized(e);
+            }
+        });
+
+        fXYViewer.getControl().addPaintListener(new PaintListener() {
+            @Override
+            public void paintControl(PaintEvent e) {
+                // Sashes in a SashForm are being created on layout so add the
+                // drag listener here
+                if (fSashDragListener == null) {
+                    for (Control control : fSashForm.getChildren()) {
+                        if (control instanceof Sash) {
+                            fSashDragListener = new Listener() {
+
+                                @Override
+                                public void handleEvent(Event event) {
+                                    TmfSignalManager.dispatchSignal(new TmfTimeViewAlignmentSignal(fSashForm, getTimeViewAlignmentInfo()));
+                                }
+                            };
+                            control.removePaintListener(this);
+                            control.addListener(SWT.Selection, fSashDragListener);
+                            // There should be only one sash
+                            break;
+                        }
+                    }
+                }
+            }
+        });
+
+        fSashForm.setWeights(DEFAULT_WEIGHTS);
+    }
+
+    @Override
+    public void setFocus() {
+        fXYViewer.getControl().setFocus();
+    }
+
+    @Override
+    public void dispose() {
+        super.dispose();
+        if (fTreeViewer != null) {
+            fTreeViewer.dispose();
+        }
+        if (fXYViewer != null) {
+            fXYViewer.dispose();
+        }
+    }
+
+    /**
+     * @since 1.0
+     */
+    @Override
+    public TmfTimeViewAlignmentInfo getTimeViewAlignmentInfo() {
+        if (fSashForm == null) {
+            return null;
+        }
+
+        return new TmfTimeViewAlignmentInfo(fSashForm.getShell(), fSashForm.toDisplay(0, 0), getTimeAxisOffset());
+    }
+
+    private int getTimeAxisOffset() {
+        return fTreeViewer.getControl().getSize().x + fSashForm.getSashWidth() + fXYViewer.getPointAreaOffset();
+    }
+
+    /**
+     * @since 1.0
+     */
+    @Override
+    public int getAvailableWidth(int requestedOffset) {
+        int pointAreaWidth = fXYViewer.getPointAreaWidth();
+        int curTimeAxisOffset = getTimeAxisOffset();
+        if (pointAreaWidth <= 0) {
+            pointAreaWidth = fSashForm.getBounds().width - curTimeAxisOffset;
+        }
+        // TODO this is just an approximation that assumes that the end will be at the same position but that can change for a different data range/scaling
+        int endOffset = curTimeAxisOffset + pointAreaWidth;
+        GridLayout layout = (GridLayout) fXYViewerContainer.getLayout();
+        int endOffsetWithoutMargin = endOffset + layout.marginRight;
+        int availableWidth = endOffsetWithoutMargin - requestedOffset;
+        availableWidth = Math.min(fSashForm.getBounds().width, Math.max(0, availableWidth));
+        return availableWidth;
+    }
+
+    /**
+     * @since 1.0
+     */
+    @Override
+    public void performAlign(int offset, int width) {
+        int total = fSashForm.getBounds().width;
+        int plotAreaOffset = fXYViewer.getPointAreaOffset();
+        int width1 = Math.max(0, offset - plotAreaOffset - fSashForm.getSashWidth());
+        int width2 = Math.max(0, total - width1 - fSashForm.getSashWidth());
+        fSashForm.setWeights(new int[] { width1, width2 });
+        fSashForm.layout();
+
+        Composite composite = fXYViewerContainer;
+        GridLayout layout = (GridLayout) composite.getLayout();
+        int timeAxisWidth = getAvailableWidth(offset);
+        int marginSize = timeAxisWidth - width;
+        layout.marginRight = Math.max(0, marginSize);
+        composite.layout();
+    }
+}
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/cpuusage/CpuUsageXYViewer.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/cpuusage/CpuUsageXYViewer.java
new file mode 100644 (file)
index 0000000..e01cd73
--- /dev/null
@@ -0,0 +1,220 @@
+/*******************************************************************************
+ * Copyright (c) 2014, 2015 Ã‰cole Polytechnique de Montréal
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Geneviève Bastien - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.analysis.os.linux.ui.views.cpuusage;
+
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.tracecompass.analysis.os.linux.core.cpuusage.KernelCpuUsageAnalysis;
+import org.eclipse.tracecompass.internal.analysis.os.linux.ui.Activator;
+import org.eclipse.tracecompass.statesystem.core.ITmfStateSystem;
+import org.eclipse.tracecompass.statesystem.core.exceptions.StateValueTypeException;
+import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
+import org.eclipse.tracecompass.tmf.core.trace.TmfTraceUtils;
+import org.eclipse.tracecompass.tmf.ui.viewers.xycharts.linecharts.TmfCommonXLineChartViewer;
+
+/**
+ * CPU usage viewer with XY line chart. It displays the total CPU usage and that
+ * of the threads selected in the CPU usage tree viewer.
+ *
+ * @author Geneviève Bastien
+ */
+public class CpuUsageXYViewer extends TmfCommonXLineChartViewer {
+
+    private KernelCpuUsageAnalysis fModule = null;
+
+    /* Maps a thread ID to a list of y values */
+    private final Map<String, double[]> fYValues = new LinkedHashMap<>();
+    /*
+     * To avoid up and downs CPU usage when process is in and out of CPU
+     * frequently, use a smaller resolution to get better averages.
+     */
+    private static final double RESOLUTION = 0.4;
+
+    // Timeout between updates in the updateData thread
+    private static final long BUILD_UPDATE_TIMEOUT = 500;
+
+    private long fSelectedThread = -1;
+
+    /**
+     * Constructor
+     *
+     * @param parent
+     *            parent composite
+     */
+    public CpuUsageXYViewer(Composite parent) {
+        super(parent, Messages.CpuUsageXYViewer_Title, Messages.CpuUsageXYViewer_TimeXAxis, Messages.CpuUsageXYViewer_CpuYAxis);
+        setResolution(RESOLUTION);
+    }
+
+    @Override
+    protected void initializeDataSource() {
+        ITmfTrace trace = getTrace();
+        if (trace != null) {
+            fModule = TmfTraceUtils.getAnalysisModuleOfClass(trace, KernelCpuUsageAnalysis.class, KernelCpuUsageAnalysis.ID);
+            if (fModule == null) {
+                return;
+            }
+            fModule.schedule();
+        }
+    }
+
+    private static double[] zeroFill(int nb) {
+        double[] arr = new double[nb];
+        Arrays.fill(arr, 0.0);
+        return arr;
+    }
+
+    @Override
+    protected void updateData(long start, long end, int nb, IProgressMonitor monitor) {
+        try {
+            if (getTrace() == null || fModule == null) {
+                return;
+            }
+            fModule.waitForInitialization();
+            ITmfStateSystem ss = fModule.getStateSystem();
+            if (ss == null) {
+                return;
+            }
+            double[] xvalues = getXAxis(start, end, nb);
+            if (xvalues.length == 0) {
+                return;
+            }
+            setXAxis(xvalues);
+
+            boolean complete = false;
+            long currentEnd = start;
+
+            while (!complete && currentEnd < end) {
+
+                if (monitor.isCanceled()) {
+                    return;
+                }
+
+                long traceStart = getStartTime();
+                long traceEnd = getEndTime();
+                long offset = getTimeOffset();
+                long selectedThread = fSelectedThread;
+
+                complete = ss.waitUntilBuilt(BUILD_UPDATE_TIMEOUT);
+                currentEnd = ss.getCurrentEndTime();
+
+                /* Initialize the data */
+                Map<String, Long> cpuUsageMap = fModule.getCpuUsageInRange(Math.max(start, traceStart), Math.min(end, traceEnd));
+                Map<String, String> totalEntries = new HashMap<>();
+                fYValues.clear();
+                fYValues.put(Messages.CpuUsageXYViewer_Total, zeroFill(xvalues.length));
+                String stringSelectedThread = Long.toString(selectedThread);
+                if (selectedThread != -1) {
+                    fYValues.put(stringSelectedThread, zeroFill(xvalues.length));
+                }
+
+                for (Entry<String, Long> entry : cpuUsageMap.entrySet()) {
+                    /*
+                     * Process only entries representing the total of all CPUs
+                     * and that have time on CPU
+                     */
+                    if (entry.getValue() == 0) {
+                        continue;
+                    }
+                    if (!entry.getKey().startsWith(KernelCpuUsageAnalysis.TOTAL)) {
+                        continue;
+                    }
+                    String[] strings = entry.getKey().split(KernelCpuUsageAnalysis.SPLIT_STRING, 2);
+
+                    if ((strings.length > 1) && !(strings[1].equals(KernelCpuUsageAnalysis.TID_ZERO))) {
+                        /* This is the total cpu usage for a thread */
+                        totalEntries.put(strings[1], entry.getKey());
+                    }
+                }
+
+                double prevX = xvalues[0] - 1;
+                long prevTime = (long) prevX + offset;
+                /*
+                 * make sure that time is in the trace range after double to
+                 * long conversion
+                 */
+                prevTime = Math.max(traceStart, prevTime);
+                prevTime = Math.min(traceEnd, prevTime);
+                /* Get CPU usage statistics for each x value */
+                for (int i = 0; i < xvalues.length; i++) {
+                    if (monitor.isCanceled()) {
+                        return;
+                    }
+                    long totalCpu = 0;
+                    double x = xvalues[i];
+                    long time = (long) x + offset;
+                    time = Math.max(traceStart, time);
+                    time = Math.min(traceEnd, time);
+                    if (time == prevTime) {
+                        /*
+                         * we need at least 1 time unit to be able to get cpu
+                         * usage when zoomed in
+                         */
+                        prevTime = time - 1;
+                    }
+
+                    cpuUsageMap = fModule.getCpuUsageInRange(prevTime, time);
+
+                    /*
+                     * Calculate the sum of all total entries, and add a data
+                     * point to the selected one
+                     */
+                    for (Entry<String, String> entry : totalEntries.entrySet()) {
+                        Long cpuEntry = cpuUsageMap.get(entry.getValue());
+                        cpuEntry = cpuEntry != null ? cpuEntry : 0L;
+
+                        totalCpu += cpuEntry;
+
+                        if (entry.getKey().equals(stringSelectedThread)) {
+                            /* This is the total cpu usage for a thread */
+                            fYValues.get(entry.getKey())[i] = (double) cpuEntry / (double) (time - prevTime) * 100;
+                        }
+
+                    }
+                    fYValues.get(Messages.CpuUsageXYViewer_Total)[i] = (double) totalCpu / (double) (time - prevTime) * 100;
+                    prevTime = time;
+                }
+                for (Entry<String, double[]> entry : fYValues.entrySet()) {
+                    setSeries(entry.getKey(), entry.getValue());
+                }
+                if (monitor.isCanceled()) {
+                    return;
+                }
+                updateDisplay();
+            }
+        } catch (StateValueTypeException e) {
+            Activator.getDefault().logError("Error updating the data of the CPU usage view", e); //$NON-NLS-1$
+        }
+
+    }
+
+    /**
+     * Set the selected thread ID, which will be graphed in this viewer
+     *
+     * @param tid
+     *            The selected thread ID
+     */
+    public void setSelectedThread(long tid) {
+        cancelUpdate();
+        deleteSeries(Long.toString(fSelectedThread));
+        fSelectedThread = tid;
+        updateContent();
+    }
+
+}
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/cpuusage/Messages.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/cpuusage/Messages.java
new file mode 100644 (file)
index 0000000..1460009
--- /dev/null
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2014, 2015 Ã‰cole Polytechnique de Montréal
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Geneviève Bastien - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.analysis.os.linux.ui.views.cpuusage;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * Messages used in the LTTng kernel CPU usage view and viewers.
+ *
+ * @author Geneviève Bastien
+ */
+@SuppressWarnings("javadoc")
+public class Messages extends NLS {
+
+    private static final String BUNDLE_NAME = "org.eclipse.tracecompass.analysis.os.linux.ui.views.cpuusage.messages"; //$NON-NLS-1$
+
+    public static String CpuUsageComposite_ColumnPercent;
+    public static String CpuUsageComposite_ColumnProcess;
+    public static String CpuUsageComposite_ColumnTID;
+    public static String CpuUsageComposite_ColumnTime;
+    public static String CpuUsageComposite_TextPercent;
+    public static String CpuUsageComposite_TextTime;
+    public static String CpuUsageView_Title;
+    public static String CpuUsageXYViewer_CpuYAxis;
+    public static String CpuUsageXYViewer_TimeXAxis;
+    public static String CpuUsageXYViewer_Title;
+    public static String CpuUsageXYViewer_Total;
+
+    static {
+        // initialize resource bundle
+        NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+    }
+
+    private Messages() {
+    }
+}
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/cpuusage/messages.properties b/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/cpuusage/messages.properties
new file mode 100644 (file)
index 0000000..bf8a799
--- /dev/null
@@ -0,0 +1,23 @@
+###############################################################################
+# Copyright (c) 2014, 2015 Ã‰cole Polytechnique de Montréal
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     Geneviève Bastien - Initial API and implementation
+###############################################################################
+
+CpuUsageComposite_ColumnPercent=%
+CpuUsageComposite_ColumnProcess=Process
+CpuUsageComposite_ColumnTID=TID
+CpuUsageComposite_ColumnTime=Time
+CpuUsageComposite_TextPercent=%1$.3f %%
+CpuUsageComposite_TextTime={0} ns
+CpuUsageView_Title=CPU Usage
+CpuUsageXYViewer_CpuYAxis=% CPU
+CpuUsageXYViewer_TimeXAxis=Time
+CpuUsageXYViewer_Title=CPU usage
+CpuUsageXYViewer_Total=Total
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/resources/ResourcesEntry.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/resources/ResourcesEntry.java
new file mode 100644 (file)
index 0000000..92d6067
--- /dev/null
@@ -0,0 +1,177 @@
+/*******************************************************************************
+ * Copyright (c) 2012, 2015 Ericsson, Ã‰cole Polytechnique de Montréal
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Patrick Tasse - Initial API and implementation
+ *   Geneviève Bastien - Move code to provide base classes for time graph view
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.analysis.os.linux.ui.views.resources;
+
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
+import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.model.ITimeGraphEntry;
+import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.model.TimeGraphEntry;
+
+/**
+ * An entry, or row, in the resource view
+ *
+ * @author Patrick Tasse
+ */
+public class ResourcesEntry extends TimeGraphEntry implements Comparable<ITimeGraphEntry> {
+
+    /** Type of resource */
+    public static enum Type {
+        /** Null resources (filler rows, etc.) */
+        NULL,
+        /** Entries for CPUs */
+        CPU,
+        /** Entries for IRQs */
+        IRQ,
+        /** Entries for Soft IRQ */
+        SOFT_IRQ
+    }
+
+    private final int fId;
+    private final @NonNull ITmfTrace fTrace;
+    private final Type fType;
+    private final int fQuark;
+
+    /**
+     * Constructor
+     *
+     * @param quark
+     *            The attribute quark matching the entry
+     * @param trace
+     *            The trace on which we are working
+     * @param name
+     *            The exec_name of this entry
+     * @param startTime
+     *            The start time of this entry lifetime
+     * @param endTime
+     *            The end time of this entry
+     * @param type
+     *            The type of this entry
+     * @param id
+     *            The id of this entry
+     */
+    public ResourcesEntry(int quark, @NonNull ITmfTrace trace, String name,
+            long startTime, long endTime, Type type, int id) {
+        super(name, startTime, endTime);
+        fId = id;
+        fTrace = trace;
+        fType = type;
+        fQuark = quark;
+    }
+
+    /**
+     * Constructor
+     *
+     * @param trace
+     *            The trace on which we are working
+     * @param name
+     *            The exec_name of this entry
+     * @param startTime
+     *            The start time of this entry lifetime
+     * @param endTime
+     *            The end time of this entry
+     * @param id
+     *            The id of this entry
+     */
+    public ResourcesEntry(@NonNull ITmfTrace trace, String name,
+            long startTime, long endTime, int id) {
+        this(-1, trace, name, startTime, endTime, Type.NULL, id);
+    }
+
+    /**
+     * Constructor
+     *
+     * @param quark
+     *            The attribute quark matching the entry
+     * @param trace
+     *            The trace on which we are working
+     * @param startTime
+     *            The start time of this entry lifetime
+     * @param endTime
+     *            The end time of this entry
+     * @param type
+     *            The type of this entry
+     * @param id
+     *            The id of this entry
+     */
+    public ResourcesEntry(int quark, @NonNull ITmfTrace trace,
+            long startTime, long endTime, Type type, int id) {
+        this(quark, trace, type.toString() + " " + id, startTime, endTime, type, id); //$NON-NLS-1$
+    }
+
+    /**
+     * Get the entry's id
+     *
+     * @return the entry's id
+     */
+    public int getId() {
+        return fId;
+    }
+
+    /**
+     * Get the entry's trace
+     *
+     * @return the entry's trace
+     */
+    public @NonNull ITmfTrace getTrace() {
+        return fTrace;
+    }
+
+    /**
+     * Get the entry Type of this entry. Uses the inner Type enum.
+     *
+     * @return The entry type
+     */
+    public Type getType() {
+        return fType;
+    }
+
+    /**
+     * Retrieve the attribute quark that's represented by this entry.
+     *
+     * @return The integer quark The attribute quark matching the entry
+     */
+    public int getQuark() {
+        return fQuark;
+    }
+
+    @Override
+    public boolean hasTimeEvents() {
+        if (fType == Type.NULL) {
+            return false;
+        }
+        return true;
+    }
+
+    @Override
+    public int compareTo(ITimeGraphEntry other) {
+        if (!(other instanceof ResourcesEntry)) {
+            /* Should not happen, but if it does, put those entries at the end */
+            return -1;
+        }
+        ResourcesEntry o = (ResourcesEntry) other;
+
+        /*
+         * Resources entry names should all be of type "ABC 123"
+         *
+         * We want to filter on the Type first (the "ABC" part), then on the ID
+         * ("123") in numerical order (so we get 1,2,10 and not 1,10,2).
+         */
+        int ret = this.getType().compareTo(o.getType());
+        if (ret != 0) {
+            return ret;
+        }
+        return Integer.compare(this.getId(), o.getId());
+    }
+
+}
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/resources/ResourcesPresentationProvider.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/resources/ResourcesPresentationProvider.java
new file mode 100644 (file)
index 0000000..a0ac390
--- /dev/null
@@ -0,0 +1,379 @@
+/*******************************************************************************
+ * Copyright (c) 2012, 2015 Ericsson, Ã‰cole Polytechnique de Montréal
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Patrick Tasse - Initial API and implementation
+ *   Geneviève Bastien - Move code to provide base classes for time graph view
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.analysis.os.linux.ui.views.resources;
+
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.Attributes;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelAnalysisModule;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.StateValues;
+import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelAnalysisEventLayout;
+import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelTrace;
+import org.eclipse.tracecompass.analysis.os.linux.ui.views.resources.ResourcesEntry.Type;
+import org.eclipse.tracecompass.internal.analysis.os.linux.ui.Activator;
+import org.eclipse.tracecompass.internal.analysis.os.linux.ui.Messages;
+import org.eclipse.tracecompass.statesystem.core.ITmfStateSystem;
+import org.eclipse.tracecompass.statesystem.core.exceptions.AttributeNotFoundException;
+import org.eclipse.tracecompass.statesystem.core.exceptions.StateSystemDisposedException;
+import org.eclipse.tracecompass.statesystem.core.exceptions.StateValueTypeException;
+import org.eclipse.tracecompass.statesystem.core.exceptions.TimeRangeException;
+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.widgets.timegraph.StateItem;
+import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.TimeGraphPresentationProvider;
+import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.model.ITimeEvent;
+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.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;
+
+/**
+ * Presentation provider for the Resource view, based on the generic TMF
+ * presentation provider.
+ *
+ * @author Patrick Tasse
+ */
+public class ResourcesPresentationProvider extends TimeGraphPresentationProvider {
+
+    private long fLastThreadId = -1;
+    private Color fColorWhite;
+    private Color fColorGray;
+    private Integer fAverageCharWidth;
+
+    private enum State {
+        IDLE             (new RGB(200, 200, 200)),
+        USERMODE         (new RGB(  0, 200,   0)),
+        SYSCALL          (new RGB(  0,   0, 200)),
+        IRQ              (new RGB(200,   0, 100)),
+        SOFT_IRQ         (new RGB(200, 150, 100)),
+        IRQ_ACTIVE       (new RGB(200,   0, 100)),
+        SOFT_IRQ_RAISED  (new RGB(200, 200,   0)),
+        SOFT_IRQ_ACTIVE  (new RGB(200, 150, 100));
+
+        public final RGB rgb;
+
+        private State(RGB rgb) {
+            this.rgb = rgb;
+        }
+    }
+
+    /**
+     * Default constructor
+     */
+    public ResourcesPresentationProvider() {
+        super();
+    }
+
+    private static State[] getStateValues() {
+        return State.values();
+    }
+
+    private static State getEventState(TimeEvent event) {
+        if (event.hasValue()) {
+            ResourcesEntry entry = (ResourcesEntry) event.getEntry();
+            int value = event.getValue();
+
+            if (entry.getType() == Type.CPU) {
+                if (value == StateValues.CPU_STATUS_IDLE) {
+                    return State.IDLE;
+                } else if (value == StateValues.CPU_STATUS_RUN_USERMODE) {
+                    return State.USERMODE;
+                } else if (value == StateValues.CPU_STATUS_RUN_SYSCALL) {
+                    return State.SYSCALL;
+                } else if (value == StateValues.CPU_STATUS_IRQ) {
+                    return State.IRQ;
+                } else if (value == StateValues.CPU_STATUS_SOFTIRQ) {
+                    return State.SOFT_IRQ;
+                }
+            } else if (entry.getType() == Type.IRQ) {
+                return State.IRQ_ACTIVE;
+            } else if (entry.getType() == Type.SOFT_IRQ) {
+                if (value == StateValues.SOFT_IRQ_RAISED) {
+                    return State.SOFT_IRQ_RAISED;
+                }
+                return State.SOFT_IRQ_ACTIVE;
+            }
+        }
+        return null;
+    }
+
+    @Override
+    public int getStateTableIndex(ITimeEvent event) {
+        State state = getEventState((TimeEvent) event);
+        if (state != null) {
+            return state.ordinal();
+        }
+        if (event instanceof NullTimeEvent) {
+            return INVISIBLE;
+        }
+        return TRANSPARENT;
+    }
+
+    @Override
+    public StateItem[] getStateTable() {
+        State[] states = getStateValues();
+        StateItem[] stateTable = new StateItem[states.length];
+        for (int i = 0; i < stateTable.length; i++) {
+            State state = states[i];
+            stateTable[i] = new StateItem(state.rgb, state.toString());
+        }
+        return stateTable;
+    }
+
+    @Override
+    public String getEventName(ITimeEvent event) {
+        State state = getEventState((TimeEvent) event);
+        if (state != null) {
+            return state.toString();
+        }
+        if (event instanceof NullTimeEvent) {
+            return null;
+        }
+        return Messages.ResourcesView_multipleStates;
+    }
+
+    @Override
+    public Map<String, String> getEventHoverToolTipInfo(ITimeEvent event, long hoverTime) {
+
+        Map<String, String> retMap = new LinkedHashMap<>();
+        if (event instanceof TimeEvent && ((TimeEvent) event).hasValue()) {
+
+            TimeEvent tcEvent = (TimeEvent) event;
+            ResourcesEntry entry = (ResourcesEntry) event.getEntry();
+
+            if (tcEvent.hasValue()) {
+                ITmfStateSystem ss = TmfStateSystemAnalysisModule.getStateSystem(entry.getTrace(), KernelAnalysisModule.ID);
+                if (ss == null) {
+                    return retMap;
+                }
+                // Check for IRQ or Soft_IRQ type
+                if (entry.getType().equals(Type.IRQ) || entry.getType().equals(Type.SOFT_IRQ)) {
+
+                    // Get CPU of IRQ or SoftIRQ and provide it for the tooltip display
+                    int cpu = tcEvent.getValue();
+                    if (cpu >= 0) {
+                        retMap.put(Messages.ResourcesView_attributeCpuName, String.valueOf(cpu));
+                    }
+                }
+
+                // Check for type CPU
+                else if (entry.getType().equals(Type.CPU)) {
+                    int status = tcEvent.getValue();
+
+                    if (status == StateValues.CPU_STATUS_IRQ) {
+                        // In IRQ state get the IRQ that caused the interruption
+                        int cpu = entry.getId();
+
+                        try {
+                            List<ITmfStateInterval> fullState = ss.queryFullState(event.getTime());
+                            List<Integer> irqQuarks = ss.getQuarks(Attributes.RESOURCES, Attributes.IRQS, "*"); //$NON-NLS-1$
+
+                            for (int irqQuark : irqQuarks) {
+                                if (fullState.get(irqQuark).getStateValue().unboxInt() == cpu) {
+                                    ITmfStateInterval value = ss.querySingleState(event.getTime(), irqQuark);
+                                    if (!value.getStateValue().isNull()) {
+                                        int irq = Integer.parseInt(ss.getAttributeName(irqQuark));
+                                        retMap.put(Messages.ResourcesView_attributeIrqName, String.valueOf(irq));
+                                    }
+                                    break;
+                                }
+                            }
+                        } catch (AttributeNotFoundException | TimeRangeException | StateValueTypeException e) {
+                            Activator.getDefault().logError("Error in ResourcesPresentationProvider", e); //$NON-NLS-1$
+                        } catch (StateSystemDisposedException e) {
+                            /* Ignored */
+                        }
+                    } else if (status == StateValues.CPU_STATUS_SOFTIRQ) {
+                        // In SOFT_IRQ state get the SOFT_IRQ that caused the interruption
+                        int cpu = entry.getId();
+
+                        try {
+                            List<ITmfStateInterval> fullState = ss.queryFullState(event.getTime());
+                            List<Integer> softIrqQuarks = ss.getQuarks(Attributes.RESOURCES, Attributes.SOFT_IRQS, "*"); //$NON-NLS-1$
+
+                            for (int softIrqQuark : softIrqQuarks) {
+                                if (fullState.get(softIrqQuark).getStateValue().unboxInt() == cpu) {
+                                    ITmfStateInterval value = ss.querySingleState(event.getTime(), softIrqQuark);
+                                    if (!value.getStateValue().isNull()) {
+                                        int softIrq = Integer.parseInt(ss.getAttributeName(softIrqQuark));
+                                        retMap.put(Messages.ResourcesView_attributeSoftIrqName, String.valueOf(softIrq));
+                                    }
+                                    break;
+                                }
+                            }
+                        } catch (AttributeNotFoundException | TimeRangeException | StateValueTypeException e) {
+                            Activator.getDefault().logError("Error in ResourcesPresentationProvider", e); //$NON-NLS-1$
+                        } catch (StateSystemDisposedException e) {
+                            /* Ignored */
+                        }
+                    } else if (status == StateValues.CPU_STATUS_RUN_USERMODE || status == StateValues.CPU_STATUS_RUN_SYSCALL) {
+                        // In running state get the current tid
+
+                        try {
+                            retMap.put(Messages.ResourcesView_attributeHoverTime, Utils.formatTime(hoverTime, TimeFormat.CALENDAR, Resolution.NANOSEC));
+                            int cpuQuark = entry.getQuark();
+                            int currentThreadQuark = ss.getQuarkRelative(cpuQuark, Attributes.CURRENT_THREAD);
+                            ITmfStateInterval interval = ss.querySingleState(hoverTime, currentThreadQuark);
+                            if (!interval.getStateValue().isNull()) {
+                                ITmfStateValue value = interval.getStateValue();
+                                int currentThreadId = value.unboxInt();
+                                retMap.put(Messages.ResourcesView_attributeTidName, Integer.toString(currentThreadId));
+                                int execNameQuark = ss.getQuarkAbsolute(Attributes.THREADS, Integer.toString(currentThreadId), Attributes.EXEC_NAME);
+                                interval = ss.querySingleState(hoverTime, execNameQuark);
+                                if (!interval.getStateValue().isNull()) {
+                                    value = interval.getStateValue();
+                                    retMap.put(Messages.ResourcesView_attributeProcessName, value.unboxStr());
+                                }
+                                if (status == StateValues.CPU_STATUS_RUN_SYSCALL) {
+                                    int syscallQuark = ss.getQuarkAbsolute(Attributes.THREADS, Integer.toString(currentThreadId), Attributes.SYSTEM_CALL);
+                                    interval = ss.querySingleState(hoverTime, syscallQuark);
+                                    if (!interval.getStateValue().isNull()) {
+                                        value = interval.getStateValue();
+                                        retMap.put(Messages.ResourcesView_attributeSyscallName, value.unboxStr());
+                                    }
+                                }
+                            }
+                        } catch (AttributeNotFoundException | TimeRangeException | StateValueTypeException e) {
+                            Activator.getDefault().logError("Error in ResourcesPresentationProvider", e); //$NON-NLS-1$
+                        } catch (StateSystemDisposedException e) {
+                            /* Ignored */
+                        }
+                    }
+                }
+            }
+        }
+
+        return retMap;
+    }
+
+    @Override
+    public void postDrawEvent(ITimeEvent event, Rectangle bounds, GC gc) {
+        if (fColorGray == null) {
+            fColorGray = gc.getDevice().getSystemColor(SWT.COLOR_GRAY);
+        }
+        if (fColorWhite == null) {
+            fColorWhite = gc.getDevice().getSystemColor(SWT.COLOR_WHITE);
+        }
+        if (fAverageCharWidth == null) {
+            fAverageCharWidth = gc.getFontMetrics().getAverageCharWidth();
+        }
+
+        ITmfTimeGraphDrawingHelper drawingHelper = getDrawingHelper();
+        if (bounds.width <= fAverageCharWidth) {
+            return;
+        }
+
+        if (!(event instanceof TimeEvent)) {
+            return;
+        }
+        TimeEvent tcEvent = (TimeEvent) event;
+        if (!tcEvent.hasValue()) {
+            return;
+        }
+
+        ResourcesEntry entry = (ResourcesEntry) event.getEntry();
+        if (!entry.getType().equals(Type.CPU)) {
+            return;
+        }
+
+        int status = tcEvent.getValue();
+        if (status != StateValues.CPU_STATUS_RUN_USERMODE && status != StateValues.CPU_STATUS_RUN_SYSCALL) {
+            return;
+        }
+
+        ITmfStateSystem ss = TmfStateSystemAnalysisModule.getStateSystem(entry.getTrace(), KernelAnalysisModule.ID);
+        if (ss == null) {
+            return;
+        }
+        long time = event.getTime();
+        try {
+            while (time < event.getTime() + event.getDuration()) {
+                int cpuQuark = entry.getQuark();
+                int currentThreadQuark = ss.getQuarkRelative(cpuQuark, Attributes.CURRENT_THREAD);
+                ITmfStateInterval tidInterval = ss.querySingleState(time, currentThreadQuark);
+                long startTime = Math.max(tidInterval.getStartTime(), event.getTime());
+                int x = Math.max(drawingHelper.getXForTime(startTime), bounds.x);
+                if (x >= bounds.x + bounds.width) {
+                    break;
+                }
+                if (!tidInterval.getStateValue().isNull()) {
+                    ITmfStateValue value = tidInterval.getStateValue();
+                    int currentThreadId = value.unboxInt();
+                    long endTime = Math.min(tidInterval.getEndTime() + 1, event.getTime() + event.getDuration());
+                    int xForEndTime = drawingHelper.getXForTime(endTime);
+                    if (xForEndTime > bounds.x) {
+                        int width = Math.min(xForEndTime, bounds.x + bounds.width) - x - 1;
+                        if (width > 0) {
+                            String attribute = null;
+                            int beginIndex = 0;
+                            if (status == StateValues.CPU_STATUS_RUN_USERMODE && currentThreadId != fLastThreadId) {
+                                attribute = Attributes.EXEC_NAME;
+                            } else if (status == StateValues.CPU_STATUS_RUN_SYSCALL) {
+                                attribute = Attributes.SYSTEM_CALL;
+                                /*
+                                 * Remove the "sys_" or "syscall_entry_" or similar from what we
+                                 * draw in the rectangle. This depends on the trace's event layout.
+                                 */
+                                ITmfTrace trace = entry.getTrace();
+                                if (trace instanceof IKernelTrace) {
+                                    IKernelAnalysisEventLayout layout = ((IKernelTrace) trace).getKernelEventLayout();
+                                    beginIndex = layout.eventSyscallEntryPrefix().length();
+                                }
+                            }
+                            if (attribute != null) {
+                                int quark = ss.getQuarkAbsolute(Attributes.THREADS, Integer.toString(currentThreadId), attribute);
+                                ITmfStateInterval interval = ss.querySingleState(time, quark);
+                                if (!interval.getStateValue().isNull()) {
+                                    value = interval.getStateValue();
+                                    gc.setForeground(fColorWhite);
+                                    int drawn = Utils.drawText(gc, value.unboxStr().substring(beginIndex), x + 1, bounds.y - 2, width, true, true);
+                                    if (drawn > 0) {
+                                        fLastThreadId = currentThreadId;
+                                    }
+                                }
+                            }
+                            if (xForEndTime < bounds.x + bounds.width) {
+                                gc.setForeground(fColorGray);
+                                gc.drawLine(xForEndTime, bounds.y + 1, xForEndTime, bounds.y + bounds.height - 2);
+                            }
+                        }
+                    }
+                }
+                // make sure next time is at least at the next pixel
+                time = Math.max(tidInterval.getEndTime() + 1, drawingHelper.getTimeAtX(x + 1));
+            }
+        } catch (AttributeNotFoundException | TimeRangeException | StateValueTypeException e) {
+            Activator.getDefault().logError("Error in ResourcesPresentationProvider", e); //$NON-NLS-1$
+        } catch (StateSystemDisposedException e) {
+            /* Ignored */
+        }
+    }
+
+    @Override
+    public void postDrawEntry(ITimeGraphEntry entry, Rectangle bounds, GC gc) {
+        fLastThreadId = -1;
+    }
+}
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/resources/ResourcesView.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/resources/ResourcesView.java
new file mode 100644 (file)
index 0000000..1d5b902
--- /dev/null
@@ -0,0 +1,328 @@
+/*******************************************************************************
+ * Copyright (c) 2012, 2015 Ericsson, Ã‰cole Polytechnique de Montréal
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Patrick Tasse - Initial API and implementation
+ *   Geneviève Bastien - Move code to provide base classes for time graph views
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.analysis.os.linux.ui.views.resources;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.Attributes;
+import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelAnalysisModule;
+import org.eclipse.tracecompass.analysis.os.linux.ui.views.resources.ResourcesEntry.Type;
+import org.eclipse.tracecompass.internal.analysis.os.linux.ui.Messages;
+import org.eclipse.tracecompass.statesystem.core.ITmfStateSystem;
+import org.eclipse.tracecompass.statesystem.core.StateSystemUtils;
+import org.eclipse.tracecompass.statesystem.core.exceptions.AttributeNotFoundException;
+import org.eclipse.tracecompass.statesystem.core.exceptions.StateSystemDisposedException;
+import org.eclipse.tracecompass.statesystem.core.exceptions.StateValueTypeException;
+import org.eclipse.tracecompass.statesystem.core.exceptions.TimeRangeException;
+import org.eclipse.tracecompass.statesystem.core.interval.ITmfStateInterval;
+import org.eclipse.tracecompass.tmf.core.statesystem.TmfStateSystemAnalysisModule;
+import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
+import org.eclipse.tracecompass.tmf.ui.views.timegraph.AbstractTimeGraphView;
+import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.model.ITimeEvent;
+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;
+
+/**
+ * Main implementation for the LTTng 2.0 kernel Resource view
+ *
+ * @author Patrick Tasse
+ */
+public class ResourcesView extends AbstractTimeGraphView {
+
+    /** View ID. */
+    public static final String ID = "org.eclipse.tracecompass.analysis.os.linux.views.resources"; //$NON-NLS-1$
+
+    private static final String[] FILTER_COLUMN_NAMES = new String[] {
+            Messages.ResourcesView_stateTypeName
+    };
+
+    // Timeout between updates in the build thread in ms
+    private static final long BUILD_UPDATE_TIMEOUT = 500;
+
+    // ------------------------------------------------------------------------
+    // Constructors
+    // ------------------------------------------------------------------------
+
+    /**
+     * Default constructor
+     */
+    public ResourcesView() {
+        super(ID, new ResourcesPresentationProvider());
+        setFilterColumns(FILTER_COLUMN_NAMES);
+    }
+
+    // ------------------------------------------------------------------------
+    // Internal
+    // ------------------------------------------------------------------------
+
+    @Override
+    protected String getNextText() {
+        return Messages.ResourcesView_nextResourceActionNameText;
+    }
+
+    @Override
+    protected String getNextTooltip() {
+        return Messages.ResourcesView_nextResourceActionToolTipText;
+    }
+
+    @Override
+    protected String getPrevText() {
+        return Messages.ResourcesView_previousResourceActionNameText;
+    }
+
+    @Override
+    protected String getPrevTooltip() {
+        return Messages.ResourcesView_previousResourceActionToolTipText;
+    }
+
+    @Override
+    protected void buildEventList(ITmfTrace trace, ITmfTrace parentTrace, IProgressMonitor monitor) {
+        ITmfStateSystem ssq = TmfStateSystemAnalysisModule.getStateSystem(trace, KernelAnalysisModule.ID);
+        if (ssq == null) {
+            return;
+        }
+        Comparator<ITimeGraphEntry> comparator = new Comparator<ITimeGraphEntry>() {
+            @Override
+            public int compare(ITimeGraphEntry o1, ITimeGraphEntry o2) {
+                return ((ResourcesEntry) o1).compareTo(o2);
+            }
+        };
+
+        Map<Integer, ResourcesEntry> entryMap = new HashMap<>();
+        TimeGraphEntry traceEntry = null;
+
+        long startTime = ssq.getStartTime();
+        long start = startTime;
+        setStartTime(Math.min(getStartTime(), startTime));
+        boolean complete = false;
+        while (!complete) {
+            if (monitor.isCanceled()) {
+                return;
+            }
+            complete = ssq.waitUntilBuilt(BUILD_UPDATE_TIMEOUT);
+            if (ssq.isCancelled()) {
+                return;
+            }
+            long end = ssq.getCurrentEndTime();
+            if (start == end && !complete) { // when complete execute one last time regardless of end time
+                continue;
+            }
+            long endTime = end + 1;
+            setEndTime(Math.max(getEndTime(), endTime));
+
+            if (traceEntry == null) {
+                traceEntry = new ResourcesEntry(trace, trace.getName(), startTime, endTime, 0);
+                traceEntry.sortChildren(comparator);
+                List<TimeGraphEntry> entryList = Collections.singletonList(traceEntry);
+                addToEntryList(parentTrace, entryList);
+            } else {
+                traceEntry.updateEndTime(endTime);
+            }
+
+            List<Integer> cpuQuarks = ssq.getQuarks(Attributes.CPUS, "*"); //$NON-NLS-1$
+            for (Integer cpuQuark : cpuQuarks) {
+                int cpu = Integer.parseInt(ssq.getAttributeName(cpuQuark));
+                ResourcesEntry entry = entryMap.get(cpuQuark);
+                if (entry == null) {
+                    entry = new ResourcesEntry(cpuQuark, trace, startTime, endTime, Type.CPU, cpu);
+                    entryMap.put(cpuQuark, entry);
+                    traceEntry.addChild(entry);
+                } else {
+                    entry.updateEndTime(endTime);
+                }
+            }
+            List<Integer> irqQuarks = ssq.getQuarks(Attributes.RESOURCES, Attributes.IRQS, "*"); //$NON-NLS-1$
+            for (Integer irqQuark : irqQuarks) {
+                int irq = Integer.parseInt(ssq.getAttributeName(irqQuark));
+                ResourcesEntry entry = entryMap.get(irqQuark);
+                if (entry == null) {
+                    entry = new ResourcesEntry(irqQuark, trace, startTime, endTime, Type.IRQ, irq);
+                    entryMap.put(irqQuark, entry);
+                    traceEntry.addChild(entry);
+                } else {
+                    entry.updateEndTime(endTime);
+                }
+            }
+            List<Integer> softIrqQuarks = ssq.getQuarks(Attributes.RESOURCES, Attributes.SOFT_IRQS, "*"); //$NON-NLS-1$
+            for (Integer softIrqQuark : softIrqQuarks) {
+                int softIrq = Integer.parseInt(ssq.getAttributeName(softIrqQuark));
+                ResourcesEntry entry = entryMap.get(softIrqQuark);
+                if (entry == null) {
+                    entry = new ResourcesEntry(softIrqQuark, trace, startTime, endTime, Type.SOFT_IRQ, softIrq);
+                    entryMap.put(softIrqQuark, entry);
+                    traceEntry.addChild(entry);
+                } else {
+                    entry.updateEndTime(endTime);
+                }
+            }
+
+            if (parentTrace.equals(getTrace())) {
+                refresh();
+            }
+            long resolution = Math.max(1, (endTime - ssq.getStartTime()) / getDisplayWidth());
+            for (ITimeGraphEntry child : traceEntry.getChildren()) {
+                if (monitor.isCanceled()) {
+                    return;
+                }
+                if (child instanceof TimeGraphEntry) {
+                    TimeGraphEntry entry = (TimeGraphEntry) child;
+                    List<ITimeEvent> eventList = getEventList(entry, start, endTime, resolution, monitor);
+                    if (eventList != null) {
+                        for (ITimeEvent event : eventList) {
+                            entry.addEvent(event);
+                        }
+                    }
+                    redraw();
+                }
+            }
+
+            start = end;
+        }
+    }
+
+    @Override
+    protected @Nullable List<ITimeEvent> getEventList(TimeGraphEntry entry,
+            long startTime, long endTime, long resolution,
+            IProgressMonitor monitor) {
+        ResourcesEntry resourcesEntry = (ResourcesEntry) entry;
+        ITmfStateSystem ssq = TmfStateSystemAnalysisModule.getStateSystem(resourcesEntry.getTrace(), KernelAnalysisModule.ID);
+        if (ssq == null) {
+            return null;
+        }
+        final long realStart = Math.max(startTime, ssq.getStartTime());
+        final long realEnd = Math.min(endTime, ssq.getCurrentEndTime() + 1);
+        if (realEnd <= realStart) {
+            return null;
+        }
+        List<ITimeEvent> eventList = null;
+        int quark = resourcesEntry.getQuark();
+
+        try {
+            if (resourcesEntry.getType().equals(Type.CPU)) {
+                int statusQuark;
+                try {
+                    statusQuark = ssq.getQuarkRelative(quark, Attributes.STATUS);
+                } catch (AttributeNotFoundException e) {
+                    /*
+                     * The sub-attribute "status" is not available. May happen
+                     * if the trace does not have sched_switch events enabled.
+                     */
+                    return null;
+                }
+                List<ITmfStateInterval> statusIntervals = StateSystemUtils.queryHistoryRange(ssq, statusQuark, realStart, realEnd - 1, resolution, monitor);
+                eventList = new ArrayList<>(statusIntervals.size());
+                long lastEndTime = -1;
+                for (ITmfStateInterval statusInterval : statusIntervals) {
+                    if (monitor.isCanceled()) {
+                        return null;
+                    }
+                    int status = statusInterval.getStateValue().unboxInt();
+                    long time = statusInterval.getStartTime();
+                    long duration = statusInterval.getEndTime() - time + 1;
+                    if (!statusInterval.getStateValue().isNull()) {
+                        if (lastEndTime != time && lastEndTime != -1) {
+                            eventList.add(new TimeEvent(entry, lastEndTime, time - lastEndTime));
+                        }
+                        eventList.add(new TimeEvent(entry, time, duration, status));
+                    } else if (lastEndTime == -1 || time + duration >= endTime) {
+                        // add null event if it intersects the start or end time
+                        eventList.add(new NullTimeEvent(entry, time, duration));
+                    }
+                    lastEndTime = time + duration;
+                }
+            } else if (resourcesEntry.getType().equals(Type.IRQ)) {
+                List<ITmfStateInterval> irqIntervals = StateSystemUtils.queryHistoryRange(ssq, quark, realStart, realEnd - 1, resolution, monitor);
+                eventList = new ArrayList<>(irqIntervals.size());
+                long lastEndTime = -1;
+                boolean lastIsNull = true;
+                for (ITmfStateInterval irqInterval : irqIntervals) {
+                    if (monitor.isCanceled()) {
+                        return null;
+                    }
+                    long time = irqInterval.getStartTime();
+                    long duration = irqInterval.getEndTime() - time + 1;
+                    if (!irqInterval.getStateValue().isNull()) {
+                        int cpu = irqInterval.getStateValue().unboxInt();
+                        eventList.add(new TimeEvent(entry, time, duration, cpu));
+                        lastIsNull = false;
+                    } else {
+                        if (lastEndTime == -1) {
+                            // add null event if it intersects the start time
+                            eventList.add(new NullTimeEvent(entry, time, duration));
+                        } else {
+                            if (lastEndTime != time && lastIsNull) {
+                                /* This is a special case where we want to show IRQ_ACTIVE state but we don't know the CPU (it is between two null samples) */
+                                eventList.add(new TimeEvent(entry, lastEndTime, time - lastEndTime, -1));
+                            }
+                            if (time + duration >= endTime) {
+                                // add null event if it intersects the end time
+                                eventList.add(new NullTimeEvent(entry, time, duration));
+                            }
+                        }
+                        lastIsNull = true;
+                    }
+                    lastEndTime = time + duration;
+                }
+            } else if (resourcesEntry.getType().equals(Type.SOFT_IRQ)) {
+                List<ITmfStateInterval> softIrqIntervals = StateSystemUtils.queryHistoryRange(ssq, quark, realStart, realEnd - 1, resolution, monitor);
+                eventList = new ArrayList<>(softIrqIntervals.size());
+                long lastEndTime = -1;
+                boolean lastIsNull = true;
+                for (ITmfStateInterval softIrqInterval : softIrqIntervals) {
+                    if (monitor.isCanceled()) {
+                        return null;
+                    }
+                    long time = softIrqInterval.getStartTime();
+                    long duration = softIrqInterval.getEndTime() - time + 1;
+                    if (!softIrqInterval.getStateValue().isNull()) {
+                        int cpu = softIrqInterval.getStateValue().unboxInt();
+                        eventList.add(new TimeEvent(entry, time, duration, cpu));
+                    } else {
+                        if (lastEndTime == -1) {
+                            // add null event if it intersects the start time
+                            eventList.add(new NullTimeEvent(entry, time, duration));
+                        } else {
+                            if (lastEndTime != time && lastIsNull) {
+                                /* This is a special case where we want to show IRQ_ACTIVE state but we don't know the CPU (it is between two null samples) */
+                                eventList.add(new TimeEvent(entry, lastEndTime, time - lastEndTime, -1));
+                            }
+                            if (time + duration >= endTime) {
+                                // add null event if it intersects the end time
+                                eventList.add(new NullTimeEvent(entry, time, duration));
+                            }
+                        }
+                        lastIsNull = true;
+                    }
+                    lastEndTime = time + duration;
+                }
+            }
+
+        } catch (AttributeNotFoundException | TimeRangeException | StateValueTypeException e) {
+            e.printStackTrace();
+        } catch (StateSystemDisposedException e) {
+            /* Ignored */
+        }
+        return eventList;
+    }
+
+}
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/internal/analysis/os/linux/ui/Activator.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/internal/analysis/os/linux/ui/Activator.java
new file mode 100644 (file)
index 0000000..097b40c
--- /dev/null
@@ -0,0 +1,184 @@
+/*******************************************************************************
+ * Copyright (c) 2015 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Alexandre Montplaisir - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.internal.analysis.os.linux.ui;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+    // ------------------------------------------------------------------------
+    // Attributes
+    // ------------------------------------------------------------------------
+
+    /**
+     *  The plug-in ID
+     */
+    public static final String PLUGIN_ID = "org.eclipse.tracecompass.analysis.os.linux.ui"; //$NON-NLS-1$
+
+    /**
+     *  The shared instance
+     */
+    private static Activator plugin;
+
+    // ------------------------------------------------------------------------
+    // Constructors
+    // ------------------------------------------------------------------------
+
+    /**
+     * The constructor
+     */
+    public Activator() {
+    }
+
+    // ------------------------------------------------------------------------
+    // Accessors
+    // ------------------------------------------------------------------------
+
+    /**
+     * Returns the shared instance
+     *
+     * @return the shared instance
+     */
+    public static Activator getDefault() {
+        return plugin;
+    }
+
+    // ------------------------------------------------------------------------
+    // AbstractUIPlugin
+    // ------------------------------------------------------------------------
+
+    @Override
+    public void start(BundleContext context) throws Exception {
+        super.start(context);
+        plugin = this;
+    }
+
+    @Override
+    public void stop(BundleContext context) throws Exception {
+        plugin = null;
+        super.stop(context);
+    }
+
+    @Override
+    protected void initializeImageRegistry(ImageRegistry reg) {
+    }
+
+    // ------------------------------------------------------------------------
+    // Operations
+    // ------------------------------------------------------------------------
+
+    /**
+     * Get the image object from a given path
+     *
+     * @param path
+     *            The path to the image file
+     * @return The Image object
+     */
+    public Image getImageFromPath(String path) {
+        return getImageDescripterFromPath(path).createImage();
+    }
+
+    /**
+     * Get the ImageDescriptor from a given path
+     *
+     * @param path
+     *            The path to the image file
+     * @return The ImageDescriptor object
+     */
+    public ImageDescriptor getImageDescripterFromPath(String path) {
+        return AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, path);
+    }
+
+    /**
+     * Get the Image from a registry
+     *
+     * @param path
+     *            The path to the image registry
+     * @return The Image object
+     */
+    public Image getImageFromImageRegistry(String path) {
+        Image icon = getImageRegistry().get(path);
+        if (icon == null) {
+            icon = getImageDescripterFromPath(path).createImage();
+            plugin.getImageRegistry().put(path, icon);
+        }
+        return icon;
+    }
+
+    /**
+     * Logs a message with severity INFO in the runtime log of the plug-in.
+     *
+     * @param message A message to log
+     */
+    public void logInfo(String message) {
+        getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message));
+    }
+
+    /**
+     * Logs a message and exception with severity INFO in the runtime log of the plug-in.
+     *
+     * @param message A message to log
+     * @param exception A exception to log
+     */
+    public void logInfo(String message, Throwable exception) {
+        getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message, exception));
+    }
+
+    /**
+     * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
+     *
+     * @param message A message to log
+     */
+    public void logWarning(String message) {
+        getLog().log(new Status(IStatus.WARNING, PLUGIN_ID, message));
+    }
+
+    /**
+     * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
+     *
+     * @param message A message to log
+     * @param exception A exception to log
+     */
+    public void logWarning(String message, Throwable exception) {
+        getLog().log(new Status(IStatus.WARNING, PLUGIN_ID, message, exception));
+    }
+
+    /**
+     * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
+     *
+     * @param message A message to log
+     */
+    public void logError(String message) {
+        getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message));
+    }
+
+    /**
+     * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
+     *
+     * @param message A message to log
+     * @param exception A exception to log
+     */
+    public void logError(String message, Throwable exception) {
+        getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message, exception));
+    }
+
+}
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/internal/analysis/os/linux/ui/Messages.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/internal/analysis/os/linux/ui/Messages.java
new file mode 100644 (file)
index 0000000..f0e98d5
--- /dev/null
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2013, 2015 Ericsson
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Patrick Tassé - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.internal.analysis.os.linux.ui;
+
+import org.eclipse.osgi.util.NLS;
+
+@SuppressWarnings("javadoc")
+public class Messages extends NLS {
+    private static final String BUNDLE_NAME = "org.eclipse.tracecompass.internal.analysis.os.linux.ui.messages"; //$NON-NLS-1$
+
+    public static String ControlFlowView_birthTimeColumn;
+    public static String ControlFlowView_tidColumn;
+    public static String ControlFlowView_ptidColumn;
+    public static String ControlFlowView_processColumn;
+    public static String ControlFlowView_traceColumn;
+
+    public static String ControlFlowView_stateTypeName;
+    public static String ControlFlowView_multipleStates;
+    public static String ControlFlowView_nextProcessActionNameText;
+    public static String ControlFlowView_nextProcessActionToolTipText;
+    public static String ControlFlowView_previousProcessActionNameText;
+    public static String ControlFlowView_previousProcessActionToolTipText;
+    public static String ControlFlowView_followCPUBwdText;
+    public static String ControlFlowView_followCPUFwdText;
+    public static String ControlFlowView_checkActiveLabel;
+    public static String ControlFlowView_checkActiveToolTip;
+    public static String ControlFlowView_uncheckInactiveLabel;
+    public static String ControlFlowView_uncheckInactiveToolTip;
+    public static String ControlFlowView_attributeSyscallName;
+    public static String ControlFlowView_attributeCpuName;
+
+    public static String ResourcesView_stateTypeName;
+    public static String ResourcesView_multipleStates;
+    public static String ResourcesView_nextResourceActionNameText;
+    public static String ResourcesView_nextResourceActionToolTipText;
+    public static String ResourcesView_previousResourceActionNameText;
+    public static String ResourcesView_previousResourceActionToolTipText;
+    public static String ResourcesView_attributeCpuName;
+    public static String ResourcesView_attributeIrqName;
+    public static String ResourcesView_attributeSoftIrqName;
+    public static String ResourcesView_attributeHoverTime;
+    public static String ResourcesView_attributeTidName;
+    public static String ResourcesView_attributeProcessName;
+    public static String ResourcesView_attributeSyscallName;
+
+    static {
+        // initialize resource bundle
+        NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+    }
+
+    private Messages() {
+    }
+}
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/internal/analysis/os/linux/ui/messages.properties b/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/internal/analysis/os/linux/ui/messages.properties
new file mode 100644 (file)
index 0000000..a6a7d1e
--- /dev/null
@@ -0,0 +1,46 @@
+###############################################################################
+# Copyright (c) 2013, 2015 Ericsson
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     Ericsson - Initial API and implementation
+###############################################################################
+
+ControlFlowView_birthTimeColumn=Birth time
+ControlFlowView_tidColumn=TID
+ControlFlowView_ptidColumn=PTID
+ControlFlowView_processColumn=Process
+ControlFlowView_traceColumn=Trace
+
+ControlFlowView_stateTypeName=Process
+ControlFlowView_multipleStates=(multiple)
+ControlFlowView_nextProcessActionNameText=Next Process
+ControlFlowView_nextProcessActionToolTipText=Select Next Process
+ControlFlowView_previousProcessActionNameText=Previous Process
+ControlFlowView_previousProcessActionToolTipText=Select Previous Process
+ControlFlowView_followCPUBwdText=Follow CPU Backward
+ControlFlowView_followCPUFwdText=Follow CPU Forward
+ControlFlowView_checkActiveLabel=Check Active
+ControlFlowView_checkActiveToolTip=Checks all threads executing within the time frame.
+ControlFlowView_uncheckInactiveLabel=Uncheck Inactive
+ControlFlowView_uncheckInactiveToolTip=Unchecks all threads not executing within the time frame.
+ControlFlowView_attributeSyscallName=System Call
+ControlFlowView_attributeCpuName=CPU
+
+ResourcesView_stateTypeName=Resource
+ResourcesView_multipleStates=(multiple)
+ResourcesView_nextResourceActionNameText=Next Resource
+ResourcesView_nextResourceActionToolTipText=Select Next Resource
+ResourcesView_previousResourceActionNameText=Previous Resource
+ResourcesView_previousResourceActionToolTipText=Select Previous Resource
+ResourcesView_attributeCpuName=CPU
+ResourcesView_attributeIrqName=IRQ
+ResourcesView_attributeSoftIrqName=SOFT IRQ
+ResourcesView_attributeHoverTime=> Hover Time
+ResourcesView_attributeTidName=> TID
+ResourcesView_attributeProcessName=> Process
+ResourcesView_attributeSyscallName=> System Call
diff --git a/analysis/pom.xml b/analysis/pom.xml
new file mode 100644 (file)
index 0000000..f691afb
--- /dev/null
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+   Copyright (C) 2015, Ericsson, EfficiOS Inc. and others
+
+   All rights reserved. This program and the accompanying materials
+   are made available under the terms of the Eclipse Public License v1.0
+   which accompanies this distribution, and is available at
+   http://www.eclipse.org/legal/epl-v10.html
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <prerequisites>
+    <maven>3.0</maven>
+  </prerequisites>
+
+  <parent>
+    <artifactId>org.eclipse.tracecompass</artifactId>
+    <groupId>org.eclipse.tracecompass</groupId>
+    <version>1.0.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>org.eclipse.tracecompass.analysis-parent</artifactId>
+  <groupId>org.eclipse.tracecompass</groupId>
+  <version>1.0.0-SNAPSHOT</version>
+  <packaging>pom</packaging>
+
+  <name>Trace Compass Tracetype-agnostic Analyses Parent</name>
+
+  <modules>
+    <module>org.eclipse.tracecompass.analysis.os.linux.core</module>
+    <module>org.eclipse.tracecompass.analysis.os.linux.core.tests</module>
+    <module>org.eclipse.tracecompass.analysis.os.linux.ui</module>
+  </modules>
+
+</project>
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core.tests/.classpath b/org.eclipse.tracecompass.analysis.os.linux.core.tests/.classpath
deleted file mode 100644 (file)
index 098194c..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
-       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
-       <classpathentry kind="src" path="src"/>
-       <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core.tests/.project b/org.eclipse.tracecompass.analysis.os.linux.core.tests/.project
deleted file mode 100644 (file)
index e27d0cb..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-       <name>org.eclipse.tracecompass.analysis.os.linux.core.tests</name>
-       <comment></comment>
-       <projects>
-       </projects>
-       <buildSpec>
-               <buildCommand>
-                       <name>org.eclipse.jdt.core.javabuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.ManifestBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.SchemaBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-       </buildSpec>
-       <natures>
-               <nature>org.eclipse.pde.PluginNature</nature>
-               <nature>org.eclipse.jdt.core.javanature</nature>
-               <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
-       </natures>
-</projectDescription>
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core.tests/.settings/org.eclipse.core.resources.prefs b/org.eclipse.tracecompass.analysis.os.linux.core.tests/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644 (file)
index 99f26c0..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-encoding/<project>=UTF-8
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core.tests/.settings/org.eclipse.core.runtime.prefs b/org.eclipse.tracecompass.analysis.os.linux.core.tests/.settings/org.eclipse.core.runtime.prefs
deleted file mode 100644 (file)
index 5a0ad22..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-line.separator=\n
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core.tests/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.tracecompass.analysis.os.linux.core.tests/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644 (file)
index 0409c61..0000000
+++ /dev/null
@@ -1,403 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.codeComplete.argumentPrefixes=
-org.eclipse.jdt.core.codeComplete.argumentSuffixes=
-org.eclipse.jdt.core.codeComplete.fieldPrefixes=f
-org.eclipse.jdt.core.codeComplete.fieldSuffixes=
-org.eclipse.jdt.core.codeComplete.localPrefixes=
-org.eclipse.jdt.core.codeComplete.localSuffixes=
-org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
-org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
-org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes=
-org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes=
-org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled
-org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
-org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
-org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
-org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
-org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
-org.eclipse.jdt.core.compiler.problem.deadCode=error
-org.eclipse.jdt.core.compiler.problem.deprecation=error
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=error
-org.eclipse.jdt.core.compiler.problem.emptyStatement=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=error
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=error
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=error
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=error
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
-org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=error
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
-org.eclipse.jdt.core.compiler.problem.missingDefaultCase=error
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error
-org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=enabled
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
-org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=error
-org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
-org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=error
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
-org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=error
-org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=error
-org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=error
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=error
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
-org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error
-org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=error
-org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=error
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=error
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=disabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=error
-org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=error
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
-org.eclipse.jdt.core.compiler.source=1.7
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=0
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=true
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
-org.eclipse.jdt.core.formatter.comment.format_line_comments=true
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
-org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
-org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
-org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.join_lines_in_comments=true
-org.eclipse.jdt.core.formatter.join_wrapped_lines=false
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=250
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
-org.eclipse.jdt.core.formatter.tabulation.char=space
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_on_off_tags=false
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
-org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core.tests/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.tracecompass.analysis.os.linux.core.tests/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644 (file)
index 232a3fd..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_tmf-style
-formatter_settings_version=12
-org.eclipse.jdt.ui.exception.name=e
-org.eclipse.jdt.ui.gettersetter.use.is=true
-org.eclipse.jdt.ui.keywordthis=false
-org.eclipse.jdt.ui.overrideannotation=true
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=false
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_methods=false
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_missing_override_annotations_interface_methods=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.correct_indentation=false
-sp_cleanup.format_source_code=false
-sp_cleanup.format_source_code_changes_only=false
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_type_abstract_if_missing_method=false
-sp_cleanup.make_variable_declarations_final=false
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=true
-sp_cleanup.organize_imports=false
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=true
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=false
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=true
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core.tests/.settings/org.eclipse.pde.api.tools.prefs b/org.eclipse.tracecompass.analysis.os.linux.core.tests/.settings/org.eclipse.pde.api.tools.prefs
deleted file mode 100644 (file)
index acc3abd..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
-ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
-API_USE_SCAN_FIELD_SEVERITY=Error
-API_USE_SCAN_METHOD_SEVERITY=Error
-API_USE_SCAN_TYPE_SEVERITY=Error
-CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
-CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
-CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
-CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
-CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
-CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
-CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
-ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
-ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
-ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
-FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
-FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
-FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
-FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
-FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
-FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
-FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
-ILLEGAL_EXTEND=Warning
-ILLEGAL_IMPLEMENT=Warning
-ILLEGAL_INSTANTIATE=Warning
-ILLEGAL_OVERRIDE=Warning
-ILLEGAL_REFERENCE=Warning
-INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
-INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
-INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
-INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-INVALID_JAVADOC_TAG=Warning
-INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Warning
-LEAK_EXTEND=Warning
-LEAK_FIELD_DECL=Warning
-LEAK_IMPLEMENT=Warning
-LEAK_METHOD_PARAM=Warning
-LEAK_METHOD_RETURN_TYPE=Warning
-METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
-METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
-METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
-METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
-METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-MISSING_EE_DESCRIPTIONS=Ignore
-TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
-UNUSED_PROBLEM_FILTERS=Warning
-automatically_removed_unused_problem_filters=false
-eclipse.preferences.version=1
-incompatible_api_component_version=Error
-incompatible_api_component_version_include_major_without_breaking_change=Disabled
-incompatible_api_component_version_include_minor_without_api_change=Disabled
-invalid_since_tag_version=Error
-malformed_since_tag=Error
-missing_since_tag=Error
-report_api_breakage_when_major_version_incremented=Disabled
-report_resolution_errors_api_component=Warning
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core.tests/.settings/org.eclipse.pde.prefs b/org.eclipse.tracecompass.analysis.os.linux.core.tests/.settings/org.eclipse.pde.prefs
deleted file mode 100644 (file)
index 62cfa90..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-compilers.f.unresolved-features=1
-compilers.f.unresolved-plugins=1
-compilers.incompatible-environment=1
-compilers.p.build=1
-compilers.p.build.bin.includes=1
-compilers.p.build.encodings=2
-compilers.p.build.java.compiler=2
-compilers.p.build.java.compliance=1
-compilers.p.build.missing.output=2
-compilers.p.build.output.library=1
-compilers.p.build.source.library=1
-compilers.p.build.src.includes=1
-compilers.p.deprecated=1
-compilers.p.discouraged-class=1
-compilers.p.internal=1
-compilers.p.missing-packages=2
-compilers.p.missing-version-export-package=2
-compilers.p.missing-version-import-package=2
-compilers.p.missing-version-require-bundle=2
-compilers.p.no-required-att=0
-compilers.p.not-externalized-att=2
-compilers.p.unknown-attribute=1
-compilers.p.unknown-class=1
-compilers.p.unknown-element=1
-compilers.p.unknown-identifier=1
-compilers.p.unknown-resource=1
-compilers.p.unresolved-ex-points=0
-compilers.p.unresolved-import=0
-compilers.s.create-docs=false
-compilers.s.doc-folder=doc
-compilers.s.open-tags=1
-eclipse.preferences.version=1
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core.tests/META-INF/MANIFEST.MF b/org.eclipse.tracecompass.analysis.os.linux.core.tests/META-INF/MANIFEST.MF
deleted file mode 100644 (file)
index a55e8d7..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %Bundle-Name
-Bundle-Vendor: %Bundle-Vendor
-Bundle-Version: 1.0.0.qualifier
-Bundle-Localization: plugin
-Bundle-SymbolicName: org.eclipse.tracecompass.analysis.os.linux.core.tests;singleton:=true
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
-Require-Bundle: org.junit;bundle-version="4.0.0",
- org.eclipse.core.runtime,
- org.eclipse.tracecompass.common.core,
- org.eclipse.tracecompass.analysis.os.linux.core,
- org.eclipse.tracecompass.tmf.core,
- org.eclipse.tracecompass.tmf.core.tests,
- org.eclipse.tracecompass.tmf.ctf.core,
- org.eclipse.tracecompass.tmf.ctf.core.tests,
- org.eclipse.core.resources
-Import-Package: com.google.common.collect
-Export-Package: org.eclipse.tracecompass.analysis.os.linux.core.tests,
- org.eclipse.tracecompass.analysis.os.linux.core.tests.cpuusage
-Bundle-Activator: org.eclipse.tracecompass.analysis.os.linux.core.tests.Activator
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core.tests/about.html b/org.eclipse.tracecompass.analysis.os.linux.core.tests/about.html
deleted file mode 100644 (file)
index c258ef5..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-<p>June 5, 2006</p>    
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;).  Unless otherwise 
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;).  A copy of the EPL is available 
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is 
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content.  Check the Redistributor's license that was 
-provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-</body>
-</html>
\ No newline at end of file
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core.tests/build.properties b/org.eclipse.tracecompass.analysis.os.linux.core.tests/build.properties
deleted file mode 100644 (file)
index 0f70a06..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-###############################################################################
-# Copyright (c) 2015 Ericsson
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     Ericsson - Initial API and implementation
-###############################################################################
-
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
-               .,\
-               plugin.properties,\
-               plugin.xml,\
-               about.html
-src.includes = about.html
-additional.bundles = org.eclipse.jdt.annotation
-jars.extra.classpath = platform:/plugin/org.eclipse.jdt.annotation
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core.tests/plugin.properties b/org.eclipse.tracecompass.analysis.os.linux.core.tests/plugin.properties
deleted file mode 100644 (file)
index 2e4b796..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-###############################################################################
-# Copyright (c) 2015 Ericsson
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     Ericsson - Initial API and implementation
-###############################################################################
-
-Bundle-Vendor = Eclipse Trace Compass
-Bundle-Name = Trace Compass Linux Kernel Analysis Core Tests Plug-in
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core.tests/plugin.xml b/org.eclipse.tracecompass.analysis.os.linux.core.tests/plugin.xml
deleted file mode 100644 (file)
index 162b33f..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
-   <extension
-         point="org.eclipse.linuxtools.tmf.core.analysis">
-      <module
-            analysis_module="org.eclipse.tracecompass.analysis.os.linux.core.cpuusage.KernelCpuUsageAnalysis"
-            automatic="false"
-            id="org.eclipse.tracecompass.analysis.os.linux.cpuusage"
-            name="CPU Usage Test Analysis">
-         <tracetype
-               applies="true"
-               class="org.eclipse.tracecompass.tmf.tests.stubs.trace.xml.TmfXmlTraceStub">
-         </tracetype>
-      </module>
-      <module
-            analysis_module="org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelAnalysisModule"
-            automatic="false"
-            id="org.eclipse.tracecompass.analysis.os.linux.kernel"
-            name="Linux Kernel Test Analysis">
-         <tracetype
-               applies="true"
-               class="org.eclipse.tracecompass.tmf.tests.stubs.trace.xml.TmfXmlTraceStub">
-         </tracetype>
-      </module>
-   </extension>
-
-</plugin>
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core.tests/pom.xml b/org.eclipse.tracecompass.analysis.os.linux.core.tests/pom.xml
deleted file mode 100644 (file)
index 09f8800..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-   Copyright (C) 2011, Red Hat, Inc.
-
-   All rights reserved. This program and the accompanying materials
-   are made available under the terms of the Eclipse Public License v1.0
-   which accompanies this distribution, and is available at
-   http://www.eclipse.org/legal/epl-v10.html
--->
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-    <artifactId>org.eclipse.tracecompass</artifactId>
-    <groupId>org.eclipse.tracecompass</groupId>
-    <version>1.0.0-SNAPSHOT</version>
-  </parent>
-
-  <artifactId>org.eclipse.tracecompass.analysis.os.linux.core.tests</artifactId>
-  <groupId>org.eclipse.tracecompass</groupId>
-  <version>1.0.0-SNAPSHOT</version>
-  <packaging>eclipse-test-plugin</packaging>
-
-  <name>Trace Compass Linux Kernel Analysis Core Tests Plug-in</name>
-
-  <build>
-    <plugins>
-        <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-antrun-plugin</artifactId>
-            <version>1.8</version>
-            <executions>
-                <execution>
-                    <id>prepare</id>
-                    <phase>validate</phase>
-                    <configuration>
-                    <target>
-                        <echo message="prepare phase" />
-                    </target>
-                    </configuration>
-                        <goals>
-                            <goal>run</goal>
-                        </goals>
-                </execution>
-            </executions>
-        </plugin>
-        <plugin>
-            <groupId>org.eclipse.tycho</groupId>
-            <artifactId>tycho-surefire-plugin</artifactId>
-            <version>${tycho-version}</version>
-            <configuration>
-                <includes>
-                    <include>**/AllTests.*</include>
-                </includes>
-                <useUIHarness>false</useUIHarness>
-                <useUIThread>false</useUIThread>
-                <product>org.eclipse.platform.ide</product>
-            </configuration>
-        </plugin>
-    </plugins>
-  </build>
-
-</project>
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/Activator.java b/org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/Activator.java
deleted file mode 100644 (file)
index 46eba8a..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014, 2015 Ã‰cole Polytechnique de Montréal
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Geneviève Bastien - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.analysis.os.linux.core.tests;
-
-import java.io.IOException;
-import java.net.URL;
-
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Plugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * Activator for this plugin
- *
- * @author Geneviève Bastien
- */
-public class Activator extends Plugin {
-    // ------------------------------------------------------------------------
-    // Attributes
-    // ------------------------------------------------------------------------
-
-    /**
-     * The plug-in ID
-     */
-    public static final String PLUGIN_ID = "org.eclipse.tracecompass.analysis.linux.core.tests"; //$NON-NLS-1$
-
-    /**
-     * The shared instance
-     */
-    private static Activator PLUGIN;
-
-    // ------------------------------------------------------------------------
-    // Constructors
-    // ------------------------------------------------------------------------
-
-    /**
-     * The constructor
-     */
-    public Activator() {
-    }
-
-    // ------------------------------------------------------------------------
-    // Accessors
-    // ------------------------------------------------------------------------
-
-    /**
-     * Returns the shared instance
-     *
-     * @return the shared instance
-     */
-    public static Activator getDefault() {
-        return PLUGIN;
-    }
-
-    // ------------------------------------------------------------------------
-    // Operators
-    // ------------------------------------------------------------------------
-
-    @Override
-    public void start(BundleContext context) throws Exception {
-        super.start(context);
-        PLUGIN = this;
-    }
-
-    @Override
-    public void stop(BundleContext context) throws Exception {
-        PLUGIN = null;
-        super.stop(context);
-    }
-
-    /**
-     * Return a path to a file relative to this plugin's base directory
-     *
-     * @param relativePath
-     *            The path relative to the plugin's root directory
-     * @return The path corresponding to the relative path in parameter
-     */
-    public static IPath getAbsoluteFilePath(String relativePath) {
-        Activator plugin = Activator.getDefault();
-        if (plugin == null) {
-            /*
-             * Shouldn't happen but at least throw something to get the test to
-             * fail early
-             */
-            throw new IllegalStateException();
-        }
-        URL location = FileLocator.find(plugin.getBundle(), new Path(relativePath), null);
-        try {
-            return new Path(FileLocator.toFileURL(location).getPath());
-        } catch (IOException e) {
-            throw new IllegalStateException();
-        }
-    }
-}
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/AllTests.java b/org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/AllTests.java
deleted file mode 100644 (file)
index 9d353ae..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012, 2015 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Francois Chouinard - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.analysis.os.linux.core.tests;
-
-import org.eclipse.tracecompass.tmf.core.tests.shared.DebugSuite;
-import org.junit.runner.RunWith;
-
-/**
- * Runner for the unit tests of this plugin
- */
-@RunWith(DebugSuite.class)
-@DebugSuite.SuiteClasses({
-    org.eclipse.tracecompass.analysis.os.linux.core.tests.cpuusage.AllTests.class,
-    org.eclipse.tracecompass.analysis.os.linux.core.tests.kernelanalysis.AllTests.class
-})
-public class AllTests {
-
-}
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/cpuusage/AllTests.java b/org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/cpuusage/AllTests.java
deleted file mode 100644 (file)
index 3f74b64..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014, 2015 Ã‰cole Polytechnique de Montréal
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Geneviève Bastien - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.analysis.os.linux.core.tests.cpuusage;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-/**
- * Test suite for the CPU usage package
- */
-@RunWith(Suite.class)
-@Suite.SuiteClasses({
-    CpuUsageStateProviderTest.class
-})
-public class AllTests {
-
-}
\ No newline at end of file
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/cpuusage/CpuUsageStateProviderTest.java b/org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/cpuusage/CpuUsageStateProviderTest.java
deleted file mode 100644 (file)
index 51b4b70..0000000
+++ /dev/null
@@ -1,272 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014, 2015 Ã‰cole Polytechnique de Montréal
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Geneviève Bastien - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.analysis.os.linux.core.tests.cpuusage;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import java.io.File;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.tracecompass.analysis.os.linux.core.cpuusage.KernelCpuUsageAnalysis;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.Attributes;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelAnalysisModule;
-import org.eclipse.tracecompass.analysis.os.linux.core.tests.Activator;
-import org.eclipse.tracecompass.statesystem.core.ITmfStateSystem;
-import org.eclipse.tracecompass.statesystem.core.exceptions.AttributeNotFoundException;
-import org.eclipse.tracecompass.statesystem.core.exceptions.StateSystemDisposedException;
-import org.eclipse.tracecompass.statesystem.core.interval.ITmfStateInterval;
-import org.eclipse.tracecompass.tmf.core.analysis.IAnalysisModule;
-import org.eclipse.tracecompass.tmf.core.event.TmfEvent;
-import org.eclipse.tracecompass.tmf.core.exceptions.TmfTraceException;
-import org.eclipse.tracecompass.tmf.core.signal.TmfTraceOpenedSignal;
-import org.eclipse.tracecompass.tmf.core.tests.shared.TmfTestHelper;
-import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
-import org.eclipse.tracecompass.tmf.core.trace.TmfTrace;
-import org.eclipse.tracecompass.tmf.core.trace.TmfTraceManager;
-import org.eclipse.tracecompass.tmf.core.trace.TmfTraceUtils;
-import org.eclipse.tracecompass.tmf.tests.stubs.trace.xml.TmfXmlTraceStub;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * Test suite for the {@link KernelCpuUsageAnalysis} class
- *
- * @author Geneviève Bastien
- */
-public class CpuUsageStateProviderTest {
-
-    private static final String CPU_USAGE_FILE = "testfiles/cpu_analysis.xml";
-
-    private ITmfTrace fTrace;
-    private KernelCpuUsageAnalysis fModule;
-
-    private static void deleteSuppFiles(ITmfTrace trace) {
-        /* Remove supplementary files */
-        File suppDir = new File(TmfTraceManager.getSupplementaryFileDir(trace));
-        for (File file : suppDir.listFiles()) {
-            file.delete();
-        }
-    }
-
-    /**
-     * Setup the trace for the tests
-     */
-    @Before
-    public void setUp() {
-        ITmfTrace trace = new TmfXmlTraceStub();
-        IPath filePath = Activator.getAbsoluteFilePath(CPU_USAGE_FILE);
-        IStatus status = trace.validate(null, filePath.toOSString());
-        if (!status.isOK()) {
-            fail(status.getException().getMessage());
-        }
-        try {
-            trace.initTrace(null, filePath.toOSString(), TmfEvent.class);
-        } catch (TmfTraceException e) {
-            fail(e.getMessage());
-        }
-        deleteSuppFiles(trace);
-        ((TmfTrace) trace).traceOpened(new TmfTraceOpenedSignal(this, trace, null));
-        /*
-         * FIXME: Make sure this analysis is finished before running the CPU
-         * analysis. This block can be removed once analysis dependency and
-         * request precedence is implemented
-         */
-        IAnalysisModule module = null;
-        for (IAnalysisModule mod : TmfTraceUtils.getAnalysisModulesOfClass(trace, KernelAnalysisModule.class)) {
-            module = mod;
-        }
-        assertNotNull(module);
-        module.schedule();
-        module.waitForCompletion();
-        /* End of the FIXME block */
-
-        fModule = TmfTraceUtils.getAnalysisModuleOfClass(trace, KernelCpuUsageAnalysis.class, KernelCpuUsageAnalysis.ID);
-        assertNotNull(fModule);
-        fTrace = trace;
-    }
-
-    /**
-     * Clean up
-     */
-    @After
-    public void tearDown() {
-        deleteSuppFiles(fTrace);
-        fTrace.dispose();
-    }
-
-    /**
-     * Test that the analysis executes without problems
-     */
-    @Test
-    public void testAnalysisExecution() {
-        /* Make sure the analysis hasn't run yet */
-        assertNull(fModule.getStateSystem());
-
-        /* Execute the analysis */
-        assertTrue(TmfTestHelper.executeAnalysis(fModule));
-        assertNotNull(fModule.getStateSystem());
-    }
-
-    /**
-     * Test that the state system is returned with the expected results
-     */
-    @Test
-    public void testReturnedStateSystem() {
-        fModule.schedule();
-        fModule.waitForCompletion();
-        ITmfStateSystem ss = fModule.getStateSystem();
-        assertNotNull(ss);
-        assertEquals(1L, ss.getStartTime());
-        assertEquals(25L, ss.getCurrentEndTime());
-
-        try {
-            int cpusQuark = ss.getQuarkAbsolute(Attributes.CPUS);
-
-            /*
-             * There should be 2 CPU entries: 0 and 1 and 3 process entries
-             * under each
-             */
-            List<Integer> cpuQuarks = ss.getSubAttributes(cpusQuark, false);
-            assertEquals(2, cpuQuarks.size());
-            for (Integer cpuQuark : cpuQuarks) {
-                assertEquals(3, ss.getSubAttributes(cpuQuark, false).size());
-            }
-
-            /* Proc 2 on CPU 0 should run from 1 to 20 seconds */
-            int proc2Quark = ss.getQuarkAbsolute(Attributes.CPUS, "0", "2");
-            ITmfStateInterval interval = ss.querySingleState(2L, proc2Quark);
-            assertEquals(1L, interval.getStartTime());
-            assertEquals(19L, interval.getEndTime());
-
-            /*
-             * Query at the end and make sure all processes on all CPU have the
-             * expected values
-             */
-            List<ITmfStateInterval> state = ss.queryFullState(25L);
-
-            int quark = ss.getQuarkAbsolute("CPUs", "0", "1");
-            assertEquals(0L, state.get(quark).getStateValue().unboxLong());
-
-            quark = ss.getQuarkAbsolute("CPUs", "0", "2");
-            assertEquals(19L, state.get(quark).getStateValue().unboxLong());
-
-            quark = ss.getQuarkAbsolute("CPUs", "0", "3");
-            assertEquals(5L, state.get(quark).getStateValue().unboxLong());
-
-            quark = ss.getQuarkAbsolute("CPUs", "1", "1");
-            assertEquals(5L, state.get(quark).getStateValue().unboxLong());
-
-            quark = ss.getQuarkAbsolute("CPUs", "1", "3");
-            assertEquals(6L, state.get(quark).getStateValue().unboxLong());
-
-            quark = ss.getQuarkAbsolute("CPUs", "1", "4");
-            assertEquals(8L, state.get(quark).getStateValue().unboxLong());
-
-        } catch (AttributeNotFoundException | StateSystemDisposedException e) {
-            fail(e.getMessage());
-        }
-    }
-
-    /**
-     * Test the
-     * {@link KernelCpuUsageAnalysis#getCpuUsageInRange(long, long)}
-     * method.
-     */
-    @Test
-    public void testUsageInRange() {
-        fModule.schedule();
-        fModule.waitForCompletion();
-
-        /* This range should query the total range */
-        Map<String, Long> expected = new HashMap<>();
-        expected.put("0/1", 0L);
-        expected.put("0/2", 19L);
-        expected.put("0/3", 5L);
-        expected.put("1/1", 5L);
-        expected.put("1/3", 6L);
-        expected.put("1/4", 13L);
-        expected.put("total", 48L);
-        expected.put("total/1", 5L);
-        expected.put("total/2", 19L);
-        expected.put("total/3", 11L);
-        expected.put("total/4", 13L);
-        expected.put("0", 24L);
-        expected.put("1", 24L);
-        Map<String, Long> resultMap = fModule.getCpuUsageInRange(0L, 30L);
-        assertEquals(expected, resultMap);
-
-        /* Verify a range when a process runs at the start */
-        expected.clear();
-        expected.put("0/1", 0L);
-        expected.put("0/2", 0L);
-        expected.put("0/3", 3L);
-        expected.put("1/1", 0L);
-        expected.put("1/3", 0L);
-        expected.put("1/4", 3L);
-        expected.put("total", 6L);
-        expected.put("total/1", 0L);
-        expected.put("total/2", 0L);
-        expected.put("total/3", 3L);
-        expected.put("total/4", 3L);
-        expected.put("0", 3L);
-        expected.put("1", 3L);
-        resultMap = fModule.getCpuUsageInRange(22L, 25L);
-        assertEquals(expected, resultMap);
-
-        /* Verify a range when a process runs at the end */
-        expected.clear();
-        expected.put("0/1", 0L);
-        expected.put("0/2", 3L);
-        expected.put("0/3", 0L);
-        expected.put("1/1", 0L);
-        expected.put("1/3", 1L);
-        expected.put("1/4", 2L);
-        expected.put("total", 6L);
-        expected.put("total/1", 0L);
-        expected.put("total/2", 3L);
-        expected.put("total/3", 1L);
-        expected.put("total/4", 2L);
-        expected.put("0", 3L);
-        expected.put("1", 3L);
-        resultMap = fModule.getCpuUsageInRange(1L, 4L);
-        assertEquals(expected, resultMap);
-
-        /* Verify a range when a process runs at start and at the end */
-        expected.clear();
-        expected.put("0/1", 0L);
-        expected.put("0/2", 9L);
-        expected.put("0/3", 0L);
-        expected.put("1/1", 0L);
-        expected.put("1/3", 5L);
-        expected.put("1/4", 4L);
-        expected.put("total", 18L);
-        expected.put("total/1", 0L);
-        expected.put("total/2", 9L);
-        expected.put("total/3", 5L);
-        expected.put("total/4", 4L);
-        expected.put("0", 9L);
-        expected.put("1", 9L);
-        resultMap = fModule.getCpuUsageInRange(4L, 13L);
-        assertEquals(expected, resultMap);
-
-    }
-}
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/kernelanalysis/AllTests.java b/org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/kernelanalysis/AllTests.java
deleted file mode 100644 (file)
index 781e2f3..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2015 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Alexandre Montplaisir - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.analysis.os.linux.core.tests.kernelanalysis;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-/**
- * Test suite
- */
-@RunWith(Suite.class)
-@Suite.SuiteClasses({
-        KernelStateProviderTest.class,
-        KernelThreadInformationProviderTest.class,
-        KernelTidAspectTest.class
-})
-public class AllTests {
-
-}
\ No newline at end of file
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/kernelanalysis/KernelStateProviderTest.java b/org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/kernelanalysis/KernelStateProviderTest.java
deleted file mode 100644 (file)
index 4f53a3d..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012, 2015 Ericsson
- * Copyright (c) 2010, 2011 Ã‰cole Polytechnique de Montréal
- * Copyright (c) 2010, 2011 Alexandre Montplaisir <alexandre.montplaisir@gmail.com>
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- *******************************************************************************/
-
-package org.eclipse.tracecompass.analysis.os.linux.core.tests.kernelanalysis;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assume.assumeTrue;
-
-import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelAnalysisEventLayout;
-import org.eclipse.tracecompass.internal.analysis.os.linux.core.kernelanalysis.KernelStateProvider;
-import org.eclipse.tracecompass.tmf.core.statesystem.ITmfStateProvider;
-import org.eclipse.tracecompass.tmf.ctf.core.tests.shared.CtfTmfTestTrace;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-/**
- * Tests for the {@link KernelStateProvider}
- *
- * @author Alexandre Montplaisir
- */
-public class KernelStateProviderTest {
-
-    private static final CtfTmfTestTrace testTrace = CtfTmfTestTrace.TRACE2;
-
-    private static ITmfStateProvider input;
-
-    /**
-     * Set-up.
-     */
-    @BeforeClass
-    public static void initialize() {
-        assumeTrue(testTrace.exists());
-        input = new KernelStateProvider(testTrace.getTrace(), IKernelAnalysisEventLayout.DEFAULT_LAYOUT);
-    }
-
-    /**
-     * Test loading the state provider.
-     */
-    @Test
-    public void testOpening() {
-        long testStartTime;
-        testStartTime = input.getStartTime();
-        /* Expected start time of "trace2" */
-        assertEquals(testStartTime, 1331668247314038062L);
-    }
-
-}
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/kernelanalysis/KernelThreadInformationProviderTest.java b/org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/kernelanalysis/KernelThreadInformationProviderTest.java
deleted file mode 100644 (file)
index 987d5fc..0000000
+++ /dev/null
@@ -1,311 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014, 2015 Ã‰cole Polytechnique de Montréal
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Geneviève Bastien - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.analysis.os.linux.core.tests.kernelanalysis;
-
-import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import java.io.File;
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jdt.annotation.NonNull;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelAnalysisModule;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelThreadInformationProvider;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.StateValues;
-import org.eclipse.tracecompass.analysis.os.linux.core.tests.Activator;
-import org.eclipse.tracecompass.statesystem.core.interval.ITmfStateInterval;
-import org.eclipse.tracecompass.statesystem.core.statevalue.ITmfStateValue;
-import org.eclipse.tracecompass.statesystem.core.statevalue.TmfStateValue;
-import org.eclipse.tracecompass.tmf.core.analysis.IAnalysisModule;
-import org.eclipse.tracecompass.tmf.core.event.TmfEvent;
-import org.eclipse.tracecompass.tmf.core.exceptions.TmfTraceException;
-import org.eclipse.tracecompass.tmf.core.signal.TmfTraceOpenedSignal;
-import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
-import org.eclipse.tracecompass.tmf.core.trace.TmfTrace;
-import org.eclipse.tracecompass.tmf.core.trace.TmfTraceManager;
-import org.eclipse.tracecompass.tmf.core.trace.TmfTraceUtils;
-import org.eclipse.tracecompass.tmf.tests.stubs.trace.xml.TmfXmlTraceStub;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * Test analysis-specific methods for the {@link KernelAnalysisModule} class.
- *
- * @author Geneviève Bastien
- */
-public class KernelThreadInformationProviderTest {
-
-    private static final @NonNull String LTTNG_KERNEL_FILE = "testfiles/lttng_kernel_analysis.xml";
-
-    private ITmfTrace fTrace;
-    private KernelAnalysisModule fModule;
-
-    private static void deleteSuppFiles(ITmfTrace trace) {
-        /* Remove supplementary files */
-        File suppDir = new File(TmfTraceManager.getSupplementaryFileDir(trace));
-        for (File file : suppDir.listFiles()) {
-            file.delete();
-        }
-    }
-
-    /**
-     * Setup the trace for the tests
-     */
-    @Before
-    public void setUp() {
-        ITmfTrace trace = new TmfXmlTraceStub();
-        IPath filePath = Activator.getAbsoluteFilePath(LTTNG_KERNEL_FILE);
-        IStatus status = trace.validate(null, filePath.toOSString());
-        if (!status.isOK()) {
-            fail(status.getException().getMessage());
-        }
-        try {
-            trace.initTrace(null, filePath.toOSString(), TmfEvent.class);
-        } catch (TmfTraceException e) {
-            fail(e.getMessage());
-        }
-        deleteSuppFiles(trace);
-        ((TmfTrace) trace).traceOpened(new TmfTraceOpenedSignal(this, trace, null));
-        IAnalysisModule module = null;
-        for (IAnalysisModule mod : TmfTraceUtils.getAnalysisModulesOfClass(trace, KernelAnalysisModule.class)) {
-            module = mod;
-        }
-        assertNotNull(module);
-        module.schedule();
-        module.waitForCompletion();
-        fModule = TmfTraceUtils.getAnalysisModuleOfClass(trace, KernelAnalysisModule.class, KernelAnalysisModule.ID);
-        fTrace = trace;
-    }
-
-    /**
-     * Clean up
-     */
-    @After
-    public void tearDown() {
-        deleteSuppFiles(fTrace);
-        fTrace.dispose();
-    }
-
-    /**
-     * Test the
-     * {@link KernelThreadInformationProvider#getThreadIds(KernelAnalysisModule)}
-     * method
-     */
-    @Test
-    public void testGetThreadQuarks() {
-        KernelAnalysisModule module = checkNotNull(fModule);
-        Collection<Integer> threadIds = KernelThreadInformationProvider.getThreadIds(module);
-        assertEquals(7, threadIds.size());
-    }
-
-    /**
-     * Test the
-     * {@link KernelThreadInformationProvider#getThreadOnCpu(KernelAnalysisModule, long, long)}
-     * method
-     */
-    @Test
-    public void testGetThreadOnCpu() {
-        KernelAnalysisModule module = checkNotNull(fModule);
-
-        /* Check with invalid timestamps */
-        Integer tid = KernelThreadInformationProvider.getThreadOnCpu(module, 0, -1);
-        assertNull(tid);
-
-        tid = KernelThreadInformationProvider.getThreadOnCpu(module, 0, 80);
-        assertNull(tid);
-
-        /* Check with invalid cpus */
-        tid = KernelThreadInformationProvider.getThreadOnCpu(module, 2, 20);
-        assertNull(tid);
-
-        tid = KernelThreadInformationProvider.getThreadOnCpu(module, -1, 20);
-        assertNull(tid);
-
-        /* Check valid values */
-        tid = KernelThreadInformationProvider.getThreadOnCpu(module, 0, 4);
-        assertNull(tid);
-
-        tid = KernelThreadInformationProvider.getThreadOnCpu(module, 0, 15);
-        assertNull(tid);
-
-        tid = KernelThreadInformationProvider.getThreadOnCpu(module, 1, 15);
-        assertEquals(Integer.valueOf(11), tid);
-
-        tid = KernelThreadInformationProvider.getThreadOnCpu(module, 1, 29);
-        assertEquals(Integer.valueOf(20), tid);
-
-        tid = KernelThreadInformationProvider.getThreadOnCpu(module, 1, 30);
-        assertEquals(Integer.valueOf(21), tid);
-
-        tid = KernelThreadInformationProvider.getThreadOnCpu(module, 0, 59);
-        assertEquals(Integer.valueOf(11), tid);
-
-        tid = KernelThreadInformationProvider.getThreadOnCpu(module, 1, 59);
-        assertEquals(Integer.valueOf(30), tid);
-
-        tid = KernelThreadInformationProvider.getThreadOnCpu(module, 0, 60);
-        assertEquals(Integer.valueOf(11), tid);
-
-        tid = KernelThreadInformationProvider.getThreadOnCpu(module, 1, 60);
-        assertEquals(Integer.valueOf(21), tid);
-
-    }
-
-    /**
-     * Test the
-     * {@link KernelThreadInformationProvider#getParentPid(KernelAnalysisModule, Integer, long)}
-     * method
-     */
-    @Test
-    public void testGetPpid() {
-        KernelAnalysisModule module = checkNotNull(fModule);
-
-        /* Check with invalid timestamps */
-        Integer ppid = KernelThreadInformationProvider.getParentPid(module, 11, -1);
-        assertNull(ppid);
-
-        ppid = KernelThreadInformationProvider.getParentPid(module, 11, 80);
-        assertNull(ppid);
-
-        /* Check with invalid cpus */
-        ppid = KernelThreadInformationProvider.getParentPid(module, -4, 20);
-        assertNull(ppid);
-
-        ppid = KernelThreadInformationProvider.getParentPid(module, 12, 20);
-        assertNull(ppid);
-
-        /* Check values with no parent */
-        ppid = KernelThreadInformationProvider.getParentPid(module, 10, 20);
-        assertEquals(Integer.valueOf(0), ppid);
-
-        ppid = KernelThreadInformationProvider.getParentPid(module, 30, 60);
-        assertEquals(Integer.valueOf(0), ppid);
-
-        /* Check parent determined at statedump */
-        ppid = KernelThreadInformationProvider.getParentPid(module, 11, 4);
-        assertNull(ppid);
-
-        ppid = KernelThreadInformationProvider.getParentPid(module, 11, 5);
-        assertEquals(Integer.valueOf(10), ppid);
-
-        /* Check parent after process fork */
-        ppid = KernelThreadInformationProvider.getParentPid(module, 21, 25);
-        assertEquals(Integer.valueOf(20), ppid);
-
-        ppid = KernelThreadInformationProvider.getParentPid(module, 21, 70);
-        assertEquals(Integer.valueOf(20), ppid);
-
-    }
-
-    /**
-     * Test the {@link KernelThreadInformationProvider#getExecutableName(KernelAnalysisModule, Integer)} method
-     */
-    @Test
-    public void testGetExecutableName() {
-        KernelAnalysisModule module = checkNotNull(fModule);
-
-        /* Check with invalid threads */
-        String execName = KernelThreadInformationProvider.getExecutableName(module, 101);
-        assertNull(execName);
-
-        execName = KernelThreadInformationProvider.getExecutableName(module, -2);
-        assertNull(execName);
-
-        /* Check valid value */
-        execName = KernelThreadInformationProvider.getExecutableName(module, 20);
-        assertEquals("proc20", execName);
-
-        /* Check valid value with process name change in history */
-        execName = KernelThreadInformationProvider.getExecutableName(module, 21);
-        assertEquals("proc21", execName);
-
-    }
-
-    private static void testIntervals(String info, List<ITmfStateInterval> intervals, ITmfStateValue[] values) {
-        assertEquals(info + " interval count", values.length, intervals.size());
-        for (int i = 0; i < values.length; i++) {
-            assertEquals(info + " interval " + i, values[i], intervals.get(i).getStateValue());
-        }
-    }
-
-    /**
-     * Test the
-     * {@link KernelThreadInformationProvider#getStatusIntervalsForThread(KernelAnalysisModule, Integer, long, long, long, IProgressMonitor)}
-     * method
-     */
-    @Test
-    public void testGetStatusIntervalsForThread() {
-        KernelAnalysisModule module = checkNotNull(fModule);
-
-        IProgressMonitor monitor = new NullProgressMonitor();
-        Integer process21 = 21;
-        Integer process20 = 20;
-
-        /* Check invalid time ranges */
-        List<ITmfStateInterval> intervals = KernelThreadInformationProvider.getStatusIntervalsForThread(module, process21, -15, -5, 3, monitor);
-        assertTrue(intervals.isEmpty());
-
-        intervals = KernelThreadInformationProvider.getStatusIntervalsForThread(module, process21, 80, 1500000000L, 50, monitor);
-        assertTrue(intervals.isEmpty());
-
-        /* Check invalid quarks */
-        intervals = KernelThreadInformationProvider.getStatusIntervalsForThread(module, -1, 0, 70L, 3, monitor);
-        assertTrue(intervals.isEmpty());
-
-        intervals = KernelThreadInformationProvider.getStatusIntervalsForThread(module, 0, 0, 70L, 3, monitor);
-        assertTrue(intervals.isEmpty());
-
-        /* Check different time ranges and resolutions */
-        ITmfStateValue[] values = { TmfStateValue.nullValue(), StateValues.PROCESS_STATUS_WAIT_FOR_CPU_VALUE,
-                StateValues.PROCESS_STATUS_RUN_SYSCALL_VALUE, StateValues.PROCESS_STATUS_WAIT_FOR_CPU_VALUE,
-                StateValues.PROCESS_STATUS_RUN_SYSCALL_VALUE };
-        intervals = KernelThreadInformationProvider.getStatusIntervalsForThread(module, process21, 0, 70L, 3, monitor);
-        testIntervals("tid 21 [0,70,3]", intervals, values);
-
-        ITmfStateValue[] values2 = { TmfStateValue.nullValue(), StateValues.PROCESS_STATUS_RUN_SYSCALL_VALUE,
-                StateValues.PROCESS_STATUS_RUN_SYSCALL_VALUE };
-        intervals = KernelThreadInformationProvider.getStatusIntervalsForThread(module, process21, 1, 70L, 30, monitor);
-        testIntervals("tid 21 [0,70,30]", intervals, values2);
-
-        ITmfStateValue[] values3 = { StateValues.PROCESS_STATUS_WAIT_FOR_CPU_VALUE,
-                StateValues.PROCESS_STATUS_RUN_SYSCALL_VALUE };
-        intervals = KernelThreadInformationProvider.getStatusIntervalsForThread(module, process21, 25, 50L, 3, monitor);
-        testIntervals("tid 21 [25,50,3]", intervals, values3);
-
-        ITmfStateValue[] values4 = { TmfStateValue.nullValue(), StateValues.PROCESS_STATUS_WAIT_UNKNOWN_VALUE,
-                StateValues.PROCESS_STATUS_RUN_USERMODE_VALUE, StateValues.PROCESS_STATUS_WAIT_FOR_CPU_VALUE };
-        intervals = KernelThreadInformationProvider.getStatusIntervalsForThread(module, process20, 0, 70L, 3, monitor);
-        testIntervals("tid 20 [0,70,3]", intervals, values4);
-
-        ITmfStateValue[] values5 = { TmfStateValue.nullValue(), StateValues.PROCESS_STATUS_WAIT_FOR_CPU_VALUE };
-        intervals = KernelThreadInformationProvider.getStatusIntervalsForThread(module, process20, 1, 70L, 30, monitor);
-        testIntervals("tid 20 [0,70,30]", intervals, values5);
-
-        ITmfStateValue[] values6 = { StateValues.PROCESS_STATUS_RUN_USERMODE_VALUE,
-                StateValues.PROCESS_STATUS_WAIT_FOR_CPU_VALUE };
-        intervals = KernelThreadInformationProvider.getStatusIntervalsForThread(module, process20, 25, 50L, 3, monitor);
-        testIntervals("tid 20 [25,50,3]", intervals, values6);
-
-    }
-
-}
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/kernelanalysis/KernelTidAspectTest.java b/org.eclipse.tracecompass.analysis.os.linux.core.tests/src/org/eclipse/tracecompass/analysis/os/linux/core/tests/kernelanalysis/KernelTidAspectTest.java
deleted file mode 100644 (file)
index 9617287..0000000
+++ /dev/null
@@ -1,161 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2015 Ã‰cole Polytechnique de Montréal
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Geneviève Bastien - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.analysis.os.linux.core.tests.kernelanalysis;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.fail;
-
-import java.io.File;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jdt.annotation.NonNull;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelAnalysisModule;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.ThreadPriorityAspect;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelTidAspect;
-import org.eclipse.tracecompass.analysis.os.linux.core.tests.Activator;
-import org.eclipse.tracecompass.common.core.NonNullUtils;
-import org.eclipse.tracecompass.tmf.core.analysis.IAnalysisModule;
-import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
-import org.eclipse.tracecompass.tmf.core.event.TmfEvent;
-import org.eclipse.tracecompass.tmf.core.event.aspect.ITmfEventAspect;
-import org.eclipse.tracecompass.tmf.core.exceptions.TmfTraceException;
-import org.eclipse.tracecompass.tmf.core.signal.TmfTraceOpenedSignal;
-import org.eclipse.tracecompass.tmf.core.trace.ITmfContext;
-import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
-import org.eclipse.tracecompass.tmf.core.trace.TmfTrace;
-import org.eclipse.tracecompass.tmf.core.trace.TmfTraceManager;
-import org.eclipse.tracecompass.tmf.core.trace.TmfTraceUtils;
-import org.eclipse.tracecompass.tmf.tests.stubs.trace.xml.TmfXmlTraceStub;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-import com.google.common.collect.ImmutableSet;
-
-/**
- * Test the {@link KernelTidAspect} class
- *
- * @author Geneviève Bastien
- */
-public class KernelTidAspectTest {
-
-    private static final @NonNull String LTTNG_KERNEL_FILE = "testfiles/lttng_kernel_analysis.xml";
-
-    // ------------------------------------------------------------------------
-    // Test trace class definition
-    // ------------------------------------------------------------------------
-
-    private static class TmfXmlTraceStubWithTidAspects extends TmfXmlTraceStub {
-
-        public TmfXmlTraceStubWithTidAspects() {
-            super();
-        }
-
-        @Override
-        public Iterable<ITmfEventAspect> getEventAspects() {
-            ImmutableSet.Builder<ITmfEventAspect> builder = ImmutableSet.builder();
-            builder.addAll(super.getEventAspects());
-            builder.add(KernelTidAspect.INSTANCE);
-            builder.add(ThreadPriorityAspect.INSTANCE);
-            return NonNullUtils.checkNotNull(builder.build());
-        }
-
-    }
-
-    private ITmfTrace fTrace;
-
-    private static void deleteSuppFiles(ITmfTrace trace) {
-        /* Remove supplementary files */
-        File suppDir = new File(TmfTraceManager.getSupplementaryFileDir(trace));
-        for (File file : suppDir.listFiles()) {
-            file.delete();
-        }
-    }
-
-    /**
-     * Test setup
-     */
-    @Before
-    public void setUp() {
-        ITmfTrace trace = new TmfXmlTraceStubWithTidAspects();
-        IPath filePath = Activator.getAbsoluteFilePath(LTTNG_KERNEL_FILE);
-        IStatus status = trace.validate(null, filePath.toOSString());
-        if (!status.isOK()) {
-            fail(status.getException().getMessage());
-        }
-        try {
-            trace.initTrace(null, filePath.toOSString(), TmfEvent.class);
-        } catch (TmfTraceException e) {
-            fail(e.getMessage());
-        }
-        deleteSuppFiles(trace);
-        /* Make sure the Kernel analysis has run */
-        ((TmfTrace) trace).traceOpened(new TmfTraceOpenedSignal(this, trace, null));
-        IAnalysisModule module = null;
-        for (IAnalysisModule mod : TmfTraceUtils.getAnalysisModulesOfClass(trace, KernelAnalysisModule.class)) {
-            module = mod;
-        }
-        assertNotNull(module);
-        module.schedule();
-        module.waitForCompletion();
-        fTrace = trace;
-    }
-
-    /**
-     * Test clean up
-     */
-    @After
-    public void tearDown() {
-        fTrace.dispose();
-    }
-
-    private void resolveNextEvent(ITmfContext context, Integer tid) {
-        ITmfTrace trace = fTrace;
-        ITmfEvent event = trace.getNext(context);
-        assertNotNull(event);
-
-        Object tidObj = TmfTraceUtils.resolveEventAspectOfClassForEvent(trace, KernelTidAspect.class, event);
-        if (tid == null) {
-            assertNull(tidObj);
-        } else {
-            assertNotNull(tidObj);
-            assertEquals(tid, tidObj);
-        }
-    }
-
-    /**
-     * Test the {@link KernelTidAspect#resolve(ITmfEvent)} method method
-     */
-    @Test
-    public void testResolveTidAspect() {
-
-        ITmfContext context = fTrace.seekEvent(0L);
-        resolveNextEvent(context, null);
-        resolveNextEvent(context, null);
-        resolveNextEvent(context, null);
-        resolveNextEvent(context, 11);
-        resolveNextEvent(context, null);
-        resolveNextEvent(context, null);
-        resolveNextEvent(context, 20);
-        resolveNextEvent(context, 20);
-        resolveNextEvent(context, 21);
-        resolveNextEvent(context, 11);
-        resolveNextEvent(context, 30);
-        resolveNextEvent(context, 21);
-        resolveNextEvent(context, 20);
-    }
-
-}
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core.tests/testfiles/cpu_analysis.xml b/org.eclipse.tracecompass.analysis.os.linux.core.tests/testfiles/cpu_analysis.xml
deleted file mode 100644 (file)
index 01faef4..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-<trace>
-<event timestamp="0" name="set_aspects">
-<field name="cpu" value="1" type="int" />
-</event>
-<event timestamp="1" name="sched_switch">
-<field name="cpu" value="0" type="int" />
-<field name="prev_comm" value="proc1" type="string" />
-<field name="prev_tid" value="1" type="long" />
-<field name="prev_prio" value="20" type="long" />
-<field name="prev_state" value="0" type="long" />
-<field name="next_comm" value="proc2" type="string" />
-<field name="next_tid" value="2" type="long" />
-<field name="next_prio" value="20" type="long" />
-</event>
-<event timestamp="2" name="sched_switch">
-<field name="cpu" value="1" type="int" />
-<field name="prev_comm" value="proc3" type="string" />
-<field name="prev_tid" value="3" type="long" />
-<field name="prev_prio" value="20" type="long" />
-<field name="prev_state" value="0" type="long" />
-<field name="next_comm" value="proc4" type="string" />
-<field name="next_tid" value="4" type="long" />
-<field name="next_prio" value="20" type="long" />
-</event>
-<event timestamp="5" name="sched_switch">
-<field name="cpu" value="1" type="int" />
-<field name="prev_comm" value="proc4" type="string" />
-<field name="prev_tid" value="4" type="long" />
-<field name="prev_prio" value="20" type="long" />
-<field name="prev_state" value="0" type="long" />
-<field name="next_comm" value="proc3" type="string" />
-<field name="next_tid" value="3" type="long" />
-<field name="next_prio" value="20" type="long" />
-</event>
-<event timestamp="10" name="sched_switch">
-<field name="cpu" value="1" type="int" />
-<field name="prev_comm" value="proc3" type="string" />
-<field name="prev_tid" value="3" type="long" />
-<field name="prev_prio" value="20" type="long" />
-<field name="prev_state" value="0" type="long" />
-<field name="next_comm" value="proc4" type="string" />
-<field name="next_tid" value="4" type="long" />
-<field name="next_prio" value="20" type="long" />
-</event>
-<event timestamp="15" name="sched_switch">
-<field name="cpu" value="1" type="int" />
-<field name="prev_comm" value="proc4" type="string" />
-<field name="prev_tid" value="4" type="long" />
-<field name="prev_prio" value="20" type="long" />
-<field name="prev_state" value="0" type="long" />
-<field name="next_comm" value="proc1" type="string" />
-<field name="next_tid" value="1" type="long" />
-<field name="next_prio" value="20" type="long" />
-</event>
-<event timestamp="20" name="sched_switch">
-<field name="cpu" value="1" type="int" />
-<field name="prev_comm" value="proc1" type="string" />
-<field name="prev_tid" value="1" type="long" />
-<field name="prev_prio" value="20" type="long" />
-<field name="prev_state" value="0" type="long" />
-<field name="next_comm" value="proc4" type="string" />
-<field name="next_tid" value="4" type="long" />
-<field name="next_prio" value="20" type="long" />
-</event>
-<event timestamp="20" name="sched_switch">
-<field name="cpu" value="0" type="int" />
-<field name="prev_comm" value="proc2" type="string" />
-<field name="prev_tid" value="2" type="long" />
-<field name="prev_prio" value="20" type="long" />
-<field name="prev_state" value="0" type="long" />
-<field name="next_comm" value="proc3" type="string" />
-<field name="next_tid" value="3" type="long" />
-<field name="next_prio" value="20" type="long" />
-</event>
-<event timestamp="25" name="sched_switch">
-<field name="cpu" value="0" type="int" />
-<field name="prev_comm" value="proc3" type="string" />
-<field name="prev_tid" value="3" type="long" />
-<field name="prev_prio" value="20" type="long" />
-<field name="prev_state" value="0" type="long" />
-<field name="next_comm" value="proc2" type="string" />
-<field name="next_tid" value="2" type="long" />
-<field name="next_prio" value="20" type="long" />
-</event>
-</trace>
\ No newline at end of file
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core.tests/testfiles/lttng_kernel_analysis.xml b/org.eclipse.tracecompass.analysis.os.linux.core.tests/testfiles/lttng_kernel_analysis.xml
deleted file mode 100644 (file)
index 40f7efc..0000000
+++ /dev/null
@@ -1,151 +0,0 @@
-<!-- ***************************************************************************
-* Simple LTTng Kernel trace, with simple process statedumps,
-* sched_switches and a process forking
-*************************************************************************** -->
-<trace>
-<event timestamp="0" name="set_aspects">
-<field name="cpu" value="1" type="int" />
-</event>
-<event timestamp="1" name="lttng_statedump_process_state">
-<field name="cpu" value="0" type="int" />
-<field name="tid" value="10" type="long" />
-<field name="vtid" value="10" type="long" />
-<field name="pid" value="10" type="long" />
-<field name="vpid" value="10" type="long" />
-<field name="ppid" value="0" type="long" />
-<field name="vppid" value="0" type="long" />
-<field name="type" value="1" type="int" />
-<field name="mode" value="5" type="int" />
-<field name="submode" value="0" type="int" />
-<field name="status" value="5" type="long" />
-<field name="ns_level" value="0" type="int" />
-<field name="name" value="proc10" type="string" />
-</event>
-<event timestamp="5" name="lttng_statedump_process_state">
-<field name="cpu" value="0" type="int" />
-<field name="tid" value="11" type="long" />
-<field name="vtid" value="11" type="long" />
-<field name="pid" value="11" type="long" />
-<field name="vpid" value="11" type="long" />
-<field name="ppid" value="10" type="long" />
-<field name="vppid" value="10" type="long" />
-<field name="type" value="1" type="int" />
-<field name="mode" value="5" type="int" />
-<field name="submode" value="0" type="int" />
-<field name="status" value="5" type="long" />
-<field name="ns_level" value="0" type="int" />
-<field name="name" value="proc11" type="string" />
-</event>
-<event timestamp="10" name="lttng_statedump_process_state">
-<field name="cpu" value="0" type="int" />
-<field name="tid" value="20" type="long" />
-<field name="vtid" value="20" type="long" />
-<field name="pid" value="20" type="long" />
-<field name="vpid" value="20" type="long" />
-<field name="ppid" value="0" type="long" />
-<field name="vppid" value="0" type="long" />
-<field name="type" value="1" type="int" />
-<field name="mode" value="5" type="int" />
-<field name="submode" value="0" type="int" />
-<field name="status" value="5" type="long" />
-<field name="ns_level" value="0" type="int" />
-<field name="name" value="proc20" type="string" />
-</event>
-<event timestamp="12" name="sched_switch">
-<field name="cpu" value="1" type="int" />
-<field name="prev_comm" value="proc3" type="string" />
-<field name="prev_tid" value="30" type="long" />
-<field name="prev_prio" value="20" type="long" />
-<field name="prev_state" value="0" type="long" />
-<field name="next_comm" value="proc11" type="string" />
-<field name="next_tid" value="11" type="long" />
-<field name="next_prio" value="20" type="long" />
-</event>
-<event timestamp="15" name="lttng_statedump_process_state">
-<field name="cpu" value="0" type="int" />
-<field name="tid" value="30" type="long" />
-<field name="vtid" value="30" type="long" />
-<field name="pid" value="30" type="long" />
-<field name="vpid" value="30" type="long" />
-<field name="ppid" value="0" type="long" />
-<field name="vppid" value="0" type="long" />
-<field name="type" value="1" type="int" />
-<field name="mode" value="5" type="int" />
-<field name="submode" value="0" type="int" />
-<field name="status" value="5" type="long" />
-<field name="ns_level" value="0" type="int" />
-<field name="name" value="proc30" type="string" />
-</event>
-<event timestamp="17" name="lttng_statedump_end">
-<field name="cpu" value="0" type="int" />
-</event>
-<event timestamp="20" name="sched_switch">
-<field name="cpu" value="1" type="int" />
-<field name="prev_comm" value="proc11" type="string" />
-<field name="prev_tid" value="10" type="long" />
-<field name="prev_prio" value="20" type="long" />
-<field name="prev_state" value="0" type="long" />
-<field name="next_comm" value="proc20" type="string" />
-<field name="next_tid" value="20" type="long" />
-<field name="next_prio" value="20" type="long" />
-</event>
-<event timestamp="25" name="sched_process_fork">
-<field name="cpu" value="1" type="int" />
-<field name="parent_comm" value="proc20" type="string" />
-<field name="parent_tid" value="20" type="long" />
-<field name="parent_pid" value="20" type="int" />
-<field name="child_comm" value="proc20" type="string" />
-<field name="child_tid" value="21" type="long" />
-<field name="child_pid" value="20" type="int" />
-</event>
-<event timestamp="30" name="sched_switch">
-<field name="cpu" value="1" type="int" />
-<field name="prev_comm" value="proc20" type="string" />
-<field name="prev_tid" value="20" type="long" />
-<field name="prev_prio" value="20" type="long" />
-<field name="prev_state" value="0" type="long" />
-<field name="next_comm" value="proc21" type="string" />
-<field name="next_tid" value="21" type="long" />
-<field name="next_prio" value="20" type="long" />
-</event>
-<event timestamp="35" name="sched_switch">
-<field name="cpu" value="0" type="int" />
-<field name="prev_comm" value="lttng-sessiond" type="string" />
-<field name="prev_tid" value="100" type="long" />
-<field name="prev_prio" value="20" type="long" />
-<field name="prev_state" value="0" type="long" />
-<field name="next_comm" value="proc11" type="string" />
-<field name="next_tid" value="11" type="long" />
-<field name="next_prio" value="20" type="long" />
-</event>
-<event timestamp="50" name="sched_switch">
-<field name="cpu" value="1" type="int" />
-<field name="prev_comm" value="proc21" type="string" />
-<field name="prev_tid" value="21" type="long" />
-<field name="prev_prio" value="20" type="long" />
-<field name="prev_state" value="0" type="long" />
-<field name="next_comm" value="proc30" type="string" />
-<field name="next_tid" value="30" type="long" />
-<field name="next_prio" value="20" type="long" />
-</event>
-<event timestamp="60" name="sched_switch">
-<field name="cpu" value="1" type="int" />
-<field name="prev_comm" value="proc30" type="string" />
-<field name="prev_tid" value="30" type="long" />
-<field name="prev_prio" value="20" type="long" />
-<field name="prev_state" value="0" type="long" />
-<field name="next_comm" value="proc21" type="string" />
-<field name="next_tid" value="21" type="long" />
-<field name="next_prio" value="20" type="long" />
-</event>
-<event timestamp="70" name="sched_switch">
-<field name="cpu" value="1" type="int" />
-<field name="prev_comm" value="proc21" type="string" />
-<field name="prev_tid" value="21" type="long" />
-<field name="prev_prio" value="20" type="long" />
-<field name="prev_state" value="0" type="long" />
-<field name="next_comm" value="proc20" type="string" />
-<field name="next_tid" value="20" type="long" />
-<field name="next_prio" value="20" type="long" />
-</event>
-</trace>
\ No newline at end of file
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core/.classpath b/org.eclipse.tracecompass.analysis.os.linux.core/.classpath
deleted file mode 100644 (file)
index 098194c..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
-       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
-       <classpathentry kind="src" path="src"/>
-       <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core/.project b/org.eclipse.tracecompass.analysis.os.linux.core/.project
deleted file mode 100644 (file)
index 106b248..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-       <name>org.eclipse.tracecompass.analysis.os.linux.core</name>
-       <comment></comment>
-       <projects>
-       </projects>
-       <buildSpec>
-               <buildCommand>
-                       <name>org.eclipse.jdt.core.javabuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.ManifestBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.SchemaBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-       </buildSpec>
-       <natures>
-               <nature>org.eclipse.pde.PluginNature</nature>
-               <nature>org.eclipse.jdt.core.javanature</nature>
-               <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
-       </natures>
-</projectDescription>
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core/.settings/org.eclipse.core.resources.prefs b/org.eclipse.tracecompass.analysis.os.linux.core/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644 (file)
index 99f26c0..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-encoding/<project>=UTF-8
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core/.settings/org.eclipse.core.runtime.prefs b/org.eclipse.tracecompass.analysis.os.linux.core/.settings/org.eclipse.core.runtime.prefs
deleted file mode 100644 (file)
index 5a0ad22..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-line.separator=\n
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.tracecompass.analysis.os.linux.core/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644 (file)
index a2b5e6b..0000000
+++ /dev/null
@@ -1,405 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.codeComplete.argumentPrefixes=
-org.eclipse.jdt.core.codeComplete.argumentSuffixes=
-org.eclipse.jdt.core.codeComplete.fieldPrefixes=f
-org.eclipse.jdt.core.codeComplete.fieldSuffixes=
-org.eclipse.jdt.core.codeComplete.localPrefixes=
-org.eclipse.jdt.core.codeComplete.localSuffixes=
-org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
-org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
-org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes=
-org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes=
-org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled
-org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
-org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
-org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
-org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
-org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
-org.eclipse.jdt.core.compiler.problem.deadCode=error
-org.eclipse.jdt.core.compiler.problem.deprecation=error
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=error
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=error
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=error
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=error
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
-org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=error
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
-org.eclipse.jdt.core.compiler.problem.missingDefaultCase=error
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error
-org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=enabled
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
-org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=error
-org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
-org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=error
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
-org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=error
-org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=error
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=error
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
-org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error
-org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=error
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=disabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=error
-org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameter=error
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=error
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=error
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
-org.eclipse.jdt.core.compiler.source=1.7
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=0
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=true
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
-org.eclipse.jdt.core.formatter.comment.format_line_comments=true
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
-org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
-org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
-org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.join_lines_in_comments=true
-org.eclipse.jdt.core.formatter.join_wrapped_lines=false
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=250
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
-org.eclipse.jdt.core.formatter.tabulation.char=space
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_on_off_tags=false
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
-org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.tracecompass.analysis.os.linux.core/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644 (file)
index 232a3fd..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_tmf-style
-formatter_settings_version=12
-org.eclipse.jdt.ui.exception.name=e
-org.eclipse.jdt.ui.gettersetter.use.is=true
-org.eclipse.jdt.ui.keywordthis=false
-org.eclipse.jdt.ui.overrideannotation=true
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=false
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_methods=false
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_missing_override_annotations_interface_methods=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.correct_indentation=false
-sp_cleanup.format_source_code=false
-sp_cleanup.format_source_code_changes_only=false
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_type_abstract_if_missing_method=false
-sp_cleanup.make_variable_declarations_final=false
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=true
-sp_cleanup.organize_imports=false
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=true
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=false
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=true
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core/.settings/org.eclipse.pde.api.tools.prefs b/org.eclipse.tracecompass.analysis.os.linux.core/.settings/org.eclipse.pde.api.tools.prefs
deleted file mode 100644 (file)
index acc3abd..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
-ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
-API_USE_SCAN_FIELD_SEVERITY=Error
-API_USE_SCAN_METHOD_SEVERITY=Error
-API_USE_SCAN_TYPE_SEVERITY=Error
-CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
-CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
-CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
-CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
-CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
-CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
-CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
-ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
-ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
-ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
-FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
-FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
-FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
-FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
-FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
-FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
-FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
-ILLEGAL_EXTEND=Warning
-ILLEGAL_IMPLEMENT=Warning
-ILLEGAL_INSTANTIATE=Warning
-ILLEGAL_OVERRIDE=Warning
-ILLEGAL_REFERENCE=Warning
-INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
-INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
-INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
-INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-INVALID_JAVADOC_TAG=Warning
-INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Warning
-LEAK_EXTEND=Warning
-LEAK_FIELD_DECL=Warning
-LEAK_IMPLEMENT=Warning
-LEAK_METHOD_PARAM=Warning
-LEAK_METHOD_RETURN_TYPE=Warning
-METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
-METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
-METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
-METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
-METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-MISSING_EE_DESCRIPTIONS=Ignore
-TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
-UNUSED_PROBLEM_FILTERS=Warning
-automatically_removed_unused_problem_filters=false
-eclipse.preferences.version=1
-incompatible_api_component_version=Error
-incompatible_api_component_version_include_major_without_breaking_change=Disabled
-incompatible_api_component_version_include_minor_without_api_change=Disabled
-invalid_since_tag_version=Error
-malformed_since_tag=Error
-missing_since_tag=Error
-report_api_breakage_when_major_version_incremented=Disabled
-report_resolution_errors_api_component=Warning
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core/.settings/org.eclipse.pde.prefs b/org.eclipse.tracecompass.analysis.os.linux.core/.settings/org.eclipse.pde.prefs
deleted file mode 100644 (file)
index d92b94f..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-compilers.f.unresolved-features=1
-compilers.f.unresolved-plugins=1
-compilers.incompatible-environment=1
-compilers.p.build=1
-compilers.p.build.bin.includes=1
-compilers.p.build.encodings=2
-compilers.p.build.java.compiler=2
-compilers.p.build.java.compliance=1
-compilers.p.build.missing.output=2
-compilers.p.build.output.library=1
-compilers.p.build.source.library=1
-compilers.p.build.src.includes=1
-compilers.p.deprecated=1
-compilers.p.discouraged-class=1
-compilers.p.internal=1
-compilers.p.missing-packages=1
-compilers.p.missing-version-export-package=2
-compilers.p.missing-version-import-package=2
-compilers.p.missing-version-require-bundle=2
-compilers.p.no-required-att=0
-compilers.p.not-externalized-att=1
-compilers.p.unknown-attribute=1
-compilers.p.unknown-class=1
-compilers.p.unknown-element=1
-compilers.p.unknown-identifier=1
-compilers.p.unknown-resource=1
-compilers.p.unresolved-ex-points=0
-compilers.p.unresolved-import=0
-compilers.s.create-docs=false
-compilers.s.doc-folder=doc
-compilers.s.open-tags=1
-eclipse.preferences.version=1
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core/META-INF/MANIFEST.MF b/org.eclipse.tracecompass.analysis.os.linux.core/META-INF/MANIFEST.MF
deleted file mode 100644 (file)
index 0a76920..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %Bundle-Name
-Bundle-Vendor: %Bundle-Vendor
-Bundle-Version: 1.0.0.qualifier
-Bundle-Localization: plugin
-Bundle-SymbolicName: org.eclipse.tracecompass.analysis.os.linux.core;singleton:=true
-Bundle-Activator: org.eclipse.tracecompass.internal.analysis.os.linux.core.Activator
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.core.resources,
- org.eclipse.tracecompass.common.core,
- org.eclipse.tracecompass.tmf.core
-Import-Package: com.google.common.collect,
- com.google.common.hash;version="15.0.0"
-Export-Package: org.eclipse.tracecompass.analysis.os.linux.core.cpuusage,
- org.eclipse.tracecompass.analysis.os.linux.core.event.aspect,
- org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis,
- org.eclipse.tracecompass.analysis.os.linux.core.model,
- org.eclipse.tracecompass.analysis.os.linux.core.trace,
- org.eclipse.tracecompass.internal.analysis.os.linux.core;x-internal:=true,
- org.eclipse.tracecompass.internal.analysis.os.linux.core.kernelanalysis;x-friends:="org.eclipse.tracecompass.analysis.os.linux.core.tests"
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core/about.html b/org.eclipse.tracecompass.analysis.os.linux.core/about.html
deleted file mode 100644 (file)
index c258ef5..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-<p>June 5, 2006</p>    
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;).  Unless otherwise 
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;).  A copy of the EPL is available 
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is 
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content.  Check the Redistributor's license that was 
-provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-</body>
-</html>
\ No newline at end of file
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core/build.properties b/org.eclipse.tracecompass.analysis.os.linux.core/build.properties
deleted file mode 100644 (file)
index ae8fab7..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-###############################################################################
-# Copyright (c) 2015 Ericsson
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     Ericsson - Initial API and implementation
-###############################################################################
-
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
-               .,\
-               about.html,\
-               plugin.properties,\
-               plugin.xml
-src.includes = about.html
-additional.bundles = org.eclipse.jdt.annotation
-jars.extra.classpath = platform:/plugin/org.eclipse.jdt.annotation
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core/plugin.properties b/org.eclipse.tracecompass.analysis.os.linux.core/plugin.properties
deleted file mode 100644 (file)
index 8d0a7f4..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-###############################################################################
-# Copyright (c) 2015 Ericsson
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     Ericsson - Initial API and implementation
-###############################################################################
-
-Bundle-Vendor = Eclipse Trace Compass
-Bundle-Name = Trace Compass Linux Kernel Analysis Core Plug-in
-
-tracetype.type.kernel = Linux Kernel Trace
-analysis.linuxkernel = Linux Kernel Analysis
-
-analysis.cpuusage = CPU usage
-
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core/plugin.xml b/org.eclipse.tracecompass.analysis.os.linux.core/plugin.xml
deleted file mode 100644 (file)
index 46b9a63..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
-   <extension
-         point="org.eclipse.linuxtools.tmf.core.analysis">
-      <module
-            analysis_module="org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelAnalysisModule"
-            automatic="true"
-            id="org.eclipse.tracecompass.analysis.os.linux.kernel"
-            name="%analysis.linuxkernel">
-         <tracetype
-               applies="true"
-               class="org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelTrace">
-         </tracetype>
-      </module>
-      <module
-            analysis_module="org.eclipse.tracecompass.analysis.os.linux.core.cpuusage.KernelCpuUsageAnalysis"
-            automatic="false"
-            id="org.eclipse.tracecompass.analysis.os.linux.cpuusage"
-            name="%analysis.cpuusage">
-         <tracetype
-               applies="true"
-               class="org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelTrace">
-         </tracetype>
-      </module>
-   </extension>
-</plugin>
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core/pom.xml b/org.eclipse.tracecompass.analysis.os.linux.core/pom.xml
deleted file mode 100644 (file)
index 1601717..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-   Copyright (C) 2011, Red Hat, Inc.
-
-   All rights reserved. This program and the accompanying materials
-   are made available under the terms of the Eclipse Public License v1.0
-   which accompanies this distribution, and is available at
-   http://www.eclipse.org/legal/epl-v10.html
--->
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-    <artifactId>org.eclipse.tracecompass</artifactId>
-    <groupId>org.eclipse.tracecompass</groupId>
-    <version>1.0.0-SNAPSHOT</version>
-  </parent>
-
-  <artifactId>org.eclipse.tracecompass.analysis.os.linux.core</artifactId>
-  <groupId>org.eclipse.tracecompass</groupId>
-  <version>1.0.0-SNAPSHOT</version>
-  <packaging>eclipse-plugin</packaging>
-
-  <name>Trace Compass Linux Kernel Analysis Core Plug-in</name>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.eclipse.tycho</groupId>
-        <artifactId>tycho-source-plugin</artifactId>
-      </plugin>
-    </plugins>
-  </build>
-
-</project>
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/cpuusage/KernelCpuUsageAnalysis.java b/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/cpuusage/KernelCpuUsageAnalysis.java
deleted file mode 100644 (file)
index 7d713e6..0000000
+++ /dev/null
@@ -1,278 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014, 2015 Ã‰cole Polytechnique de Montréal and others.
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Geneviève Bastien - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.analysis.os.linux.core.cpuusage;
-
-import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
-
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
-
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.Attributes;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelAnalysisModule;
-import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelAnalysisEventLayout;
-import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelTrace;
-import org.eclipse.tracecompass.internal.analysis.os.linux.core.Activator;
-import org.eclipse.tracecompass.statesystem.core.ITmfStateSystem;
-import org.eclipse.tracecompass.statesystem.core.exceptions.AttributeNotFoundException;
-import org.eclipse.tracecompass.statesystem.core.exceptions.StateSystemDisposedException;
-import org.eclipse.tracecompass.statesystem.core.exceptions.StateValueTypeException;
-import org.eclipse.tracecompass.statesystem.core.exceptions.TimeRangeException;
-import org.eclipse.tracecompass.statesystem.core.interval.ITmfStateInterval;
-import org.eclipse.tracecompass.tmf.core.analysis.IAnalysisModule;
-import org.eclipse.tracecompass.tmf.core.statesystem.ITmfStateProvider;
-import org.eclipse.tracecompass.tmf.core.statesystem.TmfStateSystemAnalysisModule;
-import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
-import org.eclipse.tracecompass.tmf.core.trace.TmfTraceUtils;
-
-/**
- * This analysis module computes the CPU usage of a system from a kernel trace.
- * It requires the LTTng Kernel analysis module to have accurate CPU usage data.
- *
- * @author Geneviève Bastien
- */
-public class KernelCpuUsageAnalysis extends TmfStateSystemAnalysisModule {
-
-    /** The ID of this analysis */
-    public static final String ID = "org.eclipse.tracecompass.analysis.os.linux.cpuusage"; //$NON-NLS-1$
-
-    /** Text used to identify 'total' entries in the returned maps */
-    public static final String TOTAL = "total"; //$NON-NLS-1$
-    /** String used to separate elements in the returned maps */
-    public static final String SPLIT_STRING = "/"; //$NON-NLS-1$
-    /** Idle process thread ID */
-    public static final String TID_ZERO = "0"; //$NON-NLS-1$
-
-    @Override
-    protected ITmfStateProvider createStateProvider() {
-        ITmfTrace trace = checkNotNull(getTrace());
-        IKernelAnalysisEventLayout layout;
-
-        if (trace instanceof IKernelTrace) {
-            layout = ((IKernelTrace) trace).getKernelEventLayout();
-        } else {
-            /* Fall-back to the base LttngEventLayout */
-            layout = IKernelAnalysisEventLayout.DEFAULT_LAYOUT;
-        }
-
-        return new KernelCpuUsageStateProvider(trace, layout);
-    }
-
-    @Override
-    protected StateSystemBackendType getBackendType() {
-        return StateSystemBackendType.FULL;
-    }
-
-    @Override
-    protected Iterable<IAnalysisModule> getDependentAnalyses() {
-        Set<IAnalysisModule> modules = new HashSet<>();
-
-        ITmfTrace trace = getTrace();
-        if (trace == null) {
-            throw new IllegalStateException();
-        }
-        /*
-         * This analysis depends on the LTTng kernel analysis, so it's added to
-         * dependent modules.
-         */
-        Iterable<KernelAnalysisModule> kernelModules = TmfTraceUtils.getAnalysisModulesOfClass(trace, KernelAnalysisModule.class);
-        for (KernelAnalysisModule kernelModule : kernelModules) {
-            /* Only add the first one we find, if there is one */
-            modules.add(kernelModule);
-            break;
-        }
-        return modules;
-    }
-
-    /**
-     * Get a map of time spent on CPU by various threads during a time range.
-     *
-     * @param start
-     *            Start time of requested range
-     * @param end
-     *            End time of requested range
-     * @return A map of TID -> time spent on CPU in the [start, end] interval
-     */
-    public Map<String, Long> getCpuUsageInRange(long start, long end) {
-        Map<String, Long> map = new HashMap<>();
-        Map<String, Long> totalMap = new HashMap<>();
-
-        ITmfTrace trace = getTrace();
-        ITmfStateSystem cpuSs = getStateSystem();
-        if (trace == null || cpuSs == null) {
-            return map;
-        }
-        ITmfStateSystem kernelSs = TmfStateSystemAnalysisModule.getStateSystem(trace, KernelAnalysisModule.ID);
-        if (kernelSs == null) {
-            return map;
-        }
-
-        /*
-         * Make sure the start/end times are within the state history, so we
-         * don't get TimeRange exceptions.
-         */
-        long startTime = Math.max(start, cpuSs.getStartTime());
-        startTime = Math.max(startTime, kernelSs.getStartTime());
-        long endTime = Math.min(end, cpuSs.getCurrentEndTime());
-        endTime = Math.min(endTime, kernelSs.getCurrentEndTime());
-        long totalTime = 0;
-        if (endTime < startTime) {
-            return map;
-        }
-
-        try {
-            /* Get the list of quarks for each CPU and CPU's TIDs */
-            int cpusNode = cpuSs.getQuarkAbsolute(Attributes.CPUS);
-            Map<Integer, List<Integer>> tidsPerCpu = new HashMap<>();
-            for (int cpuNode : cpuSs.getSubAttributes(cpusNode, false)) {
-                tidsPerCpu.put(cpuNode, cpuSs.getSubAttributes(cpuNode, false));
-            }
-
-            /* Query full states at start and end times */
-            List<ITmfStateInterval> kernelEndState = kernelSs.queryFullState(endTime);
-            List<ITmfStateInterval> endState = cpuSs.queryFullState(endTime);
-            List<ITmfStateInterval> kernelStartState = kernelSs.queryFullState(startTime);
-            List<ITmfStateInterval> startState = cpuSs.queryFullState(startTime);
-
-            long countAtStart, countAtEnd;
-
-            for (Entry<Integer, List<Integer>> entry : tidsPerCpu.entrySet()) {
-                int cpuNode = entry.getKey();
-                List<Integer> tidNodes = entry.getValue();
-
-                String curCpuName = cpuSs.getAttributeName(cpuNode);
-                long cpuTotal = 0;
-
-                /* Get the quark of the thread running on this CPU */
-                int currentThreadQuark = kernelSs.getQuarkAbsolute(Attributes.CPUS, curCpuName, Attributes.CURRENT_THREAD);
-                /* Get the currently running thread on this CPU */
-                int startThread = kernelStartState.get(currentThreadQuark).getStateValue().unboxInt();
-                int endThread = kernelEndState.get(currentThreadQuark).getStateValue().unboxInt();
-
-                for (int tidNode : tidNodes) {
-                    String curTidName = cpuSs.getAttributeName(tidNode);
-                    int tid = Integer.parseInt(curTidName);
-
-                    countAtEnd = endState.get(tidNode).getStateValue().unboxLong();
-                    countAtStart = startState.get(tidNode).getStateValue().unboxLong();
-                    if (countAtStart == -1) {
-                        countAtStart = 0;
-                    }
-                    if (countAtEnd == -1) {
-                        countAtEnd = 0;
-                    }
-
-                    /*
-                     * Interpolate start and end time of threads running at
-                     * those times
-                     */
-                    if (tid == startThread || startThread == -1) {
-                        long runningTime = kernelStartState.get(currentThreadQuark).getEndTime() - kernelStartState.get(currentThreadQuark).getStartTime();
-                        long runningEnd = kernelStartState.get(currentThreadQuark).getEndTime();
-
-                        countAtStart = interpolateCount(countAtStart, startTime, runningEnd, runningTime);
-                    }
-                    if (tid == endThread) {
-                        long runningTime = kernelEndState.get(currentThreadQuark).getEndTime() - kernelEndState.get(currentThreadQuark).getStartTime();
-                        long runningEnd = kernelEndState.get(currentThreadQuark).getEndTime();
-
-                        countAtEnd = interpolateCount(countAtEnd, endTime, runningEnd, runningTime);
-                    }
-                    /*
-                     * If startThread is -1, we made the hypothesis that the
-                     * process running at start was the current one. If the
-                     * count is negative, we were wrong in this hypothesis. Also
-                     * if the time at end is 0, it either means the process
-                     * hasn't been on the CPU or that we still don't know who is
-                     * running. In both cases, that invalidates the hypothesis.
-                     */
-                    if ((startThread == -1) && ((countAtEnd - countAtStart < 0) || (countAtEnd == 0))) {
-                        countAtStart = 0;
-                    }
-
-                    long currentCount = countAtEnd - countAtStart;
-                    if (currentCount < 0) {
-                        Activator.getDefault().logWarning(checkNotNull(String.format("Negative count: start %d, end %d", countAtStart, countAtEnd))); //$NON-NLS-1$
-                        currentCount = 0;
-                    } else if (currentCount > endTime - startTime) {
-                        Activator.getDefault().logWarning(checkNotNull(String.format("CPU Usage: Spent more time on CPU than allowed: %s spent %d when max should be %d", curTidName, currentCount, endTime - startTime))); //$NON-NLS-1$
-                        currentCount = 0;
-                    }
-                    cpuTotal += currentCount;
-                    map.put(curCpuName + SPLIT_STRING + curTidName, currentCount);
-                    addToMap(totalMap, curTidName, currentCount);
-                    totalTime += (currentCount);
-                }
-                map.put(curCpuName, cpuTotal);
-            }
-
-            /* Add the totals to the map */
-            for (Entry<String, Long> entry : totalMap.entrySet()) {
-                map.put(TOTAL + SPLIT_STRING + entry.getKey(), entry.getValue());
-            }
-            map.put(TOTAL, totalTime);
-
-        } catch (TimeRangeException | AttributeNotFoundException e) {
-            /*
-             * Assume there is no events or the attribute does not exist yet,
-             * nothing will be put in the map.
-             */
-        } catch (StateValueTypeException | StateSystemDisposedException e) {
-            /*
-             * These other exception types would show a logic problem, so they
-             * should not happen.
-             */
-            Activator.getDefault().logError("Error getting CPU usage in a time range", e); //$NON-NLS-1$
-        }
-
-        return map;
-    }
-
-    private static long interpolateCount(long count, long ts, long runningEnd, long runningTime) {
-        long newCount = count;
-
-        /* sanity check */
-        if (runningTime > 0) {
-
-            long runningStart = runningEnd - runningTime;
-
-            if (ts < runningStart) {
-                /*
-                 * This interval was not started, this can happen if the current
-                 * running thread is unknown and we execute this method. It just
-                 * means that this process was not the one running
-                 */
-                return newCount;
-            }
-            newCount += (ts - runningStart);
-        }
-        return newCount;
-    }
-
-    /*
-     * Add the value to the previous value in the map. If the key was not set,
-     * assume 0
-     */
-    private static void addToMap(Map<String, Long> map, String key, Long value) {
-        Long addTo = map.get(key);
-        if (addTo == null) {
-            map.put(key, value);
-        } else {
-            map.put(key, addTo + value);
-        }
-    }
-
-}
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/cpuusage/KernelCpuUsageStateProvider.java b/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/cpuusage/KernelCpuUsageStateProvider.java
deleted file mode 100644 (file)
index 3de7339..0000000
+++ /dev/null
@@ -1,159 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014, 2015 Ã‰cole Polytechnique de Montréal
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   François Rajotte - Initial API and implementation
- *   Geneviève Bastien - Revision of the initial implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.analysis.os.linux.core.cpuusage;
-
-import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.Attributes;
-import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelAnalysisEventLayout;
-import org.eclipse.tracecompass.internal.analysis.os.linux.core.Activator;
-import org.eclipse.tracecompass.statesystem.core.ITmfStateSystemBuilder;
-import org.eclipse.tracecompass.statesystem.core.exceptions.AttributeNotFoundException;
-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;
-import org.eclipse.tracecompass.tmf.core.statesystem.AbstractTmfStateProvider;
-import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
-import org.eclipse.tracecompass.tmf.core.trace.TmfTraceUtils;
-
-/**
- * Creates a state system with the total time spent on CPU for each thread and
- * for each CPU from a kernel trace.
- *
- * This state system in itself keeps the total time on CPU since last time the
- * process was scheduled out. The state system queries will only be accurate
- * when the process is not in a running state. To have exact CPU usage when
- * running, this state system needs to be used along the LTTng Kernel analysis.
- *
- * It requires only the 'sched_switch' events enabled on the trace.
- *
- * @author François Rajotte
- */
-public class KernelCpuUsageStateProvider extends AbstractTmfStateProvider {
-
-    private static final int VERSION = 2;
-
-    /* For each CPU, maps the last time a thread was scheduled in */
-    private final Map<Integer, Long> fLastStartTimes = new HashMap<>();
-    private final long fTraceStart;
-    private final IKernelAnalysisEventLayout fLayout;
-
-    /**
-     * Constructor
-     *
-     * @param trace
-     *            The trace from which to get the CPU usage
-     * @param layout
-     *            The event layout to use for this state provider.
-     */
-    public KernelCpuUsageStateProvider(ITmfTrace trace, IKernelAnalysisEventLayout layout) {
-        super(trace, "Kernel CPU usage"); //$NON-NLS-1$
-        fTraceStart = trace.getStartTime().getValue();
-        fLayout = layout;
-    }
-
-    // ------------------------------------------------------------------------
-    // ITmfStateProvider
-    // ------------------------------------------------------------------------
-
-    @Override
-    public int getVersion() {
-        return VERSION;
-    }
-
-    @Override
-    public KernelCpuUsageStateProvider getNewInstance() {
-        return new KernelCpuUsageStateProvider(this.getTrace(), this.fLayout);
-    }
-
-    @Override
-    protected void eventHandle(@Nullable ITmfEvent event) {
-        if (event == null) {
-            return;
-        }
-        final String eventName = event.getName();
-
-        if (eventName.equals(fLayout.eventSchedSwitch())) {
-            Object cpuObj = TmfTraceUtils.resolveEventAspectOfClassForEvent(event.getTrace(), TmfCpuAspect.class, event);
-            if (cpuObj == null) {
-                /* We couldn't find any CPU information, ignore this event */
-                return;
-            }
-            Integer cpu = (Integer) cpuObj;
-
-            /*
-             * Fields: string prev_comm, int32 prev_tid, int32 prev_prio, int64
-             * prev_state, string next_comm, int32 next_tid, int32 next_prio
-             */
-            ITmfEventField content = event.getContent();
-            long ts = event.getTimestamp().getValue();
-
-            Long prevTid = (Long) content.getField(fLayout.fieldPrevTid()).getValue();
-
-            try {
-                final ITmfStateSystemBuilder ss = checkNotNull(getStateSystemBuilder());
-
-                Integer currentCPUNode = ss.getQuarkRelativeAndAdd(getNodeCPUs(ss), cpu.toString());
-
-                /*
-                 * This quark contains the value of the cumulative time spent on
-                 * the source CPU by the currently running thread
-                 */
-                Integer cumulativeTimeQuark = ss.getQuarkRelativeAndAdd(currentCPUNode, prevTid.toString());
-                Long startTime = fLastStartTimes.get(cpu);
-                /*
-                 * If start time is null, we haven't seen the start of the
-                 * process, so we assume beginning of the trace
-                 */
-                if (startTime == null) {
-                    startTime = fTraceStart;
-                }
-
-                /*
-                 * We add the time from startTime until now to the cumulative
-                 * time of the thread
-                 */
-                ITmfStateValue value = ss.queryOngoingState(cumulativeTimeQuark);
-
-                /*
-                 * Modify cumulative time for this CPU/TID combo: The total time
-                 * changes when the process is scheduled out. Nothing happens
-                 * when the process is scheduled in.
-                 */
-                long prevCumulativeTime = Math.max(0, value.unboxLong());
-                long newCumulativeTime = prevCumulativeTime + (ts - startTime);
-
-                value = TmfStateValue.newValueLong(newCumulativeTime);
-                ss.modifyAttribute(ts, value, cumulativeTimeQuark);
-                fLastStartTimes.put(cpu, ts);
-
-            } catch (AttributeNotFoundException e) {
-                Activator.getDefault().logError("Attribute not found in LttngKernelCpuStateProvider", e); //$NON-NLS-1$
-            }
-
-        }
-    }
-
-    /* Shortcut for the "current CPU" attribute node */
-    private static int getNodeCPUs(ITmfStateSystemBuilder ssb) {
-        return ssb.getQuarkAbsoluteAndAdd(Attributes.CPUS);
-    }
-
-}
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/cpuusage/package-info.java b/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/cpuusage/package-info.java
deleted file mode 100644 (file)
index 53f049e..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2015 Ericsson
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *    Ericsson - Initial API and implementation
- *******************************************************************************/
-
-@org.eclipse.jdt.annotation.NonNullByDefault
-package org.eclipse.tracecompass.analysis.os.linux.core.cpuusage;
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/event/aspect/LinuxTidAspect.java b/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/event/aspect/LinuxTidAspect.java
deleted file mode 100644 (file)
index 4f8fbfd..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2015 Ã‰cole Polytechnique de Montréal
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Geneviève Bastien - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.analysis.os.linux.core.event.aspect;
-
-import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
-import org.eclipse.tracecompass.tmf.core.event.aspect.ITmfEventAspect;
-
-/**
- * This aspect finds the ID of the thread that is running when the event
- * occurred.
- *
- * @author Geneviève Bastien
- * @since 1.0
- */
-public abstract class LinuxTidAspect implements ITmfEventAspect {
-
-    @Override
-    public final String getName() {
-        return Messages.getMessage(Messages.AspectName_Tid);
-    }
-
-    @Override
-    public final String getHelpText() {
-        return Messages.getMessage(Messages.AspectHelpText_Tid);
-    }
-
-    @Override
-    public abstract @Nullable Integer resolve(ITmfEvent event);
-
-}
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/event/aspect/Messages.java b/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/event/aspect/Messages.java
deleted file mode 100644 (file)
index 49a9b11..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2015  Ã‰cole Polytechnique de Montréal
- *
- * All rights reserved. This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Geneviève Bastien - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.analysis.os.linux.core.event.aspect;
-
-import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * @since 1.0
- */
-@SuppressWarnings("javadoc")
-public class Messages extends NLS {
-
-    private static final String BUNDLE_NAME = "org.eclipse.tracecompass.analysis.os.linux.core.event.aspect.messages"; //$NON-NLS-1$
-
-    public static @Nullable String AspectName_Tid;
-
-    public static @Nullable String AspectHelpText_Tid;
-
-    static {
-        NLS.initializeMessages(BUNDLE_NAME, Messages.class);
-    }
-
-    private Messages() {
-    }
-
-    /**
-     * Helper method to expose externalized strings as non-null objects.
-     */
-    static String getMessage(@Nullable String msg) {
-        if (msg == null) {
-            return ""; //$NON-NLS-1$
-        }
-        return msg;
-    }
-}
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/event/aspect/messages.properties b/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/event/aspect/messages.properties
deleted file mode 100644 (file)
index 6ebad6f..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-###############################################################################
-# Copyright (c) 2015 Ã‰cole Polytechnique de Montréal
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     Ã‰cole Polytechnique de Montréal - Initial API and implementation
-###############################################################################
-
-AspectName_Tid=TID
-AspectHelpText_Tid=The ID of the thread this event belongs to
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/event/aspect/package-info.java b/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/event/aspect/package-info.java
deleted file mode 100644 (file)
index fb9676d..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2015 Ã‰cole Polytechnique de Montréal
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *    Ã‰cole Polytechnique de Montréal - Initial API and implementation
- *******************************************************************************/
-
-@org.eclipse.jdt.annotation.NonNullByDefault
-package org.eclipse.tracecompass.analysis.os.linux.core.event.aspect;
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/Attributes.java b/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/Attributes.java
deleted file mode 100644 (file)
index 520b1bb..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012, 2015 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Alexandre Montplaisir - Initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis;
-
-/**
- * This file defines all the attribute names used in the handler. Both the
- * construction and query steps should use them.
- *
- * These should not be externalized! The values here are used as-is in the
- * history file on disk, so they should be kept the same to keep the file format
- * compatible. If a view shows attribute names directly, the localization should
- * be done on the viewer side.
- *
- * @author alexmont
- *
- */
-@SuppressWarnings({"nls", "javadoc"})
-public interface Attributes {
-
-    /* First-level attributes */
-    String CPUS = "CPUs";
-    String THREADS = "Threads";
-    String RESOURCES = "Resources";
-
-    /* Sub-attributes of the CPU nodes */
-    String CURRENT_THREAD = "Current_thread";
-    String STATUS = "Status";
-
-    /* Sub-attributes of the Thread nodes */
-    String PPID = "PPID";
-    //static final String STATUS = "Status"
-    String EXEC_NAME = "Exec_name";
-
-    /** @since 1.0 */
-    String PRIO = "Prio";
-    String SYSTEM_CALL = "System_call";
-
-    /* Attributes under "Resources" */
-    String IRQS = "IRQs";
-    String SOFT_IRQS = "Soft_IRQs";
-
-    /* Misc stuff */
-    String UNKNOWN = "Unknown";
-}
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/KernelAnalysisModule.java b/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/KernelAnalysisModule.java
deleted file mode 100644 (file)
index 984a330..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013, 2015 Ã‰cole Polytechnique de Montréal
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Geneviève Bastien - Initial API and implementation
- *   Mathieu Rail - Provide the requirements of the analysis
- *******************************************************************************/
-
-package org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis;
-
-import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
-
-import java.util.Collections;
-import java.util.Set;
-
-import org.eclipse.jdt.annotation.NonNull;
-import org.eclipse.tracecompass.common.core.NonNullUtils;
-import org.eclipse.tracecompass.internal.analysis.os.linux.core.kernelanalysis.KernelStateProvider;
-import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelAnalysisEventLayout;
-import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelTrace;
-import org.eclipse.tracecompass.tmf.core.analysis.TmfAnalysisRequirement;
-import org.eclipse.tracecompass.tmf.core.statesystem.ITmfStateProvider;
-import org.eclipse.tracecompass.tmf.core.statesystem.TmfStateSystemAnalysisModule;
-import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
-
-/**
- * State System Module for lttng kernel traces
- *
- * @author Geneviève Bastien
- * @since 1.0
- */
-public class KernelAnalysisModule extends TmfStateSystemAnalysisModule {
-
-    /**
-     * The file name of the History Tree
-     */
-    public static final String HISTORY_TREE_FILE_NAME = "stateHistory.ht"; //$NON-NLS-1$
-
-    /** The ID of this analysis module */
-    public static final String ID = "org.eclipse.tracecompass.analysis.os.linux.kernel"; //$NON-NLS-1$
-
-    /*
-     * TODO: Decide which events should be mandatory for the analysis, once the
-     * appropriate error messages and session setup are in place.
-     */
-//    private static final ImmutableSet<String> REQUIRED_EVENTS = ImmutableSet.of();
-//
-//    private static final ImmutableSet<String> OPTIONAL_EVENTS = ImmutableSet.of(
-            // FIXME These cannot be declared statically anymore, they depend on
-            // the OriginTracer of the kernel trace.
-            // LttngStrings.EXIT_SYSCALL,
-            // LttngStrings.IRQ_HANDLER_ENTRY,
-            // LttngStrings.IRQ_HANDLER_EXIT,
-            // LttngStrings.SOFTIRQ_ENTRY,
-            // LttngStrings.SOFTIRQ_EXIT,
-            // LttngStrings.SOFTIRQ_RAISE,
-            // LttngStrings.SCHED_PROCESS_FORK,
-            // LttngStrings.SCHED_PROCESS_EXIT,
-            // LttngStrings.SCHED_PROCESS_FREE,
-            // LttngStrings.SCHED_SWITCH,
-            // LttngStrings.STATEDUMP_PROCESS_STATE,
-            // LttngStrings.SCHED_WAKEUP,
-            // LttngStrings.SCHED_WAKEUP_NEW,
-            //
-            // /* FIXME Add the prefix for syscalls */
-            // LttngStrings.SYSCALL_PREFIX
-            // );
-
-    /** The requirements as an immutable set */
-    private static final Set<TmfAnalysisRequirement> REQUIREMENTS;
-
-    static {
-//        /* initialize the requirement: domain and events */
-//        TmfAnalysisRequirement domainReq = new TmfAnalysisRequirement(SessionConfigStrings.CONFIG_ELEMENT_DOMAIN);
-//        domainReq.addValue(SessionConfigStrings.CONFIG_DOMAIN_TYPE_KERNEL, ValuePriorityLevel.MANDATORY);
-//
-//        TmfAnalysisRequirement eventReq = new TmfAnalysisRequirement(SessionConfigStrings.CONFIG_ELEMENT_EVENT, REQUIRED_EVENTS, ValuePriorityLevel.MANDATORY);
-//        eventReq.addValues(OPTIONAL_EVENTS, ValuePriorityLevel.OPTIONAL);
-//
-//        REQUIREMENTS = checkNotNull(ImmutableSet.of(domainReq, eventReq));
-        REQUIREMENTS = checkNotNull(Collections.EMPTY_SET);
-    }
-
-    @Override
-    protected @NonNull ITmfStateProvider createStateProvider() {
-        ITmfTrace trace = checkNotNull(getTrace());
-        IKernelAnalysisEventLayout layout;
-
-        if (trace instanceof IKernelTrace) {
-            layout = ((IKernelTrace) trace).getKernelEventLayout();
-        } else {
-            /* Fall-back to the base LttngEventLayout */
-            layout = IKernelAnalysisEventLayout.DEFAULT_LAYOUT;
-        }
-
-        return new KernelStateProvider(trace, layout);
-    }
-
-    @Override
-    @NonNull
-    protected String getSsFileName() {
-        return HISTORY_TREE_FILE_NAME;
-    }
-
-    @Override
-    protected String getFullHelpText() {
-        return NonNullUtils.nullToEmptyString(Messages.LttngKernelAnalysisModule_Help);
-    }
-
-    @Override
-    public Iterable<TmfAnalysisRequirement> getAnalysisRequirements() {
-        return REQUIREMENTS;
-    }
-}
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/KernelThreadInformationProvider.java b/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/KernelThreadInformationProvider.java
deleted file mode 100644 (file)
index ab96926..0000000
+++ /dev/null
@@ -1,260 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014, 2015 Ã‰cole Polytechnique de Montréal
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Geneviève Bastien - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-import java.util.Set;
-import java.util.TreeSet;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.tracecompass.common.core.NonNullUtils;
-import org.eclipse.tracecompass.statesystem.core.ITmfStateSystem;
-import org.eclipse.tracecompass.statesystem.core.StateSystemUtils;
-import org.eclipse.tracecompass.statesystem.core.exceptions.AttributeNotFoundException;
-import org.eclipse.tracecompass.statesystem.core.exceptions.StateSystemDisposedException;
-import org.eclipse.tracecompass.statesystem.core.exceptions.TimeRangeException;
-import org.eclipse.tracecompass.statesystem.core.interval.ITmfStateInterval;
-import org.eclipse.tracecompass.statesystem.core.statevalue.ITmfStateValue;
-
-/**
- * Information provider utility class that retrieves thread-related information
- * from a Linux Kernel Analysis
- *
- * @author Geneviève Bastien
- */
-public final class KernelThreadInformationProvider {
-
-    private KernelThreadInformationProvider() {
-    }
-
-    /**
-     * Get the ID of the thread running on the CPU at time ts
-     *
-     * TODO: This method may later be replaced by an aspect, when the aspect can
-     * resolve to something that is not an event
-     *
-     * @param module
-     *            The lttng kernel analysis instance to run this method on
-     * @param cpuId
-     *            The CPU number the process is running on
-     * @param ts
-     *            The timestamp at which we want the running process
-     * @return The TID of the thread running on CPU cpuId at time ts or
-     *         {@code null} if either no thread is running or we do not know.
-     * @since 1.0
-     */
-    public static @Nullable Integer getThreadOnCpu(KernelAnalysisModule module, long cpuId, long ts) {
-        ITmfStateSystem ss = module.getStateSystem();
-        if (ss == null) {
-            return null;
-        }
-        try {
-            int cpuQuark = ss.getQuarkAbsolute(Attributes.CPUS, Long.toString(cpuId), Attributes.CURRENT_THREAD);
-            ITmfStateInterval interval = ss.querySingleState(ts, cpuQuark);
-            ITmfStateValue val = interval.getStateValue();
-            switch (val.getType()) {
-            case INTEGER:
-                return val.unboxInt();
-            case LONG:
-            case DOUBLE:
-            case NULL:
-            case STRING:
-            default:
-                break;
-            }
-        } catch (AttributeNotFoundException | StateSystemDisposedException | TimeRangeException e) {
-        }
-        return null;
-    }
-
-    /**
-     * Get the TIDs of the threads from an analysis
-     *
-     * @param module
-     *            The lttng kernel analysis instance to run this method on
-     * @return The set of TIDs corresponding to the threads
-     * @since 1.0
-     */
-    public static Collection<Integer> getThreadIds(KernelAnalysisModule module) {
-        ITmfStateSystem ss = module.getStateSystem();
-        if (ss == null) {
-            return NonNullUtils.checkNotNull(Collections.EMPTY_SET);
-        }
-        int threadQuark;
-        try {
-            threadQuark = ss.getQuarkAbsolute(Attributes.THREADS);
-            Set<Integer> tids = new TreeSet<>();
-            for (Integer quark : ss.getSubAttributes(threadQuark, false)) {
-                tids.add(Integer.parseInt(ss.getAttributeName(quark)));
-            }
-            return tids;
-        } catch (AttributeNotFoundException e) {
-        }
-        return NonNullUtils.checkNotNull(Collections.EMPTY_SET);
-    }
-
-    /**
-     * Get the parent process ID of a thread
-     *
-     * @param module
-     *            The lttng kernel analysis instance to run this method on
-     * @param threadId
-     *            The thread ID of the process for which to get the parent
-     * @param ts
-     *            The timestamp at which to get the parent
-     * @return The parent PID or {@code null} if the PPID is not found.
-     * @since 1.0
-     */
-    public static @Nullable Integer getParentPid(KernelAnalysisModule module, Integer threadId, long ts) {
-        Integer ppid = null;
-        ITmfStateSystem ss = module.getStateSystem();
-        if (ss == null) {
-            return ppid;
-        }
-        Integer ppidNode;
-        try {
-            ppidNode = ss.getQuarkAbsolute(Attributes.THREADS, threadId.toString(), Attributes.PPID);
-            ITmfStateInterval ppidInterval = ss.querySingleState(ts, ppidNode);
-            ITmfStateValue ppidValue = ppidInterval.getStateValue();
-
-            switch (ppidValue.getType()) {
-            case INTEGER:
-                ppid = NonNullUtils.checkNotNull(Integer.valueOf(ppidValue.unboxInt()));
-                break;
-            case DOUBLE:
-            case LONG:
-            case NULL:
-            case STRING:
-            default:
-                break;
-            }
-        } catch (AttributeNotFoundException | StateSystemDisposedException | TimeRangeException e) {
-        }
-        return ppid;
-    }
-
-    /**
-     * Get the executable name of the thread ID. If the thread ID was used
-     * multiple time or the name changed in between, it will return the last
-     * name the thread has taken, or {@code null} if no name is found
-     *
-     * @param module
-     *            The lttng kernel analysis instance to run this method on
-     * @param threadId
-     *            The thread ID of the process for which to get the name
-     * @return The last executable name of this process, or {@code null} if not
-     *         found
-     * @since 1.0
-     */
-    public static @Nullable String getExecutableName(KernelAnalysisModule module, Integer threadId) {
-        String execName = null;
-        ITmfStateSystem ss = module.getStateSystem();
-        if (ss == null) {
-            return execName;
-        }
-        Integer execNameNode;
-        try {
-            execNameNode = ss.getQuarkAbsolute(Attributes.THREADS, threadId.toString(), Attributes.EXEC_NAME);
-            List<ITmfStateInterval> execNameIntervals = StateSystemUtils.queryHistoryRange(ss, execNameNode, ss.getStartTime(), ss.getCurrentEndTime());
-
-            ITmfStateValue execNameValue;
-            for (ITmfStateInterval interval : execNameIntervals) {
-                execNameValue = interval.getStateValue();
-                switch (execNameValue.getType()) {
-                case STRING:
-                    execName = NonNullUtils.checkNotNull(execNameValue.unboxStr());
-                    break;
-                case DOUBLE:
-                case LONG:
-                case NULL:
-                case INTEGER:
-                default:
-                    break;
-                }
-            }
-        } catch (AttributeNotFoundException | StateSystemDisposedException | TimeRangeException e) {
-        }
-        return execName;
-    }
-
-    /**
-     * Get the priority of a thread running at a time ts.
-     *
-     * @param module
-     *            The kernel analysis instance to run this method on
-     * @param threadId
-     *            The thread ID of the target thread
-     * @param ts
-     *            The timestamp at which to get the priority
-     * @return The priority of this thread, or {@code null} if not found
-     * @since 1.0
-     */
-    public static @Nullable Integer getThreadPrio(KernelAnalysisModule module, Integer threadId, long ts) {
-        Integer execPrio = null;
-        ITmfStateSystem ss = module.getStateSystem();
-        if (ss == null) {
-            return execPrio;
-        }
-        try {
-            int execPrioQuark = ss.getQuarkAbsolute(Attributes.THREADS, threadId.toString(), Attributes.PRIO);
-            ITmfStateInterval interval = ss.querySingleState(ts, execPrioQuark);
-            ITmfStateValue prioValue = interval.getStateValue();
-            /* We know the prio must be an Integer */
-            execPrio = prioValue.unboxInt();
-        } catch (AttributeNotFoundException | StateSystemDisposedException | TimeRangeException e) {
-        }
-        return execPrio;
-    }
-
-    /**
-     * Get the status intervals for a given thread with a resolution
-     *
-     * @param module
-     *            The lttng kernel analysis instance to run this method on
-     * @param threadId
-     *            The ID of the thread to get the intervals for
-     * @param start
-     *            The start time of the requested range
-     * @param end
-     *            The end time of the requested range
-     * @param resolution
-     *            The resolution or the minimal time between the requested
-     *            intervals. If interval times are smaller than resolution, only
-     *            the first interval is returned, the others are ignored.
-     * @param monitor
-     *            A progress monitor for this task
-     * @return The list of status intervals for this thread, an empty list is
-     *         returned if either the state system is {@code null} or the quark
-     *         is not found
-     * @since 1.0
-     */
-    public static List<ITmfStateInterval> getStatusIntervalsForThread(KernelAnalysisModule module, Integer threadId, long start, long end, long resolution, IProgressMonitor monitor) {
-        ITmfStateSystem ss = module.getStateSystem();
-        if (ss == null) {
-            return NonNullUtils.checkNotNull(Collections.EMPTY_LIST);
-        }
-
-        try {
-            int threadQuark = ss.getQuarkAbsolute(Attributes.THREADS, threadId.toString());
-            int statusQuark = ss.getQuarkRelative(threadQuark, Attributes.STATUS);
-            List<ITmfStateInterval> statusIntervals = StateSystemUtils.queryHistoryRange(ss, statusQuark, Math.max(start, ss.getStartTime()), Math.min(end - 1, ss.getCurrentEndTime()), resolution, monitor);
-            return statusIntervals;
-        } catch (AttributeNotFoundException | StateSystemDisposedException | TimeRangeException e) {
-        }
-        return NonNullUtils.checkNotNull(Collections.EMPTY_LIST);
-    }
-
-}
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/KernelTidAspect.java b/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/KernelTidAspect.java
deleted file mode 100644 (file)
index d3197ff..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2015 Ã‰cole Polytechnique de Montréal
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Geneviève Bastien - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis;
-
-import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.tracecompass.analysis.os.linux.core.event.aspect.LinuxTidAspect;
-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;
-
-/**
- * This aspect finds the ID of the thread running from this event using the
- * {@link KernelAnalysisModule}.
- *
- * @author Geneviève Bastien
- * @since 1.0
- */
-public final class KernelTidAspect extends LinuxTidAspect {
-
-    /** The singleton instance */
-    public static final KernelTidAspect INSTANCE = new KernelTidAspect();
-
-    private KernelTidAspect() {
-    }
-
-    @Override
-    public @Nullable Integer resolve(ITmfEvent event) {
-        /* Find the CPU this event is run on */
-        Object cpuObj = TmfTraceUtils.resolveEventAspectOfClassForEvent(event.getTrace(),
-                TmfCpuAspect.class, event);
-        if (cpuObj == null) {
-            return null;
-        }
-        Integer cpu = (Integer) cpuObj;
-
-        /* Find the analysis module for the trace */
-        KernelAnalysisModule analysis = TmfTraceUtils.getAnalysisModuleOfClass(event.getTrace(),
-                KernelAnalysisModule.class, KernelAnalysisModule.ID);
-        if (analysis == null) {
-            return null;
-        }
-        Integer tid = KernelThreadInformationProvider.getThreadOnCpu(
-                analysis, cpu, event.getTimestamp().getValue());
-        if (tid != null) {
-            return tid;
-        }
-        return null;
-    }
-
-}
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/Messages.java b/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/Messages.java
deleted file mode 100644 (file)
index d2e8255..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014, 2015 Ã‰cole Polytechnique de Montréal
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Geneviève Bastien - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis;
-
-import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Externalized message strings from the LTTng Kernel Analysis
- *
- * @author Geneviève Bastien
- */
-@SuppressWarnings("javadoc")
-public class Messages extends NLS {
-    private static final String BUNDLE_NAME = "org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.messages"; //$NON-NLS-1$
-
-    /**
-     * @since 1.0
-     */
-    public static @Nullable String AspectName_Prio;
-
-    /**
-     * @since 1.0
-     */
-    public static @Nullable String AspectHelpText_Prio;
-
-    public static @Nullable String LttngKernelAnalysisModule_Help;
-
-    static {
-        // initialize resource bundle
-        NLS.initializeMessages(BUNDLE_NAME, Messages.class);
-    }
-
-    private Messages() {
-    }
-}
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/StateValues.java b/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/StateValues.java
deleted file mode 100644 (file)
index ff3d5ee..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012, 2015 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Alexandre Montplaisir - Initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis;
-
-import org.eclipse.tracecompass.statesystem.core.statevalue.ITmfStateValue;
-import org.eclipse.tracecompass.statesystem.core.statevalue.TmfStateValue;
-
-/**
- * State values that are used in the kernel event handler. It's much better to
- * use integer values whenever possible, since those take much less space in the
- * history file.
- *
- * @author Alexandre Montplaisir
- */
-@SuppressWarnings("javadoc")
-public interface StateValues {
-
-    /* CPU Status */
-    int CPU_STATUS_IDLE = 0;
-    int CPU_STATUS_RUN_USERMODE = 1;
-    int CPU_STATUS_RUN_SYSCALL = 2;
-    int CPU_STATUS_IRQ = 3;
-    int CPU_STATUS_SOFTIRQ = 4;
-
-    ITmfStateValue CPU_STATUS_IDLE_VALUE = TmfStateValue.newValueInt(CPU_STATUS_IDLE);
-    ITmfStateValue CPU_STATUS_RUN_USERMODE_VALUE = TmfStateValue.newValueInt(CPU_STATUS_RUN_USERMODE);
-    ITmfStateValue CPU_STATUS_RUN_SYSCALL_VALUE = TmfStateValue.newValueInt(CPU_STATUS_RUN_SYSCALL);
-    ITmfStateValue CPU_STATUS_IRQ_VALUE = TmfStateValue.newValueInt(CPU_STATUS_IRQ);
-    ITmfStateValue CPU_STATUS_SOFTIRQ_VALUE = TmfStateValue.newValueInt(CPU_STATUS_SOFTIRQ);
-
-    /* Process status */
-    int PROCESS_STATUS_UNKNOWN = 0;
-    int PROCESS_STATUS_WAIT_BLOCKED = 1;
-    int PROCESS_STATUS_RUN_USERMODE = 2;
-    int PROCESS_STATUS_RUN_SYSCALL = 3;
-    int PROCESS_STATUS_INTERRUPTED = 4;
-    int PROCESS_STATUS_WAIT_FOR_CPU = 5;
-    /**
-     * @since 1.0
-     */
-    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);
-
-    /* SoftIRQ-specific stuff. -1: null/disabled, >= 0: running on that CPU */
-    int SOFT_IRQ_RAISED = -2;
-
-    ITmfStateValue SOFT_IRQ_RAISED_VALUE = TmfStateValue.newValueInt(SOFT_IRQ_RAISED);
-}
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/ThreadPriorityAspect.java b/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/ThreadPriorityAspect.java
deleted file mode 100644 (file)
index 087abb4..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2015 Keba AG
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Christian Mansky - Initial implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis;
-
-import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.tracecompass.common.core.NonNullUtils;
-import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
-import org.eclipse.tracecompass.tmf.core.event.aspect.ITmfEventAspect;
-import org.eclipse.tracecompass.tmf.core.trace.TmfTraceUtils;
-
-/**
- * This aspect finds the priority of the thread running from this event using
- * the {@link KernelAnalysisModule}.
- *
- * @author Christian Mansky
- * @since 1.0
- */
-public final class ThreadPriorityAspect implements ITmfEventAspect {
-
-    /** The singleton instance */
-    public static final ThreadPriorityAspect INSTANCE = new ThreadPriorityAspect();
-
-    private ThreadPriorityAspect() {
-    }
-
-    @Override
-    public final String getName() {
-        return NonNullUtils.nullToEmptyString(Messages.AspectName_Prio);
-    }
-
-    @Override
-    public final String getHelpText() {
-        return NonNullUtils.nullToEmptyString(Messages.AspectHelpText_Prio);
-    }
-
-    @Override
-    public @Nullable Integer resolve(ITmfEvent event) {
-        KernelAnalysisModule kernelAnalysis = TmfTraceUtils.getAnalysisModuleOfClass(event.getTrace(), KernelAnalysisModule.class, KernelAnalysisModule.ID);
-        if (kernelAnalysis == null) {
-            return null;
-        }
-
-        Integer tid = KernelTidAspect.INSTANCE.resolve(event);
-        if (tid == null) {
-            return null;
-        }
-
-        Integer prio = KernelThreadInformationProvider.getThreadPrio(kernelAnalysis, tid, event.getTimestamp().getValue());
-        return prio;
-    }
-
-}
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/messages.properties b/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/messages.properties
deleted file mode 100644 (file)
index a666ee1..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-###############################################################################
-# Copyright (c) 2014, 2015 Ã‰cole Polytechnique de Montréal
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     Geneviève Bastien - Initial API and implementation
-###############################################################################
-
-AspectName_Prio=Prio
-AspectHelpText_Prio=The priority of the thread this event belongs to
-LttngKernelAnalysisModule_Help=Builds the LTTng2 kernel state system to populate the Control Flow view and the Resources View
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/package-info.java b/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelanalysis/package-info.java
deleted file mode 100644 (file)
index 872cd80..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2015 Ericsson
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *    Ericsson - Initial API and implementation
- *******************************************************************************/
-
-@org.eclipse.jdt.annotation.NonNullByDefault
-package org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis;
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/model/HostThread.java b/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/model/HostThread.java
deleted file mode 100644 (file)
index 5dbb56d..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ã‰cole Polytechnique de Montréal
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Geneviève Bastien - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.analysis.os.linux.core.model;
-
-import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.tracecompass.common.core.NonNullUtils;
-
-import com.google.common.hash.HashFunction;
-import com.google.common.hash.Hashing;
-
-/**
- * This class represents a thread from a specific host. Many machines in an
- * experiment can have the same thread IDs. This class differentiates the
- * threads by adding the host ID it belongs to.
- *
- * @author Geneviève Bastien
- * @since 1.0
- */
-public class HostThread {
-
-    private static final HashFunction HF = NonNullUtils.checkNotNull(Hashing.goodFastHash(32));
-
-    private final String fHost;
-    private final Integer fTid;
-
-    /**
-     * Constructor
-     *
-     * @param host
-     *            The host this thread belongs to
-     * @param tid
-     *            The thread ID of this thread
-     */
-    public HostThread(String host, Integer tid) {
-        fHost = host;
-        fTid = tid;
-    }
-
-    @Override
-    public int hashCode() {
-        return HF.newHasher()
-                .putUnencodedChars(fHost)
-                .putInt(fTid).hash().asInt();
-    }
-
-    @Override
-    public boolean equals(@Nullable Object o) {
-        if (o instanceof HostThread) {
-            HostThread hostTid = (HostThread) o;
-            if (fTid.equals(hostTid.fTid) &&
-                    fHost.equals(hostTid.fHost)) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    @Override
-    public String toString() {
-        return "HostTid: [" + fHost + ',' + fTid + ']'; //$NON-NLS-1$
-    }
-
-    /**
-     * Get the thread ID of this thread
-     *
-     * @return The thread ID of this thread
-     */
-    public Integer getTid() {
-        return fTid;
-    }
-
-    /**
-     * Get the host ID of the machine this thread belongs to
-     *
-     * @return The host ID this thread belongs to
-     */
-    public String getHost() {
-        return fHost;
-    }
-
-}
\ No newline at end of file
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/model/package-info.java b/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/model/package-info.java
deleted file mode 100644 (file)
index 8fa2180..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2015 Ã‰cole Polytechnique de Montréal
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *    Ã‰cole Polytechnique de Montréal - Initial API and implementation
- *******************************************************************************/
-
-@org.eclipse.jdt.annotation.NonNullByDefault
-package org.eclipse.tracecompass.analysis.os.linux.core.model;
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/trace/DefaultEventLayout.java b/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/trace/DefaultEventLayout.java
deleted file mode 100644 (file)
index 00d7553..0000000
+++ /dev/null
@@ -1,243 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2015 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Alexandre Montplaisir - Initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.tracecompass.analysis.os.linux.core.trace;
-
-import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
-
-import java.util.Collection;
-
-import org.eclipse.jdt.annotation.NonNull;
-
-import com.google.common.collect.ImmutableList;
-
-/**
- * A kernel event layout to be used by default. This can be useful for
- * data-driven traces for example, where they can provide whatever event names
- * they want.
- *
- * Due to historical reasons, the definitions are the same as LTTng event names.
- *
- * @author Alexandre Montplaisir
- * @since 1.0
- */
-public class DefaultEventLayout implements IKernelAnalysisEventLayout{
-
-    /* Event names */
-    private static final String IRQ_HANDLER_ENTRY = "irq_handler_entry"; //$NON-NLS-1$
-    private static final String IRQ_HANDLER_EXIT = "irq_handler_exit"; //$NON-NLS-1$
-    private static final String SOFTIRQ_ENTRY = "softirq_entry"; //$NON-NLS-1$
-    private static final String SOFTIRQ_EXIT = "softirq_exit"; //$NON-NLS-1$
-    private static final String SOFTIRQ_RAISE = "softirq_raise"; //$NON-NLS-1$
-    private static final String SCHED_SWITCH = "sched_switch"; //$NON-NLS-1$
-    private static final String SCHED_PI_SETPRIO = "sched_pi_setprio"; //$NON-NLS-1$
-
-    private static final Collection<String> SCHED_WAKEUP_EVENTS =
-            checkNotNull(ImmutableList.of("sched_wakeup", "sched_wakeup_new")); //$NON-NLS-1$ //$NON-NLS-2$
-
-    private static final String SCHED_PROCESS_FORK = "sched_process_fork"; //$NON-NLS-1$
-    private static final String SCHED_PROCESS_EXIT = "sched_process_exit"; //$NON-NLS-1$
-    private static final String SCHED_PROCESS_FREE = "sched_process_free"; //$NON-NLS-1$
-    private static final String STATEDUMP_PROCESS_STATE = "lttng_statedump_process_state"; //$NON-NLS-1$
-
-    private static final String SYSCALL_ENTRY_PREFIX = "sys_"; //$NON-NLS-1$
-    private static final String COMPAT_SYSCALL_ENTRY_PREFIX = "compat_sys_"; //$NON-NLS-1$
-    private static final String SYSCALL_EXIT_PREFIX = "exit_syscall"; //$NON-NLS-1$
-
-    /* Field names */
-    private static final String IRQ = "irq"; //$NON-NLS-1$
-    private static final String TID = "tid"; //$NON-NLS-1$
-    private static final String VEC = "vec"; //$NON-NLS-1$
-    private static final String PREV_TID = "prev_tid"; //$NON-NLS-1$
-    private static final String PREV_STATE = "prev_state"; //$NON-NLS-1$
-    private static final String NEXT_COMM = "next_comm"; //$NON-NLS-1$
-    private static final String NEXT_TID = "next_tid"; //$NON-NLS-1$
-    private static final String PARENT_TID = "parent_tid"; //$NON-NLS-1$
-    private static final String CHILD_COMM = "child_comm"; //$NON-NLS-1$
-    private static final String CHILD_TID = "child_tid"; //$NON-NLS-1$
-    private static final String PRIO = "prio"; //$NON-NLS-1$
-    private static final String NEW_PRIO = "newprio"; //$NON-NLS-1$
-    private static final String NEXT_PRIO = "next_prio"; //$NON-NLS-1$
-
-    /** All instances are the same. Only provide a static instance getter */
-    private DefaultEventLayout() {
-    }
-
-    /**
-     * The instance of this event layout
-     *
-     * This object is completely immutable, so no need to create additional
-     * instances via the constructor.
-     */
-    static final IKernelAnalysisEventLayout INSTANCE = new DefaultEventLayout();
-
-    // ------------------------------------------------------------------------
-    // Event names
-    // ------------------------------------------------------------------------
-
-    @Override
-    public String eventIrqHandlerEntry() {
-        return IRQ_HANDLER_ENTRY;
-    }
-
-    @Override
-    public String eventIrqHandlerExit() {
-        return IRQ_HANDLER_EXIT;
-    }
-
-    @Override
-    public String eventSoftIrqEntry() {
-        return SOFTIRQ_ENTRY;
-    }
-
-    @Override
-    public String eventSoftIrqExit() {
-        return SOFTIRQ_EXIT;
-    }
-
-    @Override
-    public String eventSoftIrqRaise() {
-        return SOFTIRQ_RAISE;
-    }
-
-    @Override
-    public String eventSchedSwitch() {
-        return SCHED_SWITCH;
-    }
-
-    /**
-     * @since 1.0
-     */
-    @Override
-    public String eventSchedPiSetprio() {
-        return SCHED_PI_SETPRIO;
-    }
-
-    @Override
-    public Collection<String> eventsSchedWakeup() {
-        return SCHED_WAKEUP_EVENTS;
-    }
-
-    @Override
-    public String eventSchedProcessFork() {
-        return SCHED_PROCESS_FORK;
-    }
-
-    @Override
-    public String eventSchedProcessExit() {
-        return SCHED_PROCESS_EXIT;
-    }
-
-    @Override
-    public String eventSchedProcessFree() {
-        return SCHED_PROCESS_FREE;
-    }
-
-    @Override
-    public @NonNull String eventStatedumpProcessState() {
-        return STATEDUMP_PROCESS_STATE;
-    }
-
-    @Override
-    public String eventSyscallEntryPrefix() {
-        return SYSCALL_ENTRY_PREFIX;
-    }
-
-    @Override
-    public String eventCompatSyscallEntryPrefix() {
-        return COMPAT_SYSCALL_ENTRY_PREFIX;
-    }
-
-    @Override
-    public String eventSyscallExitPrefix() {
-        return SYSCALL_EXIT_PREFIX;
-    }
-
-    // ------------------------------------------------------------------------
-    // Event field names
-    // ------------------------------------------------------------------------
-
-    @Override
-    public String fieldIrq() {
-        return IRQ;
-    }
-
-    @Override
-    public String fieldVec() {
-        return VEC;
-    }
-
-    @Override
-    public String fieldTid() {
-        return TID;
-    }
-
-    @Override
-    public String fieldPrevTid() {
-        return PREV_TID;
-    }
-
-    @Override
-    public String fieldPrevState() {
-        return PREV_STATE;
-    }
-
-    @Override
-    public String fieldNextComm() {
-        return NEXT_COMM;
-    }
-
-    @Override
-    public String fieldNextTid() {
-        return NEXT_TID;
-    }
-
-    @Override
-    public String fieldChildComm() {
-        return CHILD_COMM;
-    }
-
-    @Override
-    public String fieldParentTid() {
-        return PARENT_TID;
-    }
-
-    @Override
-    public String fieldChildTid() {
-        return CHILD_TID;
-    }
-
-    /**
-     * @since 1.0
-     */
-    @Override
-    public String fieldPrio() {
-        return PRIO;
-    }
-
-    /**
-     * @since 1.0
-     */
-    @Override
-    public String fieldNewPrio() {
-        return NEW_PRIO;
-    }
-
-    /**
-     * @since 1.0
-     */
-    @Override
-    public String fieldNextPrio() {
-        return NEXT_PRIO;
-    }
-
-}
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/trace/IKernelAnalysisEventLayout.java b/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/trace/IKernelAnalysisEventLayout.java
deleted file mode 100644 (file)
index 4310892..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014, 2015 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Alexandre Montplaisir - Initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.tracecompass.analysis.os.linux.core.trace;
-
-import java.util.Collection;
-
-import org.eclipse.jdt.annotation.Nullable;
-
-/**
- * Interface to define "concepts" present in the Linux kernel (represented by
- * its tracepoints), that can then be exposed by different tracers under
- * different names.
- *
- * @author Alexandre Montplaisir
- */
-// The methods are named after the TRACE_EVENT's, should be straightforward
-@SuppressWarnings("javadoc")
-public interface IKernelAnalysisEventLayout {
-
-    // ------------------------------------------------------------------------
-    // Common definitions
-    // ------------------------------------------------------------------------
-
-    IKernelAnalysisEventLayout DEFAULT_LAYOUT = DefaultEventLayout.INSTANCE;
-
-    /**
-     * Whenever a process appears for the first time in a trace, we assume it
-     * starts inside this system call. (The syscall prefix is defined by the
-     * implementer of this interface.)
-     *
-     * TODO Change to a default method with Java 8?
-     */
-    String INITIAL_SYSCALL_NAME = "clone"; //$NON-NLS-1$
-
-    // ------------------------------------------------------------------------
-    // Event names
-    // ------------------------------------------------------------------------
-
-    String eventIrqHandlerEntry();
-    String eventIrqHandlerExit();
-    String eventSoftIrqEntry();
-    String eventSoftIrqExit();
-    String eventSoftIrqRaise();
-    String eventSchedSwitch();
-
-    /** @since 1.0 */
-    String eventSchedPiSetprio();
-
-    Collection<String> eventsSchedWakeup();
-    String eventSchedProcessFork();
-    String eventSchedProcessExit();
-    String eventSchedProcessFree();
-    @Nullable String eventStatedumpProcessState();
-    String eventSyscallEntryPrefix();
-    String eventCompatSyscallEntryPrefix();
-    String eventSyscallExitPrefix();
-
-    // ------------------------------------------------------------------------
-    // Event field names
-    // ------------------------------------------------------------------------
-
-    String fieldIrq();
-    String fieldVec();
-    String fieldTid();
-    String fieldPrevTid();
-    String fieldPrevState();
-    String fieldNextComm();
-    String fieldNextTid();
-    String fieldChildComm();
-    String fieldParentTid();
-    String fieldChildTid();
-
-    /** @since 1.0 */
-    String fieldPrio();
-
-    /** @since 1.0 */
-    String fieldNewPrio();
-
-    /** @since 1.0 */
-    String fieldNextPrio();
-}
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/trace/IKernelTrace.java b/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/trace/IKernelTrace.java
deleted file mode 100644 (file)
index 92a07bf..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2015 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Alexandre Montplaisir - Initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.tracecompass.analysis.os.linux.core.trace;
-
-import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
-
-/**
- * Trace type that represents a Linux kernel trace.
- *
- * Any trace implementing the interface should be able to run the different
- * Linux kernel analyses in this plugin.
- *
- * @author Alexandre Montplaisir
- */
-public interface IKernelTrace extends ITmfTrace {
-
-    /**
-     * Get the event layout of this trace. Many known concepts from the Linux
-     * kernel may be exported under different names, depending on the tracer.
-     *
-     * @return The event layout
-     */
-    IKernelAnalysisEventLayout getKernelEventLayout();
-}
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/trace/package-info.java b/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/trace/package-info.java
deleted file mode 100644 (file)
index efbe373..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2015 Ericsson
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *    Ericsson - Initial API and implementation
- *******************************************************************************/
-
-@org.eclipse.jdt.annotation.NonNullByDefault
-package org.eclipse.tracecompass.analysis.os.linux.core.trace;
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/internal/analysis/os/linux/core/Activator.java b/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/internal/analysis/os/linux/core/Activator.java
deleted file mode 100644 (file)
index b513e6d..0000000
+++ /dev/null
@@ -1,142 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2015 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Alexandre Montplaisir - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.internal.analysis.os.linux.core;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Plugin;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jdt.annotation.Nullable;
-import org.osgi.framework.BundleContext;
-
-/**
- * <b><u>Activator</u></b>
- * <p>
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends Plugin {
-
-    // ------------------------------------------------------------------------
-    // Attributes
-    // ------------------------------------------------------------------------
-
-    /**
-     * The plug-in ID
-     */
-    public static final String PLUGIN_ID = "org.eclipse.tracecompass.analysis.linux.core"; //$NON-NLS-1$
-
-    /**
-     * The shared instance
-     */
-    private static @Nullable Activator fPlugin;
-
-    // ------------------------------------------------------------------------
-    // Constructors
-    // ------------------------------------------------------------------------
-
-    /**
-     * The constructor
-     */
-    public Activator() {
-    }
-
-    // ------------------------------------------------------------------------
-    // Accessors
-    // ------------------------------------------------------------------------
-
-    /**
-     * Returns the shared instance
-     *
-     * @return the shared instance
-     */
-    public static Activator getDefault() {
-        Activator plugin = fPlugin;
-        if (plugin == null) {
-            throw new IllegalStateException();
-        }
-        return plugin;
-    }
-
-    // ------------------------------------------------------------------------
-    // Operators
-    // ------------------------------------------------------------------------
-
-    @Override
-    public void start(@Nullable BundleContext context) throws Exception {
-        super.start(context);
-        fPlugin = this;
-    }
-
-    @Override
-    public void stop(@Nullable BundleContext context) throws Exception {
-        fPlugin = null;
-        super.stop(context);
-    }
-
-    /**
-     * Logs a message with severity INFO in the runtime log of the plug-in.
-     *
-     * @param message A message to log
-     */
-    public void logInfo(String message) {
-        getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message));
-    }
-
-    /**
-     * Logs a message and exception with severity INFO in the runtime log of the plug-in.
-     *
-     * @param message A message to log
-     * @param exception A exception to log
-     */
-    public void logInfo(String message, Throwable exception) {
-        getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message, exception));
-    }
-
-    /**
-     * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
-     *
-     * @param message A message to log
-     */
-    public void logWarning(String message) {
-        getLog().log(new Status(IStatus.WARNING, PLUGIN_ID, message));
-    }
-
-    /**
-     * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
-     *
-     * @param message A message to log
-     * @param exception A exception to log
-     */
-    public void logWarning(String message, Throwable exception) {
-        getLog().log(new Status(IStatus.WARNING, PLUGIN_ID, message, exception));
-    }
-
-    /**
-     * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
-     *
-     * @param message A message to log
-     */
-    public void logError(String message) {
-        getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message));
-    }
-
-    /**
-     * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
-     *
-     * @param message A message to log
-     * @param exception A exception to log
-     */
-    public void logError(String message, Throwable exception) {
-        getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message, exception));
-    }
-
-}
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/internal/analysis/os/linux/core/kernelanalysis/KernelStateProvider.java b/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/internal/analysis/os/linux/core/kernelanalysis/KernelStateProvider.java
deleted file mode 100644 (file)
index 605e275..0000000
+++ /dev/null
@@ -1,649 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012, 2015 Ericsson
- * Copyright (c) 2010, 2011 Ã‰cole Polytechnique de Montréal
- * Copyright (c) 2010, 2011 Alexandre Montplaisir <alexandre.montplaisir@gmail.com>
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- *******************************************************************************/
-
-package org.eclipse.tracecompass.internal.analysis.os.linux.core.kernelanalysis;
-
-import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
-
-import java.util.Map;
-
-import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.Attributes;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.StateValues;
-import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelAnalysisEventLayout;
-import org.eclipse.tracecompass.internal.analysis.os.linux.core.kernelanalysis.LinuxValues;
-import org.eclipse.tracecompass.statesystem.core.ITmfStateSystemBuilder;
-import org.eclipse.tracecompass.statesystem.core.exceptions.AttributeNotFoundException;
-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;
-import org.eclipse.tracecompass.tmf.core.event.ITmfEventField;
-import org.eclipse.tracecompass.tmf.core.event.aspect.TmfCpuAspect;
-import org.eclipse.tracecompass.tmf.core.statesystem.AbstractTmfStateProvider;
-import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
-import org.eclipse.tracecompass.tmf.core.trace.TmfTraceUtils;
-
-import com.google.common.collect.ImmutableMap;
-
-/**
- * This is the state change input plugin for TMF's state system which handles
- * the LTTng 2.0 kernel traces in CTF format.
- *
- * It uses the reference handler defined in CTFKernelHandler.java.
- *
- * @author alexmont
- *
- */
-public class KernelStateProvider extends AbstractTmfStateProvider {
-
-    // ------------------------------------------------------------------------
-    // Static fields
-    // ------------------------------------------------------------------------
-
-    /**
-     * Version number of this state provider. Please bump this if you modify the
-     * contents of the generated state history in some way.
-     */
-    private static final int VERSION = 7;
-
-    private static final int IRQ_HANDLER_ENTRY_INDEX = 1;
-    private static final int IRQ_HANDLER_EXIT_INDEX = 2;
-    private static final int SOFT_IRQ_ENTRY_INDEX = 3;
-    private static final int SOFT_IRQ_EXIT_INDEX = 4;
-    private static final int SOFT_IRQ_RAISE_INDEX = 5;
-    private static final int SCHED_SWITCH_INDEX = 6;
-    private static final int SCHED_PROCESS_FORK_INDEX = 7;
-    private static final int SCHED_PROCESS_EXIT_INDEX = 8;
-    private static final int SCHED_PROCESS_FREE_INDEX = 9;
-    private static final int STATEDUMP_PROCESS_STATE_INDEX = 10;
-    private static final int SCHED_WAKEUP_INDEX = 11;
-    private static final int SCHED_PI_SETPRIO_INDEX = 12;
-
-
-    // ------------------------------------------------------------------------
-    // Fields
-    // ------------------------------------------------------------------------
-
-    private final Map<String, Integer> fEventNames;
-    private final IKernelAnalysisEventLayout fLayout;
-
-    // ------------------------------------------------------------------------
-    // Constructor
-    // ------------------------------------------------------------------------
-
-    /**
-     * Instantiate a new state provider plugin.
-     *
-     * @param trace
-     *            The LTTng 2.0 kernel trace directory
-     * @param layout
-     *            The event layout to use for this state provider. Usually
-     *            depending on the tracer implementation.
-     */
-    public KernelStateProvider(ITmfTrace trace, IKernelAnalysisEventLayout layout) {
-        super(trace, "Kernel"); //$NON-NLS-1$
-        fLayout = layout;
-        fEventNames = buildEventNames(layout);
-    }
-
-    // ------------------------------------------------------------------------
-    // Event names management
-    // ------------------------------------------------------------------------
-
-    private static Map<String, Integer> buildEventNames(IKernelAnalysisEventLayout layout) {
-        ImmutableMap.Builder<String, Integer> builder = ImmutableMap.builder();
-
-        builder.put(layout.eventIrqHandlerEntry(), IRQ_HANDLER_ENTRY_INDEX);
-        builder.put(layout.eventIrqHandlerExit(), IRQ_HANDLER_EXIT_INDEX);
-        builder.put(layout.eventSoftIrqEntry(), SOFT_IRQ_ENTRY_INDEX);
-        builder.put(layout.eventSoftIrqExit(), SOFT_IRQ_EXIT_INDEX);
-        builder.put(layout.eventSoftIrqRaise(), SOFT_IRQ_RAISE_INDEX);
-        builder.put(layout.eventSchedSwitch(), SCHED_SWITCH_INDEX);
-        builder.put(layout.eventSchedPiSetprio(), SCHED_PI_SETPRIO_INDEX);
-        builder.put(layout.eventSchedProcessFork(), SCHED_PROCESS_FORK_INDEX);
-        builder.put(layout.eventSchedProcessExit(), SCHED_PROCESS_EXIT_INDEX);
-        builder.put(layout.eventSchedProcessFree(), SCHED_PROCESS_FREE_INDEX);
-
-        final String eventStatedumpProcessState = layout.eventStatedumpProcessState();
-        if (eventStatedumpProcessState != null) {
-            builder.put(eventStatedumpProcessState, STATEDUMP_PROCESS_STATE_INDEX);
-        }
-
-        for (String eventSchedWakeup : layout.eventsSchedWakeup()) {
-            builder.put(eventSchedWakeup, SCHED_WAKEUP_INDEX);
-        }
-
-        return checkNotNull(builder.build());
-    }
-
-    // ------------------------------------------------------------------------
-    // IStateChangeInput
-    // ------------------------------------------------------------------------
-
-    @Override
-    public int getVersion() {
-        return VERSION;
-    }
-
-    @Override
-    public void assignTargetStateSystem(ITmfStateSystemBuilder ssb) {
-        /* We can only set up the locations once the state system is assigned */
-        super.assignTargetStateSystem(ssb);
-    }
-
-    @Override
-    public KernelStateProvider getNewInstance() {
-        return new KernelStateProvider(this.getTrace(), fLayout);
-    }
-
-    @Override
-    protected void eventHandle(@Nullable ITmfEvent event) {
-        if (event == null) {
-            return;
-        }
-
-        Object cpuObj = TmfTraceUtils.resolveEventAspectOfClassForEvent(event.getTrace(), TmfCpuAspect.class, event);
-        if (cpuObj == null) {
-            /* We couldn't find any CPU information, ignore this event */
-            return;
-        }
-        Integer cpu = (Integer) cpuObj;
-
-        final String eventName = event.getName();
-        final long ts = event.getTimestamp().getValue();
-
-        try {
-            final ITmfStateSystemBuilder ss = checkNotNull(getStateSystemBuilder());
-
-            /* Shortcut for the "current CPU" attribute node */
-            final int currentCPUNode = ss.getQuarkRelativeAndAdd(getNodeCPUs(ss), cpu.toString());
-
-            /*
-             * Shortcut for the "current thread" attribute node. It requires
-             * querying the current CPU's current thread.
-             */
-            int quark = ss.getQuarkRelativeAndAdd(currentCPUNode, Attributes.CURRENT_THREAD);
-            ITmfStateValue value = ss.queryOngoingState(quark);
-            int thread = value.isNull() ? -1 : value.unboxInt();
-            final int currentThreadNode = ss.getQuarkRelativeAndAdd(getNodeThreads(ss), String.valueOf(thread));
-
-            /*
-             * Feed event to the history system if it's known to cause a state
-             * transition.
-             */
-            Integer idx = fEventNames.get(eventName);
-            int intval = (idx == null ? -1 : idx.intValue());
-            switch (intval) {
-
-            case IRQ_HANDLER_ENTRY_INDEX:
-            {
-                Integer irqId = ((Long) event.getContent().getField(fLayout.fieldIrq()).getValue()).intValue();
-
-                /* Mark this IRQ as active in the resource tree.
-                 * The state value = the CPU on which this IRQ is sitting */
-                quark = ss.getQuarkRelativeAndAdd(getNodeIRQs(ss), irqId.toString());
-                value = TmfStateValue.newValueInt(cpu.intValue());
-                ss.modifyAttribute(ts, value, quark);
-
-                /* Change the status of the running process to interrupted */
-                quark = ss.getQuarkRelativeAndAdd(currentThreadNode, Attributes.STATUS);
-                value = StateValues.PROCESS_STATUS_INTERRUPTED_VALUE;
-                ss.modifyAttribute(ts, value, quark);
-
-                /* Change the status of the CPU to interrupted */
-                quark = ss.getQuarkRelativeAndAdd(currentCPUNode, Attributes.STATUS);
-                value = StateValues.CPU_STATUS_IRQ_VALUE;
-                ss.modifyAttribute(ts, value, quark);
-            }
-                break;
-
-            case IRQ_HANDLER_EXIT_INDEX:
-            {
-                Integer irqId = ((Long) event.getContent().getField(fLayout.fieldIrq()).getValue()).intValue();
-
-                /* Put this IRQ back to inactive in the resource tree */
-                quark = ss.getQuarkRelativeAndAdd(getNodeIRQs(ss), irqId.toString());
-                value = TmfStateValue.nullValue();
-                ss.modifyAttribute(ts, value, quark);
-
-                /* Set the previous process back to running */
-                setProcessToRunning(ss, ts, currentThreadNode);
-
-                /* Set the CPU status back to running or "idle" */
-                cpuExitInterrupt(ss, ts, currentCPUNode, currentThreadNode);
-            }
-                break;
-
-            case SOFT_IRQ_ENTRY_INDEX:
-            {
-                Integer softIrqId = ((Long) event.getContent().getField(fLayout.fieldVec()).getValue()).intValue();
-
-                /* Mark this SoftIRQ as active in the resource tree.
-                 * The state value = the CPU on which this SoftIRQ is processed */
-                quark = ss.getQuarkRelativeAndAdd(getNodeSoftIRQs(ss), softIrqId.toString());
-                value = TmfStateValue.newValueInt(cpu.intValue());
-                ss.modifyAttribute(ts, value, quark);
-
-                /* Change the status of the running process to interrupted */
-                quark = ss.getQuarkRelativeAndAdd(currentThreadNode, Attributes.STATUS);
-                value = StateValues.PROCESS_STATUS_INTERRUPTED_VALUE;
-                ss.modifyAttribute(ts, value, quark);
-
-                /* Change the status of the CPU to interrupted */
-                quark = ss.getQuarkRelativeAndAdd(currentCPUNode, Attributes.STATUS);
-                value = StateValues.CPU_STATUS_SOFTIRQ_VALUE;
-                ss.modifyAttribute(ts, value, quark);
-            }
-                break;
-
-            case SOFT_IRQ_EXIT_INDEX:
-            {
-                Integer softIrqId = ((Long) event.getContent().getField(fLayout.fieldVec()).getValue()).intValue();
-
-                /* Put this SoftIRQ back to inactive (= -1) in the resource tree */
-                quark = ss.getQuarkRelativeAndAdd(getNodeSoftIRQs(ss), softIrqId.toString());
-                value = TmfStateValue.nullValue();
-                ss.modifyAttribute(ts, value, quark);
-
-                /* Set the previous process back to running */
-                setProcessToRunning(ss, ts, currentThreadNode);
-
-                /* Set the CPU status back to "busy" or "idle" */
-                cpuExitInterrupt(ss, ts, currentCPUNode, currentThreadNode);
-            }
-                break;
-
-            case SOFT_IRQ_RAISE_INDEX:
-            /* Fields: int32 vec */
-            {
-                Integer softIrqId = ((Long) event.getContent().getField(fLayout.fieldVec()).getValue()).intValue();
-
-                /* Mark this SoftIRQ as *raised* in the resource tree.
-                 * State value = -2 */
-                quark = ss.getQuarkRelativeAndAdd(getNodeSoftIRQs(ss), softIrqId.toString());
-                value = StateValues.SOFT_IRQ_RAISED_VALUE;
-                ss.modifyAttribute(ts, value, quark);
-            }
-                break;
-
-            case SCHED_SWITCH_INDEX:
-            {
-                ITmfEventField content = event.getContent();
-                Integer prevTid = ((Long) content.getField(fLayout.fieldPrevTid()).getValue()).intValue();
-                Long prevState = (Long) content.getField(fLayout.fieldPrevState()).getValue();
-                String nextProcessName = (String) content.getField(fLayout.fieldNextComm()).getValue();
-                Integer nextTid = ((Long) content.getField(fLayout.fieldNextTid()).getValue()).intValue();
-                Integer nextPrio = ((Long) content.getField(fLayout.fieldNextPrio()).getValue()).intValue();
-
-                Integer formerThreadNode = ss.getQuarkRelativeAndAdd(getNodeThreads(ss), prevTid.toString());
-                Integer newCurrentThreadNode = ss.getQuarkRelativeAndAdd(getNodeThreads(ss), nextTid.toString());
-
-                /* Set the status of the process that got scheduled out. */
-                quark = ss.getQuarkRelativeAndAdd(formerThreadNode, Attributes.STATUS);
-                if (prevState != 0) {
-                    value = StateValues.PROCESS_STATUS_WAIT_BLOCKED_VALUE;
-                } else {
-                    value = StateValues.PROCESS_STATUS_WAIT_FOR_CPU_VALUE;
-                }
-                ss.modifyAttribute(ts, value, quark);
-
-                /* Set the status of the new scheduled process */
-                setProcessToRunning(ss, ts, newCurrentThreadNode);
-
-                /* Set the exec name of the new process */
-                quark = ss.getQuarkRelativeAndAdd(newCurrentThreadNode, Attributes.EXEC_NAME);
-                value = TmfStateValue.newValueString(nextProcessName);
-                ss.modifyAttribute(ts, value, quark);
-
-                /* Set the current prio for the new process */
-                quark = ss.getQuarkRelativeAndAdd(newCurrentThreadNode, Attributes.PRIO);
-                value = TmfStateValue.newValueInt(nextPrio);
-                ss.modifyAttribute(ts, value, quark);
-
-                /* Make sure the PPID and system_call sub-attributes exist */
-                ss.getQuarkRelativeAndAdd(newCurrentThreadNode, Attributes.SYSTEM_CALL);
-                ss.getQuarkRelativeAndAdd(newCurrentThreadNode, Attributes.PPID);
-
-                /* Set the current scheduled process on the relevant CPU */
-                quark = ss.getQuarkRelativeAndAdd(currentCPUNode, Attributes.CURRENT_THREAD);
-                value = TmfStateValue.newValueInt(nextTid);
-                ss.modifyAttribute(ts, value, quark);
-
-                /* Set the status of the CPU itself */
-                if (nextTid > 0) {
-                    /* Check if the entering process is in kernel or user mode */
-                    quark = ss.getQuarkRelativeAndAdd(newCurrentThreadNode, Attributes.SYSTEM_CALL);
-                    if (ss.queryOngoingState(quark).isNull()) {
-                        value = StateValues.CPU_STATUS_RUN_USERMODE_VALUE;
-                    } else {
-                        value = StateValues.CPU_STATUS_RUN_SYSCALL_VALUE;
-                    }
-                } else {
-                    value = StateValues.CPU_STATUS_IDLE_VALUE;
-                }
-                quark = ss.getQuarkRelativeAndAdd(currentCPUNode, Attributes.STATUS);
-                ss.modifyAttribute(ts, value, quark);
-            }
-                break;
-
-            case SCHED_PI_SETPRIO_INDEX:
-            {
-                ITmfEventField content = event.getContent();
-                Integer tid = ((Long) content.getField(fLayout.fieldTid()).getValue()).intValue();
-                Integer prio = ((Long) content.getField(fLayout.fieldNewPrio()).getValue()).intValue();
-
-                Integer updateThreadNode = ss.getQuarkRelativeAndAdd(getNodeThreads(ss), tid.toString());
-
-                /* Set the current prio for the new process */
-                quark = ss.getQuarkRelativeAndAdd(updateThreadNode, Attributes.PRIO);
-                value = TmfStateValue.newValueInt(prio);
-                ss.modifyAttribute(ts, value, quark);
-            }
-                break;
-
-            case SCHED_PROCESS_FORK_INDEX:
-            {
-                ITmfEventField content = event.getContent();
-                // String parentProcessName = (String) event.getFieldValue("parent_comm");
-                String childProcessName = (String) content.getField(fLayout.fieldChildComm()).getValue();
-                // assert ( parentProcessName.equals(childProcessName) );
-
-                Integer parentTid = ((Long) content.getField(fLayout.fieldParentTid()).getValue()).intValue();
-                Integer childTid = ((Long) content.getField(fLayout.fieldChildTid()).getValue()).intValue();
-
-                Integer parentTidNode = ss.getQuarkRelativeAndAdd(getNodeThreads(ss), parentTid.toString());
-                Integer childTidNode = ss.getQuarkRelativeAndAdd(getNodeThreads(ss), childTid.toString());
-
-                /* Assign the PPID to the new process */
-                quark = ss.getQuarkRelativeAndAdd(childTidNode, Attributes.PPID);
-                value = TmfStateValue.newValueInt(parentTid);
-                ss.modifyAttribute(ts, value, quark);
-
-                /* Set the new process' exec_name */
-                quark = ss.getQuarkRelativeAndAdd(childTidNode, Attributes.EXEC_NAME);
-                value = TmfStateValue.newValueString(childProcessName);
-                ss.modifyAttribute(ts, value, quark);
-
-                /* Set the new process' status */
-                quark = ss.getQuarkRelativeAndAdd(childTidNode, Attributes.STATUS);
-                value = StateValues.PROCESS_STATUS_WAIT_FOR_CPU_VALUE;
-                ss.modifyAttribute(ts, value, quark);
-
-                /* Set the process' syscall name, to be the same as the parent's */
-                quark = ss.getQuarkRelativeAndAdd(parentTidNode, Attributes.SYSTEM_CALL);
-                value = ss.queryOngoingState(quark);
-                if (value.isNull()) {
-                    /*
-                     * Maybe we were missing info about the parent? At least we
-                     * will set the child right. Let's suppose "sys_clone".
-                     */
-                    value = TmfStateValue.newValueString(fLayout.eventSyscallEntryPrefix() + IKernelAnalysisEventLayout.INITIAL_SYSCALL_NAME);
-                }
-                quark = ss.getQuarkRelativeAndAdd(childTidNode, Attributes.SYSTEM_CALL);
-                ss.modifyAttribute(ts, value, quark);
-            }
-                break;
-
-            case SCHED_PROCESS_EXIT_INDEX:
-                break;
-
-            case SCHED_PROCESS_FREE_INDEX:
-            {
-                Integer tid = ((Long) event.getContent().getField(fLayout.fieldTid()).getValue()).intValue();
-                /*
-                 * Remove the process and all its sub-attributes from the
-                 * current state
-                 */
-                quark = ss.getQuarkRelativeAndAdd(getNodeThreads(ss), tid.toString());
-                ss.removeAttribute(ts, quark);
-            }
-                break;
-
-            case STATEDUMP_PROCESS_STATE_INDEX:
-                /* LTTng-specific */
-            {
-                ITmfEventField content = event.getContent();
-                int tid = ((Long) content.getField("tid").getValue()).intValue(); //$NON-NLS-1$
-                int pid = ((Long) content.getField("pid").getValue()).intValue(); //$NON-NLS-1$
-                int ppid = ((Long) content.getField("ppid").getValue()).intValue(); //$NON-NLS-1$
-                int status = ((Long) content.getField("status").getValue()).intValue(); //$NON-NLS-1$
-                String name = (String) content.getField("name").getValue(); //$NON-NLS-1$
-                /*
-                 * "mode" could be interesting too, but it doesn't seem to be
-                 * populated with anything relevant for now.
-                 */
-
-                int curThreadNode = ss.getQuarkRelativeAndAdd(getNodeThreads(ss), String.valueOf(tid));
-
-                /* Set the process' name */
-                quark = ss.getQuarkRelativeAndAdd(curThreadNode, Attributes.EXEC_NAME);
-                if (ss.queryOngoingState(quark).isNull()) {
-                    /* If the value didn't exist previously, set it */
-                    value = TmfStateValue.newValueString(name);
-                    ss.modifyAttribute(ts, value, quark);
-                }
-
-                /* Set the process' PPID */
-                quark = ss.getQuarkRelativeAndAdd(curThreadNode, Attributes.PPID);
-                if (ss.queryOngoingState(quark).isNull()) {
-                    if (pid == tid) {
-                        /* We have a process. Use the 'PPID' field. */
-                        value = TmfStateValue.newValueInt(ppid);
-                    } else {
-                        /* We have a thread, use the 'PID' field for the parent. */
-                        value = TmfStateValue.newValueInt(pid);
-                    }
-                    ss.modifyAttribute(ts, value, quark);
-                }
-
-                /* Set the process' status */
-                quark = ss.getQuarkRelativeAndAdd(curThreadNode, Attributes.STATUS);
-                if (ss.queryOngoingState(quark).isNull()) {
-                    switch (status) {
-                    case LinuxValues.STATEDUMP_PROCESS_STATUS_WAIT_CPU:
-                        value = StateValues.PROCESS_STATUS_WAIT_FOR_CPU_VALUE;
-                        break;
-                    case LinuxValues.STATEDUMP_PROCESS_STATUS_WAIT:
-                        /*
-                         * We have no information on what the process is waiting
-                         * on (unlike a sched_switch for example), so we will
-                         * use the WAIT_UNKNOWN state instead of the "normal"
-                         * WAIT_BLOCKED state.
-                         */
-                        value = StateValues.PROCESS_STATUS_WAIT_UNKNOWN_VALUE;
-                        break;
-                    default:
-                        value = StateValues.PROCESS_STATUS_UNKNOWN_VALUE;
-                    }
-                    ss.modifyAttribute(ts, value, quark);
-                }
-            }
-                break;
-
-            case SCHED_WAKEUP_INDEX:
-            {
-                final int tid = ((Long) event.getContent().getField(fLayout.fieldTid()).getValue()).intValue();
-                final int prio = ((Long) event.getContent().getField(fLayout.fieldPrio()).getValue()).intValue();
-                final int threadNode = ss.getQuarkRelativeAndAdd(getNodeThreads(ss), String.valueOf(tid));
-
-                /*
-                 * The process indicated in the event's payload is now ready to
-                 * run. Assign it to the "wait for cpu" state, but only if it
-                 * was not already running.
-                 */
-                quark = ss.getQuarkRelativeAndAdd(threadNode, Attributes.STATUS);
-                int status = ss.queryOngoingState(quark).unboxInt();
-
-                if (status != StateValues.PROCESS_STATUS_RUN_SYSCALL &&
-                    status != StateValues.PROCESS_STATUS_RUN_USERMODE) {
-                    value = StateValues.PROCESS_STATUS_WAIT_FOR_CPU_VALUE;
-                    ss.modifyAttribute(ts, value, quark);
-                }
-
-                /*
-                 * When a user changes a threads prio (e.g. with pthread_setschedparam),
-                 * it shows in ftrace with a sched_wakeup.
-                 */
-                quark = ss.getQuarkRelativeAndAdd(threadNode, Attributes.PRIO);
-                value = TmfStateValue.newValueInt(prio);
-                ss.modifyAttribute(ts, value, quark);
-            }
-                break;
-
-            default:
-            /* Other event types not covered by the main switch */
-            {
-                if (eventName.startsWith(fLayout.eventSyscallEntryPrefix())
-                        || eventName.startsWith(fLayout.eventCompatSyscallEntryPrefix())) {
-
-                    /* Assign the new system call to the process */
-                    quark = ss.getQuarkRelativeAndAdd(currentThreadNode, Attributes.SYSTEM_CALL);
-                    value = TmfStateValue.newValueString(eventName);
-                    ss.modifyAttribute(ts, value, quark);
-
-                    /* Put the process in system call mode */
-                    quark = ss.getQuarkRelativeAndAdd(currentThreadNode, Attributes.STATUS);
-                    value = StateValues.PROCESS_STATUS_RUN_SYSCALL_VALUE;
-                    ss.modifyAttribute(ts, value, quark);
-
-                    /* Put the CPU in system call (kernel) mode */
-                    quark = ss.getQuarkRelativeAndAdd(currentCPUNode, Attributes.STATUS);
-                    value = StateValues.CPU_STATUS_RUN_SYSCALL_VALUE;
-                    ss.modifyAttribute(ts, value, quark);
-
-                } else if (eventName.startsWith(fLayout.eventSyscallExitPrefix())) {
-
-                    /* Clear the current system call on the process */
-                    quark = ss.getQuarkRelativeAndAdd(currentThreadNode, Attributes.SYSTEM_CALL);
-                    value = TmfStateValue.nullValue();
-                    ss.modifyAttribute(ts, value, quark);
-
-                    /* Put the process' status back to user mode */
-                    quark = ss.getQuarkRelativeAndAdd(currentThreadNode, Attributes.STATUS);
-                    value = StateValues.PROCESS_STATUS_RUN_USERMODE_VALUE;
-                    ss.modifyAttribute(ts, value, quark);
-
-                    /* Put the CPU's status back to user mode */
-                    quark = ss.getQuarkRelativeAndAdd(currentCPUNode, Attributes.STATUS);
-                    value = StateValues.CPU_STATUS_RUN_USERMODE_VALUE;
-                    ss.modifyAttribute(ts, value, quark);
-                }
-
-            }
-                break;
-            } // End of big switch
-
-        } catch (AttributeNotFoundException ae) {
-            /*
-             * This would indicate a problem with the logic of the manager here,
-             * so it shouldn't happen.
-             */
-            ae.printStackTrace();
-
-        } catch (TimeRangeException tre) {
-            /*
-             * This would happen if the events in the trace aren't ordered
-             * chronologically, which should never be the case ...
-             */
-            System.err.println("TimeRangeExcpetion caught in the state system's event manager."); //$NON-NLS-1$
-            System.err.println("Are the events in the trace correctly ordered?"); //$NON-NLS-1$
-            tre.printStackTrace();
-
-        } catch (StateValueTypeException sve) {
-            /*
-             * This would happen if we were trying to push/pop attributes not of
-             * type integer. Which, once again, should never happen.
-             */
-            sve.printStackTrace();
-        }
-    }
-
-    // ------------------------------------------------------------------------
-    // Convenience methods for commonly-used attribute tree locations
-    // ------------------------------------------------------------------------
-
-    private static int getNodeCPUs(ITmfStateSystemBuilder ssb) {
-        return ssb.getQuarkAbsoluteAndAdd(Attributes.CPUS);
-    }
-
-    private static int getNodeThreads(ITmfStateSystemBuilder ssb) {
-        return ssb.getQuarkAbsoluteAndAdd(Attributes.THREADS);
-    }
-
-    private static int getNodeIRQs(ITmfStateSystemBuilder ssb) {
-        return ssb.getQuarkAbsoluteAndAdd(Attributes.RESOURCES, Attributes.IRQS);
-    }
-
-    private static int getNodeSoftIRQs(ITmfStateSystemBuilder ssb) {
-        return ssb.getQuarkAbsoluteAndAdd(Attributes.RESOURCES, Attributes.SOFT_IRQS);
-    }
-
-    // ------------------------------------------------------------------------
-    // Advanced state-setting methods
-    // ------------------------------------------------------------------------
-
-    /**
-     * When we want to set a process back to a "running" state, first check
-     * its current System_call attribute. If there is a system call active, we
-     * put the process back in the syscall state. If not, we put it back in
-     * user mode state.
-     */
-    private static void setProcessToRunning(ITmfStateSystemBuilder ssb, long ts, int currentThreadNode)
-            throws AttributeNotFoundException, TimeRangeException,
-            StateValueTypeException {
-        int quark;
-        ITmfStateValue value;
-
-        quark = ssb.getQuarkRelativeAndAdd(currentThreadNode, Attributes.SYSTEM_CALL);
-        if (ssb.queryOngoingState(quark).isNull()) {
-            /* We were in user mode before the interruption */
-            value = StateValues.PROCESS_STATUS_RUN_USERMODE_VALUE;
-        } else {
-            /* We were previously in kernel mode */
-            value = StateValues.PROCESS_STATUS_RUN_SYSCALL_VALUE;
-        }
-        quark = ssb.getQuarkRelativeAndAdd(currentThreadNode, Attributes.STATUS);
-        ssb.modifyAttribute(ts, value, quark);
-    }
-
-    /**
-     * Similar logic as above, but to set the CPU's status when it's coming out
-     * of an interruption.
-     */
-    private static void cpuExitInterrupt(ITmfStateSystemBuilder ssb, long ts,
-            int currentCpuNode, int currentThreadNode)
-            throws StateValueTypeException, AttributeNotFoundException,
-            TimeRangeException {
-        int quark;
-        ITmfStateValue value;
-
-        quark = ssb.getQuarkRelativeAndAdd(currentCpuNode, Attributes.CURRENT_THREAD);
-        if (ssb.queryOngoingState(quark).unboxInt() > 0) {
-            /* There was a process on the CPU */
-            quark = ssb.getQuarkRelative(currentThreadNode, Attributes.SYSTEM_CALL);
-            if (ssb.queryOngoingState(quark).isNull()) {
-                /* That process was in user mode */
-                value = StateValues.CPU_STATUS_RUN_USERMODE_VALUE;
-            } else {
-                /* That process was in a system call */
-                value = StateValues.CPU_STATUS_RUN_SYSCALL_VALUE;
-            }
-        } else {
-            /* There was no real process scheduled, CPU was idle */
-            value = StateValues.CPU_STATUS_IDLE_VALUE;
-        }
-        quark = ssb.getQuarkRelativeAndAdd(currentCpuNode, Attributes.STATUS);
-        ssb.modifyAttribute(ts, value, quark);
-    }
-}
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/internal/analysis/os/linux/core/kernelanalysis/LinuxValues.java b/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/internal/analysis/os/linux/core/kernelanalysis/LinuxValues.java
deleted file mode 100644 (file)
index 88c15fd..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2015 EfficiOS Inc., Alexandre Montplaisir
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *    Alexandre Montplaisir - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.internal.analysis.os.linux.core.kernelanalysis;
-
-/**
- * Definitions of values used in the Linux kernel code.
- *
- * Instead of using "magic numbers" in state providers, the definitions should
- * be added here first.
- *
- * @author Alexandre Montplaisir
- */
-@SuppressWarnings("javadoc")
-public interface LinuxValues {
-
-    /*
-     * Process states found in scheduler events.
-     *
-     * From include/linux/sched.h
-     *
-     * #define TASK_RUNNING 0
-     * #define TASK_INTERRUPTIBLE 1
-     * #define TASK_UNINTERRUPTIBLE 2
-     * #define __TASK_STOPPED 4
-     * #define __TASK_TRACED 8
-     * #define EXIT_DEAD 16
-     * #define EXIT_ZOMBIE 32
-     * #define EXIT_TRACE (EXIT_ZOMBIE | EXIT_DEAD)
-     * #define TASK_DEAD 64
-     * #define TASK_WAKEKILL 128
-     * #define TASK_WAKING 256
-     * #define TASK_PARKED 512
-     * #define TASK_STATE_MAX 1024
-     */
-    int TASK_STATE_RUNNING = 0;
-    int TASK_STATE_MAX = 1024;
-
-    /*
-     * Process statuses, used in LTTng statedump events.
-     *
-     * This is LTTng-specific, but the statedump are handled at this level, so
-     * it makes sense to add those definitions here.
-     *
-     * Taken from lttng-module's lttng-statedump-impl.c:
-     *
-     * enum lttng_process_status {
-     *     LTTNG_UNNAMED = 0,
-     *     LTTNG_WAIT_FORK = 1,
-     *     LTTNG_WAIT_CPU = 2,
-     *     LTTNG_EXIT = 3,
-     *     LTTNG_ZOMBIE = 4,
-     *     LTTNG_WAIT = 5,
-     *     LTTNG_RUN = 6,
-     *     LTTNG_DEAD = 7,
-     * };
-     */
-    int STATEDUMP_PROCESS_STATUS_WAIT_CPU = 2;
-    int STATEDUMP_PROCESS_STATUS_WAIT = 5;
-}
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/internal/analysis/os/linux/core/kernelanalysis/package-info.java b/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/internal/analysis/os/linux/core/kernelanalysis/package-info.java
deleted file mode 100644 (file)
index 685c8f2..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2015 Ericsson
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *    Ericsson - Initial API and implementation
- *******************************************************************************/
-
-@org.eclipse.jdt.annotation.NonNullByDefault
-package org.eclipse.tracecompass.internal.analysis.os.linux.core.kernelanalysis;
diff --git a/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/internal/analysis/os/linux/core/package-info.java b/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/internal/analysis/os/linux/core/package-info.java
deleted file mode 100644 (file)
index c7ac973..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2015 Ericsson
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *    Ericsson - Initial API and implementation
- *******************************************************************************/
-
-@org.eclipse.jdt.annotation.NonNullByDefault
-package org.eclipse.tracecompass.internal.analysis.os.linux.core;
diff --git a/org.eclipse.tracecompass.analysis.os.linux.ui/.classpath b/org.eclipse.tracecompass.analysis.os.linux.ui/.classpath
deleted file mode 100644 (file)
index 098194c..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
-       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
-       <classpathentry kind="src" path="src"/>
-       <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/org.eclipse.tracecompass.analysis.os.linux.ui/.project b/org.eclipse.tracecompass.analysis.os.linux.ui/.project
deleted file mode 100644 (file)
index 043ad99..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-       <name>org.eclipse.tracecompass.analysis.os.linux.ui</name>
-       <comment></comment>
-       <projects>
-       </projects>
-       <buildSpec>
-               <buildCommand>
-                       <name>org.eclipse.jdt.core.javabuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.ManifestBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.SchemaBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-       </buildSpec>
-       <natures>
-               <nature>org.eclipse.pde.PluginNature</nature>
-               <nature>org.eclipse.jdt.core.javanature</nature>
-               <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
-       </natures>
-</projectDescription>
diff --git a/org.eclipse.tracecompass.analysis.os.linux.ui/.settings/org.eclipse.core.resources.prefs b/org.eclipse.tracecompass.analysis.os.linux.ui/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644 (file)
index 99f26c0..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-encoding/<project>=UTF-8
diff --git a/org.eclipse.tracecompass.analysis.os.linux.ui/.settings/org.eclipse.core.runtime.prefs b/org.eclipse.tracecompass.analysis.os.linux.ui/.settings/org.eclipse.core.runtime.prefs
deleted file mode 100644 (file)
index 5a0ad22..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-line.separator=\n
diff --git a/org.eclipse.tracecompass.analysis.os.linux.ui/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.tracecompass.analysis.os.linux.ui/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644 (file)
index a2b5e6b..0000000
+++ /dev/null
@@ -1,405 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.codeComplete.argumentPrefixes=
-org.eclipse.jdt.core.codeComplete.argumentSuffixes=
-org.eclipse.jdt.core.codeComplete.fieldPrefixes=f
-org.eclipse.jdt.core.codeComplete.fieldSuffixes=
-org.eclipse.jdt.core.codeComplete.localPrefixes=
-org.eclipse.jdt.core.codeComplete.localSuffixes=
-org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
-org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
-org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes=
-org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes=
-org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled
-org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
-org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
-org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
-org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
-org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
-org.eclipse.jdt.core.compiler.problem.deadCode=error
-org.eclipse.jdt.core.compiler.problem.deprecation=error
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=error
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=error
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=error
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=error
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
-org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=error
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
-org.eclipse.jdt.core.compiler.problem.missingDefaultCase=error
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error
-org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=enabled
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
-org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=error
-org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
-org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=error
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
-org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=error
-org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=error
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=error
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
-org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error
-org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=error
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=disabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=error
-org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameter=error
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=error
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=error
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
-org.eclipse.jdt.core.compiler.source=1.7
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=0
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=true
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
-org.eclipse.jdt.core.formatter.comment.format_line_comments=true
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
-org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
-org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
-org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.join_lines_in_comments=true
-org.eclipse.jdt.core.formatter.join_wrapped_lines=false
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=250
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
-org.eclipse.jdt.core.formatter.tabulation.char=space
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_on_off_tags=false
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
-org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/org.eclipse.tracecompass.analysis.os.linux.ui/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.tracecompass.analysis.os.linux.ui/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644 (file)
index 232a3fd..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_tmf-style
-formatter_settings_version=12
-org.eclipse.jdt.ui.exception.name=e
-org.eclipse.jdt.ui.gettersetter.use.is=true
-org.eclipse.jdt.ui.keywordthis=false
-org.eclipse.jdt.ui.overrideannotation=true
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=false
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_methods=false
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_missing_override_annotations_interface_methods=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.correct_indentation=false
-sp_cleanup.format_source_code=false
-sp_cleanup.format_source_code_changes_only=false
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_type_abstract_if_missing_method=false
-sp_cleanup.make_variable_declarations_final=false
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=true
-sp_cleanup.organize_imports=false
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=true
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=false
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=true
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/org.eclipse.tracecompass.analysis.os.linux.ui/.settings/org.eclipse.pde.api.tools.prefs b/org.eclipse.tracecompass.analysis.os.linux.ui/.settings/org.eclipse.pde.api.tools.prefs
deleted file mode 100644 (file)
index acc3abd..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
-ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
-API_USE_SCAN_FIELD_SEVERITY=Error
-API_USE_SCAN_METHOD_SEVERITY=Error
-API_USE_SCAN_TYPE_SEVERITY=Error
-CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
-CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
-CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
-CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
-CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
-CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
-CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
-ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
-ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
-ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
-FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
-FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
-FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
-FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
-FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
-FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
-FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
-ILLEGAL_EXTEND=Warning
-ILLEGAL_IMPLEMENT=Warning
-ILLEGAL_INSTANTIATE=Warning
-ILLEGAL_OVERRIDE=Warning
-ILLEGAL_REFERENCE=Warning
-INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
-INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
-INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
-INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-INVALID_JAVADOC_TAG=Warning
-INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Warning
-LEAK_EXTEND=Warning
-LEAK_FIELD_DECL=Warning
-LEAK_IMPLEMENT=Warning
-LEAK_METHOD_PARAM=Warning
-LEAK_METHOD_RETURN_TYPE=Warning
-METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
-METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
-METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
-METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
-METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-MISSING_EE_DESCRIPTIONS=Ignore
-TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
-UNUSED_PROBLEM_FILTERS=Warning
-automatically_removed_unused_problem_filters=false
-eclipse.preferences.version=1
-incompatible_api_component_version=Error
-incompatible_api_component_version_include_major_without_breaking_change=Disabled
-incompatible_api_component_version_include_minor_without_api_change=Disabled
-invalid_since_tag_version=Error
-malformed_since_tag=Error
-missing_since_tag=Error
-report_api_breakage_when_major_version_incremented=Disabled
-report_resolution_errors_api_component=Warning
diff --git a/org.eclipse.tracecompass.analysis.os.linux.ui/.settings/org.eclipse.pde.prefs b/org.eclipse.tracecompass.analysis.os.linux.ui/.settings/org.eclipse.pde.prefs
deleted file mode 100644 (file)
index d92b94f..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-compilers.f.unresolved-features=1
-compilers.f.unresolved-plugins=1
-compilers.incompatible-environment=1
-compilers.p.build=1
-compilers.p.build.bin.includes=1
-compilers.p.build.encodings=2
-compilers.p.build.java.compiler=2
-compilers.p.build.java.compliance=1
-compilers.p.build.missing.output=2
-compilers.p.build.output.library=1
-compilers.p.build.source.library=1
-compilers.p.build.src.includes=1
-compilers.p.deprecated=1
-compilers.p.discouraged-class=1
-compilers.p.internal=1
-compilers.p.missing-packages=1
-compilers.p.missing-version-export-package=2
-compilers.p.missing-version-import-package=2
-compilers.p.missing-version-require-bundle=2
-compilers.p.no-required-att=0
-compilers.p.not-externalized-att=1
-compilers.p.unknown-attribute=1
-compilers.p.unknown-class=1
-compilers.p.unknown-element=1
-compilers.p.unknown-identifier=1
-compilers.p.unknown-resource=1
-compilers.p.unresolved-ex-points=0
-compilers.p.unresolved-import=0
-compilers.s.create-docs=false
-compilers.s.doc-folder=doc
-compilers.s.open-tags=1
-eclipse.preferences.version=1
diff --git a/org.eclipse.tracecompass.analysis.os.linux.ui/META-INF/MANIFEST.MF b/org.eclipse.tracecompass.analysis.os.linux.ui/META-INF/MANIFEST.MF
deleted file mode 100644 (file)
index 0748fa8..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %Bundle-Name
-Bundle-Vendor: %Bundle-Vendor
-Bundle-Version: 1.0.0.qualifier
-Bundle-Localization: plugin
-Bundle-SymbolicName: org.eclipse.tracecompass.analysis.os.linux.ui;singleton:=true
-Bundle-Activator: org.eclipse.tracecompass.internal.analysis.os.linux.ui.Activator
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
-Require-Bundle: org.eclipse.ui,
- org.eclipse.ui.ide,
- org.eclipse.core.resources,
- org.eclipse.core.runtime,
- org.eclipse.tracecompass.common.core,
- org.eclipse.tracecompass.analysis.os.linux.core,
- org.eclipse.tracecompass.tmf.core,
- org.eclipse.tracecompass.tmf.ui,
- org.eclipse.tracecompass.tmf.ctf.core
-Import-Package: com.google.common.collect
-Export-Package: org.eclipse.tracecompass.analysis.os.linux.ui.views.controlflow,
- org.eclipse.tracecompass.analysis.os.linux.ui.views.cpuusage,
- org.eclipse.tracecompass.analysis.os.linux.ui.views.resources,
- org.eclipse.tracecompass.internal.analysis.os.linux.ui;x-internal:=true
diff --git a/org.eclipse.tracecompass.analysis.os.linux.ui/about.html b/org.eclipse.tracecompass.analysis.os.linux.ui/about.html
deleted file mode 100644 (file)
index c258ef5..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-<p>June 5, 2006</p>    
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;).  Unless otherwise 
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;).  A copy of the EPL is available 
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is 
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content.  Check the Redistributor's license that was 
-provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-</body>
-</html>
\ No newline at end of file
diff --git a/org.eclipse.tracecompass.analysis.os.linux.ui/build.properties b/org.eclipse.tracecompass.analysis.os.linux.ui/build.properties
deleted file mode 100644 (file)
index 9e536e8..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-###############################################################################
-# Copyright (c) 2015 Ericsson
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     Ericsson - Initial API and implementation
-###############################################################################
-
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
-               .,\
-               plugin.xml,\
-               icons/,\
-               about.html,\
-               plugin.properties
-src.includes = about.html
-additional.bundles = org.eclipse.jdt.annotation
-jars.extra.classpath = platform:/plugin/org.eclipse.jdt.annotation
\ No newline at end of file
diff --git a/org.eclipse.tracecompass.analysis.os.linux.ui/icons/eview16/control_flow_view.gif b/org.eclipse.tracecompass.analysis.os.linux.ui/icons/eview16/control_flow_view.gif
deleted file mode 100644 (file)
index 3971b50..0000000
Binary files a/org.eclipse.tracecompass.analysis.os.linux.ui/icons/eview16/control_flow_view.gif and /dev/null differ
diff --git a/org.eclipse.tracecompass.analysis.os.linux.ui/icons/eview16/resources_view.gif b/org.eclipse.tracecompass.analysis.os.linux.ui/icons/eview16/resources_view.gif
deleted file mode 100644 (file)
index 2344861..0000000
Binary files a/org.eclipse.tracecompass.analysis.os.linux.ui/icons/eview16/resources_view.gif and /dev/null differ
diff --git a/org.eclipse.tracecompass.analysis.os.linux.ui/icons/obj16/garland16.png b/org.eclipse.tracecompass.analysis.os.linux.ui/icons/obj16/garland16.png
deleted file mode 100644 (file)
index 74f9751..0000000
Binary files a/org.eclipse.tracecompass.analysis.os.linux.ui/icons/obj16/garland16.png and /dev/null differ
diff --git a/org.eclipse.tracecompass.analysis.os.linux.ui/plugin.properties b/org.eclipse.tracecompass.analysis.os.linux.ui/plugin.properties
deleted file mode 100644 (file)
index 724b0f2..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-###############################################################################
-# Copyright (c) 2015 Ericsson
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     Ericsson - Initial API and implementation
-###############################################################################
-
-Bundle-Vendor = Eclipse Trace Compass
-Bundle-Name = Trace Compass Linux Kernel Analysis UI Plug-in
-
-kernel.perspective.name = LTTng Kernel
-
-controlflow.view.name = Control Flow
-resources.view.name = Resources
-cpuusage.view.name = CPU Usage
diff --git a/org.eclipse.tracecompass.analysis.os.linux.ui/plugin.xml b/org.eclipse.tracecompass.analysis.os.linux.ui/plugin.xml
deleted file mode 100644 (file)
index 626f274..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
-   <extension
-         point="org.eclipse.ui.views">
-      <view
-            allowMultiple="false"
-            category="org.eclipse.linuxtools.lttng2.ui.views.category"
-            class="org.eclipse.tracecompass.analysis.os.linux.ui.views.controlflow.ControlFlowView"
-            icon="icons/eview16/control_flow_view.gif"
-            id="org.eclipse.tracecompass.analysis.os.linux.views.controlflow"
-            name="%controlflow.view.name"
-            restorable="true">
-      </view>
-      <view
-            allowMultiple="false"
-            category="org.eclipse.linuxtools.lttng2.ui.views.category"
-            class="org.eclipse.tracecompass.analysis.os.linux.ui.views.resources.ResourcesView"
-            icon="icons/eview16/resources_view.gif"
-            id="org.eclipse.tracecompass.analysis.os.linux.views.resources"
-            name="%resources.view.name"
-            restorable="true">
-      </view>
-      <view
-            allowMultiple="false"
-            category="org.eclipse.linuxtools.lttng2.ui.views.category"
-            class="org.eclipse.tracecompass.analysis.os.linux.ui.views.cpuusage.CpuUsageView"
-            id="org.eclipse.tracecompass.analysis.os.linux.views.cpuusage"
-            name="%cpuusage.view.name"
-            restorable="true">
-      </view>
-   </extension>
-   <extension
-         point="org.eclipse.linuxtools.tmf.core.analysis">
-      <output
-            class="org.eclipse.tracecompass.tmf.ui.analysis.TmfAnalysisViewOutput"
-            id="org.eclipse.tracecompass.analysis.os.linux.views.controlflow">
-         <analysisModuleClass
-               class="org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelAnalysisModule">
-         </analysisModuleClass>
-      </output>
-      <output
-            class="org.eclipse.tracecompass.tmf.ui.analysis.TmfAnalysisViewOutput"
-            id="org.eclipse.tracecompass.analysis.os.linux.views.resources">
-         <analysisModuleClass
-               class="org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelAnalysisModule">
-         </analysisModuleClass>
-      </output>
-      <output
-            class="org.eclipse.tracecompass.tmf.ui.analysis.TmfAnalysisViewOutput"
-            id="org.eclipse.tracecompass.analysis.os.linux.views.cpuusage">
-         <analysisModuleClass
-               class="org.eclipse.tracecompass.analysis.os.linux.core.cpuusage.KernelCpuUsageAnalysis">
-         </analysisModuleClass>
-      </output>
-   </extension>
-</plugin>
diff --git a/org.eclipse.tracecompass.analysis.os.linux.ui/pom.xml b/org.eclipse.tracecompass.analysis.os.linux.ui/pom.xml
deleted file mode 100644 (file)
index 50cd537..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-   Copyright (C) 2011, Red Hat, Inc.
-
-   All rights reserved. This program and the accompanying materials
-   are made available under the terms of the Eclipse Public License v1.0
-   which accompanies this distribution, and is available at
-   http://www.eclipse.org/legal/epl-v10.html
--->
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-    <artifactId>org.eclipse.tracecompass</artifactId>
-    <groupId>org.eclipse.tracecompass</groupId>
-    <version>1.0.0-SNAPSHOT</version>
-  </parent>
-
-  <artifactId>org.eclipse.tracecompass.analysis.os.linux.ui</artifactId>
-  <groupId>org.eclipse.tracecompass</groupId>
-  <version>1.0.0-SNAPSHOT</version>
-  <packaging>eclipse-plugin</packaging>
-
-  <name>Trace Compass Linux Kernel Analysis UI Plug-in</name>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.eclipse.tycho</groupId>
-        <artifactId>tycho-source-plugin</artifactId>
-      </plugin>
-    </plugins>
-  </build>
-
-</project>
diff --git a/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/controlflow/ControlFlowCheckActiveProvider.java b/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/controlflow/ControlFlowCheckActiveProvider.java
deleted file mode 100644 (file)
index 2a9b420..0000000
+++ /dev/null
@@ -1,130 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2015 Keba AG
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Christian Mansky - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.analysis.os.linux.ui.views.controlflow;
-
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.Attributes;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelAnalysisModule;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.StateValues;
-import org.eclipse.tracecompass.statesystem.core.ITmfStateSystem;
-import org.eclipse.tracecompass.statesystem.core.exceptions.AttributeNotFoundException;
-import org.eclipse.tracecompass.statesystem.core.exceptions.StateSystemDisposedException;
-import org.eclipse.tracecompass.statesystem.core.interval.ITmfStateInterval;
-import org.eclipse.tracecompass.tmf.core.statesystem.TmfStateSystemAnalysisModule;
-import org.eclipse.tracecompass.tmf.core.timestamp.TmfTimeRange;
-import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
-import org.eclipse.tracecompass.tmf.core.trace.TmfTraceContext;
-import org.eclipse.tracecompass.tmf.core.trace.TmfTraceManager;
-import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.dialogs.ITimeGraphEntryActiveProvider;
-import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.model.ITimeGraphEntry;
-
-/**
- * Provides Functionality for check Active / uncheck inactive
- *
- * @noinstantiate This class is not intended to be instantiated by clients.
- * @noextend This class is not intended to be subclassed by clients.
- * @since 1.0
- */
-public class ControlFlowCheckActiveProvider implements ITimeGraphEntryActiveProvider {
-
-    String fLabel;
-    String fTooltip;
-
-    /**
-     * @param label
-     *            Button label
-     * @param tooltip
-     *            Button tooltip
-     */
-    public ControlFlowCheckActiveProvider(String label, String tooltip) {
-        fLabel = label;
-        fTooltip = tooltip;
-    }
-
-    @Override
-    public String getLabel() {
-        return fLabel;
-    }
-
-    @Override
-    public String getTooltip() {
-        return fTooltip;
-    }
-
-    @Override
-    public boolean isActive(ITimeGraphEntry element) {
-        if (element instanceof ControlFlowEntry) {
-            ControlFlowEntry cfe = (ControlFlowEntry) element;
-
-            TmfTraceManager traceManager = TmfTraceManager.getInstance();
-            TmfTraceContext traceContext = traceManager.getCurrentTraceContext();
-            TmfTimeRange winRange = traceContext.getWindowRange();
-            TmfTimeRange selRange = traceContext.getSelectionRange();
-
-            /* Take precedence of selection over window range. */
-            long beginTS = selRange.getStartTime().getValue();
-            long endTS = selRange.getEndTime().getValue();
-
-            /* No selection, take window range */
-            if (beginTS == endTS) {
-                beginTS = winRange.getStartTime().getValue();
-                endTS = winRange.getEndTime().getValue();
-            }
-
-            ITmfTrace trace = cfe.getTrace();
-            ITmfStateSystem ssq = TmfStateSystemAnalysisModule.getStateSystem(trace, KernelAnalysisModule.ID);
-            if (ssq != null) {
-                beginTS = Math.max(beginTS, ssq.getStartTime());
-                endTS = Math.min(endTS, ssq.getCurrentEndTime());
-                if (beginTS > endTS) {
-                    return false;
-                }
-                try {
-                    int statusQuark = ssq.getQuarkRelative(cfe.getThreadQuark(), Attributes.STATUS);
-
-                    /* Get the initial state at beginTS */
-                    ITmfStateInterval currentInterval = ssq.querySingleState(beginTS, statusQuark);
-                    if (isIntervalInStateActive(currentInterval)) {
-                        return true;
-                    }
-
-                    /* Get the following state changes */
-                    long ts = currentInterval.getEndTime();
-                    while (ts != -1 && ts < endTS) {
-                        ts++; /* To "jump over" to the next state in the history */
-                        currentInterval = ssq.querySingleState(ts, statusQuark);
-                        if (isIntervalInStateActive(currentInterval)) {
-                            return true;
-                        }
-                        ts = currentInterval.getEndTime();
-                    }
-                } catch (AttributeNotFoundException | StateSystemDisposedException e) {
-                    /* Ignore ... */
-                }
-            }
-        }
-
-        return false;
-    }
-
-    private static boolean isIntervalInStateActive (ITmfStateInterval ival) {
-        int value = ival.getStateValue().unboxInt();
-        /* An entry is only active when running */
-        if (value == StateValues.PROCESS_STATUS_RUN_USERMODE || value == StateValues.PROCESS_STATUS_RUN_SYSCALL ||
-                value == StateValues.PROCESS_STATUS_INTERRUPTED) {
-            return true;
-        }
-
-        return false;
-    }
-
-}
diff --git a/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/controlflow/ControlFlowEntry.java b/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/controlflow/ControlFlowEntry.java
deleted file mode 100644 (file)
index 259452f..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012, 2015 Ericsson, Ã‰cole Polytechnique de Montréal
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Patrick Tasse - Initial API and implementation
- *   Geneviève Bastien - Move code to provide base classes for time graph view
- *******************************************************************************/
-
-package org.eclipse.tracecompass.analysis.os.linux.ui.views.controlflow;
-
-import org.eclipse.jdt.annotation.NonNull;
-import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
-import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.model.TimeGraphEntry;
-
-/**
- * An entry in the Control Flow view
- */
-public class ControlFlowEntry extends TimeGraphEntry {
-
-    private final @NonNull ITmfTrace fTrace;
-    private final int fThreadId;
-    private final int fParentThreadId;
-    private final int fThreadQuark;
-
-    /**
-     * Constructor
-     *
-     * @param quark
-     *            The attribute quark matching the thread
-     * @param trace
-     *            The trace on which we are working
-     * @param execName
-     *            The exec_name of this entry
-     * @param threadId
-     *            The TID of the thread
-     * @param parentThreadId
-     *            the Parent_TID of this thread
-     * @param startTime
-     *            The start time of this process's lifetime
-     * @param endTime
-     *            The end time of this process
-     */
-    public ControlFlowEntry(int quark, @NonNull ITmfTrace trace, String execName, int threadId, int parentThreadId, long startTime, long endTime) {
-        super(execName, startTime, endTime);
-        fTrace = trace;
-        fThreadId = threadId;
-        fParentThreadId = parentThreadId;
-        fThreadQuark = quark;
-    }
-
-    /**
-     * Get this entry's thread ID
-     *
-     * @return The TID
-     */
-    public int getThreadId() {
-        return fThreadId;
-    }
-
-    /**
-     * Get the entry's trace
-     *
-     * @return the entry's trace
-     */
-    public @NonNull ITmfTrace getTrace() {
-        return fTrace;
-    }
-
-    /**
-     * Get this thread's parent TID
-     *
-     * @return The "PTID"
-     */
-    public int getParentThreadId() {
-        return fParentThreadId;
-    }
-
-    /**
-     * Get the quark of the attribute matching this thread's TID
-     *
-     * @return The quark
-     */
-    public int getThreadQuark() {
-        return fThreadQuark;
-    }
-
-    @Override
-    public String toString() {
-        return getClass().getSimpleName() + '(' + getName() + '[' + fThreadId + "])"; //$NON-NLS-1$
-    }
-}
diff --git a/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/controlflow/ControlFlowPresentationProvider.java b/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/controlflow/ControlFlowPresentationProvider.java
deleted file mode 100644 (file)
index f41911e..0000000
+++ /dev/null
@@ -1,238 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012, 2015 Ericsson, Ã‰cole Polytechnique de Montréal
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Patrick Tasse - Initial API and implementation
- *   Geneviève Bastien - Move code to provide base classes for time graph view
- *******************************************************************************/
-
-package org.eclipse.tracecompass.analysis.os.linux.ui.views.controlflow;
-
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.Attributes;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelAnalysisModule;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.StateValues;
-import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelAnalysisEventLayout;
-import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelTrace;
-import org.eclipse.tracecompass.internal.analysis.os.linux.ui.Activator;
-import org.eclipse.tracecompass.internal.analysis.os.linux.ui.Messages;
-import org.eclipse.tracecompass.statesystem.core.ITmfStateSystem;
-import org.eclipse.tracecompass.statesystem.core.exceptions.AttributeNotFoundException;
-import org.eclipse.tracecompass.statesystem.core.exceptions.StateSystemDisposedException;
-import org.eclipse.tracecompass.statesystem.core.exceptions.StateValueTypeException;
-import org.eclipse.tracecompass.statesystem.core.exceptions.TimeRangeException;
-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.widgets.timegraph.StateItem;
-import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.TimeGraphPresentationProvider;
-import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.model.ITimeEvent;
-import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.model.TimeEvent;
-import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.widgets.Utils;
-
-/**
- * Presentation provider for the control flow view
- */
-public class ControlFlowPresentationProvider extends TimeGraphPresentationProvider {
-
-    private enum State {
-        UNKNOWN        (new RGB(100, 100, 100)),
-        WAIT_UNKNOWN   (new RGB(200, 200, 200)),
-        WAIT_BLOCKED   (new RGB(200, 200, 0)),
-        WAIT_FOR_CPU   (new RGB(200, 100, 0)),
-        USERMODE       (new RGB(0,   200, 0)),
-        SYSCALL        (new RGB(0,     0, 200)),
-        INTERRUPTED    (new RGB(200,   0, 100));
-
-        public final RGB rgb;
-
-        private State(RGB rgb) {
-            this.rgb = rgb;
-        }
-
-    }
-
-    /**
-     * Average width of the characters used for state labels. Is computed in the
-     * first call to postDrawEvent(). Is null before that.
-     */
-    private Integer fAverageCharacterWidth = null;
-
-    /**
-     * Default constructor
-     */
-    public ControlFlowPresentationProvider() {
-        super(Messages.ControlFlowView_stateTypeName);
-    }
-
-    private static State[] getStateValues() {
-        return State.values();
-    }
-
-    @Override
-    public StateItem[] getStateTable() {
-        State[] states = getStateValues();
-        StateItem[] stateTable = new StateItem[states.length];
-        for (int i = 0; i < stateTable.length; i++) {
-            State state = states[i];
-            stateTable[i] = new StateItem(state.rgb, state.toString());
-        }
-        return stateTable;
-    }
-
-    @Override
-    public int getStateTableIndex(ITimeEvent event) {
-        if (event instanceof TimeEvent && ((TimeEvent) event).hasValue()) {
-            int status = ((TimeEvent) event).getValue();
-            return getMatchingState(status).ordinal();
-        }
-        return TRANSPARENT;
-    }
-
-    @Override
-    public String getEventName(ITimeEvent event) {
-        if (event instanceof TimeEvent) {
-            TimeEvent ev = (TimeEvent) event;
-            if (ev.hasValue()) {
-                return getMatchingState(ev.getValue()).toString();
-            }
-        }
-        return Messages.ControlFlowView_multipleStates;
-    }
-
-    private static State getMatchingState(int status) {
-        switch (status) {
-        case StateValues.PROCESS_STATUS_WAIT_UNKNOWN:
-            return State.WAIT_UNKNOWN;
-        case StateValues.PROCESS_STATUS_WAIT_BLOCKED:
-            return State.WAIT_BLOCKED;
-        case StateValues.PROCESS_STATUS_WAIT_FOR_CPU:
-            return State.WAIT_FOR_CPU;
-        case StateValues.PROCESS_STATUS_RUN_USERMODE:
-            return State.USERMODE;
-        case StateValues.PROCESS_STATUS_RUN_SYSCALL:
-            return State.SYSCALL;
-        case StateValues.PROCESS_STATUS_INTERRUPTED:
-            return State.INTERRUPTED;
-        default:
-            return State.UNKNOWN;
-        }
-    }
-
-    @Override
-    public Map<String, String> getEventHoverToolTipInfo(ITimeEvent event) {
-        Map<String, String> retMap = new LinkedHashMap<>();
-        if (!(event instanceof TimeEvent) || !((TimeEvent) event).hasValue() ||
-                !(event.getEntry() instanceof ControlFlowEntry)) {
-            return retMap;
-        }
-        ControlFlowEntry entry = (ControlFlowEntry) event.getEntry();
-        ITmfStateSystem ssq = TmfStateSystemAnalysisModule.getStateSystem(entry.getTrace(), KernelAnalysisModule.ID);
-        if (ssq == null) {
-            return retMap;
-        }
-        int tid = entry.getThreadId();
-
-        try {
-            // Find every CPU first, then get the current thread
-            int cpusQuark = ssq.getQuarkAbsolute(Attributes.CPUS);
-            List<Integer> cpuQuarks = ssq.getSubAttributes(cpusQuark, false);
-            for (Integer cpuQuark : cpuQuarks) {
-                int currentThreadQuark = ssq.getQuarkRelative(cpuQuark, Attributes.CURRENT_THREAD);
-                ITmfStateInterval interval = ssq.querySingleState(event.getTime(), currentThreadQuark);
-                if (!interval.getStateValue().isNull()) {
-                    ITmfStateValue state = interval.getStateValue();
-                    int currentThreadId = state.unboxInt();
-                    if (tid == currentThreadId) {
-                        retMap.put(Messages.ControlFlowView_attributeCpuName, ssq.getAttributeName(cpuQuark));
-                        break;
-                    }
-                }
-            }
-
-        } catch (AttributeNotFoundException | TimeRangeException | StateValueTypeException e) {
-            Activator.getDefault().logError("Error in ControlFlowPresentationProvider", e); //$NON-NLS-1$
-        } catch (StateSystemDisposedException e) {
-            /* Ignored */
-        }
-        int status = ((TimeEvent) event).getValue();
-        if (status == StateValues.PROCESS_STATUS_RUN_SYSCALL) {
-            try {
-                int syscallQuark = ssq.getQuarkRelative(entry.getThreadQuark(), Attributes.SYSTEM_CALL);
-                ITmfStateInterval value = ssq.querySingleState(event.getTime(), syscallQuark);
-                if (!value.getStateValue().isNull()) {
-                    ITmfStateValue state = value.getStateValue();
-                    retMap.put(Messages.ControlFlowView_attributeSyscallName, state.toString());
-                }
-
-            } catch (AttributeNotFoundException | TimeRangeException e) {
-                Activator.getDefault().logError("Error in ControlFlowPresentationProvider", e); //$NON-NLS-1$
-            } catch (StateSystemDisposedException e) {
-                /* Ignored */
-            }
-        }
-
-        return retMap;
-    }
-
-    @Override
-    public void postDrawEvent(ITimeEvent event, Rectangle bounds, GC gc) {
-        if (fAverageCharacterWidth == null) {
-            fAverageCharacterWidth = gc.getFontMetrics().getAverageCharWidth();
-        }
-        if (bounds.width <= fAverageCharacterWidth) {
-            return;
-        }
-        if (!(event instanceof TimeEvent)) {
-            return;
-        }
-        ControlFlowEntry entry = (ControlFlowEntry) event.getEntry();
-        ITmfStateSystem ss = TmfStateSystemAnalysisModule.getStateSystem(entry.getTrace(), KernelAnalysisModule.ID);
-        if (ss == null) {
-            return;
-        }
-        int status = ((TimeEvent) event).getValue();
-
-        if (status != StateValues.PROCESS_STATUS_RUN_SYSCALL) {
-            return;
-        }
-        try {
-            int syscallQuark = ss.getQuarkRelative(entry.getThreadQuark(), Attributes.SYSTEM_CALL);
-            ITmfStateInterval value = ss.querySingleState(event.getTime(), syscallQuark);
-            if (!value.getStateValue().isNull()) {
-                ITmfStateValue state = value.getStateValue();
-                gc.setForeground(gc.getDevice().getSystemColor(SWT.COLOR_WHITE));
-
-                /*
-                 * Remove the "sys_" or "syscall_entry_" or similar from what we
-                 * draw in the rectangle. This depends on the trace's event layout.
-                 */
-                int beginIndex = 0;
-                ITmfTrace trace = entry.getTrace();
-                if (trace instanceof IKernelTrace) {
-                    IKernelAnalysisEventLayout layout = ((IKernelTrace) trace).getKernelEventLayout();
-                    beginIndex = layout.eventSyscallEntryPrefix().length();
-                }
-
-                Utils.drawText(gc, state.toString().substring(beginIndex), bounds.x, bounds.y - 2, bounds.width, true, true);
-            }
-        } catch (AttributeNotFoundException | TimeRangeException e) {
-            Activator.getDefault().logError("Error in ControlFlowPresentationProvider", e); //$NON-NLS-1$
-        } catch (StateSystemDisposedException e) {
-            /* Ignored */
-        }
-    }
-}
diff --git a/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/controlflow/ControlFlowView.java b/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/controlflow/ControlFlowView.java
deleted file mode 100644 (file)
index 041ea93..0000000
+++ /dev/null
@@ -1,610 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012, 2015 Ericsson, Ã‰cole Polytechnique de Montréal and others.
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Patrick Tasse - Initial API and implementation
- *   Geneviève Bastien - Move code to provide base classes for time graph view
- *   Christian Mansky - Add check active / uncheck inactive buttons
- *******************************************************************************/
-
-package org.eclipse.tracecompass.analysis.os.linux.ui.views.controlflow;
-
-import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
-
-import java.util.ArrayList;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jdt.annotation.NonNull;
-import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.Attributes;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelAnalysisModule;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelThreadInformationProvider;
-import org.eclipse.tracecompass.internal.analysis.os.linux.ui.Activator;
-import org.eclipse.tracecompass.internal.analysis.os.linux.ui.Messages;
-import org.eclipse.tracecompass.statesystem.core.ITmfStateSystem;
-import org.eclipse.tracecompass.statesystem.core.StateSystemUtils;
-import org.eclipse.tracecompass.statesystem.core.exceptions.AttributeNotFoundException;
-import org.eclipse.tracecompass.statesystem.core.exceptions.StateSystemDisposedException;
-import org.eclipse.tracecompass.statesystem.core.exceptions.StateValueTypeException;
-import org.eclipse.tracecompass.statesystem.core.exceptions.TimeRangeException;
-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.core.trace.TmfTraceManager;
-import org.eclipse.tracecompass.tmf.core.trace.TmfTraceUtils;
-import org.eclipse.tracecompass.tmf.ui.views.timegraph.AbstractTimeGraphView;
-import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.model.ILinkEvent;
-import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.model.ITimeEvent;
-import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.model.ITimeGraphEntry;
-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.model.TimeLinkEvent;
-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;
-
-/**
- * The Control Flow view main object
- *
- */
-public class ControlFlowView extends AbstractTimeGraphView {
-
-    // ------------------------------------------------------------------------
-    // Constants
-    // ------------------------------------------------------------------------
-
-    /**
-     * View ID.
-     */
-    public static final String ID = "org.eclipse.tracecompass.analysis.os.linux.views.controlflow"; //$NON-NLS-1$
-
-    private static final String PROCESS_COLUMN = Messages.ControlFlowView_processColumn;
-    private static final String TID_COLUMN = Messages.ControlFlowView_tidColumn;
-    private static final String PTID_COLUMN = Messages.ControlFlowView_ptidColumn;
-    private static final String BIRTH_TIME_COLUMN = Messages.ControlFlowView_birthTimeColumn;
-    private static final String TRACE_COLUMN = Messages.ControlFlowView_traceColumn;
-
-    private static final String[] COLUMN_NAMES = new String[] {
-            PROCESS_COLUMN,
-            TID_COLUMN,
-            PTID_COLUMN,
-            BIRTH_TIME_COLUMN,
-            TRACE_COLUMN
-    };
-
-    private static final String[] FILTER_COLUMN_NAMES = new String[] {
-            PROCESS_COLUMN,
-            TID_COLUMN
-    };
-
-    // Timeout between updates in the build thread in ms
-    private static final long BUILD_UPDATE_TIMEOUT = 500;
-
-    // ------------------------------------------------------------------------
-    // Constructors
-    // ------------------------------------------------------------------------
-
-    /**
-     * Constructor
-     */
-    public ControlFlowView() {
-        super(ID, new ControlFlowPresentationProvider());
-        setTreeColumns(COLUMN_NAMES);
-        setTreeLabelProvider(new ControlFlowTreeLabelProvider());
-        setFilterColumns(FILTER_COLUMN_NAMES);
-        setFilterLabelProvider(new ControlFlowFilterLabelProvider());
-        setEntryComparator(new ControlFlowEntryComparator());
-    }
-
-    @Override
-    public void createPartControl(Composite parent) {
-        super.createPartControl(parent);
-        // add "Check active" Button to TimeGraphFilterDialog
-        super.getTimeGraphCombo().addTimeGraphFilterCheckActiveButton(
-                new ControlFlowCheckActiveProvider(Messages.ControlFlowView_checkActiveLabel, Messages.ControlFlowView_checkActiveToolTip));
-        // add "Uncheck inactive" Button to TimeGraphFilterDialog
-        super.getTimeGraphCombo().addTimeGraphFilterUncheckInactiveButton(
-                new ControlFlowCheckActiveProvider(Messages.ControlFlowView_uncheckInactiveLabel, Messages.ControlFlowView_uncheckInactiveToolTip));
-    }
-
-    @Override
-    protected void fillLocalToolBar(IToolBarManager manager) {
-        super.fillLocalToolBar(manager);
-        IDialogSettings settings = Activator.getDefault().getDialogSettings();
-        IDialogSettings section = settings.getSection(getClass().getName());
-        if (section == null) {
-            section = settings.addNewSection(getClass().getName());
-        }
-
-        IAction hideArrowsAction = getTimeGraphCombo().getTimeGraphViewer().getHideArrowsAction(section);
-        manager.add(hideArrowsAction);
-
-        IAction followArrowBwdAction = getTimeGraphCombo().getTimeGraphViewer().getFollowArrowBwdAction();
-        followArrowBwdAction.setText(Messages.ControlFlowView_followCPUBwdText);
-        followArrowBwdAction.setToolTipText(Messages.ControlFlowView_followCPUBwdText);
-        manager.add(followArrowBwdAction);
-
-        IAction followArrowFwdAction = getTimeGraphCombo().getTimeGraphViewer().getFollowArrowFwdAction();
-        followArrowFwdAction.setText(Messages.ControlFlowView_followCPUFwdText);
-        followArrowFwdAction.setToolTipText(Messages.ControlFlowView_followCPUFwdText);
-        manager.add(followArrowFwdAction);
-    }
-
-    @Override
-    protected String getNextText() {
-        return Messages.ControlFlowView_nextProcessActionNameText;
-    }
-
-    @Override
-    protected String getNextTooltip() {
-        return Messages.ControlFlowView_nextProcessActionToolTipText;
-    }
-
-    @Override
-    protected String getPrevText() {
-        return Messages.ControlFlowView_previousProcessActionNameText;
-    }
-
-    @Override
-    protected String getPrevTooltip() {
-        return Messages.ControlFlowView_previousProcessActionToolTipText;
-    }
-
-    private static class ControlFlowEntryComparator implements Comparator<ITimeGraphEntry> {
-
-        @Override
-        public int compare(ITimeGraphEntry o1, ITimeGraphEntry o2) {
-
-            int result = 0;
-
-            if ((o1 instanceof ControlFlowEntry) && (o2 instanceof ControlFlowEntry)) {
-                ControlFlowEntry entry1 = (ControlFlowEntry) o1;
-                ControlFlowEntry entry2 = (ControlFlowEntry) o2;
-                result = entry1.getTrace().getStartTime().compareTo(entry2.getTrace().getStartTime());
-                if (result == 0) {
-                    result = entry1.getTrace().getName().compareTo(entry2.getTrace().getName());
-                }
-                if (result == 0) {
-                    result = entry1.getThreadId() < entry2.getThreadId() ? -1 : entry1.getThreadId() > entry2.getThreadId() ? 1 : 0;
-                }
-            }
-
-            if (result == 0) {
-                result = o1.getStartTime() < o2.getStartTime() ? -1 : o1.getStartTime() > o2.getStartTime() ? 1 : 0;
-            }
-
-            return result;
-        }
-    }
-
-    /**
-     * @author gbastien
-     *
-     */
-    protected static class ControlFlowTreeLabelProvider extends TreeLabelProvider {
-
-        @Override
-        public String getColumnText(Object element, int columnIndex) {
-            ControlFlowEntry entry = (ControlFlowEntry) element;
-
-            if (COLUMN_NAMES[columnIndex].equals(Messages.ControlFlowView_processColumn)) {
-                return entry.getName();
-            } else if (COLUMN_NAMES[columnIndex].equals(Messages.ControlFlowView_tidColumn)) {
-                return Integer.toString(entry.getThreadId());
-            } else if (COLUMN_NAMES[columnIndex].equals(Messages.ControlFlowView_ptidColumn)) {
-                if (entry.getParentThreadId() > 0) {
-                    return Integer.toString(entry.getParentThreadId());
-                }
-            } else if (COLUMN_NAMES[columnIndex].equals(Messages.ControlFlowView_birthTimeColumn)) {
-                return Utils.formatTime(entry.getStartTime(), TimeFormat.CALENDAR, Resolution.NANOSEC);
-            } else if (COLUMN_NAMES[columnIndex].equals(Messages.ControlFlowView_traceColumn)) {
-                return entry.getTrace().getName();
-            }
-            return ""; //$NON-NLS-1$
-        }
-
-    }
-
-    private static class ControlFlowFilterLabelProvider extends TreeLabelProvider {
-
-        @Override
-        public String getColumnText(Object element, int columnIndex) {
-            ControlFlowEntry entry = (ControlFlowEntry) element;
-
-            if (columnIndex == 0) {
-                return entry.getName();
-            } else if (columnIndex == 1) {
-                return Integer.toString(entry.getThreadId());
-            }
-            return ""; //$NON-NLS-1$
-        }
-
-    }
-
-    // ------------------------------------------------------------------------
-    // Internal
-    // ------------------------------------------------------------------------
-
-    @Override
-    protected void buildEventList(final ITmfTrace trace, ITmfTrace parentTrace, IProgressMonitor monitor) {
-        ITmfStateSystem ssq = TmfStateSystemAnalysisModule.getStateSystem(trace, KernelAnalysisModule.ID);
-        if (ssq == null) {
-            return;
-        }
-
-        List<ControlFlowEntry> entryList = new ArrayList<>();
-        Map<Integer, ControlFlowEntry> entryMap = new HashMap<>();
-
-        long start = ssq.getStartTime();
-        setStartTime(Math.min(getStartTime(), start));
-
-        boolean complete = false;
-        while (!complete) {
-            if (monitor.isCanceled()) {
-                return;
-            }
-            complete = ssq.waitUntilBuilt(BUILD_UPDATE_TIMEOUT);
-            if (ssq.isCancelled()) {
-                return;
-            }
-            long end = ssq.getCurrentEndTime();
-            if (start == end && !complete) { // when complete execute one last time regardless of end time
-                continue;
-            }
-            setEndTime(Math.max(getEndTime(), end + 1));
-            List<Integer> threadQuarks = ssq.getQuarks(Attributes.THREADS, "*"); //$NON-NLS-1$
-            for (int threadQuark : threadQuarks) {
-                if (monitor.isCanceled()) {
-                    return;
-                }
-                String threadName = ssq.getAttributeName(threadQuark);
-                int threadId = -1;
-                try {
-                    threadId = Integer.parseInt(threadName);
-                } catch (NumberFormatException e1) {
-                    continue;
-                }
-                if (threadId <= 0) { // ignore the 'unknown' (-1) and swapper (0) threads
-                    continue;
-                }
-
-                int execNameQuark;
-                List<ITmfStateInterval> execNameIntervals;
-                try {
-                    execNameQuark = ssq.getQuarkRelative(threadQuark, Attributes.EXEC_NAME);
-                    execNameIntervals = StateSystemUtils.queryHistoryRange(ssq, execNameQuark, start, end);
-                } catch (AttributeNotFoundException e) {
-                    /* No information on this thread (yet?), skip it for now */
-                    continue;
-                } catch (StateSystemDisposedException e) {
-                    /* State system is closing down, no point continuing */
-                    break;
-                }
-
-                for (ITmfStateInterval execNameInterval : execNameIntervals) {
-                    if (monitor.isCanceled()) {
-                        return;
-                    }
-                    ControlFlowEntry entry = entryMap.get(threadId);
-                    if (!execNameInterval.getStateValue().isNull() &&
-                            execNameInterval.getStateValue().getType() == ITmfStateValue.Type.STRING) {
-                        String execName = execNameInterval.getStateValue().unboxStr();
-                        long startTime = execNameInterval.getStartTime();
-                        long endTime = execNameInterval.getEndTime() + 1;
-
-                        if (entry == null) {
-                            ITmfStateInterval ppidInterval = null;
-                            try {
-                                int ppidQuark = ssq.getQuarkRelative(threadQuark, Attributes.PPID);
-                                ppidInterval = StateSystemUtils.queryUntilNonNullValue(ssq, ppidQuark, startTime, endTime);
-                            } catch (AttributeNotFoundException e) {
-                                /* No info, keep PPID at -1 */
-                            }
-
-                            int ppid = -1;
-                            if (ppidInterval != null) {
-                                ppid = ppidInterval.getStateValue().unboxInt();
-                            }
-                            entry = new ControlFlowEntry(threadQuark, trace, execName, threadId, ppid, startTime, endTime);
-                            entryList.add(entry);
-                            entryMap.put(threadId, entry);
-                        } else {
-                            // update the name of the entry to the latest
-                            // execName
-                            entry.setName(execName);
-                            entry.updateEndTime(endTime);
-                        }
-                    } else {
-                        entryMap.remove(threadId);
-                    }
-                }
-            }
-
-            updateTree(entryList, parentTrace);
-
-            if (parentTrace.equals(getTrace())) {
-                refresh();
-            }
-
-            for (ControlFlowEntry entry : entryList) {
-                if (monitor.isCanceled()) {
-                    return;
-                }
-                buildStatusEvents(entry.getTrace(), entry, monitor, start, end);
-            }
-
-            start = end;
-        }
-    }
-
-    private void updateTree(List<ControlFlowEntry> entryList, ITmfTrace parentTrace) {
-        List<TimeGraphEntry> rootListToAdd = new ArrayList<>();
-        List<TimeGraphEntry> rootListToRemove = new ArrayList<>();
-        List<TimeGraphEntry> rootList = getEntryList(parentTrace);
-
-        for (ControlFlowEntry entry : entryList) {
-            boolean root = (entry.getParent() == null);
-            if (root && entry.getParentThreadId() > 0) {
-                for (ControlFlowEntry parent : entryList) {
-                    /*
-                     * Associate the parent entry only if their time overlap. A
-                     * child entry may start before its parent, for example at
-                     * the beginning of the trace if a parent has not yet
-                     * appeared in the state system. We just want to make sure
-                     * that the entry didn't start after the parent ended or
-                     * ended before the parent started.
-                     */
-                    if (parent.getThreadId() == entry.getParentThreadId() &&
-                            !(entry.getStartTime() > parent.getEndTime() ||
-                            entry.getEndTime() < parent.getStartTime())) {
-                        parent.addChild(entry);
-                        root = false;
-                        if (rootList != null && rootList.contains(entry)) {
-                            rootListToRemove.add(entry);
-                        }
-                        break;
-                    }
-                }
-            }
-            if (root && (rootList == null || !rootList.contains(entry))) {
-                rootListToAdd.add(entry);
-            }
-        }
-
-        addToEntryList(parentTrace, rootListToAdd);
-        removeFromEntryList(parentTrace, rootListToRemove);
-    }
-
-    private void buildStatusEvents(ITmfTrace trace, ControlFlowEntry entry, @NonNull IProgressMonitor monitor, long start, long end) {
-        if (start < entry.getEndTime() && end > entry.getStartTime()) {
-            ITmfStateSystem ssq = TmfStateSystemAnalysisModule.getStateSystem(entry.getTrace(), KernelAnalysisModule.ID);
-            if (ssq == null) {
-                return;
-            }
-
-            long startTime = Math.max(start, entry.getStartTime());
-            long endTime = Math.min(end + 1, entry.getEndTime());
-            long resolution = Math.max(1, (end - ssq.getStartTime()) / getDisplayWidth());
-            List<ITimeEvent> eventList = getEventList(entry, startTime, endTime, resolution, monitor);
-            if (eventList == null) {
-                return;
-            }
-            for (ITimeEvent event : eventList) {
-                entry.addEvent(event);
-            }
-            if (trace.equals(getTrace())) {
-                redraw();
-            }
-        }
-        for (ITimeGraphEntry child : entry.getChildren()) {
-            if (monitor.isCanceled()) {
-                return;
-            }
-            buildStatusEvents(trace, (ControlFlowEntry) child, monitor, start, end);
-        }
-    }
-
-    @Override
-    protected @Nullable List<ITimeEvent> getEventList(TimeGraphEntry tgentry, long startTime, long endTime, long resolution, IProgressMonitor monitor) {
-        List<ITimeEvent> eventList = null;
-        if (!(tgentry instanceof ControlFlowEntry)) {
-            return eventList;
-        }
-        ControlFlowEntry entry = (ControlFlowEntry) tgentry;
-        final long realStart = Math.max(startTime, entry.getStartTime());
-        final long realEnd = Math.min(endTime, entry.getEndTime());
-        if (realEnd <= realStart) {
-            return null;
-        }
-        KernelAnalysisModule kernelAnalysis = TmfTraceUtils.getAnalysisModuleOfClass(entry.getTrace(), KernelAnalysisModule.class, KernelAnalysisModule.ID);
-        if (kernelAnalysis == null) {
-//        ITmfStateSystem ssq = TmfStateSystemAnalysisModule.getStateSystem(entry.getTrace(), KernelAnalysis.ID);
-//        if (ssq == null) {
-            return null;
-        }
-        try {
-            List<ITmfStateInterval> statusIntervals = KernelThreadInformationProvider.getStatusIntervalsForThread(
-                    kernelAnalysis, checkNotNull(entry.getThreadId()), realStart, realEnd, resolution, monitor);
-            eventList = new ArrayList<>(statusIntervals.size());
-            long lastEndTime = -1;
-            for (ITmfStateInterval statusInterval : statusIntervals) {
-                if (monitor.isCanceled()) {
-                    return null;
-                }
-                long time = statusInterval.getStartTime();
-                long duration = statusInterval.getEndTime() - time + 1;
-                int status = -1;
-                try {
-                    status = statusInterval.getStateValue().unboxInt();
-                } catch (StateValueTypeException e) {
-                    e.printStackTrace();
-                }
-                if (lastEndTime != time && lastEndTime != -1) {
-                    eventList.add(new TimeEvent(entry, lastEndTime, time - lastEndTime));
-                }
-                eventList.add(new TimeEvent(entry, time, duration, status));
-                lastEndTime = time + duration;
-            }
-        } catch (TimeRangeException e) {
-            Activator.getDefault().logError(e.getMessage());
-        }
-        return eventList;
-    }
-
-    /**
-     * Returns a value corresponding to the selected entry.
-     *
-     * Used in conjunction with synchingToTime to change the selected entry. If
-     * one of these methods is overridden in child class, then both should be.
-     *
-     * @param time
-     *            The currently selected time
-     * @return a value identifying the entry
-     */
-    private int getSelectionValue(long time) {
-        int thread = -1;
-        for (ITmfTrace trace : TmfTraceManager.getTraceSet(getTrace())) {
-            if (thread > 0) {
-                break;
-            }
-            if (trace == null) {
-                continue;
-            }
-            ITmfStateSystem ssq = TmfStateSystemAnalysisModule.getStateSystem(trace, KernelAnalysisModule.ID);
-            if (ssq == null) {
-                continue;
-            }
-            if (time >= ssq.getStartTime() && time <= ssq.getCurrentEndTime()) {
-                List<Integer> currentThreadQuarks = ssq.getQuarks(Attributes.CPUS, "*", Attributes.CURRENT_THREAD); //$NON-NLS-1$
-                for (int currentThreadQuark : currentThreadQuarks) {
-                    try {
-                        ITmfStateInterval currentThreadInterval = ssq.querySingleState(time, currentThreadQuark);
-                        int currentThread = currentThreadInterval.getStateValue().unboxInt();
-                        if (currentThread > 0) {
-                            int statusQuark = ssq.getQuarkAbsolute(Attributes.THREADS, Integer.toString(currentThread), Attributes.STATUS);
-                            ITmfStateInterval statusInterval = ssq.querySingleState(time, statusQuark);
-                            if (statusInterval.getStartTime() == time) {
-                                thread = currentThread;
-                                break;
-                            }
-                        }
-                    } catch (AttributeNotFoundException | TimeRangeException | StateValueTypeException e) {
-                        e.printStackTrace();
-                    } catch (StateSystemDisposedException e) {
-                        /* Ignored */
-                    }
-                }
-            }
-        }
-        return thread;
-    }
-
-    @Override
-    protected void synchingToTime(long time) {
-        int selected = getSelectionValue(time);
-        if (selected > 0) {
-            for (Object element : getTimeGraphViewer().getExpandedElements()) {
-                if (element instanceof ControlFlowEntry) {
-                    ControlFlowEntry entry = (ControlFlowEntry) element;
-                    if (entry.getThreadId() == selected) {
-                        getTimeGraphCombo().setSelection(entry);
-                        break;
-                    }
-                }
-            }
-        }
-    }
-
-    @Override
-    protected List<ILinkEvent> getLinkList(long startTime, long endTime, long resolution, IProgressMonitor monitor) {
-        List<ILinkEvent> list = new ArrayList<>();
-        List<TimeGraphEntry> entryList = getEntryList(getTrace());
-        if (entryList == null) {
-            return list;
-        }
-        for (ITmfTrace trace : TmfTraceManager.getTraceSet(getTrace())) {
-            if (trace == null) {
-                continue;
-            }
-            ITmfStateSystem ssq = TmfStateSystemAnalysisModule.getStateSystem(trace, KernelAnalysisModule.ID);
-            if (ssq == null) {
-                continue;
-            }
-            try {
-                long start = Math.max(startTime, ssq.getStartTime());
-                long end = Math.min(endTime, ssq.getCurrentEndTime());
-                if (end < start) {
-                    continue;
-                }
-                List<Integer> currentThreadQuarks = ssq.getQuarks(Attributes.CPUS, "*", Attributes.CURRENT_THREAD); //$NON-NLS-1$
-                for (int currentThreadQuark : currentThreadQuarks) {
-                    // adjust the query range to include the previous and following intervals
-                    long qstart = Math.max(ssq.querySingleState(start, currentThreadQuark).getStartTime() - 1, ssq.getStartTime());
-                    long qend = Math.min(ssq.querySingleState(end, currentThreadQuark).getEndTime() + 1, ssq.getCurrentEndTime());
-                    List<ITmfStateInterval> currentThreadIntervals = StateSystemUtils.queryHistoryRange(ssq, currentThreadQuark, qstart, qend, resolution, monitor);
-                    int prevThread = 0;
-                    long prevEnd = 0;
-                    long lastEnd = 0;
-                    for (ITmfStateInterval currentThreadInterval : currentThreadIntervals) {
-                        if (monitor.isCanceled()) {
-                            return null;
-                        }
-                        long time = currentThreadInterval.getStartTime();
-                        if (time != lastEnd) {
-                            // don't create links where there are gaps in intervals due to the resolution
-                            prevThread = 0;
-                            prevEnd = 0;
-                        }
-                        int thread = currentThreadInterval.getStateValue().unboxInt();
-                        if (thread > 0 && prevThread > 0) {
-                            ITimeGraphEntry prevEntry = findEntry(entryList, trace, prevThread);
-                            ITimeGraphEntry nextEntry = findEntry(entryList, trace, thread);
-                            list.add(new TimeLinkEvent(prevEntry, nextEntry, prevEnd, time - prevEnd, 0));
-                        }
-                        lastEnd = currentThreadInterval.getEndTime() + 1;
-                        if (thread != 0) {
-                            prevThread = thread;
-                            prevEnd = lastEnd;
-                        }
-                    }
-                }
-            } catch (TimeRangeException | AttributeNotFoundException | StateValueTypeException e) {
-                e.printStackTrace();
-            } catch (StateSystemDisposedException e) {
-                /* Ignored */
-            }
-        }
-        return list;
-    }
-
-    private ControlFlowEntry findEntry(List<? extends ITimeGraphEntry> entryList, ITmfTrace trace, int threadId) {
-        for (ITimeGraphEntry entry : entryList) {
-            if (entry instanceof ControlFlowEntry) {
-                ControlFlowEntry controlFlowEntry = (ControlFlowEntry) entry;
-                if (controlFlowEntry.getThreadId() == threadId && controlFlowEntry.getTrace() == trace) {
-                    return controlFlowEntry;
-                } else if (entry.hasChildren()) {
-                    controlFlowEntry = findEntry(entry.getChildren(), trace, threadId);
-                    if (controlFlowEntry != null) {
-                        return controlFlowEntry;
-                    }
-                }
-            }
-        }
-        return null;
-    }
-}
diff --git a/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/cpuusage/CpuUsageComposite.java b/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/cpuusage/CpuUsageComposite.java
deleted file mode 100644 (file)
index ec51353..0000000
+++ /dev/null
@@ -1,326 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014, 2015 Ã‰cole Polytechnique de Montréal
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Geneviève Bastien - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.analysis.os.linux.ui.views.cpuusage;
-
-import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerComparator;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.tracecompass.analysis.os.linux.core.cpuusage.KernelCpuUsageAnalysis;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.Attributes;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelAnalysisModule;
-import org.eclipse.tracecompass.statesystem.core.ITmfStateSystem;
-import org.eclipse.tracecompass.statesystem.core.StateSystemUtils;
-import org.eclipse.tracecompass.statesystem.core.exceptions.AttributeNotFoundException;
-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.tmf.core.statesystem.TmfStateSystemAnalysisModule;
-import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
-import org.eclipse.tracecompass.tmf.core.trace.TmfTraceUtils;
-import org.eclipse.tracecompass.tmf.ui.viewers.tree.AbstractTmfTreeViewer;
-import org.eclipse.tracecompass.tmf.ui.viewers.tree.ITmfTreeColumnDataProvider;
-import org.eclipse.tracecompass.tmf.ui.viewers.tree.ITmfTreeViewerEntry;
-import org.eclipse.tracecompass.tmf.ui.viewers.tree.TmfTreeColumnData;
-import org.eclipse.tracecompass.tmf.ui.viewers.tree.TmfTreeColumnData.ITmfColumnPercentageProvider;
-import org.eclipse.tracecompass.tmf.ui.viewers.tree.TmfTreeViewerEntry;
-
-/**
- * Tree viewer to display CPU usage information in a specified time range. It
- * shows the process's TID, its name, the time spent on the CPU during that
- * range, in % and absolute value.
- *
- * @author Geneviève Bastien
- */
-public class CpuUsageComposite extends AbstractTmfTreeViewer {
-
-    // Timeout between to wait for in the updateElements method
-    private static final long BUILD_UPDATE_TIMEOUT = 500;
-
-    private KernelCpuUsageAnalysis fModule = null;
-    private String fSelectedThread = null;
-
-    private static final String[] COLUMN_NAMES = new String[] {
-            Messages.CpuUsageComposite_ColumnTID,
-            Messages.CpuUsageComposite_ColumnProcess,
-            Messages.CpuUsageComposite_ColumnPercent,
-            Messages.CpuUsageComposite_ColumnTime
-    };
-
-    /* A map that saves the mapping of a thread ID to its executable name */
-    private final Map<String, String> fProcessNameMap = new HashMap<>();
-
-    /** Provides label for the CPU usage tree viewer cells */
-    protected static class CpuLabelProvider extends TreeLabelProvider {
-
-        @Override
-        public String getColumnText(Object element, int columnIndex) {
-            CpuUsageEntry obj = (CpuUsageEntry) element;
-            if (columnIndex == 0) {
-                return obj.getTid();
-            } else if (columnIndex == 1) {
-                return obj.getProcessName();
-            } else if (columnIndex == 2) {
-                return String.format(Messages.CpuUsageComposite_TextPercent, obj.getPercent());
-            } else if (columnIndex == 3) {
-                return NLS.bind(Messages.CpuUsageComposite_TextTime, obj.getTime());
-            }
-
-            return element.toString();
-        }
-
-    }
-
-    /**
-     * Constructor
-     *
-     * @param parent
-     *            The parent composite that holds this viewer
-     */
-    public CpuUsageComposite(Composite parent) {
-        super(parent, false);
-        setLabelProvider(new CpuLabelProvider());
-    }
-
-    @Override
-    protected ITmfTreeColumnDataProvider getColumnDataProvider() {
-        return new ITmfTreeColumnDataProvider() {
-
-            @Override
-            public List<TmfTreeColumnData> getColumnData() {
-                /* All columns are sortable */
-                List<TmfTreeColumnData> columns = new ArrayList<>();
-                TmfTreeColumnData column = new TmfTreeColumnData(COLUMN_NAMES[0]);
-                column.setComparator(new ViewerComparator() {
-                    @Override
-                    public int compare(Viewer viewer, Object e1, Object e2) {
-                        CpuUsageEntry n1 = (CpuUsageEntry) e1;
-                        CpuUsageEntry n2 = (CpuUsageEntry) e2;
-
-                        return n1.getTid().compareTo(n2.getTid());
-
-                    }
-                });
-                columns.add(column);
-                column = new TmfTreeColumnData(COLUMN_NAMES[1]);
-                column.setComparator(new ViewerComparator() {
-                    @Override
-                    public int compare(Viewer viewer, Object e1, Object e2) {
-                        CpuUsageEntry n1 = (CpuUsageEntry) e1;
-                        CpuUsageEntry n2 = (CpuUsageEntry) e2;
-
-                        return n1.getProcessName().compareTo(n2.getProcessName());
-
-                    }
-                });
-                columns.add(column);
-                column = new TmfTreeColumnData(COLUMN_NAMES[2]);
-                column.setComparator(new ViewerComparator() {
-                    @Override
-                    public int compare(Viewer viewer, Object e1, Object e2) {
-                        CpuUsageEntry n1 = (CpuUsageEntry) e1;
-                        CpuUsageEntry n2 = (CpuUsageEntry) e2;
-
-                        return n1.getPercent().compareTo(n2.getPercent());
-
-                    }
-                });
-                column.setPercentageProvider(new ITmfColumnPercentageProvider() {
-
-                    @Override
-                    public double getPercentage(Object data) {
-                        CpuUsageEntry parent = (CpuUsageEntry) data;
-                        return parent.getPercent() / 100;
-                    }
-                });
-                columns.add(column);
-                column = new TmfTreeColumnData(COLUMN_NAMES[3]);
-                column.setComparator(new ViewerComparator() {
-                    @Override
-                    public int compare(Viewer viewer, Object e1, Object e2) {
-                        CpuUsageEntry n1 = (CpuUsageEntry) e1;
-                        CpuUsageEntry n2 = (CpuUsageEntry) e2;
-
-                        return n1.getTime().compareTo(n2.getTime());
-
-                    }
-                });
-                columns.add(column);
-
-                return columns;
-            }
-
-        };
-    }
-
-    // ------------------------------------------------------------------------
-    // Operations
-    // ------------------------------------------------------------------------
-
-    @Override
-    protected void contentChanged(ITmfTreeViewerEntry rootEntry) {
-        String selectedThread = fSelectedThread;
-        if (selectedThread != null) {
-            /* Find the selected thread among the inputs */
-            for (ITmfTreeViewerEntry entry : rootEntry.getChildren()) {
-                if (entry instanceof CpuUsageEntry) {
-                    if (selectedThread.equals(((CpuUsageEntry) entry).getTid())) {
-                        List<ITmfTreeViewerEntry> list = checkNotNull(Collections.singletonList(entry));
-                        super.setSelection(list);
-                        return;
-                    }
-                }
-            }
-        }
-    }
-
-    @Override
-    public void initializeDataSource() {
-        /* Should not be called while trace is still null */
-        ITmfTrace trace = checkNotNull(getTrace());
-
-        fModule = TmfTraceUtils.getAnalysisModuleOfClass(trace, KernelCpuUsageAnalysis.class, KernelCpuUsageAnalysis.ID);
-        if (fModule == null) {
-            return;
-        }
-        fModule.schedule();
-        fModule.waitForInitialization();
-        fProcessNameMap.clear();
-    }
-
-    @Override
-    protected ITmfTreeViewerEntry updateElements(long start, long end, boolean isSelection) {
-        if (isSelection || (start == end)) {
-            return null;
-        }
-        if (getTrace() == null || fModule == null) {
-            return null;
-        }
-        fModule.waitForInitialization();
-        ITmfStateSystem ss = fModule.getStateSystem();
-        if (ss == null) {
-            return null;
-        }
-
-        boolean complete = false;
-        long currentEnd = start;
-
-        while (!complete && currentEnd < end) {
-            complete = ss.waitUntilBuilt(BUILD_UPDATE_TIMEOUT);
-            currentEnd = ss.getCurrentEndTime();
-        }
-
-        /* Initialize the data */
-        Map<String, Long> cpuUsageMap = fModule.getCpuUsageInRange(Math.max(start, getStartTime()), Math.min(end, getEndTime()));
-
-        TmfTreeViewerEntry root = new TmfTreeViewerEntry(""); //$NON-NLS-1$
-        List<ITmfTreeViewerEntry> entryList = root.getChildren();
-
-        for (Entry<String, Long> entry : cpuUsageMap.entrySet()) {
-            /*
-             * Process only entries representing the total of all CPUs and that
-             * have time on CPU
-             */
-            if (entry.getValue() == 0) {
-                continue;
-            }
-            if (!entry.getKey().startsWith(KernelCpuUsageAnalysis.TOTAL)) {
-                continue;
-            }
-            String[] strings = entry.getKey().split(KernelCpuUsageAnalysis.SPLIT_STRING, 2);
-
-            if ((strings.length > 1) && !(strings[1].equals(KernelCpuUsageAnalysis.TID_ZERO))) {
-                CpuUsageEntry obj = new CpuUsageEntry(strings[1], getProcessName(strings[1]), (double) entry.getValue() / (double) (end - start) * 100, entry.getValue());
-                entryList.add(obj);
-            }
-        }
-
-        return root;
-    }
-
-    /*
-     * Get the process name from its TID by using the LTTng kernel analysis
-     * module
-     */
-    private String getProcessName(String tid) {
-        String execName = fProcessNameMap.get(tid);
-        if (execName != null) {
-            return execName;
-        }
-        ITmfTrace trace = getTrace();
-        if (trace == null) {
-            return tid;
-        }
-        ITmfStateSystem kernelSs = TmfStateSystemAnalysisModule.getStateSystem(trace, KernelAnalysisModule.ID);
-        if (kernelSs == null) {
-            return tid;
-        }
-
-        try {
-            int cpusNode = kernelSs.getQuarkAbsolute(Attributes.THREADS);
-
-            /* Get the quarks for each cpu */
-            List<Integer> cpuNodes = kernelSs.getSubAttributes(cpusNode, false);
-
-            for (Integer tidQuark : cpuNodes) {
-                if (kernelSs.getAttributeName(tidQuark).equals(tid)) {
-                    int execNameQuark;
-                    List<ITmfStateInterval> execNameIntervals;
-                    try {
-                        execNameQuark = kernelSs.getQuarkRelative(tidQuark, Attributes.EXEC_NAME);
-                        execNameIntervals = StateSystemUtils.queryHistoryRange(kernelSs, execNameQuark, getStartTime(), getEndTime());
-                    } catch (AttributeNotFoundException e) {
-                        /* No information on this thread (yet?), skip it for now */
-                        continue;
-                    } catch (StateSystemDisposedException e) {
-                        /* State system is closing down, no point continuing */
-                        break;
-                    }
-
-                    for (ITmfStateInterval execNameInterval : execNameIntervals) {
-                        if (!execNameInterval.getStateValue().isNull() &&
-                                execNameInterval.getStateValue().getType() == ITmfStateValue.Type.STRING) {
-                            execName = execNameInterval.getStateValue().unboxStr();
-                            fProcessNameMap.put(tid, execName);
-                            return execName;
-                        }
-                    }
-                }
-            }
-
-        } catch (AttributeNotFoundException e) {
-            /* can't find the process name, just return the tid instead */
-        }
-        return tid;
-    }
-
-    /**
-     * Set the currently selected thread ID
-     *
-     * @param tid
-     *            The selected thread ID
-     */
-    public void setSelectedThread(String tid) {
-        fSelectedThread = tid;
-    }
-
-}
diff --git a/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/cpuusage/CpuUsageEntry.java b/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/cpuusage/CpuUsageEntry.java
deleted file mode 100644 (file)
index 94ac77a..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014, 2015 Ã‰cole Polytechnique de Montréal
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Geneviève Bastien - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.analysis.os.linux.ui.views.cpuusage;
-
-import org.eclipse.tracecompass.tmf.ui.viewers.tree.TmfTreeViewerEntry;
-
-/**
- * Represents an entry in the tree viewer of the CPU usage view. An entry is a
- * thread that occupied part of the CPU in the selected time range.
- *
- * @author Geneviève Bastien
- */
-public class CpuUsageEntry extends TmfTreeViewerEntry {
-    private final String fTid;
-    private final String fProcessName;
-    private final Double fPercent;
-    private final Long fTime;
-
-    /**
-     * Constructor
-     *
-     * @param tid
-     *            The TID of the process
-     * @param name
-     *            The thread's name
-     * @param percent
-     *            The percentage CPU usage
-     * @param time
-     *            The total amount of time spent on CPU
-     */
-    public CpuUsageEntry(String tid, String name, double percent, long time) {
-        super(tid);
-        fTid = tid;
-        fProcessName = name;
-        fPercent = percent;
-        fTime = time;
-    }
-
-    /**
-     * Get the TID of the thread represented by this entry
-     *
-     * @return The thread's TID
-     */
-    public String getTid() {
-        return fTid;
-    }
-
-    /**
-     * Get the process name
-     *
-     * @return The process name
-     */
-    public String getProcessName() {
-        return fProcessName;
-    }
-
-    /**
-     * Get the percentage of time spent on CPU in the time interval represented
-     * by this entry.
-     *
-     * @return The percentage of time spent on CPU
-     */
-    public Double getPercent() {
-        return fPercent;
-    }
-
-    /**
-     * Get the total time spent on CPU in the time interval represented by this
-     * entry.
-     *
-     * @return The total time spent on CPU
-     */
-    public Long getTime() {
-        return fTime;
-    }
-}
diff --git a/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/cpuusage/CpuUsageView.java b/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/cpuusage/CpuUsageView.java
deleted file mode 100644 (file)
index a2b899a..0000000
+++ /dev/null
@@ -1,218 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014, 2015 Ã‰cole Polytechnique de Montréal
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Geneviève Bastien - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.analysis.os.linux.ui.views.cpuusage;
-
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.SashForm;
-import org.eclipse.swt.events.ControlAdapter;
-import org.eclipse.swt.events.ControlEvent;
-import org.eclipse.swt.events.PaintEvent;
-import org.eclipse.swt.events.PaintListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Sash;
-import org.eclipse.tracecompass.tmf.core.signal.TmfSignalManager;
-import org.eclipse.tracecompass.tmf.core.signal.TmfTraceSelectedSignal;
-import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
-import org.eclipse.tracecompass.tmf.core.trace.TmfTraceManager;
-import org.eclipse.tracecompass.tmf.ui.signal.TmfTimeViewAlignmentInfo;
-import org.eclipse.tracecompass.tmf.ui.signal.TmfTimeViewAlignmentSignal;
-import org.eclipse.tracecompass.tmf.ui.views.ITmfTimeAligned;
-import org.eclipse.tracecompass.tmf.ui.views.TmfView;
-
-/**
- * CPU usage view. It contains 2 viewers: one tree viewer showing all the
- * threads who were on the CPU in the time range, and one XY chart viewer
- * plotting the total time spent on CPU and the time of the threads selected in
- * the tree viewer.
- *
- * @author Geneviève Bastien
- */
-public class CpuUsageView extends TmfView implements ITmfTimeAligned {
-
-    /** ID string */
-    public static final String ID = "org.eclipse.tracecompass.analysis.os.linux.views.cpuusage"; //$NON-NLS-1$
-
-    private static final int[] DEFAULT_WEIGHTS = {1, 3};
-
-    private CpuUsageComposite fTreeViewer = null;
-    private CpuUsageXYViewer fXYViewer = null;
-
-    private SashForm fSashForm;
-    private Listener fSashDragListener;
-    /** A composite that allows us to add margins */
-    private Composite fXYViewerContainer;
-
-    /**
-     * Constructor
-     */
-    public CpuUsageView() {
-        super(Messages.CpuUsageView_Title);
-    }
-
-    @Override
-    public void createPartControl(Composite parent) {
-        super.createPartControl(parent);
-
-        fSashForm = new SashForm(parent, SWT.NONE);
-
-        fTreeViewer = new CpuUsageComposite(fSashForm);
-
-        fXYViewerContainer = new Composite(fSashForm, SWT.NONE);
-        GridLayout layout = new GridLayout();
-        layout.marginHeight = 0;
-        layout.marginWidth = 0;
-        fXYViewerContainer.setLayout(layout);
-
-        /* Build the XY chart part of the view */
-        fXYViewer = new CpuUsageXYViewer(fXYViewerContainer);
-        fXYViewer.setSendTimeAlignSignals(true);
-        fXYViewer.getControl().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
-
-        /* Add selection listener to tree viewer */
-        fTreeViewer.addSelectionChangeListener(new ISelectionChangedListener() {
-            @Override
-            public void selectionChanged(SelectionChangedEvent event) {
-                ISelection selection = event.getSelection();
-                if (selection instanceof IStructuredSelection) {
-                    Object structSelection = ((IStructuredSelection) selection).getFirstElement();
-                    if (structSelection instanceof CpuUsageEntry) {
-                        CpuUsageEntry entry = (CpuUsageEntry) structSelection;
-                        fTreeViewer.setSelectedThread(entry.getTid());
-                        fXYViewer.setSelectedThread(Long.valueOf(entry.getTid()));
-                    }
-                }
-            }
-        });
-
-        /* Initialize the viewers with the currently selected trace */
-        ITmfTrace trace = TmfTraceManager.getInstance().getActiveTrace();
-        if (trace != null) {
-            TmfTraceSelectedSignal signal = new TmfTraceSelectedSignal(this, trace);
-            fTreeViewer.traceSelected(signal);
-            fXYViewer.traceSelected(signal);
-        }
-        fTreeViewer.getControl().addControlListener(new ControlAdapter() {
-            @Override
-            public void controlResized(ControlEvent e) {
-                super.controlResized(e);
-            }
-        });
-
-        fXYViewer.getControl().addPaintListener(new PaintListener() {
-            @Override
-            public void paintControl(PaintEvent e) {
-                // Sashes in a SashForm are being created on layout so add the
-                // drag listener here
-                if (fSashDragListener == null) {
-                    for (Control control : fSashForm.getChildren()) {
-                        if (control instanceof Sash) {
-                            fSashDragListener = new Listener() {
-
-                                @Override
-                                public void handleEvent(Event event) {
-                                    TmfSignalManager.dispatchSignal(new TmfTimeViewAlignmentSignal(fSashForm, getTimeViewAlignmentInfo()));
-                                }
-                            };
-                            control.removePaintListener(this);
-                            control.addListener(SWT.Selection, fSashDragListener);
-                            // There should be only one sash
-                            break;
-                        }
-                    }
-                }
-            }
-        });
-
-        fSashForm.setWeights(DEFAULT_WEIGHTS);
-    }
-
-    @Override
-    public void setFocus() {
-        fXYViewer.getControl().setFocus();
-    }
-
-    @Override
-    public void dispose() {
-        super.dispose();
-        if (fTreeViewer != null) {
-            fTreeViewer.dispose();
-        }
-        if (fXYViewer != null) {
-            fXYViewer.dispose();
-        }
-    }
-
-    /**
-     * @since 1.0
-     */
-    @Override
-    public TmfTimeViewAlignmentInfo getTimeViewAlignmentInfo() {
-        if (fSashForm == null) {
-            return null;
-        }
-
-        return new TmfTimeViewAlignmentInfo(fSashForm.getShell(), fSashForm.toDisplay(0, 0), getTimeAxisOffset());
-    }
-
-    private int getTimeAxisOffset() {
-        return fTreeViewer.getControl().getSize().x + fSashForm.getSashWidth() + fXYViewer.getPointAreaOffset();
-    }
-
-    /**
-     * @since 1.0
-     */
-    @Override
-    public int getAvailableWidth(int requestedOffset) {
-        int pointAreaWidth = fXYViewer.getPointAreaWidth();
-        int curTimeAxisOffset = getTimeAxisOffset();
-        if (pointAreaWidth <= 0) {
-            pointAreaWidth = fSashForm.getBounds().width - curTimeAxisOffset;
-        }
-        // TODO this is just an approximation that assumes that the end will be at the same position but that can change for a different data range/scaling
-        int endOffset = curTimeAxisOffset + pointAreaWidth;
-        GridLayout layout = (GridLayout) fXYViewerContainer.getLayout();
-        int endOffsetWithoutMargin = endOffset + layout.marginRight;
-        int availableWidth = endOffsetWithoutMargin - requestedOffset;
-        availableWidth = Math.min(fSashForm.getBounds().width, Math.max(0, availableWidth));
-        return availableWidth;
-    }
-
-    /**
-     * @since 1.0
-     */
-    @Override
-    public void performAlign(int offset, int width) {
-        int total = fSashForm.getBounds().width;
-        int plotAreaOffset = fXYViewer.getPointAreaOffset();
-        int width1 = Math.max(0, offset - plotAreaOffset - fSashForm.getSashWidth());
-        int width2 = Math.max(0, total - width1 - fSashForm.getSashWidth());
-        fSashForm.setWeights(new int[] { width1, width2 });
-        fSashForm.layout();
-
-        Composite composite = fXYViewerContainer;
-        GridLayout layout = (GridLayout) composite.getLayout();
-        int timeAxisWidth = getAvailableWidth(offset);
-        int marginSize = timeAxisWidth - width;
-        layout.marginRight = Math.max(0, marginSize);
-        composite.layout();
-    }
-}
diff --git a/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/cpuusage/CpuUsageXYViewer.java b/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/cpuusage/CpuUsageXYViewer.java
deleted file mode 100644 (file)
index e01cd73..0000000
+++ /dev/null
@@ -1,220 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014, 2015 Ã‰cole Polytechnique de Montréal
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Geneviève Bastien - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.analysis.os.linux.ui.views.cpuusage;
-
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.LinkedHashMap;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.tracecompass.analysis.os.linux.core.cpuusage.KernelCpuUsageAnalysis;
-import org.eclipse.tracecompass.internal.analysis.os.linux.ui.Activator;
-import org.eclipse.tracecompass.statesystem.core.ITmfStateSystem;
-import org.eclipse.tracecompass.statesystem.core.exceptions.StateValueTypeException;
-import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
-import org.eclipse.tracecompass.tmf.core.trace.TmfTraceUtils;
-import org.eclipse.tracecompass.tmf.ui.viewers.xycharts.linecharts.TmfCommonXLineChartViewer;
-
-/**
- * CPU usage viewer with XY line chart. It displays the total CPU usage and that
- * of the threads selected in the CPU usage tree viewer.
- *
- * @author Geneviève Bastien
- */
-public class CpuUsageXYViewer extends TmfCommonXLineChartViewer {
-
-    private KernelCpuUsageAnalysis fModule = null;
-
-    /* Maps a thread ID to a list of y values */
-    private final Map<String, double[]> fYValues = new LinkedHashMap<>();
-    /*
-     * To avoid up and downs CPU usage when process is in and out of CPU
-     * frequently, use a smaller resolution to get better averages.
-     */
-    private static final double RESOLUTION = 0.4;
-
-    // Timeout between updates in the updateData thread
-    private static final long BUILD_UPDATE_TIMEOUT = 500;
-
-    private long fSelectedThread = -1;
-
-    /**
-     * Constructor
-     *
-     * @param parent
-     *            parent composite
-     */
-    public CpuUsageXYViewer(Composite parent) {
-        super(parent, Messages.CpuUsageXYViewer_Title, Messages.CpuUsageXYViewer_TimeXAxis, Messages.CpuUsageXYViewer_CpuYAxis);
-        setResolution(RESOLUTION);
-    }
-
-    @Override
-    protected void initializeDataSource() {
-        ITmfTrace trace = getTrace();
-        if (trace != null) {
-            fModule = TmfTraceUtils.getAnalysisModuleOfClass(trace, KernelCpuUsageAnalysis.class, KernelCpuUsageAnalysis.ID);
-            if (fModule == null) {
-                return;
-            }
-            fModule.schedule();
-        }
-    }
-
-    private static double[] zeroFill(int nb) {
-        double[] arr = new double[nb];
-        Arrays.fill(arr, 0.0);
-        return arr;
-    }
-
-    @Override
-    protected void updateData(long start, long end, int nb, IProgressMonitor monitor) {
-        try {
-            if (getTrace() == null || fModule == null) {
-                return;
-            }
-            fModule.waitForInitialization();
-            ITmfStateSystem ss = fModule.getStateSystem();
-            if (ss == null) {
-                return;
-            }
-            double[] xvalues = getXAxis(start, end, nb);
-            if (xvalues.length == 0) {
-                return;
-            }
-            setXAxis(xvalues);
-
-            boolean complete = false;
-            long currentEnd = start;
-
-            while (!complete && currentEnd < end) {
-
-                if (monitor.isCanceled()) {
-                    return;
-                }
-
-                long traceStart = getStartTime();
-                long traceEnd = getEndTime();
-                long offset = getTimeOffset();
-                long selectedThread = fSelectedThread;
-
-                complete = ss.waitUntilBuilt(BUILD_UPDATE_TIMEOUT);
-                currentEnd = ss.getCurrentEndTime();
-
-                /* Initialize the data */
-                Map<String, Long> cpuUsageMap = fModule.getCpuUsageInRange(Math.max(start, traceStart), Math.min(end, traceEnd));
-                Map<String, String> totalEntries = new HashMap<>();
-                fYValues.clear();
-                fYValues.put(Messages.CpuUsageXYViewer_Total, zeroFill(xvalues.length));
-                String stringSelectedThread = Long.toString(selectedThread);
-                if (selectedThread != -1) {
-                    fYValues.put(stringSelectedThread, zeroFill(xvalues.length));
-                }
-
-                for (Entry<String, Long> entry : cpuUsageMap.entrySet()) {
-                    /*
-                     * Process only entries representing the total of all CPUs
-                     * and that have time on CPU
-                     */
-                    if (entry.getValue() == 0) {
-                        continue;
-                    }
-                    if (!entry.getKey().startsWith(KernelCpuUsageAnalysis.TOTAL)) {
-                        continue;
-                    }
-                    String[] strings = entry.getKey().split(KernelCpuUsageAnalysis.SPLIT_STRING, 2);
-
-                    if ((strings.length > 1) && !(strings[1].equals(KernelCpuUsageAnalysis.TID_ZERO))) {
-                        /* This is the total cpu usage for a thread */
-                        totalEntries.put(strings[1], entry.getKey());
-                    }
-                }
-
-                double prevX = xvalues[0] - 1;
-                long prevTime = (long) prevX + offset;
-                /*
-                 * make sure that time is in the trace range after double to
-                 * long conversion
-                 */
-                prevTime = Math.max(traceStart, prevTime);
-                prevTime = Math.min(traceEnd, prevTime);
-                /* Get CPU usage statistics for each x value */
-                for (int i = 0; i < xvalues.length; i++) {
-                    if (monitor.isCanceled()) {
-                        return;
-                    }
-                    long totalCpu = 0;
-                    double x = xvalues[i];
-                    long time = (long) x + offset;
-                    time = Math.max(traceStart, time);
-                    time = Math.min(traceEnd, time);
-                    if (time == prevTime) {
-                        /*
-                         * we need at least 1 time unit to be able to get cpu
-                         * usage when zoomed in
-                         */
-                        prevTime = time - 1;
-                    }
-
-                    cpuUsageMap = fModule.getCpuUsageInRange(prevTime, time);
-
-                    /*
-                     * Calculate the sum of all total entries, and add a data
-                     * point to the selected one
-                     */
-                    for (Entry<String, String> entry : totalEntries.entrySet()) {
-                        Long cpuEntry = cpuUsageMap.get(entry.getValue());
-                        cpuEntry = cpuEntry != null ? cpuEntry : 0L;
-
-                        totalCpu += cpuEntry;
-
-                        if (entry.getKey().equals(stringSelectedThread)) {
-                            /* This is the total cpu usage for a thread */
-                            fYValues.get(entry.getKey())[i] = (double) cpuEntry / (double) (time - prevTime) * 100;
-                        }
-
-                    }
-                    fYValues.get(Messages.CpuUsageXYViewer_Total)[i] = (double) totalCpu / (double) (time - prevTime) * 100;
-                    prevTime = time;
-                }
-                for (Entry<String, double[]> entry : fYValues.entrySet()) {
-                    setSeries(entry.getKey(), entry.getValue());
-                }
-                if (monitor.isCanceled()) {
-                    return;
-                }
-                updateDisplay();
-            }
-        } catch (StateValueTypeException e) {
-            Activator.getDefault().logError("Error updating the data of the CPU usage view", e); //$NON-NLS-1$
-        }
-
-    }
-
-    /**
-     * Set the selected thread ID, which will be graphed in this viewer
-     *
-     * @param tid
-     *            The selected thread ID
-     */
-    public void setSelectedThread(long tid) {
-        cancelUpdate();
-        deleteSeries(Long.toString(fSelectedThread));
-        fSelectedThread = tid;
-        updateContent();
-    }
-
-}
diff --git a/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/cpuusage/Messages.java b/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/cpuusage/Messages.java
deleted file mode 100644 (file)
index 1460009..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014, 2015 Ã‰cole Polytechnique de Montréal
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Geneviève Bastien - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.analysis.os.linux.ui.views.cpuusage;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Messages used in the LTTng kernel CPU usage view and viewers.
- *
- * @author Geneviève Bastien
- */
-@SuppressWarnings("javadoc")
-public class Messages extends NLS {
-
-    private static final String BUNDLE_NAME = "org.eclipse.tracecompass.analysis.os.linux.ui.views.cpuusage.messages"; //$NON-NLS-1$
-
-    public static String CpuUsageComposite_ColumnPercent;
-    public static String CpuUsageComposite_ColumnProcess;
-    public static String CpuUsageComposite_ColumnTID;
-    public static String CpuUsageComposite_ColumnTime;
-    public static String CpuUsageComposite_TextPercent;
-    public static String CpuUsageComposite_TextTime;
-    public static String CpuUsageView_Title;
-    public static String CpuUsageXYViewer_CpuYAxis;
-    public static String CpuUsageXYViewer_TimeXAxis;
-    public static String CpuUsageXYViewer_Title;
-    public static String CpuUsageXYViewer_Total;
-
-    static {
-        // initialize resource bundle
-        NLS.initializeMessages(BUNDLE_NAME, Messages.class);
-    }
-
-    private Messages() {
-    }
-}
diff --git a/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/cpuusage/messages.properties b/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/cpuusage/messages.properties
deleted file mode 100644 (file)
index bf8a799..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-###############################################################################
-# Copyright (c) 2014, 2015 Ã‰cole Polytechnique de Montréal
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     Geneviève Bastien - Initial API and implementation
-###############################################################################
-
-CpuUsageComposite_ColumnPercent=%
-CpuUsageComposite_ColumnProcess=Process
-CpuUsageComposite_ColumnTID=TID
-CpuUsageComposite_ColumnTime=Time
-CpuUsageComposite_TextPercent=%1$.3f %%
-CpuUsageComposite_TextTime={0} ns
-CpuUsageView_Title=CPU Usage
-CpuUsageXYViewer_CpuYAxis=% CPU
-CpuUsageXYViewer_TimeXAxis=Time
-CpuUsageXYViewer_Title=CPU usage
-CpuUsageXYViewer_Total=Total
diff --git a/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/resources/ResourcesEntry.java b/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/resources/ResourcesEntry.java
deleted file mode 100644 (file)
index 92d6067..0000000
+++ /dev/null
@@ -1,177 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012, 2015 Ericsson, Ã‰cole Polytechnique de Montréal
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Patrick Tasse - Initial API and implementation
- *   Geneviève Bastien - Move code to provide base classes for time graph view
- *******************************************************************************/
-
-package org.eclipse.tracecompass.analysis.os.linux.ui.views.resources;
-
-import org.eclipse.jdt.annotation.NonNull;
-import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
-import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.model.ITimeGraphEntry;
-import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.model.TimeGraphEntry;
-
-/**
- * An entry, or row, in the resource view
- *
- * @author Patrick Tasse
- */
-public class ResourcesEntry extends TimeGraphEntry implements Comparable<ITimeGraphEntry> {
-
-    /** Type of resource */
-    public static enum Type {
-        /** Null resources (filler rows, etc.) */
-        NULL,
-        /** Entries for CPUs */
-        CPU,
-        /** Entries for IRQs */
-        IRQ,
-        /** Entries for Soft IRQ */
-        SOFT_IRQ
-    }
-
-    private final int fId;
-    private final @NonNull ITmfTrace fTrace;
-    private final Type fType;
-    private final int fQuark;
-
-    /**
-     * Constructor
-     *
-     * @param quark
-     *            The attribute quark matching the entry
-     * @param trace
-     *            The trace on which we are working
-     * @param name
-     *            The exec_name of this entry
-     * @param startTime
-     *            The start time of this entry lifetime
-     * @param endTime
-     *            The end time of this entry
-     * @param type
-     *            The type of this entry
-     * @param id
-     *            The id of this entry
-     */
-    public ResourcesEntry(int quark, @NonNull ITmfTrace trace, String name,
-            long startTime, long endTime, Type type, int id) {
-        super(name, startTime, endTime);
-        fId = id;
-        fTrace = trace;
-        fType = type;
-        fQuark = quark;
-    }
-
-    /**
-     * Constructor
-     *
-     * @param trace
-     *            The trace on which we are working
-     * @param name
-     *            The exec_name of this entry
-     * @param startTime
-     *            The start time of this entry lifetime
-     * @param endTime
-     *            The end time of this entry
-     * @param id
-     *            The id of this entry
-     */
-    public ResourcesEntry(@NonNull ITmfTrace trace, String name,
-            long startTime, long endTime, int id) {
-        this(-1, trace, name, startTime, endTime, Type.NULL, id);
-    }
-
-    /**
-     * Constructor
-     *
-     * @param quark
-     *            The attribute quark matching the entry
-     * @param trace
-     *            The trace on which we are working
-     * @param startTime
-     *            The start time of this entry lifetime
-     * @param endTime
-     *            The end time of this entry
-     * @param type
-     *            The type of this entry
-     * @param id
-     *            The id of this entry
-     */
-    public ResourcesEntry(int quark, @NonNull ITmfTrace trace,
-            long startTime, long endTime, Type type, int id) {
-        this(quark, trace, type.toString() + " " + id, startTime, endTime, type, id); //$NON-NLS-1$
-    }
-
-    /**
-     * Get the entry's id
-     *
-     * @return the entry's id
-     */
-    public int getId() {
-        return fId;
-    }
-
-    /**
-     * Get the entry's trace
-     *
-     * @return the entry's trace
-     */
-    public @NonNull ITmfTrace getTrace() {
-        return fTrace;
-    }
-
-    /**
-     * Get the entry Type of this entry. Uses the inner Type enum.
-     *
-     * @return The entry type
-     */
-    public Type getType() {
-        return fType;
-    }
-
-    /**
-     * Retrieve the attribute quark that's represented by this entry.
-     *
-     * @return The integer quark The attribute quark matching the entry
-     */
-    public int getQuark() {
-        return fQuark;
-    }
-
-    @Override
-    public boolean hasTimeEvents() {
-        if (fType == Type.NULL) {
-            return false;
-        }
-        return true;
-    }
-
-    @Override
-    public int compareTo(ITimeGraphEntry other) {
-        if (!(other instanceof ResourcesEntry)) {
-            /* Should not happen, but if it does, put those entries at the end */
-            return -1;
-        }
-        ResourcesEntry o = (ResourcesEntry) other;
-
-        /*
-         * Resources entry names should all be of type "ABC 123"
-         *
-         * We want to filter on the Type first (the "ABC" part), then on the ID
-         * ("123") in numerical order (so we get 1,2,10 and not 1,10,2).
-         */
-        int ret = this.getType().compareTo(o.getType());
-        if (ret != 0) {
-            return ret;
-        }
-        return Integer.compare(this.getId(), o.getId());
-    }
-
-}
diff --git a/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/resources/ResourcesPresentationProvider.java b/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/resources/ResourcesPresentationProvider.java
deleted file mode 100644 (file)
index a0ac390..0000000
+++ /dev/null
@@ -1,379 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012, 2015 Ericsson, Ã‰cole Polytechnique de Montréal
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Patrick Tasse - Initial API and implementation
- *   Geneviève Bastien - Move code to provide base classes for time graph view
- *******************************************************************************/
-
-package org.eclipse.tracecompass.analysis.os.linux.ui.views.resources;
-
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.Attributes;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelAnalysisModule;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.StateValues;
-import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelAnalysisEventLayout;
-import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelTrace;
-import org.eclipse.tracecompass.analysis.os.linux.ui.views.resources.ResourcesEntry.Type;
-import org.eclipse.tracecompass.internal.analysis.os.linux.ui.Activator;
-import org.eclipse.tracecompass.internal.analysis.os.linux.ui.Messages;
-import org.eclipse.tracecompass.statesystem.core.ITmfStateSystem;
-import org.eclipse.tracecompass.statesystem.core.exceptions.AttributeNotFoundException;
-import org.eclipse.tracecompass.statesystem.core.exceptions.StateSystemDisposedException;
-import org.eclipse.tracecompass.statesystem.core.exceptions.StateValueTypeException;
-import org.eclipse.tracecompass.statesystem.core.exceptions.TimeRangeException;
-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.widgets.timegraph.StateItem;
-import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.TimeGraphPresentationProvider;
-import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.model.ITimeEvent;
-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.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;
-
-/**
- * Presentation provider for the Resource view, based on the generic TMF
- * presentation provider.
- *
- * @author Patrick Tasse
- */
-public class ResourcesPresentationProvider extends TimeGraphPresentationProvider {
-
-    private long fLastThreadId = -1;
-    private Color fColorWhite;
-    private Color fColorGray;
-    private Integer fAverageCharWidth;
-
-    private enum State {
-        IDLE             (new RGB(200, 200, 200)),
-        USERMODE         (new RGB(  0, 200,   0)),
-        SYSCALL          (new RGB(  0,   0, 200)),
-        IRQ              (new RGB(200,   0, 100)),
-        SOFT_IRQ         (new RGB(200, 150, 100)),
-        IRQ_ACTIVE       (new RGB(200,   0, 100)),
-        SOFT_IRQ_RAISED  (new RGB(200, 200,   0)),
-        SOFT_IRQ_ACTIVE  (new RGB(200, 150, 100));
-
-        public final RGB rgb;
-
-        private State(RGB rgb) {
-            this.rgb = rgb;
-        }
-    }
-
-    /**
-     * Default constructor
-     */
-    public ResourcesPresentationProvider() {
-        super();
-    }
-
-    private static State[] getStateValues() {
-        return State.values();
-    }
-
-    private static State getEventState(TimeEvent event) {
-        if (event.hasValue()) {
-            ResourcesEntry entry = (ResourcesEntry) event.getEntry();
-            int value = event.getValue();
-
-            if (entry.getType() == Type.CPU) {
-                if (value == StateValues.CPU_STATUS_IDLE) {
-                    return State.IDLE;
-                } else if (value == StateValues.CPU_STATUS_RUN_USERMODE) {
-                    return State.USERMODE;
-                } else if (value == StateValues.CPU_STATUS_RUN_SYSCALL) {
-                    return State.SYSCALL;
-                } else if (value == StateValues.CPU_STATUS_IRQ) {
-                    return State.IRQ;
-                } else if (value == StateValues.CPU_STATUS_SOFTIRQ) {
-                    return State.SOFT_IRQ;
-                }
-            } else if (entry.getType() == Type.IRQ) {
-                return State.IRQ_ACTIVE;
-            } else if (entry.getType() == Type.SOFT_IRQ) {
-                if (value == StateValues.SOFT_IRQ_RAISED) {
-                    return State.SOFT_IRQ_RAISED;
-                }
-                return State.SOFT_IRQ_ACTIVE;
-            }
-        }
-        return null;
-    }
-
-    @Override
-    public int getStateTableIndex(ITimeEvent event) {
-        State state = getEventState((TimeEvent) event);
-        if (state != null) {
-            return state.ordinal();
-        }
-        if (event instanceof NullTimeEvent) {
-            return INVISIBLE;
-        }
-        return TRANSPARENT;
-    }
-
-    @Override
-    public StateItem[] getStateTable() {
-        State[] states = getStateValues();
-        StateItem[] stateTable = new StateItem[states.length];
-        for (int i = 0; i < stateTable.length; i++) {
-            State state = states[i];
-            stateTable[i] = new StateItem(state.rgb, state.toString());
-        }
-        return stateTable;
-    }
-
-    @Override
-    public String getEventName(ITimeEvent event) {
-        State state = getEventState((TimeEvent) event);
-        if (state != null) {
-            return state.toString();
-        }
-        if (event instanceof NullTimeEvent) {
-            return null;
-        }
-        return Messages.ResourcesView_multipleStates;
-    }
-
-    @Override
-    public Map<String, String> getEventHoverToolTipInfo(ITimeEvent event, long hoverTime) {
-
-        Map<String, String> retMap = new LinkedHashMap<>();
-        if (event instanceof TimeEvent && ((TimeEvent) event).hasValue()) {
-
-            TimeEvent tcEvent = (TimeEvent) event;
-            ResourcesEntry entry = (ResourcesEntry) event.getEntry();
-
-            if (tcEvent.hasValue()) {
-                ITmfStateSystem ss = TmfStateSystemAnalysisModule.getStateSystem(entry.getTrace(), KernelAnalysisModule.ID);
-                if (ss == null) {
-                    return retMap;
-                }
-                // Check for IRQ or Soft_IRQ type
-                if (entry.getType().equals(Type.IRQ) || entry.getType().equals(Type.SOFT_IRQ)) {
-
-                    // Get CPU of IRQ or SoftIRQ and provide it for the tooltip display
-                    int cpu = tcEvent.getValue();
-                    if (cpu >= 0) {
-                        retMap.put(Messages.ResourcesView_attributeCpuName, String.valueOf(cpu));
-                    }
-                }
-
-                // Check for type CPU
-                else if (entry.getType().equals(Type.CPU)) {
-                    int status = tcEvent.getValue();
-
-                    if (status == StateValues.CPU_STATUS_IRQ) {
-                        // In IRQ state get the IRQ that caused the interruption
-                        int cpu = entry.getId();
-
-                        try {
-                            List<ITmfStateInterval> fullState = ss.queryFullState(event.getTime());
-                            List<Integer> irqQuarks = ss.getQuarks(Attributes.RESOURCES, Attributes.IRQS, "*"); //$NON-NLS-1$
-
-                            for (int irqQuark : irqQuarks) {
-                                if (fullState.get(irqQuark).getStateValue().unboxInt() == cpu) {
-                                    ITmfStateInterval value = ss.querySingleState(event.getTime(), irqQuark);
-                                    if (!value.getStateValue().isNull()) {
-                                        int irq = Integer.parseInt(ss.getAttributeName(irqQuark));
-                                        retMap.put(Messages.ResourcesView_attributeIrqName, String.valueOf(irq));
-                                    }
-                                    break;
-                                }
-                            }
-                        } catch (AttributeNotFoundException | TimeRangeException | StateValueTypeException e) {
-                            Activator.getDefault().logError("Error in ResourcesPresentationProvider", e); //$NON-NLS-1$
-                        } catch (StateSystemDisposedException e) {
-                            /* Ignored */
-                        }
-                    } else if (status == StateValues.CPU_STATUS_SOFTIRQ) {
-                        // In SOFT_IRQ state get the SOFT_IRQ that caused the interruption
-                        int cpu = entry.getId();
-
-                        try {
-                            List<ITmfStateInterval> fullState = ss.queryFullState(event.getTime());
-                            List<Integer> softIrqQuarks = ss.getQuarks(Attributes.RESOURCES, Attributes.SOFT_IRQS, "*"); //$NON-NLS-1$
-
-                            for (int softIrqQuark : softIrqQuarks) {
-                                if (fullState.get(softIrqQuark).getStateValue().unboxInt() == cpu) {
-                                    ITmfStateInterval value = ss.querySingleState(event.getTime(), softIrqQuark);
-                                    if (!value.getStateValue().isNull()) {
-                                        int softIrq = Integer.parseInt(ss.getAttributeName(softIrqQuark));
-                                        retMap.put(Messages.ResourcesView_attributeSoftIrqName, String.valueOf(softIrq));
-                                    }
-                                    break;
-                                }
-                            }
-                        } catch (AttributeNotFoundException | TimeRangeException | StateValueTypeException e) {
-                            Activator.getDefault().logError("Error in ResourcesPresentationProvider", e); //$NON-NLS-1$
-                        } catch (StateSystemDisposedException e) {
-                            /* Ignored */
-                        }
-                    } else if (status == StateValues.CPU_STATUS_RUN_USERMODE || status == StateValues.CPU_STATUS_RUN_SYSCALL) {
-                        // In running state get the current tid
-
-                        try {
-                            retMap.put(Messages.ResourcesView_attributeHoverTime, Utils.formatTime(hoverTime, TimeFormat.CALENDAR, Resolution.NANOSEC));
-                            int cpuQuark = entry.getQuark();
-                            int currentThreadQuark = ss.getQuarkRelative(cpuQuark, Attributes.CURRENT_THREAD);
-                            ITmfStateInterval interval = ss.querySingleState(hoverTime, currentThreadQuark);
-                            if (!interval.getStateValue().isNull()) {
-                                ITmfStateValue value = interval.getStateValue();
-                                int currentThreadId = value.unboxInt();
-                                retMap.put(Messages.ResourcesView_attributeTidName, Integer.toString(currentThreadId));
-                                int execNameQuark = ss.getQuarkAbsolute(Attributes.THREADS, Integer.toString(currentThreadId), Attributes.EXEC_NAME);
-                                interval = ss.querySingleState(hoverTime, execNameQuark);
-                                if (!interval.getStateValue().isNull()) {
-                                    value = interval.getStateValue();
-                                    retMap.put(Messages.ResourcesView_attributeProcessName, value.unboxStr());
-                                }
-                                if (status == StateValues.CPU_STATUS_RUN_SYSCALL) {
-                                    int syscallQuark = ss.getQuarkAbsolute(Attributes.THREADS, Integer.toString(currentThreadId), Attributes.SYSTEM_CALL);
-                                    interval = ss.querySingleState(hoverTime, syscallQuark);
-                                    if (!interval.getStateValue().isNull()) {
-                                        value = interval.getStateValue();
-                                        retMap.put(Messages.ResourcesView_attributeSyscallName, value.unboxStr());
-                                    }
-                                }
-                            }
-                        } catch (AttributeNotFoundException | TimeRangeException | StateValueTypeException e) {
-                            Activator.getDefault().logError("Error in ResourcesPresentationProvider", e); //$NON-NLS-1$
-                        } catch (StateSystemDisposedException e) {
-                            /* Ignored */
-                        }
-                    }
-                }
-            }
-        }
-
-        return retMap;
-    }
-
-    @Override
-    public void postDrawEvent(ITimeEvent event, Rectangle bounds, GC gc) {
-        if (fColorGray == null) {
-            fColorGray = gc.getDevice().getSystemColor(SWT.COLOR_GRAY);
-        }
-        if (fColorWhite == null) {
-            fColorWhite = gc.getDevice().getSystemColor(SWT.COLOR_WHITE);
-        }
-        if (fAverageCharWidth == null) {
-            fAverageCharWidth = gc.getFontMetrics().getAverageCharWidth();
-        }
-
-        ITmfTimeGraphDrawingHelper drawingHelper = getDrawingHelper();
-        if (bounds.width <= fAverageCharWidth) {
-            return;
-        }
-
-        if (!(event instanceof TimeEvent)) {
-            return;
-        }
-        TimeEvent tcEvent = (TimeEvent) event;
-        if (!tcEvent.hasValue()) {
-            return;
-        }
-
-        ResourcesEntry entry = (ResourcesEntry) event.getEntry();
-        if (!entry.getType().equals(Type.CPU)) {
-            return;
-        }
-
-        int status = tcEvent.getValue();
-        if (status != StateValues.CPU_STATUS_RUN_USERMODE && status != StateValues.CPU_STATUS_RUN_SYSCALL) {
-            return;
-        }
-
-        ITmfStateSystem ss = TmfStateSystemAnalysisModule.getStateSystem(entry.getTrace(), KernelAnalysisModule.ID);
-        if (ss == null) {
-            return;
-        }
-        long time = event.getTime();
-        try {
-            while (time < event.getTime() + event.getDuration()) {
-                int cpuQuark = entry.getQuark();
-                int currentThreadQuark = ss.getQuarkRelative(cpuQuark, Attributes.CURRENT_THREAD);
-                ITmfStateInterval tidInterval = ss.querySingleState(time, currentThreadQuark);
-                long startTime = Math.max(tidInterval.getStartTime(), event.getTime());
-                int x = Math.max(drawingHelper.getXForTime(startTime), bounds.x);
-                if (x >= bounds.x + bounds.width) {
-                    break;
-                }
-                if (!tidInterval.getStateValue().isNull()) {
-                    ITmfStateValue value = tidInterval.getStateValue();
-                    int currentThreadId = value.unboxInt();
-                    long endTime = Math.min(tidInterval.getEndTime() + 1, event.getTime() + event.getDuration());
-                    int xForEndTime = drawingHelper.getXForTime(endTime);
-                    if (xForEndTime > bounds.x) {
-                        int width = Math.min(xForEndTime, bounds.x + bounds.width) - x - 1;
-                        if (width > 0) {
-                            String attribute = null;
-                            int beginIndex = 0;
-                            if (status == StateValues.CPU_STATUS_RUN_USERMODE && currentThreadId != fLastThreadId) {
-                                attribute = Attributes.EXEC_NAME;
-                            } else if (status == StateValues.CPU_STATUS_RUN_SYSCALL) {
-                                attribute = Attributes.SYSTEM_CALL;
-                                /*
-                                 * Remove the "sys_" or "syscall_entry_" or similar from what we
-                                 * draw in the rectangle. This depends on the trace's event layout.
-                                 */
-                                ITmfTrace trace = entry.getTrace();
-                                if (trace instanceof IKernelTrace) {
-                                    IKernelAnalysisEventLayout layout = ((IKernelTrace) trace).getKernelEventLayout();
-                                    beginIndex = layout.eventSyscallEntryPrefix().length();
-                                }
-                            }
-                            if (attribute != null) {
-                                int quark = ss.getQuarkAbsolute(Attributes.THREADS, Integer.toString(currentThreadId), attribute);
-                                ITmfStateInterval interval = ss.querySingleState(time, quark);
-                                if (!interval.getStateValue().isNull()) {
-                                    value = interval.getStateValue();
-                                    gc.setForeground(fColorWhite);
-                                    int drawn = Utils.drawText(gc, value.unboxStr().substring(beginIndex), x + 1, bounds.y - 2, width, true, true);
-                                    if (drawn > 0) {
-                                        fLastThreadId = currentThreadId;
-                                    }
-                                }
-                            }
-                            if (xForEndTime < bounds.x + bounds.width) {
-                                gc.setForeground(fColorGray);
-                                gc.drawLine(xForEndTime, bounds.y + 1, xForEndTime, bounds.y + bounds.height - 2);
-                            }
-                        }
-                    }
-                }
-                // make sure next time is at least at the next pixel
-                time = Math.max(tidInterval.getEndTime() + 1, drawingHelper.getTimeAtX(x + 1));
-            }
-        } catch (AttributeNotFoundException | TimeRangeException | StateValueTypeException e) {
-            Activator.getDefault().logError("Error in ResourcesPresentationProvider", e); //$NON-NLS-1$
-        } catch (StateSystemDisposedException e) {
-            /* Ignored */
-        }
-    }
-
-    @Override
-    public void postDrawEntry(ITimeGraphEntry entry, Rectangle bounds, GC gc) {
-        fLastThreadId = -1;
-    }
-}
diff --git a/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/resources/ResourcesView.java b/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/resources/ResourcesView.java
deleted file mode 100644 (file)
index 1d5b902..0000000
+++ /dev/null
@@ -1,328 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012, 2015 Ericsson, Ã‰cole Polytechnique de Montréal
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Patrick Tasse - Initial API and implementation
- *   Geneviève Bastien - Move code to provide base classes for time graph views
- *******************************************************************************/
-
-package org.eclipse.tracecompass.analysis.os.linux.ui.views.resources;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.Attributes;
-import org.eclipse.tracecompass.analysis.os.linux.core.kernelanalysis.KernelAnalysisModule;
-import org.eclipse.tracecompass.analysis.os.linux.ui.views.resources.ResourcesEntry.Type;
-import org.eclipse.tracecompass.internal.analysis.os.linux.ui.Messages;
-import org.eclipse.tracecompass.statesystem.core.ITmfStateSystem;
-import org.eclipse.tracecompass.statesystem.core.StateSystemUtils;
-import org.eclipse.tracecompass.statesystem.core.exceptions.AttributeNotFoundException;
-import org.eclipse.tracecompass.statesystem.core.exceptions.StateSystemDisposedException;
-import org.eclipse.tracecompass.statesystem.core.exceptions.StateValueTypeException;
-import org.eclipse.tracecompass.statesystem.core.exceptions.TimeRangeException;
-import org.eclipse.tracecompass.statesystem.core.interval.ITmfStateInterval;
-import org.eclipse.tracecompass.tmf.core.statesystem.TmfStateSystemAnalysisModule;
-import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
-import org.eclipse.tracecompass.tmf.ui.views.timegraph.AbstractTimeGraphView;
-import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.model.ITimeEvent;
-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;
-
-/**
- * Main implementation for the LTTng 2.0 kernel Resource view
- *
- * @author Patrick Tasse
- */
-public class ResourcesView extends AbstractTimeGraphView {
-
-    /** View ID. */
-    public static final String ID = "org.eclipse.tracecompass.analysis.os.linux.views.resources"; //$NON-NLS-1$
-
-    private static final String[] FILTER_COLUMN_NAMES = new String[] {
-            Messages.ResourcesView_stateTypeName
-    };
-
-    // Timeout between updates in the build thread in ms
-    private static final long BUILD_UPDATE_TIMEOUT = 500;
-
-    // ------------------------------------------------------------------------
-    // Constructors
-    // ------------------------------------------------------------------------
-
-    /**
-     * Default constructor
-     */
-    public ResourcesView() {
-        super(ID, new ResourcesPresentationProvider());
-        setFilterColumns(FILTER_COLUMN_NAMES);
-    }
-
-    // ------------------------------------------------------------------------
-    // Internal
-    // ------------------------------------------------------------------------
-
-    @Override
-    protected String getNextText() {
-        return Messages.ResourcesView_nextResourceActionNameText;
-    }
-
-    @Override
-    protected String getNextTooltip() {
-        return Messages.ResourcesView_nextResourceActionToolTipText;
-    }
-
-    @Override
-    protected String getPrevText() {
-        return Messages.ResourcesView_previousResourceActionNameText;
-    }
-
-    @Override
-    protected String getPrevTooltip() {
-        return Messages.ResourcesView_previousResourceActionToolTipText;
-    }
-
-    @Override
-    protected void buildEventList(ITmfTrace trace, ITmfTrace parentTrace, IProgressMonitor monitor) {
-        ITmfStateSystem ssq = TmfStateSystemAnalysisModule.getStateSystem(trace, KernelAnalysisModule.ID);
-        if (ssq == null) {
-            return;
-        }
-        Comparator<ITimeGraphEntry> comparator = new Comparator<ITimeGraphEntry>() {
-            @Override
-            public int compare(ITimeGraphEntry o1, ITimeGraphEntry o2) {
-                return ((ResourcesEntry) o1).compareTo(o2);
-            }
-        };
-
-        Map<Integer, ResourcesEntry> entryMap = new HashMap<>();
-        TimeGraphEntry traceEntry = null;
-
-        long startTime = ssq.getStartTime();
-        long start = startTime;
-        setStartTime(Math.min(getStartTime(), startTime));
-        boolean complete = false;
-        while (!complete) {
-            if (monitor.isCanceled()) {
-                return;
-            }
-            complete = ssq.waitUntilBuilt(BUILD_UPDATE_TIMEOUT);
-            if (ssq.isCancelled()) {
-                return;
-            }
-            long end = ssq.getCurrentEndTime();
-            if (start == end && !complete) { // when complete execute one last time regardless of end time
-                continue;
-            }
-            long endTime = end + 1;
-            setEndTime(Math.max(getEndTime(), endTime));
-
-            if (traceEntry == null) {
-                traceEntry = new ResourcesEntry(trace, trace.getName(), startTime, endTime, 0);
-                traceEntry.sortChildren(comparator);
-                List<TimeGraphEntry> entryList = Collections.singletonList(traceEntry);
-                addToEntryList(parentTrace, entryList);
-            } else {
-                traceEntry.updateEndTime(endTime);
-            }
-
-            List<Integer> cpuQuarks = ssq.getQuarks(Attributes.CPUS, "*"); //$NON-NLS-1$
-            for (Integer cpuQuark : cpuQuarks) {
-                int cpu = Integer.parseInt(ssq.getAttributeName(cpuQuark));
-                ResourcesEntry entry = entryMap.get(cpuQuark);
-                if (entry == null) {
-                    entry = new ResourcesEntry(cpuQuark, trace, startTime, endTime, Type.CPU, cpu);
-                    entryMap.put(cpuQuark, entry);
-                    traceEntry.addChild(entry);
-                } else {
-                    entry.updateEndTime(endTime);
-                }
-            }
-            List<Integer> irqQuarks = ssq.getQuarks(Attributes.RESOURCES, Attributes.IRQS, "*"); //$NON-NLS-1$
-            for (Integer irqQuark : irqQuarks) {
-                int irq = Integer.parseInt(ssq.getAttributeName(irqQuark));
-                ResourcesEntry entry = entryMap.get(irqQuark);
-                if (entry == null) {
-                    entry = new ResourcesEntry(irqQuark, trace, startTime, endTime, Type.IRQ, irq);
-                    entryMap.put(irqQuark, entry);
-                    traceEntry.addChild(entry);
-                } else {
-                    entry.updateEndTime(endTime);
-                }
-            }
-            List<Integer> softIrqQuarks = ssq.getQuarks(Attributes.RESOURCES, Attributes.SOFT_IRQS, "*"); //$NON-NLS-1$
-            for (Integer softIrqQuark : softIrqQuarks) {
-                int softIrq = Integer.parseInt(ssq.getAttributeName(softIrqQuark));
-                ResourcesEntry entry = entryMap.get(softIrqQuark);
-                if (entry == null) {
-                    entry = new ResourcesEntry(softIrqQuark, trace, startTime, endTime, Type.SOFT_IRQ, softIrq);
-                    entryMap.put(softIrqQuark, entry);
-                    traceEntry.addChild(entry);
-                } else {
-                    entry.updateEndTime(endTime);
-                }
-            }
-
-            if (parentTrace.equals(getTrace())) {
-                refresh();
-            }
-            long resolution = Math.max(1, (endTime - ssq.getStartTime()) / getDisplayWidth());
-            for (ITimeGraphEntry child : traceEntry.getChildren()) {
-                if (monitor.isCanceled()) {
-                    return;
-                }
-                if (child instanceof TimeGraphEntry) {
-                    TimeGraphEntry entry = (TimeGraphEntry) child;
-                    List<ITimeEvent> eventList = getEventList(entry, start, endTime, resolution, monitor);
-                    if (eventList != null) {
-                        for (ITimeEvent event : eventList) {
-                            entry.addEvent(event);
-                        }
-                    }
-                    redraw();
-                }
-            }
-
-            start = end;
-        }
-    }
-
-    @Override
-    protected @Nullable List<ITimeEvent> getEventList(TimeGraphEntry entry,
-            long startTime, long endTime, long resolution,
-            IProgressMonitor monitor) {
-        ResourcesEntry resourcesEntry = (ResourcesEntry) entry;
-        ITmfStateSystem ssq = TmfStateSystemAnalysisModule.getStateSystem(resourcesEntry.getTrace(), KernelAnalysisModule.ID);
-        if (ssq == null) {
-            return null;
-        }
-        final long realStart = Math.max(startTime, ssq.getStartTime());
-        final long realEnd = Math.min(endTime, ssq.getCurrentEndTime() + 1);
-        if (realEnd <= realStart) {
-            return null;
-        }
-        List<ITimeEvent> eventList = null;
-        int quark = resourcesEntry.getQuark();
-
-        try {
-            if (resourcesEntry.getType().equals(Type.CPU)) {
-                int statusQuark;
-                try {
-                    statusQuark = ssq.getQuarkRelative(quark, Attributes.STATUS);
-                } catch (AttributeNotFoundException e) {
-                    /*
-                     * The sub-attribute "status" is not available. May happen
-                     * if the trace does not have sched_switch events enabled.
-                     */
-                    return null;
-                }
-                List<ITmfStateInterval> statusIntervals = StateSystemUtils.queryHistoryRange(ssq, statusQuark, realStart, realEnd - 1, resolution, monitor);
-                eventList = new ArrayList<>(statusIntervals.size());
-                long lastEndTime = -1;
-                for (ITmfStateInterval statusInterval : statusIntervals) {
-                    if (monitor.isCanceled()) {
-                        return null;
-                    }
-                    int status = statusInterval.getStateValue().unboxInt();
-                    long time = statusInterval.getStartTime();
-                    long duration = statusInterval.getEndTime() - time + 1;
-                    if (!statusInterval.getStateValue().isNull()) {
-                        if (lastEndTime != time && lastEndTime != -1) {
-                            eventList.add(new TimeEvent(entry, lastEndTime, time - lastEndTime));
-                        }
-                        eventList.add(new TimeEvent(entry, time, duration, status));
-                    } else if (lastEndTime == -1 || time + duration >= endTime) {
-                        // add null event if it intersects the start or end time
-                        eventList.add(new NullTimeEvent(entry, time, duration));
-                    }
-                    lastEndTime = time + duration;
-                }
-            } else if (resourcesEntry.getType().equals(Type.IRQ)) {
-                List<ITmfStateInterval> irqIntervals = StateSystemUtils.queryHistoryRange(ssq, quark, realStart, realEnd - 1, resolution, monitor);
-                eventList = new ArrayList<>(irqIntervals.size());
-                long lastEndTime = -1;
-                boolean lastIsNull = true;
-                for (ITmfStateInterval irqInterval : irqIntervals) {
-                    if (monitor.isCanceled()) {
-                        return null;
-                    }
-                    long time = irqInterval.getStartTime();
-                    long duration = irqInterval.getEndTime() - time + 1;
-                    if (!irqInterval.getStateValue().isNull()) {
-                        int cpu = irqInterval.getStateValue().unboxInt();
-                        eventList.add(new TimeEvent(entry, time, duration, cpu));
-                        lastIsNull = false;
-                    } else {
-                        if (lastEndTime == -1) {
-                            // add null event if it intersects the start time
-                            eventList.add(new NullTimeEvent(entry, time, duration));
-                        } else {
-                            if (lastEndTime != time && lastIsNull) {
-                                /* This is a special case where we want to show IRQ_ACTIVE state but we don't know the CPU (it is between two null samples) */
-                                eventList.add(new TimeEvent(entry, lastEndTime, time - lastEndTime, -1));
-                            }
-                            if (time + duration >= endTime) {
-                                // add null event if it intersects the end time
-                                eventList.add(new NullTimeEvent(entry, time, duration));
-                            }
-                        }
-                        lastIsNull = true;
-                    }
-                    lastEndTime = time + duration;
-                }
-            } else if (resourcesEntry.getType().equals(Type.SOFT_IRQ)) {
-                List<ITmfStateInterval> softIrqIntervals = StateSystemUtils.queryHistoryRange(ssq, quark, realStart, realEnd - 1, resolution, monitor);
-                eventList = new ArrayList<>(softIrqIntervals.size());
-                long lastEndTime = -1;
-                boolean lastIsNull = true;
-                for (ITmfStateInterval softIrqInterval : softIrqIntervals) {
-                    if (monitor.isCanceled()) {
-                        return null;
-                    }
-                    long time = softIrqInterval.getStartTime();
-                    long duration = softIrqInterval.getEndTime() - time + 1;
-                    if (!softIrqInterval.getStateValue().isNull()) {
-                        int cpu = softIrqInterval.getStateValue().unboxInt();
-                        eventList.add(new TimeEvent(entry, time, duration, cpu));
-                    } else {
-                        if (lastEndTime == -1) {
-                            // add null event if it intersects the start time
-                            eventList.add(new NullTimeEvent(entry, time, duration));
-                        } else {
-                            if (lastEndTime != time && lastIsNull) {
-                                /* This is a special case where we want to show IRQ_ACTIVE state but we don't know the CPU (it is between two null samples) */
-                                eventList.add(new TimeEvent(entry, lastEndTime, time - lastEndTime, -1));
-                            }
-                            if (time + duration >= endTime) {
-                                // add null event if it intersects the end time
-                                eventList.add(new NullTimeEvent(entry, time, duration));
-                            }
-                        }
-                        lastIsNull = true;
-                    }
-                    lastEndTime = time + duration;
-                }
-            }
-
-        } catch (AttributeNotFoundException | TimeRangeException | StateValueTypeException e) {
-            e.printStackTrace();
-        } catch (StateSystemDisposedException e) {
-            /* Ignored */
-        }
-        return eventList;
-    }
-
-}
diff --git a/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/internal/analysis/os/linux/ui/Activator.java b/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/internal/analysis/os/linux/ui/Activator.java
deleted file mode 100644 (file)
index 097b40c..0000000
+++ /dev/null
@@ -1,184 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2015 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Alexandre Montplaisir - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.internal.analysis.os.linux.ui;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
-    // ------------------------------------------------------------------------
-    // Attributes
-    // ------------------------------------------------------------------------
-
-    /**
-     *  The plug-in ID
-     */
-    public static final String PLUGIN_ID = "org.eclipse.tracecompass.analysis.os.linux.ui"; //$NON-NLS-1$
-
-    /**
-     *  The shared instance
-     */
-    private static Activator plugin;
-
-    // ------------------------------------------------------------------------
-    // Constructors
-    // ------------------------------------------------------------------------
-
-    /**
-     * The constructor
-     */
-    public Activator() {
-    }
-
-    // ------------------------------------------------------------------------
-    // Accessors
-    // ------------------------------------------------------------------------
-
-    /**
-     * Returns the shared instance
-     *
-     * @return the shared instance
-     */
-    public static Activator getDefault() {
-        return plugin;
-    }
-
-    // ------------------------------------------------------------------------
-    // AbstractUIPlugin
-    // ------------------------------------------------------------------------
-
-    @Override
-    public void start(BundleContext context) throws Exception {
-        super.start(context);
-        plugin = this;
-    }
-
-    @Override
-    public void stop(BundleContext context) throws Exception {
-        plugin = null;
-        super.stop(context);
-    }
-
-    @Override
-    protected void initializeImageRegistry(ImageRegistry reg) {
-    }
-
-    // ------------------------------------------------------------------------
-    // Operations
-    // ------------------------------------------------------------------------
-
-    /**
-     * Get the image object from a given path
-     *
-     * @param path
-     *            The path to the image file
-     * @return The Image object
-     */
-    public Image getImageFromPath(String path) {
-        return getImageDescripterFromPath(path).createImage();
-    }
-
-    /**
-     * Get the ImageDescriptor from a given path
-     *
-     * @param path
-     *            The path to the image file
-     * @return The ImageDescriptor object
-     */
-    public ImageDescriptor getImageDescripterFromPath(String path) {
-        return AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, path);
-    }
-
-    /**
-     * Get the Image from a registry
-     *
-     * @param path
-     *            The path to the image registry
-     * @return The Image object
-     */
-    public Image getImageFromImageRegistry(String path) {
-        Image icon = getImageRegistry().get(path);
-        if (icon == null) {
-            icon = getImageDescripterFromPath(path).createImage();
-            plugin.getImageRegistry().put(path, icon);
-        }
-        return icon;
-    }
-
-    /**
-     * Logs a message with severity INFO in the runtime log of the plug-in.
-     *
-     * @param message A message to log
-     */
-    public void logInfo(String message) {
-        getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message));
-    }
-
-    /**
-     * Logs a message and exception with severity INFO in the runtime log of the plug-in.
-     *
-     * @param message A message to log
-     * @param exception A exception to log
-     */
-    public void logInfo(String message, Throwable exception) {
-        getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message, exception));
-    }
-
-    /**
-     * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
-     *
-     * @param message A message to log
-     */
-    public void logWarning(String message) {
-        getLog().log(new Status(IStatus.WARNING, PLUGIN_ID, message));
-    }
-
-    /**
-     * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
-     *
-     * @param message A message to log
-     * @param exception A exception to log
-     */
-    public void logWarning(String message, Throwable exception) {
-        getLog().log(new Status(IStatus.WARNING, PLUGIN_ID, message, exception));
-    }
-
-    /**
-     * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
-     *
-     * @param message A message to log
-     */
-    public void logError(String message) {
-        getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message));
-    }
-
-    /**
-     * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
-     *
-     * @param message A message to log
-     * @param exception A exception to log
-     */
-    public void logError(String message, Throwable exception) {
-        getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message, exception));
-    }
-
-}
diff --git a/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/internal/analysis/os/linux/ui/Messages.java b/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/internal/analysis/os/linux/ui/Messages.java
deleted file mode 100644 (file)
index f0e98d5..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013, 2015 Ericsson
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     Patrick Tassé - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.internal.analysis.os.linux.ui;
-
-import org.eclipse.osgi.util.NLS;
-
-@SuppressWarnings("javadoc")
-public class Messages extends NLS {
-    private static final String BUNDLE_NAME = "org.eclipse.tracecompass.internal.analysis.os.linux.ui.messages"; //$NON-NLS-1$
-
-    public static String ControlFlowView_birthTimeColumn;
-    public static String ControlFlowView_tidColumn;
-    public static String ControlFlowView_ptidColumn;
-    public static String ControlFlowView_processColumn;
-    public static String ControlFlowView_traceColumn;
-
-    public static String ControlFlowView_stateTypeName;
-    public static String ControlFlowView_multipleStates;
-    public static String ControlFlowView_nextProcessActionNameText;
-    public static String ControlFlowView_nextProcessActionToolTipText;
-    public static String ControlFlowView_previousProcessActionNameText;
-    public static String ControlFlowView_previousProcessActionToolTipText;
-    public static String ControlFlowView_followCPUBwdText;
-    public static String ControlFlowView_followCPUFwdText;
-    public static String ControlFlowView_checkActiveLabel;
-    public static String ControlFlowView_checkActiveToolTip;
-    public static String ControlFlowView_uncheckInactiveLabel;
-    public static String ControlFlowView_uncheckInactiveToolTip;
-    public static String ControlFlowView_attributeSyscallName;
-    public static String ControlFlowView_attributeCpuName;
-
-    public static String ResourcesView_stateTypeName;
-    public static String ResourcesView_multipleStates;
-    public static String ResourcesView_nextResourceActionNameText;
-    public static String ResourcesView_nextResourceActionToolTipText;
-    public static String ResourcesView_previousResourceActionNameText;
-    public static String ResourcesView_previousResourceActionToolTipText;
-    public static String ResourcesView_attributeCpuName;
-    public static String ResourcesView_attributeIrqName;
-    public static String ResourcesView_attributeSoftIrqName;
-    public static String ResourcesView_attributeHoverTime;
-    public static String ResourcesView_attributeTidName;
-    public static String ResourcesView_attributeProcessName;
-    public static String ResourcesView_attributeSyscallName;
-
-    static {
-        // initialize resource bundle
-        NLS.initializeMessages(BUNDLE_NAME, Messages.class);
-    }
-
-    private Messages() {
-    }
-}
diff --git a/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/internal/analysis/os/linux/ui/messages.properties b/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/internal/analysis/os/linux/ui/messages.properties
deleted file mode 100644 (file)
index a6a7d1e..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-###############################################################################
-# Copyright (c) 2013, 2015 Ericsson
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     Ericsson - Initial API and implementation
-###############################################################################
-
-ControlFlowView_birthTimeColumn=Birth time
-ControlFlowView_tidColumn=TID
-ControlFlowView_ptidColumn=PTID
-ControlFlowView_processColumn=Process
-ControlFlowView_traceColumn=Trace
-
-ControlFlowView_stateTypeName=Process
-ControlFlowView_multipleStates=(multiple)
-ControlFlowView_nextProcessActionNameText=Next Process
-ControlFlowView_nextProcessActionToolTipText=Select Next Process
-ControlFlowView_previousProcessActionNameText=Previous Process
-ControlFlowView_previousProcessActionToolTipText=Select Previous Process
-ControlFlowView_followCPUBwdText=Follow CPU Backward
-ControlFlowView_followCPUFwdText=Follow CPU Forward
-ControlFlowView_checkActiveLabel=Check Active
-ControlFlowView_checkActiveToolTip=Checks all threads executing within the time frame.
-ControlFlowView_uncheckInactiveLabel=Uncheck Inactive
-ControlFlowView_uncheckInactiveToolTip=Unchecks all threads not executing within the time frame.
-ControlFlowView_attributeSyscallName=System Call
-ControlFlowView_attributeCpuName=CPU
-
-ResourcesView_stateTypeName=Resource
-ResourcesView_multipleStates=(multiple)
-ResourcesView_nextResourceActionNameText=Next Resource
-ResourcesView_nextResourceActionToolTipText=Select Next Resource
-ResourcesView_previousResourceActionNameText=Previous Resource
-ResourcesView_previousResourceActionToolTipText=Select Previous Resource
-ResourcesView_attributeCpuName=CPU
-ResourcesView_attributeIrqName=IRQ
-ResourcesView_attributeSoftIrqName=SOFT IRQ
-ResourcesView_attributeHoverTime=> Hover Time
-ResourcesView_attributeTidName=> TID
-ResourcesView_attributeProcessName=> Process
-ResourcesView_attributeSyscallName=> System Call
diff --git a/pom.xml b/pom.xml
index 65047227f617439edca7fa288343f87a6759a111..ee23a18bf3920f0955382e71902632cb08b66edb 100644 (file)
--- a/pom.xml
+++ b/pom.xml
 </profiles>
 
   <modules>
+    <module>analysis</module>
     <module>btf</module>
     <module>common</module>
     <module>ctf</module>
     <module>org.eclipse.tracecompass.target</module>
     <module>org.eclipse.tracecompass.testing</module>
 
-    <module>org.eclipse.tracecompass.analysis.os.linux.core</module>
-    <module>org.eclipse.tracecompass.analysis.os.linux.core.tests</module>
-    <module>org.eclipse.tracecompass.analysis.os.linux.ui</module>
-
     <module>org.eclipse.tracecompass.examples</module>
   </modules>
 
This page took 0.23432 seconds and 5 git commands to generate.