roxier@eiffel.UUCP (Roxie Rochat) (03/15/91)
If you are using a C compiler that knows about -pg and have a gprof program available that displays the call-graph, you can profile your Eiffel application using the following procedure. If you have other tools available, make appropriate substitutions. Add the -pg flags to your C_COMPILER environment variable: setenv C_COMPILER "cc -pg" Enable the C_PACKAGE option, but make sure that VISIBLE is disabled (see section 7.2 of the 2.3 Environment manual). Compile, using 'es.' This ensures that all files are compiled with the correct flags and that library files won't be affected. If you also want to profile the run-time library, remove the _run_time.a file in the C package directory and execute "make." Execute your application (to produce the "gmon.out" profile_file), and then display the results of the profiling: gprof <executable> Chapter 13 of the 2.3 Environment manual, particularly section 13.4 ("Object allocation under garbage collection"), contains hints about increasing efficiency with the garbage collector. Don't forget to unset or reset $C_COMPILER when you're done. Roxie Rochat Interactive Software Engineering If you have questions about the results of your profiling, please send mail to: eiffel@eiffel.com. Please do NOT reply directly to the sender of this message.