1 /*******************************************************************************
2 * Copyright (c) 2015 Ericsson
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
10 * Bernd Hufmann - Initial API and implementation
11 *******************************************************************************/
12 package org
.eclipse
.tracecompass
.internal
.analysis
.os
.linux
.core
.latency
.statistics
;
14 import org
.eclipse
.jdt
.annotation
.NonNull
;
15 import org
.eclipse
.jdt
.annotation
.Nullable
;
16 import org
.eclipse
.tracecompass
.analysis
.os
.linux
.core
.latency
.SystemCall
;
17 import org
.eclipse
.tracecompass
.analysis
.os
.linux
.core
.latency
.SystemCallLatencyAnalysis
;
18 import org
.eclipse
.tracecompass
.analysis
.timing
.core
.segmentstore
.ISegmentStoreProvider
;
19 import org
.eclipse
.tracecompass
.internal
.analysis
.timing
.core
.segmentstore
.statistics
.AbstractSegmentStatisticsAnalysis
;
20 import org
.eclipse
.tracecompass
.segmentstore
.core
.ISegment
;
21 import org
.eclipse
.tracecompass
.tmf
.core
.trace
.ITmfTrace
;
22 import org
.eclipse
.tracecompass
.tmf
.core
.trace
.TmfTraceUtils
;
25 * Analysis module to calculate statistics of a latency analysis
27 * @author Bernd Hufmann
29 public class SystemCallLatencyStatisticsAnalysisModule
extends AbstractSegmentStatisticsAnalysis
{
31 /** The analysis module ID */
32 public static final String ID
= "org.eclipse.tracecompass.analysis.os.linux.core.latency.statistics.syscall"; //$NON-NLS-1$
35 protected @Nullable String
getSegmentType(@NonNull ISegment segment
) {
36 if (segment
instanceof SystemCall
) {
37 SystemCall syscall
= (SystemCall
) segment
;
38 return syscall
.getName();
44 protected @Nullable ISegmentStoreProvider
getSegmentProviderAnalysis(@NonNull ITmfTrace trace
) {
45 return TmfTraceUtils
.getAnalysisModuleOfClass(trace
, SystemCallLatencyAnalysis
.class, SystemCallLatencyAnalysis
.ID
);