Luke Tierney
2003-Jun-14 04:26 UTC
[Rd] simple tools for extracting call graph information from Rprof output
A preliminary version of a package proftools for examining Rprof profiling output and, in particular, extracting and viewing call graph information is available at http://www.stat.uiowa.edu/~luke/R/codetools/proftools.tar.gz Call graph information, including which direct calls where observed and how much time was spent in these calls, can be very useful in identifying performance bottlenecks. The package produces either printed representations of the call graph, analogous to the ones produced by the GNU profiler gprof, or can be used to produce graphical representations using the Graphviz command line tools or the Rgraphviz package. The README file in the package contains some documentation that will eventually be worked into a vignette. The implementation is extremely crude (a real mess would be more accurate) and will hopefully be improved over time--at this point it is more of an existence proof than a final product. Performance is less than ideal, though using these tools it was possible to identify some problem points and speed up computing the profile data by a factor of two (in other words, it may be bad now but it used to be worse). More careful design of the data structures and memoizing calculations that are now repeated is likely to improve performance substantially. luke -- Luke Tierney University of Iowa Phone: 319-335-3386 Department of Statistics and Fax: 319-335-3017 Actuarial Science 241 Schaeffer Hall email: luke@stat.uiowa.edu Iowa City, IA 52242 WWW: http://www.stat.uiowa.edu