Adding tracing capabilities to analyses shows that an analysis is scheduled
a LOT of times just to get the state system. We should check the state system
is not null before scheduling.
Change-Id: Ic5b159566b0b84211e1b9506f4d0ecfa08df0dc6
Signed-off-by: Geneviève Bastien <gbastien+lttng@versatic.net>
Reviewed-on: https://git.eclipse.org/r/38271
Reviewed-by: Hudson CI
Reviewed-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
Tested-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
TmfStateSystemAnalysisModule module =
TmfTraceUtils.getAnalysisModuleOfClass(trace, TmfStateSystemAnalysisModule.class, moduleId);
if (module != null) {
+ ITmfStateSystem ss = module.getStateSystem();
+ if (ss != null) {
+ return ss;
+ }
IStatus status = module.schedule();
if (status.isOK()) {
module.waitForInitialization();