use of org.eclipse.linuxtools.internal.gprof.utils.PPC64ElfBinaryObjectWrapper in project linuxtools by eclipse.
the class GmonView method displayGprofView.
/**
* Display gmon results in the GProf View. NOTE: this method has to be called from within the UI thread.
*
* @param binaryPath
* @param gmonPath
* @param instanceName
*/
public static GmonView displayGprofView(String binaryPath, String gmonPath, IProject project) {
IBinaryObject binary = STSymbolManager.sharedInstance.getBinaryObject(new Path(binaryPath));
if (binary == null) {
// $NON-NLS-1$
MessageDialog.openError(// $NON-NLS-1$
PlatformUI.getWorkbench().getDisplay().getActiveShell(), // $NON-NLS-1$
"Invalid binary file", // $NON-NLS-1$
binaryPath + " is not a valid binary file.");
return null;
} else if (binary.getCPU().equals("ppc64") && !binary.isLittleEndian()) {
// $NON-NLS-1$
binary = new PPC64ElfBinaryObjectWrapper(binary.getBinaryParser(), binary.getPath(), binary.getType());
}
GmonDecoder decoder = new GmonDecoder(binary, project);
try {
decoder.read(gmonPath);
} catch (IOException e) {
Status status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, IStatus.ERROR, e.getMessage(), e);
Activator.getDefault().getLog().log(status);
}
return displayGprofView(decoder, gmonPath);
}
Aggregations