From: Yang Z. <yan...@gm...> - 2009-01-15 07:40:44
|
Does anybody have experience profiling ST programs? Any advice on how to do this? I'm currently trying to profile this simple C++ app: http://assorted.svn.sourceforge.net/viewvc/assorted/ydb/trunk/src/main.lzz.clamp?revision=1130&view=markup (Higher-level info about this program can be found at http://assorted.sf.net/ydb/.) With gprof, I obtain strange results. They don't appear to be garbage, but otherwise I'm not sure whether (or how) to trust the results: - Many things are shown as taking up 100% of the time. How exactly does gprof work (with ST)? Does gprof somehow understand the different ST threads as different threads, and thus be able to give a full 100% to each thread? Because if not, I'd expect each thread to take up <100% (but add up to 100%). Does this even happen with OS threads? - Certain connections aren't being made, such as the one between swallow and issue_txns. See some [gprof output] from a run of this program (running as a leader), along with [the visualization] produced using [gprof2dot]. (BTW, [xdot] is a good dot viewer.) [gprof output]: http://www.mit.edu/~y_z/st-prof/gprof.bz2 [the visualization]: http://www.mit.edu/~y_z/st-prof/dot.pdf [gprof2dot]: http://code.google.com/p/jrfonseca/wiki/Gprof2Dot [xdot]: http://code.google.com/p/jrfonseca/wiki/XDot Aside: has anybody tried using google-perftools with ST? -- Yang Zhang http://www.mit.edu/~y_z/ |