use of org.eclipse.tracecompass.lttng2.ust.core.trace.LttngUstTrace in project tracecompass by tracecompass.
the class UstDebugInfoAnalysisModule method canExecute.
@Override
public boolean canExecute(ITmfTrace trace) {
/* The analysis can only work with LTTng-UST traces... */
if (!(trace instanceof LttngUstTrace)) {
return false;
}
LttngUstTrace ustTrace = (LttngUstTrace) trace;
String tracerName = CtfUtils.getTracerName(ustTrace);
int majorVersion = CtfUtils.getTracerMajorVersion(ustTrace);
int minorVersion = CtfUtils.getTracerMinorVersion(ustTrace);
/* ... taken with UST >= 2.8 ... */
if (!LttngUstTrace.TRACER_NAME.equals(tracerName)) {
return false;
}
if (majorVersion < 2) {
return false;
}
if (majorVersion == 2 && minorVersion < 8) {
return false;
}
/* ... that respect the ip/vpid contexts requirements. */
return super.canExecute(trace);
}
use of org.eclipse.tracecompass.lttng2.ust.core.trace.LttngUstTrace in project tracecompass by tracecompass.
the class UstDebugInfoBinaryAspect method resolve.
@Override
@Nullable
public BinaryCallsite resolve(ITmfEvent event) {
/* This aspect only supports UST traces */
if (!(event.getTrace() instanceof LttngUstTrace)) {
return null;
}
LttngUstTrace trace = (LttngUstTrace) event.getTrace();
ILttngUstEventLayout layout = trace.getEventLayout();
/* We need both the vpid and ip contexts */
ITmfEventField vpidField = event.getContent().getField(layout.contextVpid());
ITmfEventField ipField = event.getContent().getField(layout.contextIp());
if (ipField == null) {
ipField = event.getContent().getField(layout.fieldAddr());
}
if (vpidField == null || ipField == null) {
return null;
}
Long vpid = (Long) vpidField.getValue();
Long ip = (Long) ipField.getValue();
long ts = event.getTimestamp().toNanos();
return getBinaryCallsite(trace, vpid.intValue(), ts, ip.longValue());
}
use of org.eclipse.tracecompass.lttng2.ust.core.trace.LttngUstTrace in project tracecompass by tracecompass.
the class UstDebugInfoSymbolProviderPreferencePage method saveConfiguration.
@Override
public void saveConfiguration() {
SymbolProviderConfig config = new SymbolProviderConfig(getCurrentCheckBoxState(), getCurrentPathPrefix());
LttngUstTrace trace = getSymbolProvider().getTrace();
trace.setSymbolProviderConfig(config);
}
use of org.eclipse.tracecompass.lttng2.ust.core.trace.LttngUstTrace in project tracecompass by tracecompass.
the class MarkerSetSwtBotTest method setUp.
/**
* Set up the test context and environment
*/
@BeforeClass
public static void setUp() {
SWTBotUtils.initialize();
/* set up for swtbot */
SWTBotPreferences.TIMEOUT = 10000;
/* 10 second timeout */
SWTBotPreferences.KEYBOARD_LAYOUT = "EN_US";
fBot = new SWTWorkbenchBot();
SWTBotUtils.createProject(TRACE_PROJECT_NAME);
WaitUtils.waitForJobs();
final CtfTestTrace cygProfile = CtfTestTrace.CYG_PROFILE;
LttngUstTrace trace = LttngUstTestTraceUtils.getTrace(cygProfile);
fStart = ((CtfTmfTrace) trace).getStartTime().toNanos();
fFullRange = new TmfTimeRange(TmfTimestamp.fromNanos(fStart), TmfTimestamp.fromNanos(fStart + 100l));
final File file = new File(trace.getPath());
LttngUstTestTraceUtils.dispose(cygProfile);
SWTBotUtils.openTrace(TRACE_PROJECT_NAME, file.getAbsolutePath(), UST_ID);
SWTBotUtils.openView(FlameChartView.ID);
fViewBot = fBot.viewByTitle("Flame Chart");
WaitUtils.waitForJobs();
}
use of org.eclipse.tracecompass.lttng2.ust.core.trace.LttngUstTrace in project tracecompass by tracecompass.
the class UstDebugInfoAnalysisModuleTest method testBuildIDDebugLink.
/**
* Test the analysis with a trace with debug_link information.
*/
@Test
public void testBuildIDDebugLink() {
UstDebugInfoLoadedBinaryFile matchingFile, expected;
LttngUstTrace trace = LttngUstTestTraceUtils.getTrace(SYNTH_BUILDID_DEBUGLINK_TRACE);
executeModule(trace);
expected = new UstDebugInfoLoadedBinaryFile(0x400000, "/tmp/foo_nn", null, null, false);
matchingFile = fModule.getMatchingFile(17000000, 1337, 0x400100);
assertEquals(expected, matchingFile);
expected = new UstDebugInfoLoadedBinaryFile(0x400000, "/tmp/foo_yn", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", null, false);
matchingFile = fModule.getMatchingFile(18000000, 1338, 0x400100);
assertEquals(expected, matchingFile);
expected = new UstDebugInfoLoadedBinaryFile(0x400000, "/tmp/foo_ny", null, "/tmp/debug_link1", false);
matchingFile = fModule.getMatchingFile(19000000, 1339, 0x400100);
assertEquals(expected, matchingFile);
expected = new UstDebugInfoLoadedBinaryFile(0x400000, "/tmp/foo_yy", "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", "/tmp/debug_link2", false);
matchingFile = fModule.getMatchingFile(20000000, 1340, 0x400100);
assertEquals(expected, matchingFile);
LttngUstTestTraceUtils.dispose(SYNTH_BUILDID_DEBUGLINK_TRACE);
}
Aggregations