linux.core: internalize System Call Analysis
[deliverable/tracecompass.git] / analysis / org.eclipse.tracecompass.analysis.os.linux.core / src / org / eclipse / tracecompass / internal / analysis / os / linux / core / latency / statistics / SystemCallLatencyStatisticsAnalysisModule.java
CommitLineData
ce8319b6
BH
1/*******************************************************************************
2 * Copyright (c) 2015 Ericsson
3 *
4 * All rights reserved. This program and the accompanying materials are made
5 * available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
8 *
9 * Contributors:
10 * Bernd Hufmann - Initial API and implementation
11 *******************************************************************************/
12package org.eclipse.tracecompass.internal.analysis.os.linux.core.latency.statistics;
13
abda4cb0 14import org.eclipse.jdt.annotation.NonNull;
ce8319b6 15import org.eclipse.jdt.annotation.Nullable;
abda4cb0 16import org.eclipse.tracecompass.analysis.timing.core.segmentstore.ISegmentStoreProvider;
5b901f94 17import org.eclipse.tracecompass.analysis.timing.core.segmentstore.statistics.AbstractSegmentStatisticsAnalysis;
660d4ed9
MK
18import org.eclipse.tracecompass.internal.analysis.os.linux.core.latency.SystemCall;
19import org.eclipse.tracecompass.internal.analysis.os.linux.core.latency.SystemCallLatencyAnalysis;
ce8319b6 20import org.eclipse.tracecompass.segmentstore.core.ISegment;
ce8319b6
BH
21import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
22import org.eclipse.tracecompass.tmf.core.trace.TmfTraceUtils;
23
ce8319b6
BH
24/**
25 * Analysis module to calculate statistics of a latency analysis
26 *
27 * @author Bernd Hufmann
28 */
abda4cb0 29public class SystemCallLatencyStatisticsAnalysisModule extends AbstractSegmentStatisticsAnalysis {
ce8319b6
BH
30
31 /** The analysis module ID */
5ea53577 32 public static final String ID = "org.eclipse.tracecompass.analysis.os.linux.core.latency.statistics.syscall"; //$NON-NLS-1$
ce8319b6 33
ce8319b6 34 @Override
abda4cb0
JCK
35 protected @Nullable String getSegmentType(@NonNull ISegment segment) {
36 if (segment instanceof SystemCall) {
37 SystemCall syscall = (SystemCall) segment;
38 return syscall.getName();
ce8319b6 39 }
abda4cb0 40 return null;
ce8319b6
BH
41 }
42
43 @Override
abda4cb0
JCK
44 protected @Nullable ISegmentStoreProvider getSegmentProviderAnalysis(@NonNull ITmfTrace trace) {
45 return TmfTraceUtils.getAnalysisModuleOfClass(trace, SystemCallLatencyAnalysis.class, SystemCallLatencyAnalysis.ID);
ce8319b6
BH
46 }
47
abda4cb0 48}
This page took 0.038099 seconds and 5 git commands to generate.