home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!sun-barr!olivea!charnel!rat!usc!zaphod.mps.ohio-state.edu!ub!galileo.cc.rochester.edu!rochester!rocksanne!leisner
- From: leisner@wrc.xerox.com ( Marty Leisner)
- Newsgroups: comp.unix.misc
- Subject: Profiling/timing subroutines
- Message-ID: <1992Nov18.183231.7281@spectrum.xerox.com>
- Date: 18 Nov 92 18:32:31 GMT
- Sender: news@spectrum.xerox.com
- Reply-To: leisner@eso.mc.xerox.com
- Organization: Xerox
- Lines: 54
- X-Newsreader: TIN [version 1.1 PL7]
-
- I'm using SunOS 4.1.2 (with most of the gnu stuff available).
-
- I'm not experienced with profiling...I looked a gprof...and the man pages it should tell me
- how much time I spend in subroutines.
-
- I'm working with a custom board/driver where IOCTLs can take several seconds to execute (the
- IOCTLs may take transfer 15Mbytes via DMA).
-
- Doing GNUtime -v:
- Summary statistics:
- Command being timed: "a.out"
-
- User time (seconds): 4.99
- System time (seconds): 1.26
- Percent of CPU this job got: 64%
- Elapsed (wall clock) time (h:mm:ss or m:ss): 0:09.75
-
- Doing gprof a.out gmon.out:
- Each sample counts as 0.01 seconds.
- % cumulative self self total
- time seconds seconds calls ms/call ms/call name
- 94.60 4.72 4.72 1 4720.39 4990.41 main
- 5.21 4.98 0.26 1 260.02 260.02 bzero
- 0.20 4.99 0.01 1 10.00 10.00 mmap
- 0.00 4.99 0.00 3 0.00 0.00 open
- 0.00 4.99 0.00 2 0.00 0.00 ioctl
- 0.00 4.99 0.00 2 0.00 0.00 realloc
- 0.00 4.99 0.00 2 0.00 0.00 sbrk
- 0.00 4.99 0.00 2 0.00 0.00 strlen
- 0.00 4.99 0.00 1 0.00 0.00 exit
- 0.00 4.99 0.00 1 0.00 0.00 free
- 0.00 4.99 0.00 1 0.00 0.00 getpagesize
- 0.00 4.99 0.00 1 0.00 0.00 malloc
- 0.00 4.99 0.00 1 0.00 0.00 on_exit
- 0.00 4.99 0.00 1 0.00 0.00 profil
- 0.00 4.99 0.00 1 0.00 0.00 sprintf
-
- % the percentage of the total running time of the
-
-
- My bzero profiled pretty well, by my ioctls are profiled...also, my time for main is just user
- time, I want to be able to understand user+sys time, and wall clock time...
-
- I also looked at prof...I only see if I develop other routines to do the ioctls I can time
- (but this looks kludgey...
-
- Is there a good way to do this?
-
-
-
- --
- marty
- leisner.henr801c@xerox.com leisner@eso.mc.xerox.com
- Member of the League for Programming Freedom
-