2011/1/9 Mark Engelberg <mark.engelb...@gmail.com>: > I'm trying to use JVisualVM to profile some Clojure code. > > One thing I successfully figured out from using the profiler was that > lein swank was not actually starting the jvm in -server mode like I > thought it was. Arggh, now I have to figure out what's going wrong > there. > > In the meantime, I fired up the "lein repl" which did start up in > -server mode, and tried to do some profiling. It tells me 80% of its > time is being spent in: > sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run() > > What does this mean? Is this just an artifact of the connection > between the profiler and the repl?
The jvisualvm CPU profiling measures time spent in a method. A wait() call will then add to the method's time. Indeed it's misleading. > The other time was mostly being spent in Clojure's hashmap classes. > Is there any way to figure out which lines of my Clojure code actually > triggered the time-consuming hash map operations? > > Is there a better free profiler I should be using? I had reasonable success with jprofiler, which has a "trial" license that can be renewed by signing up again with a new email. In any case It's not expensive. Just beware that jprofiler runs code without JIT, or so I (perhaps wrongly) concluded. Albert -- http://albert.rierol.net -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en