use of org.eclipse.tracecompass.lttng2.ust.core.trace.LttngUstTrace in project tracecompass by tracecompass.
the class UstDebugInfoSourceAspect method resolve.
/**
* @since 2.1
*/
@Override
@Nullable
public TmfCallsite resolve(ITmfEvent event) {
/* This aspect only supports UST traces */
if (!(event.getTrace() instanceof LttngUstTrace)) {
return null;
}
LttngUstTrace trace = (LttngUstTrace) event.getTrace();
/*
* Resolve the binary callsite first, from there we can use the file's
* debug information if it is present.
*/
BinaryCallsite bc = UstDebugInfoBinaryAspect.INSTANCE.resolve(event);
if (bc == null) {
return null;
}
TmfCallsite callsite = FileOffsetMapper.getCallsiteFromOffset(new File(bc.getBinaryFilePath()), bc.getBuildId(), bc.getOffset());
if (callsite == null) {
return null;
}
/*
* Apply the path prefix again, this time on the path given from
* addr2line. If applicable.
*/
String pathPrefix = trace.getSymbolProviderConfig().getActualRootDirPath();
if (pathPrefix.isEmpty()) {
return callsite;
}
String fullFileName = (pathPrefix + callsite.getFileName());
return new TmfCallsite(fullFileName, callsite.getLineNo());
}
use of org.eclipse.tracecompass.lttng2.ust.core.trace.LttngUstTrace in project tracecompass by tracecompass.
the class LttngUstCallStackAnalysis method getAnalysisRequirements.
@Override
@NonNull
public Iterable<@NonNull TmfAbstractAnalysisRequirement> getAnalysisRequirements() {
Set<@NonNull TmfAbstractAnalysisRequirement> requirements = fAnalysisRequirements;
if (requirements == null) {
LttngUstTrace trace = getTrace();
ILttngUstEventLayout layout = ILttngUstEventLayout.DEFAULT_LAYOUT;
if (trace != null) {
layout = trace.getEventLayout();
}
requirements = ImmutableSet.of(new LttngUstCallStackAnalysisRequirement(layout));
fAnalysisRequirements = requirements;
}
return requirements;
}
use of org.eclipse.tracecompass.lttng2.ust.core.trace.LttngUstTrace in project tracecompass by tracecompass.
the class UstDebugInfoSymbolProviderPreferencePage method loadCurrentSettings.
private void loadCurrentSettings() {
/* The settings are currently stored in the trace object */
LttngUstTrace trace = getSymbolProvider().getTrace();
SymbolProviderConfig config = trace.getSymbolProviderConfig();
checkNotNull(fUseCustomDirectoryCheckbox).setSelection(config.useCustomRootDir());
checkNotNull(fCustomDirectoryPath).setText(config.getCustomRootDirPath());
updateContents();
}
Aggregations