Commit | Line | Data |
---|---|---|
50659279 AM |
1 | /******************************************************************************* |
2 | * Copyright (c) 2014 Ericsson | |
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 | ||
13 | package org.eclipse.linuxtools.lttng2.ust.ui.analysis.callstack; | |
14 | ||
15 | import org.eclipse.linuxtools.internal.lttng2.ust.core.trace.callstack.LttngUstCallStackProvider; | |
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.trace.ITmfTrace; | |
20 | import org.eclipse.linuxtools.tmf.ui.views.callstack.AbstractCallStackAnalysis; | |
21 | ||
22 | /** | |
23 | * Call-stack analysis to populate the TMF CallStack View from UST cyg-profile | |
24 | * events. | |
25 | * | |
26 | * @author Alexandre Montplaisir | |
27 | * @since 3.0 | |
28 | */ | |
29 | public class LttngUstCallStackAnalysis extends AbstractCallStackAnalysis { | |
30 | ||
31 | @Override | |
32 | public void setTrace(ITmfTrace trace) throws TmfAnalysisException { | |
33 | if (!(trace instanceof LttngUstTrace)) { | |
34 | throw new IllegalArgumentException("Trace should be of type LttngUstTrace"); //$NON-NLS-1$ | |
35 | } | |
36 | super.setTrace(trace); | |
37 | } | |
38 | ||
39 | @Override | |
40 | protected LttngUstTrace getTrace() { | |
41 | return (LttngUstTrace) super.getTrace(); | |
42 | } | |
43 | ||
44 | @Override | |
45 | protected ITmfStateProvider createStateProvider() { | |
46 | return new LttngUstCallStackProvider(getTrace()); | |
47 | } | |
48 | ||
49 | } |