mkdir myexperiment cd myexperimentAll instrumented code goes here. Your original program and system DLLs will be left alone.
cginstrument /dllwatch notepad.exeThis step is optional; if you don't discover all the modules ahead of time, Etch will detect and instrument them during the profiled run of the application. This is called on-the-fly instrumentation.
cginstrument notepad.exeCGInstrument will process each module used by the application and generate a new profiled version of the module. In addition to instrumenting the procedures, CGInstrument will also update the program's import tables so that profiled versions of the application modules will be used at run-time.
notepad-etch.exeWhen the run of application completes, you can use CGProfile to process the raw profile samples.
cgprofile /html > cgprof.htmlNow open cgprof.html in a web browser. Step 4 can be repeated to generate profiles for multiple application inputs.
cginstrument c:\winnt\system32\notepad.exe
cginstrument "c:\Program Files\Plus!\Microsoft Internet\IExplore.exe"If you don't use quotes, the Windows command interpreter will use spaces to break the command line into arguments.
Copyright (c) 1997 The University of Washington. All rights reserved.