use of org.eclipse.linuxtools.internal.gprof.parser.GmonDecoder in project linuxtools by eclipse.
the class GprofParserTest method testProcessGmonFile.
@Test
public void testProcessGmonFile() throws IOException {
IBinaryObject binary = STSymbolManager.sharedInstance.getBinaryObject(binaryFile.getAbsolutePath());
final GmonDecoder gmondecoder = new GmonDecoder(binary, new PrintStream(parserDumpFile), null);
gmondecoder.setShouldDump(true);
gmondecoder.read(gmonFile.getAbsolutePath());
STJunitUtils.compareIgnoreEOL(parserDumpFile.getAbsolutePath(), parserRefFile.getAbsolutePath(), true);
}
use of org.eclipse.linuxtools.internal.gprof.parser.GmonDecoder in project linuxtools by eclipse.
the class GprofTest method changeMode.
private void changeMode(GmonView view, boolean timeModeRequested) {
AbstractSTTreeViewer gmonViewer = (AbstractSTTreeViewer) view.getSTViewer();
GmonDecoder decoder = (GmonDecoder) gmonViewer.getInput();
int prof_rate = decoder.getHistogramDecoder().getProfRate();
if (prof_rate == 0) {
return;
}
TreeColumn tc = gmonViewer.getViewer().getTree().getColumn(1);
SampleProfField spf = (SampleProfField) tc.getData();
if (spf.getColumnHeaderText().endsWith("Samples") ^ !timeModeRequested) {
new SwitchSampleTimeAction(view).run();
}
}
use of org.eclipse.linuxtools.internal.gprof.parser.GmonDecoder in project linuxtools by eclipse.
the class SwitchSampleTimeAction method run.
@Override
public void run() {
AbstractSTTreeViewer gmonViewer = (AbstractSTTreeViewer) view.getSTViewer();
GmonDecoder decoder = (GmonDecoder) gmonViewer.getInput();
if (decoder != null) {
int prof_rate = decoder.getHistogramDecoder().getProfRate();
if (prof_rate == 0) {
MessageDialog.openError(view.getSite().getShell(), Messages.SwitchSampleTimeAction_GMON_PROF_RATE_IS_NULL, Messages.SwitchSampleTimeAction_GMON_PROF_RATE_IS_NULL_LONG_MSG);
return;
}
TreeColumn tc = gmonViewer.getViewer().getTree().getColumn(1);
SampleProfField spf = (SampleProfField) tc.getData();
spf.toggle();
tc.setText(spf.getColumnHeaderText());
gmonViewer.getViewer().refresh();
}
}
use of org.eclipse.linuxtools.internal.gprof.parser.GmonDecoder in project linuxtools by eclipse.
the class CallGraphContentProvider method getElements.
@Override
public Object[] getElements(Object inputElement) {
if (inputElement instanceof GmonDecoder) {
GmonDecoder obj = (GmonDecoder) inputElement;
HistRoot root = obj.getRootNode();
return new Object[] { root };
}
return new Object[0];
}
use of org.eclipse.linuxtools.internal.gprof.parser.GmonDecoder in project linuxtools by eclipse.
the class FileHistogramContentProvider method getElements.
@Override
public Object[] getElements(Object inputElement) {
if (inputElement instanceof GmonDecoder) {
GmonDecoder obj = (GmonDecoder) inputElement;
HistRoot root = obj.getRootNode();
return new Object[] { root };
}
return new Object[0];
}
Aggregations