This fixes a NPE and also avoids execution the statistics analysis on
other trace types than LTTng Kernel when the view is open.
Change-Id: I6583dcbb80044586f25067f32a5fbd9f28c7d4ed
Signed-off-by: Bernd Hufmann <Bernd.Hufmann@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/59045
Reviewed-by: Hudson CI
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Tested-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
ITmfTrace trace = getTrace();
if (trace != null) {
SystemCallLatencyAnalysis module = TmfTraceUtils.getAnalysisModuleOfClass(trace, SystemCallLatencyAnalysis.class, checkNotNull(SystemCallLatencyAnalysis.ID));
- fLatencyModule = module;
- return checkNotNull(ImmutableList.of((IAnalysisModule) module));
+ if (module != null) {
+ fLatencyModule = module;
+ return checkNotNull(ImmutableList.of((IAnalysisModule) module));
+ }
}
return super.getDependentAnalyses();
}