os.linux: Do not rely on static initialisation order for layouts
authorMatthew Khouzam <matthew.khouzam@ericsson.com>
Wed, 6 Apr 2016 22:14:00 +0000 (18:14 -0400)
committerMatthew Khouzam <matthew.khouzam@ericsson.com>
Thu, 7 Apr 2016 13:57:19 +0000 (09:57 -0400)
commit4f2bd079f4adb4349ffab67313d85392b87c759a
tree0632c71e8306d99a527bfcb178b8916c2f5fc155
parenta19e7bb2b195e83a15f70caad757c69609482594
os.linux: Do not rely on static initialisation order for layouts

Expose DefaultLayout#getInstance() instead of DefaultLayout#INSTANCE

This solves a weird problem where the layout could be null.

To reproduce this problem, define and run the following test suite:
@RunWith(Suite.class)
@Suite.SuiteClasses({
VirtualMachineAnalysisTest.class,
LttngKernelAnalysisTest.class,
PartialStateSystemTest.class,
StateSystemInMemoryTest.class,
StateSystemFullHistoryTest.class
})
public class TestSuite { }

Change-Id: I772ee0944334283d4b36118001a858322921d98a
Signed-off-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/69864
Reviewed-by: Alexandre Montplaisir <alexmonthy@efficios.com>
Tested-by: Alexandre Montplaisir <alexmonthy@efficios.com>
Reviewed-by: Hudson CI
analysis/org.eclipse.tracecompass.analysis.os.linux.core.tests/stubs/org/eclipse/tracecompass/analysis/os/linux/core/tests/stubs/trace/KernelEventLayoutStub.java
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/trace/DefaultEventLayout.java
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/trace/IKernelAnalysisEventLayout.java
This page took 0.026382 seconds and 5 git commands to generate.