home *** CD-ROM | disk | FTP | other *** search
/ Best Tools for JAVA / Best Tools for JAVA.iso / JAVA_ALL / JAVA_UTL / HYPERPRO / README < prev   
Encoding:
Text File  |  1996-09-14  |  8.7 KB  |  251 lines

  1.  
  2. The HyperProf - hyperbolic profile browser for Java
  3.  
  4. == Version 1.2 
  5. == 14 September 1996
  6.  
  7.  
  8. Author: Vladimir Bulatov (V.Bulatov@ic.ac.uk)
  9.  
  10. This archive contains the distribution of the HyperProf.
  11. It allows you to view and analyze the execution profile of Java program,
  12. which shows exactly how much time your Java program spend and where.
  13.  
  14.  
  15. MAIN FEATURES
  16.  
  17. HyperProf is written in Java language and should (in principle) run 
  18. on all platforms supported by Java. It was tested with JDK 1.01 
  19. at least in Linux (where it was developed) and Windows 95. 
  20.  
  21. HyperProf includes hyperbolic browser of packages, classes and methods,
  22. which are called during execution of the profiled program. This browser
  23. visualizes global structure of the program and relationship between classes.
  24.  
  25. INSTALLATION
  26.  
  27. Unix installation.
  28.  
  29. The provided Makefile will install HyperProf on your system.  To use
  30. the Makefile, you MUST first edit it to match your directory
  31. structure. Change the values of $JAVA_DIR and the other two variables
  32. if necessary to point to where the actual Java binaries and classes
  33. are stored on your system.  See the Makefile itself for more
  34. information. If you wish to do in-place installation, you should 
  35. add 'classes' subdirectory to CLASSPATH enviroment variable.
  36.  
  37. Windows 95 
  38.  
  39. 0) Be  sure, that you have extracted files from this archive with 
  40. long file names.
  41.  
  42. 1) Copy contents of directory "classes" with all subdirectories  
  43. to some place pointed by CLASSPATH variable (or add new 
  44. path to CLASSPATH), or add path to "classes" to 
  45. your CLASSPATH and do not copy anything.
  46.  
  47. 2) Edit bin/HyperProf.bat to have correct full path to java executable 
  48. and CLASSPATH in it pointing to correct location of HyperProf classes.
  49.  
  50. 3) Copy bin/HyperProf.bat to some directory from your PATH variable.
  51.  
  52. Mac installation.
  53.  
  54. Here you are on your own at the moment. It shouldn't be a problem,
  55. but I am not too familiar with Mac to provide exact installation procedure.
  56.  
  57. RUNNING HyperProfiler.
  58.  
  59. To profile a program you should make profile information first.
  60. It can be obtained by running 
  61.  
  62.  > java -prof <name of your program> [parameters]
  63.  
  64. or 
  65.  
  66.  > java -prof sun.applet.AppletViewer applet.html
  67.  
  68. in case of profiling applets.
  69.  
  70. After your program will finished normally (not with the help of Ctrl-C for 
  71. example) there will be file java.prof in current directory. This file 
  72. contatins all necessary information to investigate execution profile. 
  73.  
  74. There is simple program TestProfiler.java and corresponding java.prof in
  75. src directory.
  76.  
  77. You can now run HyperProf typing 
  78.  
  79.  > HyperProf java.prof 
  80.  
  81.  
  82. MAIN WINDOW
  83.  
  84. HyperProf's main window has 4 lists: Methods, Caller, Callee, Memory, 
  85. which can be resized by mouse dragging boundary between them.
  86.  
  87. This lists contain
  88. Methods: 
  89.  
  90. shows all methods of all classes which was called during 
  91. execution of program. Each line contains:
  92. - time, spended in current method (in percent of total time or in milliseconds) 
  93. - cumulative time - a total time spend in this method and all methods 
  94. called by this method
  95. - number of calls of this method.
  96. - short name of this method.
  97.  
  98. Caller: 
  99.  
  100. Lists all methods, which have called selected method. Each line contains:
  101.  
  102. - total time spend in selected method from point of view of each caller.
  103. this time includes the time of all callee of the method.
  104. - cumulative time - sum of all times of all callers
  105. - number of calls of each caller.
  106. - name of caller
  107.  
  108. Callee:
  109.  
  110. Lists all method, which are called by selected method. Each line shows
  111.  
  112. - time spend in the callee (including all its callee).
  113. - cumulative time - sum of all times of all callees
  114. - number of calls done by currently selected method to this callee
  115. - name of callee
  116.  
  117. Memory:
  118.  
  119. Lists memory used by program. Each line contains 
  120.  
  121. - number of bytes allocated for particular type of objects (absolute value 
  122. or in percent of all allocated memory).
  123. - number of chunks by which this data was allocated.
  124. - short name of this data type.
  125.  
  126.  
  127. Selecting of one entry in methods list caused filling of 
  128. Callee and Caller lists with correspontding callee and callers of 
  129. selected method. Double click (or pressing <Enter> key) in Callers or Callees
  130. list caused selection of corresponding method in Methods list.
  131.  
  132.  
  133. HYPERBOLIC BROWSER
  134.  
  135. By selection of menu File|Show Graph, you can run Hyperbolic Browser.
  136. Simply speaking it represents all methods, classes and packages as tree.
  137. However to make possible to fit big amount of methods and classes (hundreds and
  138. thousands in relatively big program), it uses Poincare-disk model of 
  139. hyperbolic plane. Hyperbolic plane has more space, than usual euclidean plane,
  140. and it is ideall place to put trees with big number of leafs.
  141. There are some not always trivial geometrical constructions behind
  142. this hyperbolic browser, however user is not expected to know 
  143. anything about noneuclidean geometry and this knowledge is absolutelly 
  144. not necessary to use browser. You can just drag tree by mouse in hyperplane
  145. and enjoy :)
  146.  
  147. All tree is represented by 3 levels of nodes: packages (blue cyrcles), 
  148. classes (green cyrcles), methods(pink cyrcles). All nodes are sorted 
  149. by time and are placed clockwise starting from noon.
  150.  
  151. Dragging node by mouse to center of 
  152. Poincare disk caused considerable zooming in of visible size of this cyrcle
  153. with corresponding zooming out of nodes, which are going to boundary of disk.
  154. Dragging mouse with right button pressed caused rotation of all picture around 
  155. the center. If your mouse dosn't have right button - use [META+mouse button] 
  156. instead.
  157.  
  158. Clicking by mouse over method's cyrcle caused drawing of bounds, which 
  159. connect this method with its callers (yellow hyperlines) and callees (white
  160. hyperlines). The selection is reflected also in corresponding lists of main 
  161. window. Clicking by mouse over class or package node causes drawing of all 
  162. caller-callee bounds for methods from corresponding class or package. 
  163.  
  164. The status line in the bottom of the browser reflect name of and total 
  165. time spend by node over which mouse is currently located.
  166.  
  167. Root of the tree, which is located currently in the center of the disk
  168. represent special method with name '?.?', which I suppose represent in 
  169. some sence calls done by java vitual machine. This method have no caller, 
  170. no class, no package and I have decided to draw it as a root. Because 
  171. of the fact, that this method has no callers, its time is negative, as far as 
  172. time of several other methods. Don't worry about this.
  173.  
  174.  
  175. MENUS DESCRIPTION
  176.  
  177. File|Load... - load new execution profile from disk,
  178. File|New Profiler - create new empty HyperProf window, 
  179.     (that alows comparision of different profiles without overhead 
  180.     of running separate java programm)
  181. File|Show Graph - creates hyperbolic browser
  182. File|Quit - ...
  183.  
  184. Sort|by time - sort all entries by time spend there or by memory size.
  185. Sort|by name - sort all entries by name of it's Method or Class.
  186.  
  187. Options|absolute numbers - write absolute time in milliseconds or amount 
  188.                            of byte allocated 
  189. Options|relative numbers - write percentage of time and memory relative 
  190.     to total memory spended by program or to total memory allocated
  191.  
  192.  
  193.  
  194. KNOWN BUGS AND LIMITATIONS
  195.  
  196. 1)In case of recursive function calls data, provided by java.prof may be 
  197. incorrect or at least may be not treated correctly by the HyperProf.
  198.  
  199. 2)java.prof file has several system entries, 
  200. which appears as callers only, and therefore after subtracting 
  201. the time of all callee from time spend in this method this methods 
  202. will have negative time spend in them. It may be considered as a feature though,
  203. indicating that this method is high level system method.
  204.  
  205. 3)The headers of lists are shifted to right in Windows 95 (Why?)
  206.  
  207. 4) When boundary between lists is dragged by mouse, there is no visible 
  208. trace of current position. This is Windows 95 JDK 1.02 limitation, which 
  209. have forced me to remove this feature from Unix version too.
  210.  
  211. 5) JDK 1.02 has broken profile output: all names of methods are truncated to 30 
  212. characters. Usually HyperProf will still work, however it is not guarantied.
  213. Better choice - use JDK 1.01.
  214.  
  215. 6) The repainting speed of Hyperbolic browser is not great in case of relatively 
  216. complex program. 
  217.  
  218.  
  219.  
  220. HISTORY
  221.  
  222. 16 July 1996
  223. Initial public release version 1.1
  224.  
  225. 14 September 1996 
  226. version 1.2 - fixed some bugs:
  227. - JDK 1.02 profile format is supported 
  228. - fixed parsing of names of array as arguments 
  229.  
  230.  
  231.  
  232.  
  233. LICENSE
  234.  
  235. This software is distributed for free including it's source code under 
  236. terms of license included.
  237.  
  238. If you like this software very much you can send me postcard or donations.
  239. My current address is: 
  240. 84 Harslock Drive, London SE2 9UU (but check via e-mail first)
  241.  
  242. Any comments and questions by e-mail are welcome too.
  243.  
  244. You can also visit may home page http://pc153.mt.ic.ac.uk/Bulatov/
  245. to find news about HyperProf and much more.
  246.  
  247. Happy profiling!    
  248.  
  249. V.Bulatov@ic.ac.uk
  250.  
  251.