90 likes | 230 Views
“Because Size Matters” Combining CDT and BIRT to analyze binary code size of embedded applications. Short-Talk. Size of binaries is an important parameter for embedded software development.
E N D
“Because Size Matters”Combining CDT and BIRT to analyze binary code size of embedded applications
Short-Talk • Size of binaries is an important parameter for embedded software development. • In this talk we present how BIRT‘s charting and reporting capabilities can be combined with CDT to improve size-based analysis of build configurations. • We show how a simple chart viewer displaying size of object file sections can be easily integrated into multiple Eclipse graphical components (view, property page, ...) to enhance developer‘s experience. • Also see BIRT short talk „Charting Everywhere“
Size Matters • In the embedded world, binary code size matters • Limited memory • Small instruction caches • Requirements • Visualize sections of a binary file (data, text, …) • Compare CDT configurations (size-wise) • Generate size oriented reports • Implementation • CDT provides binary file support (IBinary, IBinaryFile) • BIRT provides chart rendering and report generation features • New framework • Extracts size data from binary files • Instantiates charts • Render charts in standard Eclipse components (view, property page, …)
Retrieve Size Data • An extension point to associate an IBinaryFileSizeProvider with a sub-class of org.eclipse.cdt.core.IBinaryFile • An generic wrapper for tool-chains supporting a size-like command line tool (eg. Cygwin PE, TriMedia). $> size foo.exe text data bss dec hex filename 976 388 64 1428 594 foo.exe (sections) (total size) (sub sizes)
Rendering Size Data • org.eclipse.birt.chart.model.Chart • A Generator produces a GeneratedChartState that can be rendered thanks to a IDeviceRenderer (PluginSettings.instance().getDevice("dv.SWT")) • A generic chart viewer • Configurable with style bits (PIE_CHART, STACKED_BAR_CHART, …) • Canvas into which the chart is rendered • Content provider implementing
Putting Everything Together (2) ICProject IBinaryFile.EXECUTABLE ChartViewer
Conclusion • Charts can be used to visualize data in many contexts: code size, code metrics, performance, … • Cross-fertilization of Eclipse plug-ins can greatly enhance experience of users (TPTP already uses BIRT for report generation) • Is it time for org.eclipse.cdt.birt ? • Also see BIRT short talk „Charting Everywhere“