1 / 11

Instrumentation and Optimization of Win32 Executables with Etch

Instrumentation and Optimization of Win32 Executables with Etch. Ted Romer, Geoff Voelker, Dennis Lee, Alec Wolman, Wayne Wong, Hank Levy, Brian Bershad, and Brad Chen. What is Etch?. Binary rewriting engine to measure and optimize x86/Win32 applications API for controlling rewrite process

neona
Download Presentation

Instrumentation and Optimization of Win32 Executables with Etch

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Instrumentation and Optimization of Win32 Executables with Etch Ted Romer, Geoff Voelker, Dennis Lee, Alec Wolman, Wayne Wong, Hank Levy, Brian Bershad, and Brad Chen Etch. Copyright 1996,1997 University of Washington

  2. What is Etch? • Binary rewriting engine to measure and optimize x86/Win32 applications • API for controlling rewrite process • Customizable runtime services • Tools to instrument and analyze programs • User interface for running experiments and optimizing programs

  3. Basic Concepts • A program • one executable, several DLLs • A tool • instrumentation routines • runtime routines • An etched program • transformed program that includes tool runtime routines.

  4. Etch Engine Instrumentation Code Etching a Binary on NT Original Exe and DLLs Instrumented/Optimized Exe and DLLs Analysis Code

  5. Example: Instruction Counting void InstrumentInstruction(WhenType when, InstPtr inst, int procNum) { void * array[1]; ArgType argt[1]; if (when == Before) { array[0] = (void*)InstGetPC(inst); argt[0] = ArgImmed; InsertCall(”InstReference", 1, array, argt); } } Instrumentation code

  6. Instruction Counting Runtime // instruction_histo is allocated at run-time int *instruction_histo; void InstReference(DWORD pc) { instruction_histo[pc]++; } Analysis Code

  7. Adobe Photoshop Borland C Borland/Intel C Bomb Corel Flow Corel Motion Corel PhotoPaint Ghostscript Ghostview Lotus Notes/Domino Lotus Word Pro Microsoft Visual C++ MS Internet Explorer 3.02 MS Monster Truck Madness MS Pinball MS Office MS Money MS Schedule+ MS SQL Server MS Word Mpegplayer Netscape 3.01 ParcPlace Visual Works 2.0 su2cor, tomcatv A Few Applications

  8. Etch Demo Etch. Copyright 1996,1997 University of Washington

  9. Related Work • Pixie • Epoxie • EEL • ATOM • TracePoint, Purify, NuMega

  10. ETCH HIPROF 0 500 1000 1500 2000 2500 Seconds Instrumentation Time Rewriting Time for CGPROF/Winword advapi.dll bsg32.wll comctl32.dll comdlg32.dll ctl3d32.dll gdi32.dll inloader.dll kernel32.dll linkinfo.dll mpr.dll ms05enu.dll ms095.dll msreftlw.wll mssp232.dll msvcrt.dll netapi32.dll nettrap.dll netui0.dll netui1.dll ntdll.dll ntlanman.dll ntshrui.dll ole32.dll openenu.dll pscrptui.dll rpcltc1.dll rpcrt4.dll samlib.dll shell32.dll user32.dll wiahtm32.dll wininet.dll winspool.dll winword.exe wwintl32.dll

  11. Conclusions • Etch rewriting API makes it easy to implement new tools. • Etch rewriting engine is fast. • Etch is an effective platform for instrumenting Win32 applications. For more information: http://etch.cs.washington.edu etch-info@cs.washington.edu

More Related