Path: utzoo!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!nosc!ucsd!rutgers!mailrus!cornell!batcomputer!sun.soe.clarkson.edu!nelson From: nelson@sun.soe.clarkson.edu (Russ Nelson) Newsgroups: comp.sys.ibm.pc Subject: Re: Turbo C Debugger (really: profiling under DOS vs. Unix) Message-ID: <1151@sun.soe.clarkson.edu> Date: 7 Jul 88 14:19:04 GMT References: <11590@agate.BERKELEY.EDU> <1803@akgua.ATT.COM> <12338@mimsy.UUCP> Reply-To: nelson@sun.soe.clarkson.edu (Russ Nelson) Organization: Clarkson University, Potsdam, NY Lines: 73 In article <12338@mimsy.UUCP> jds@mimsy.umd.edu (James da Silva) writes: >Actually, Brian, a DOS Compiler has the potential to blow away any Unix-based >compiler in the area of profiling; DOS's main weakness is a strength when it >comes to profiling. > >The lack of multitasking and protection allow you to get very accurate >results free of any distortions. ... The following package is on the comp.binaries.ibm.pc archive machine, grape.ecs.clarkson.edu [128.153.13.196] under file/turboc/tchrt.arc. Grape.ecs is also the CUHUG Fido BBS, (315)268-6667, 300/1200/2400 8N1. TCHRT Turbo C High Resolution Timer Version 1.01 18 May 1988 --------------------------------------------------------------- TCHRT is a library of subroutines that implement a very high resolution timing function. With suitable statements added to an application's source code, a very accurate profile of the application's execution time can be generated that provides the developer with a clear picture of what parts of the application code are taking the most time to execute. With this information, an application's "hot spots" can quickly be determined and algorithm or assembly code optimization can be implemented to increase performance. Some significant features of TCHRT are: - Timing accuracy to one microsecond. This accuracy is independant of execution environment (PC, AT, 386) so long as the hardware is 100% IBM PC compatible. The timing software calibrates itself to the host processor speed, so absolute accuracy is maintained regardless of host CPU and it's associated clock rate. - User definable profiling. Source code statements are added by the user to time those areas of the application that are of interest. Only two source code statements are required to time any portion of the application, and up to 100 different parts of the application may be timed. Unlike "binning" profilers that report only sampled "hits" on a range of CPU Program Counter (PC) addresses, TCHRT allows the user to profile any part of an application's source code, down to a single statement or procdure call. Unlike "binning" profilers, there is an exact one to one correspond- ance between the profiler's result and source code statements. - A complete summary of the profiler's results is generated. This summary can be automatically sent to the CRT display, a printer, or a disk file. Multiple summary reports can be generated during a single run to show changes in performance as an application's runtime parameters are dynamically changed. - No side effects during application execution. Unlike many profilers, the application "wall clock" execution time does not significantly change when TCHRT is active. Also unlike many profilers, the system's timer interupt (1C hex) is not altered, so the system clock is not disturbed. Normal interupts continue at their usual rate. Requirements ------------ 100% hardware compatible IBM PC, AT or 386 microcomputer. PS/2 machines have not been tested - reports regarding PS/2 compati- bility are welcome! Borland Turbo C V1.5. TC V1.0 has not been tested, but will probably work. -- Pray that Bush gets re-elected so that the Republicans will be blamed for it.