use of org.eclipse.linuxtools.internal.perf.PerfVersion in project linuxtools by eclipse.
the class PerfVersionTest method testPerfVersionString.
@Test
public void testPerfVersionString() {
PerfVersion version = new PerfVersion("4.2.3.300.fc23.x86_64.g21b8");
assertEquals(4, version.getMajor());
assertEquals(2, version.getMinor());
assertEquals(3, version.getMicro());
assertEquals("300.fc23.x86_64.g21b8", version.getQualifier());
}
use of org.eclipse.linuxtools.internal.perf.PerfVersion in project linuxtools by eclipse.
the class PerfOptionsTab method performApply.
@Override
public void performApply(ILaunchConfigurationWorkingCopy wconfig) {
PerfVersion perfVersion = PerfCore.getPerfVersion(wconfig);
if (perfVersion != null && multiplexEventsVersion.isNewer(perfVersion)) {
wconfig.setAttribute(PerfPlugin.ATTR_Multiplex, chkMultiplexEvents.getSelection());
}
wconfig.setAttribute(PerfPlugin.ATTR_Kernel_Location, txtKernelLocation.getText());
wconfig.setAttribute(PerfPlugin.ATTR_Record_Realtime, chkRecordRealtime.getSelection());
wconfig.setAttribute(PerfPlugin.ATTR_Record_Realtime_Priority, rtPriority.getSelection());
wconfig.setAttribute(PerfPlugin.ATTR_Record_Verbose, chkRecordVerbose.getSelection());
wconfig.setAttribute(PerfPlugin.ATTR_SourceLineNumbers, chkSourceLineNumbers.getSelection());
wconfig.setAttribute(PerfPlugin.ATTR_Kernel_SourceLineNumbers, chkKernelSourceLineNumbers.getSelection());
wconfig.setAttribute(PerfPlugin.ATTR_ModuleSymbols, chkModuleSymbols.getSelection());
wconfig.setAttribute(PerfPlugin.ATTR_HideUnresolvedSymbols, chkHideUnresolvedSymbols.getSelection());
wconfig.setAttribute(PerfPlugin.ATTR_ShowSourceDisassembly, chkShowSourceDisassembly.getSelection());
wconfig.setAttribute(PerfPlugin.ATTR_ShowStat, chkShowStat.getSelection());
wconfig.setAttribute(PerfPlugin.ATTR_StatRunCount, statRunCount.getSelection());
}
use of org.eclipse.linuxtools.internal.perf.PerfVersion in project linuxtools by eclipse.
the class PerfOptionsTab method initializeFrom.
@Override
public void initializeFrom(ILaunchConfiguration config) {
// Keep track of the last configuration loaded
lastConfig = config;
PerfVersion perfVersion = PerfCore.getPerfVersion(config);
try {
if (perfVersion != null && multiplexEventsVersion.isNewer(perfVersion)) {
chkMultiplexEvents.setSelection(config.getAttribute(PerfPlugin.ATTR_Multiplex, PerfPlugin.ATTR_Multiplex_default));
}
txtKernelLocation.setText(config.getAttribute(PerfPlugin.ATTR_Kernel_Location, PerfPlugin.ATTR_Kernel_Location_default));
chkRecordRealtime.setSelection(config.getAttribute(PerfPlugin.ATTR_Record_Realtime, PerfPlugin.ATTR_Record_Realtime_default));
int priority = config.getAttribute(PerfPlugin.ATTR_Record_Realtime_Priority, PerfPlugin.ATTR_Record_Realtime_Priority_default);
rtPriority.setEnabled(chkRecordRealtime.getSelection());
rtPriority.setSelection(priority);
chkRecordVerbose.setSelection(config.getAttribute(PerfPlugin.ATTR_Record_Verbose, PerfPlugin.ATTR_Record_Verbose_default));
chkSourceLineNumbers.setSelection(config.getAttribute(PerfPlugin.ATTR_SourceLineNumbers, PerfPlugin.ATTR_SourceLineNumbers_default));
chkKernelSourceLineNumbers.setSelection(config.getAttribute(PerfPlugin.ATTR_Kernel_SourceLineNumbers, PerfPlugin.ATTR_Kernel_SourceLineNumbers_default));
chkModuleSymbols.setSelection(config.getAttribute(PerfPlugin.ATTR_ModuleSymbols, PerfPlugin.ATTR_ModuleSymbols_default));
chkHideUnresolvedSymbols.setSelection(config.getAttribute(PerfPlugin.ATTR_HideUnresolvedSymbols, PerfPlugin.ATTR_HideUnresolvedSymbols_default));
chkShowSourceDisassembly.setSelection(config.getAttribute(PerfPlugin.ATTR_ShowSourceDisassembly, PerfPlugin.ATTR_ShowSourceDisassembly_default));
chkShowStat.setSelection(config.getAttribute(PerfPlugin.ATTR_ShowStat, PerfPlugin.ATTR_ShowStat_default));
int runCount = config.getAttribute(PerfPlugin.ATTR_StatRunCount, PerfPlugin.ATTR_StatRunCount_default);
statRunCount.setSelection(runCount);
handleShowStatSelection();
} catch (CoreException e) {
// do nothing
}
}
Aggregations