import org.eclipse.tracecompass.tmf.core.request.TmfEventRequest;
import org.eclipse.tracecompass.tmf.core.signal.TmfSignalManager;
import org.eclipse.tracecompass.tmf.core.signal.TmfTraceOpenedSignal;
+import org.eclipse.tracecompass.tmf.core.trace.TmfTraceUtils;
import org.eclipse.tracecompass.tmf.ctf.core.event.CtfTmfEvent;
import org.eclipse.tracecompass.tmf.ctf.core.tests.shared.CtfTmfTestTraceUtils;
import org.junit.After;
TmfTraceOpenedSignal signal = new TmfTraceOpenedSignal(this, trace, null);
TmfSignalManager.dispatchSignal(signal);
+ UstDebugInfoAnalysisModule module = TmfTraceUtils.getAnalysisModuleOfClass(trace, UstDebugInfoAnalysisModule.class, UstDebugInfoAnalysisModule.ID);
+ assertNotNull(module);
+ module.waitForCompletion();
+
/* Send a request to get the 3 events we are interested in */
List<@NonNull LttngUstEvent> events = new ArrayList<>();
TmfEventRequest request = new TmfEventRequest(LttngUstEvent.class, 31, 1, ExecutionType.FOREGROUND) {
* @return The binaries (executables or libraries) referred to in the trace.
*/
public Collection<UstDebugInfoBinaryFile> getAllBinaries() {
- waitForCompletion();
ITmfStateSystem ss = getStateSystem();
if (ss == null) {
/* State system might not yet be initialized */
interval = StateSystemUtils.queryUntilNonNullValue(ss, baddrQuark, ts, Long.MAX_VALUE);
}
}
- } catch (AttributeNotFoundException e) {
- throw new IllegalStateException(e);
- } catch (TimeRangeException | StateSystemDisposedException e) {
+ } catch (AttributeNotFoundException | TimeRangeException | StateSystemDisposedException e) {
/* Oh well, such is life. */
}
return files;
@VisibleForTesting
public @Nullable UstDebugInfoLoadedBinaryFile getMatchingFile(long ts, long vpid, long ip) {
try {
- waitForCompletion();
final ITmfStateSystem ss = getStateSystem();
if (ss == null) {
/* State system might not yet be initialized */
return new UstDebugInfoLoadedBinaryFile(baddr, filePath, buildId, debugLink, isPic);
- } catch (AttributeNotFoundException e) {
- // TODO: that's probably not true anymore
- /* We're only using quarks we've checked for. */
- throw new IllegalStateException(e);
- } catch (TimeRangeException | StateSystemDisposedException e) {
+ } catch (AttributeNotFoundException | TimeRangeException | StateSystemDisposedException e) {
+ /* Either the data is not available yet, or incomplete. */
return null;
}
}