tmf: Provide a static method to retrieve state systems
authorAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Tue, 13 May 2014 21:55:21 +0000 (17:55 -0400)
committerAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Mon, 14 Jul 2014 21:55:02 +0000 (17:55 -0400)
commit72221aa4d1c8326148afaa94355d5d9c469f8698
treea066baac951943b4ed3b0fd227b6fe48e8024b46
parent43ee8b79f83530ffaab3c4771edc5e8a498777f7
tmf: Provide a static method to retrieve state systems

This new method in TmfStateSystemAnalysisModule will:

- Null check the analysis module, so callers don't all have to do it.
- Start the execution of the module, if required (calling schedule()
  after it has already been started is a no-op).
- Avoid exposing a ITmfAnalysisModule object, which is Closeable
  because it holds disposable resources.

This fixes a bunch of the new potential leaks warnings (actually, it
isolates them in one place). Eventually the analysis module API might
have to be reworked, to either never expose the analysis module objects
publicly, or to separate the "accessor" objects from the ones holding
the resources.

Change-Id: I693d233f02a8f53c49c5dc429a84c098bd35f004
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Reviewed-on: https://git.eclipse.org/r/26487
Reviewed-by: Genevieve Bastien <gbastien+lttng@versatic.net>
Tested-by: Hudson CI
org.eclipse.linuxtools.lttng2.kernel.core/src/org/eclipse/linuxtools/lttng2/kernel/core/analysis/LttngKernelAnalysisModule.java
org.eclipse.linuxtools.lttng2.kernel.core/src/org/eclipse/linuxtools/lttng2/kernel/core/cpuusage/LttngKernelCpuUsageAnalysis.java
org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/views/controlflow/ControlFlowEntry.java
org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/views/controlflow/ControlFlowPresentationProvider.java
org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/views/controlflow/ControlFlowView.java
org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/views/cpuusage/CpuUsageComposite.java
org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/views/resources/ResourcesEntry.java
org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/views/resources/ResourcesPresentationProvider.java
org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/views/resources/ResourcesView.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/statesystem/TmfStateSystemAnalysisModule.java
This page took 0.03813 seconds and 5 git commands to generate.