Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Real-Time Profiling of Code

10 views
Skip to first unread message

Alex Measday

unread,
May 17, 1993, 6:38:32 PM5/17/93
to
I used to work for GE in Lanham, MD, back in the mid-1980's. Our VMS guru,
Bob Wilson, had written a real-time, CPU sampling monitor called PROFILE
that provided - as your program ran - a continuously-updating, graphical
display (on a VT terminal) of where your program was spending its time.
PROFILE could generate a number of different types of displays and,
depending on how much information your program was compiled and linked
with, could show statistics down to the line number.

Does anyone know if any tools like this are available - preferably in
the public domain? I've tried DEC's Performance and Coverage Analyzer,
but it appears (from my limited dabbling with it) to just be a take-off
of the UNIX GPROF(1) tool. As with GPROFed programs, you need to build
a special version of your application (linked with the PCA library), run
your application to collect statistics, and, after the run is complete,
analyze the statistics.

Bob Wilson's PROFILE, on the other hand, required no special executables,
although LINK-generated symbol tables, etc., allowed finer granularity
in the displayed statistics. You could monitor the behavior of your
program as it executed. For example, we were running our production
system once (multiple processes performing image processing) and one
of the processes was monopolizing the CPU. Bob sat down at a terminal,
attached PROFILE to the process, watched it for a couple of minutes, and
said "You're spending all your time in this histogramming function. Why
don't you rewrite it in assembler?" We did and that process no longer
hogged the CPU.

PROFILE also had the capability of logging and reingesting its samples,
so that post-run, GPROF/PCA-style analysis was possible. I found PROFILE
easier to use and more useful than GPROF (which I used later). I've seen
no mention of tools like PROFILE in any of the DEC-related publications
I read and the VMS gurus at my present site haven't heard of anything
like it. Doesn't anybody use tools like PROFILE?

Thanks for any information,

Alex Measday
Integral Systems, Inc.
al...@tpocc.gsfc.nasa.gov

Steve Simmons

unread,
May 18, 1993, 8:29:51 AM5/18/93
to

> Does anyone know if any tools like this are available - preferably in
> the public domain? I've tried DEC's Performance and Coverage Analyzer,
> but it appears (from my limited dabbling with it) to just be a take-off
> of the UNIX GPROF(1) tool. As with GPROFed programs, you need to build
> a special version of your application (linked with the PCA library), run
> your application to collect statistics, and, after the run is complete,
> analyze the statistics.

First, I worked on VAX PCA after it shipped V1. The original designer
Bert Beander never used or knew of gprof until I showed it to him in
'85.

Next, there is no specific set of PCA libraries (like there are in
gprof). There is a specific handler that must be linked; however,
you can use the same executable that you used for debugging. You
must define the following logical (I think)...

$DEFINE LIB$DEBUG SYS$SYSTEM:PCA$OBJ.EXE


> PROFILE also had the capability of logging and reingesting its samples,
> so that post-run, GPROF/PCA-style analysis was possible. I found PROFILE
> easier to use and more useful than GPROF (which I used later). I've seen
> no mention of tools like PROFILE in any of the DEC-related publications
> I read and the VMS gurus at my present site haven't heard of anything
> like it. Doesn't anybody use tools like PROFILE?

Certainly, real time view of the data is nice and the ability to attach
to a running process.. Especially, when the program
is NOW in a loop. On the other hand, VAX debug can provide some of that
functionality. Merely type CTRL-Y debug. Then, randomly interrupt
your running program with CTRL-C. You will have to do your own reduction
to infer the location of where your time is. Maybe, you can write your
own tool that interprets the backtrace command.

Thank you.

Steve Simmons

Alex Measday

unread,
May 18, 1993, 11:23:34 AM5/18/93
to
In article <ssimmons.737728191> ssim...@convex.com (Steve Simmons) writes:
>
>First, I worked on VAX PCA after it shipped V1. The original designer
>Bert Beander never used or knew of gprof until I showed it to him in '85.

I apologize for the (unintended) slight of PCA and Bert Beander. When I
called PCA a "takeoff" of GPROF, I really meant that it was in the same
vein as the UNIX collection of profiling tools, i.e., you run your program
to collect statistics and then analyze them after the run completes. In
fact, my impression of PCA was that, in typical DEC fashion, it was much
more polished and powerful than its UNIX counterpart. Some of the UNIX
utilities give the impression of being hacked together; the DEC developers
seem to go the extra step to produce a finished product.

>
>Next, there is no specific set of PCA libraries (like there are in
>gprof). There is a specific handler that must be linked; however,
>you can use the same executable that you used for debugging.

I stand corrected - it's been a few months since I last used PCA.

>On the other hand, VAX debug can provide some of that
>functionality. Merely type CTRL-Y debug. Then, randomly interrupt
>your running program with CTRL-C.

Having had my share of infinite loops, I've done this before, although
it's somewhat difficult if the application wasn't started from the
command line on your terminal!

-----

Marty (Vii...@darwin.cmh.mcmaster.ca) provided the following information
via E-mail; I hope he doesn't mind my quoting it:

I know of a tool exactly like the one you describe, maybe even better.
It also gives detailed info about RMS files and RDB databases. Its
called RPM/V. Its a real-time production tool, not a development tool
like PCA that requires linking. It will attach to anything or any
number of images at the same time. Very efficient as well.

Vaxxine Computer Systems
St. Catharines Ont. Canada
(416) 687-8424
1-800-667-8299

-----

Steve Lionel

unread,
May 18, 1993, 12:11:34 PM5/18/93
to

In article <1t9458$6...@skates.gsfc.nasa.gov>, al...@tpocc.gsfc.nasa.gov
(Alex Measday) asks about a real-time profiling tool for VMS...

It's not fancy, and it certainly doesn't give you line numbers, but you might
get a kick out of using SHOW PROCESS/CONTINUOUS and pressing V. See the help
for SHOW PROCESS/CONTINUOUS for more details.
--

Steve Lionel lio...@quark.enet.dec.com
SDT Languages Group
Digital Equipment Corporation
110 Spit Brook Road
Nashua, NH 03062

Arthur T. McClinton

unread,
May 19, 1993, 1:06:05 PM5/19/93
to
I used to use the PROFILE package that GE wrote for use on the LANDSAT
project at NASA-GSFC in the mid 80's. I was able to re-link it for use under
VMS 4.n and under VMS 5.0-5.2 I was able to keep a few of the libraries
around to make it continue to work, but then I lost interest (need for it)
and I never could get it to work under VMS5.3 and above. GE sold the
rights to the package and the new owner has never contacted me about continuing
maintenance.

The various DEC packages and those of McCabe and Reasoning Systems do an
excellent job on procedure based Fortran but have a hard time when it
comes to AST routines.

Basically what PROFILE did was to connect to any interrupt (clock or otherwise)
and store the address that the interrupt came from before taking the normal
interrupt. The data was then processed against the link map and the debug
information to give code usage distribution. It is a very simple concept and
relatively easy to implement.



*
*---Art
*
*Arthur T. McClinton Jr. Internet: A...@MITRE.ORG
*The Mitre Corporation Phone: 703-883-6356
*7525 Colshire Dr. Internal Mitre: ART@AERA785 or M10319@MWVM
*McLean, Va. 22102-3481 DCS: MCCLINTON
* FAX: 703-883-1964

0 new messages