For example, the following script fails with NullPointerException but succeeds
without Thread.start block.
{code}
def foo() {
Thread.sleep(100)
}
def bar() {
Thread.sleep(100)
}
profile {
Thread.start {
10.times { foo() }
}
Thread.start {
10.times { bar() }
}
}.prettyPrint()
{code}
{code}
Caught: java.lang.NullPointerException
java.lang.NullPointerException
at gprof.ProfileTime.plus(ProfileTime.java:43)
at gprof.Profile$1.visit(Profile.java:59)
at gprof.ProfileCallTree$Node.visit(ProfileCallTree.java:97)
at gprof.ProfileCallTree.visit(ProfileCallTree.java:32)
at gprof.Profile.makeMethodEntries(Profile.java:33)
at gprof.Profile.<init>(Profile.java:26)
at gprof.Profiler.run(Profiler.java:47)
at gprof.Profiler$run.call(Unknown Source)
at gprof.ProfileStaticExtension.profile(ProfileStaticExtension.groovy:29)
at ConcurrentProf.run(ConcurrentProf.groovy:9)
{code}
Original issue reported on code.google.com by nagaimas...@gmail.com on 20 Apr 2013 at 8:02
Original issue reported on code.google.com by
nagaimas...@gmail.com
on 20 Apr 2013 at 8:02