170 likes | 306 Vues
Deconstruction of Dyninst : Best Practices and Lessons Learned. Bill Williams. What is Componentization?. Software Project. Public Interface. Neat Idea. What is Componentization?. Software Project. Public Interface. Public Interface. Neat Idea. Component. Component. Why Components?.
E N D
Deconstruction of Dyninst:Best Practices and Lessons Learned Bill Williams
What is Componentization? Software Project Public Interface Neat Idea Deconstruction of Dyninst
What is Componentization? Software Project Public Interface Public Interface Neat Idea Component Component Deconstruction of Dyninst
Why Components? • Expose existing functionality • Build new tools easily • Orthogonality • Testability • Improved code quality Deconstruction of Dyninst
Dyninst and the Components = New Component = Existing Component AST = Proposed DyninstAPI Code Gen Symtab API Parse API Patch API Process Binary Binary InstructionAPI DataFlow API ProcControlAPI Stackwalker API
ParseAPI: Defining the component DyninstCFG model Block Edge Cached register livenessinfo InstPoints Instrumentability Function Deconstruction of Dyninst
ParseAPI: Defining the component ParseAPI CFG model Dyninstextensions Cached register livenessinfo Block Edge InstPoints Function Instrumentability Deconstruction of Dyninst
PatchAPI: Refine your assumptions Deconstruction of Dyninst
SymtabAPI: Creating good abstractions Great interface… …hiding messy internals XCOFF ELF PE Deconstruction of Dyninst
InstructionAPI: Adding missing features Old: Control flow and not much else Deconstruction of Dyninst
InstructionAPI: Adding missing features New: control flow and data flow Deconstruction of Dyninst
ProcControlAPI: Build one to throw away Too many features, and I don’t need all of them! Deconstruction of Dyninst
ProcControlAPI: Build one to throw away Ah, something that just does what I need! Deconstruction of Dyninst
Stackwalker: When customers attack STAT requirements Dyninstrequirements Deconstruction of Dyninst
DataflowAPI: Cool isn’t enough Customers: the difference between a module and a component Deconstruction of Dyninst
What we’ve learned • Internal and external users driving interface design • Test new interfaces • Change codeincrementally • Keep your project’s details where they belong Deconstruction of Dyninst
Componentization Tradeoffs • Stability vs. improvement • Internal requirements vs. external requirements • Development time vs. scope • Structured vs. organic • Early feedback vs. interface stability Deconstruction of Dyninst