msriram@cis.ohio-state.edu (M.G. SriRam) (02/15/89)
i am using SPY to study the behaviour of a rather large system. could someone tell me whether it is possible to obtain the results of SPY in a tabular form, suitable for hardcopy? also, is there a way to 'save' the tree produced by SPY on disk? from what i can make out in the documentation the only way to view this tree is in graphical form. this is very nice but it is not very 'portable' and scrolling through it tends to be slow. many thanks!
Briggs.pa@XEROX.COM (02/15/89)
For what it's worth, you can shift-select the SPY graph into a TEdit document and save it, but then it is purely the grapher graph, and has lost the data that it was based on (i.e., adjust the threshold and merge-none/all/default *before* you put it into TEdit) In the Lyric release (at least) of Xerox Lisp there was a Lispusers package called HGRAPH which redefined the Grapher hardcopy fn so that it would print multiple panels for large graphs -- don't know how well it interacted with SPY graphs in Lyric though. You might want to consider setting the "Threshold" to something like 5 or 10%, which will reduce the size of the SPY graph, and you'll see who the real time hogs are instead of all the little stuff that you probably don't care about (adjust the threshold value until you see about what you want, it depends on the program -- sometimes I set it around 2%) \nick briggs
schmidt@SUMEX-AIM.STANFORD.EDU (Christopher Schmidt) (02/16/89)
As noted on page 250 of the Medley SPY documentation, you can save SPY.TREE as an UGLYVARS. Eg. (SETQ TESTCOMS '((UGLYVARS SPY.TREE))) and (MAKEFILE 'TEST.LSP 'NEW). Note that what looks like a symbol ("spy:T") is actually a record of type SPYRECORD. You can inspect this record with the inspector or (in the absence of a declaration for SPYRECORD) programatically fetch the fields with FETCHFIELD and any of the field descriptors returned by (GETDESCRIPTORS 'SPYRECORD). (See section 8.9 (page 8.21) in the IRM.) For the casual hacker, FETCHFIELD is a little safer than writing your own ACCESSFNS which would be prefereable from the point-of-view of style. [Of course, what you really want is the SPYRECORD declaration. I doubt it has changed since Lyric if you have the source to that version. Since the UGLYVARS dump shows that it's just 6 pointers, you could wing it and make up your own field names in a DATATYPE declaration, but I haven't tried that.] --Christopher