1 /*******************************************************************************
2 * Copyright (c) 2014 École Polytechnique de Montréal
4 * All rights reserved. This program and the accompanying materials are
5 * made 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 * Geneviève Bastien - Initial API and implementation
11 *******************************************************************************/
13 package org
.eclipse
.linuxtools
.lttng2
.ust
.core
.analysis
.memory
;
15 import org
.eclipse
.linuxtools
.internal
.lttng2
.ust
.core
.memoryusage
.MemoryUsageStateProvider
;
16 import org
.eclipse
.linuxtools
.lttng2
.ust
.core
.trace
.LttngUstTrace
;
17 import org
.eclipse
.linuxtools
.tmf
.core
.exceptions
.TmfAnalysisException
;
18 import org
.eclipse
.linuxtools
.tmf
.core
.statesystem
.ITmfStateProvider
;
19 import org
.eclipse
.linuxtools
.tmf
.core
.statesystem
.TmfStateSystemAnalysisModule
;
20 import org
.eclipse
.linuxtools
.tmf
.core
.trace
.ITmfTrace
;
23 * This analysis build a state system from the libc memory instrumentation on a
26 * @author Geneviève Bastien
29 public class UstMemoryAnalysisModule
extends TmfStateSystemAnalysisModule
{
32 * Analysis ID, it should match that in the plugin.xml file
34 public static String ID
= "org.eclipse.linuxtools.lttng2.ust.analysis.memory"; //$NON-NLS-1$
38 ITmfStateProvider
createStateProvider() {
39 return new MemoryUsageStateProvider(getTrace());
43 public void setTrace(ITmfTrace trace
) throws TmfAnalysisException
{
44 if (!(trace
instanceof LttngUstTrace
)) {
45 throw new IllegalStateException("UstMemoryAnalysisModule: trace should be of type LttngUstTrace"); //$NON-NLS-1$
47 super.setTrace(trace
);
51 protected LttngUstTrace
getTrace() {
52 return (LttngUstTrace
) super.getTrace();