rokicki@navajo.STANFORD.EDU (Tomas Rokicki) (12/15/86)
[ `--\- flyin' high ] I'm about ready to start on an execution profiler for the Manx compiler and linker. Basically, it will patch an executable to generate traps, which will be intercepted by a second process which gathers statistics. I think I've figured out how to do everything I need to. The questions: -- Has anyone else attempted this, what problems did you run into? -- I'm not planning (initially) to make it compatible with Lattice or BLINK; I don't have Lattice so I don't know how the code is organized, and I plan to use a verbose link description output file from Manx `ln' for routine names and locations and the like. Perhaps someone else wants to help me with these? -- I need a fast, free-running clock. I plan to use the vertical beam position counter in addition to a vertical-retrace interrupt driven counter to get this clock . . . I'm still not sure how to introduce a vertical-retrace interrupt without mucking with the system, but I'm perfectly willing to muck with it if necessary. -- exit() and longjmp() will cause problems; routines which don't return will have their time lost, unless I rewrite these routines. I see some major assembly language hacking, here! -- Anyone out there have any sample code which installs new traps? I can do it myself, but samples always make it easier . . . See you at BADGE! -tom
rokicki@navajo.STANFORD.EDU (Tomas Rokicki) (12/22/86)
[ `--\- flyin' high ] I just spent the last two days hacking, wrote a profiler for Manx. (The quarter is over, and it is great to be hacking again!) It only works for Manx 3.30e or later, but it seems to work well. It's about 34K of source plus documentation, so I'd like to see if there is some interest in it out there before I post it. Three votes and it is yours. It can be modified to work with earlier Manx (easy) or with Lattice (medium easy) or even with other compilers (medium hard.) But I'll let those that need it do that . . . The only problem is, it confirmed what I already knew; I'm not going to make TeX much faster by looking at a few routines; those which headed the list on my profiler are the same ones I recoded in machine language. -tom