Commit | Line | Data |
---|---|---|
50659279 | 1 | /******************************************************************************* |
ed902a2b | 2 | * Copyright (c) 2014, 2015 Ericsson |
50659279 AM |
3 | * |
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 | |
8 | * | |
9 | * Contributors: | |
10 | * Alexandre Montplaisir - Initial API and implementation | |
11 | *******************************************************************************/ | |
12 | ||
9bc60be7 | 13 | package org.eclipse.tracecompass.lttng2.ust.ui.analysis.callstack; |
50659279 | 14 | |
d0c7e4ba AM |
15 | import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull; |
16 | ||
9bc60be7 AM |
17 | import org.eclipse.tracecompass.internal.lttng2.ust.core.trace.callstack.LttngUstCallStackProvider; |
18 | import org.eclipse.tracecompass.lttng2.ust.core.trace.LttngUstTrace; | |
2bdf0193 AM |
19 | import org.eclipse.tracecompass.tmf.core.exceptions.TmfAnalysisException; |
20 | import org.eclipse.tracecompass.tmf.core.statesystem.ITmfStateProvider; | |
21 | import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace; | |
22 | import org.eclipse.tracecompass.tmf.ui.views.callstack.AbstractCallStackAnalysis; | |
50659279 AM |
23 | |
24 | /** | |
25 | * Call-stack analysis to populate the TMF CallStack View from UST cyg-profile | |
26 | * events. | |
27 | * | |
28 | * @author Alexandre Montplaisir | |
50659279 AM |
29 | */ |
30 | public class LttngUstCallStackAnalysis extends AbstractCallStackAnalysis { | |
31 | ||
32 | @Override | |
33 | public void setTrace(ITmfTrace trace) throws TmfAnalysisException { | |
34 | if (!(trace instanceof LttngUstTrace)) { | |
35 | throw new IllegalArgumentException("Trace should be of type LttngUstTrace"); //$NON-NLS-1$ | |
36 | } | |
37 | super.setTrace(trace); | |
38 | } | |
39 | ||
40 | @Override | |
41 | protected LttngUstTrace getTrace() { | |
42 | return (LttngUstTrace) super.getTrace(); | |
43 | } | |
44 | ||
45 | @Override | |
46 | protected ITmfStateProvider createStateProvider() { | |
d0c7e4ba | 47 | return new LttngUstCallStackProvider(checkNotNull(getTrace())); |
50659279 AM |
48 | } |
49 | ||
50 | } |