1 /*******************************************************************************
2 * Copyright (c) 2016-2017 Movidius Inc. and others
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
8 *******************************************************************************/
10 package org
.eclipse
.tracecompass
.tmf
.core
.symbols
;
12 import org
.eclipse
.core
.runtime
.IProgressMonitor
;
13 import org
.eclipse
.jdt
.annotation
.Nullable
;
14 import org
.eclipse
.tracecompass
.tmf
.core
.trace
.ITmfTrace
;
15 import org
.eclipse
.tracecompass
.tmf
.core
.trace
.TmfTrace
;
18 * An ISymbolProvider is used to map symbol addresses that might be found inside
19 * an {@link TmfTrace} into human readable strings.
21 * @author Matthew Khouzam
25 public interface ISymbolProvider
{
28 * @return the trace that this class resolves symbols for
33 * Some providers might have configurations that take some time to load. All
34 * the CPU intensive load operations shall be done in this method. The
35 * adopters shall call this method at an opportune moment when cancellation
36 * and UI feedback is possible. However, the implementors of this interface
37 * shall not assume that this method has been called.
40 * The progress monitor to use, can be null
42 void loadConfiguration(@Nullable IProgressMonitor monitor
);
45 * Return the symbol text corresponding to the given address or null if
46 * there is no such symbol
49 * the address of the symbol
50 * @return the symbol text or <code>null</code> if the symbol cannot be found
52 @Nullable String
getSymbolText(long address
);
55 * Return the symbol text corresponding to the given pid/timestamp/address
56 * tuple, or null if there is no such symbol. An implementation that does
57 * not support pid and timestamp should return the symbol based on address
60 * A caller that has pid and timestamp information should call this method.
61 * {@link #getSymbolText(long)} should only be invoked by callers that do
62 * not have access to the pid and timestamp.
65 * The process Id for which to query
67 * The timestamp of the query
69 * the address of the symbol
70 * @return the symbol text or <code>null</code> if the symbol cannot be
73 default @Nullable String
getSymbolText(int pid
, long timestamp
, long address
) {
74 return getSymbolText(address
);
This page took 0.038854 seconds and 5 git commands to generate.