timholy / IProfile.jl

Profilers for Julia
MIT License
18 stars 15 forks source link

Possible SProfile bug? #23

Closed IainNZ closed 11 years ago

IainNZ commented 11 years ago

When I run the following code: https://gist.github.com/IainNZ/6044280

I see 5111 ...dunning/raytracer.jl intersect 71 Even thought the total number of samples taken is only 2713: 2713 ...file/src/sprofile.jl anonymous 309 ... 2600 ...dunning/raytracer.jl Raytracer 124

Is this a bug or some subtlety that I don't understand?

timholy commented 11 years ago

Mostly answered on the mailing list. In the course of adding this to the README, it occurred to me that maybe what you really want is a view that only includes the "lowest level", i.e., the line that was executing at the moment the snapshot was taken?

IainNZ commented 11 years ago

That could perhaps be useful, on the other hand, that'd possibly be deep within Julia in an area we wouldn't care about. I think the current way of doing things is pretty easy to understand, apart from this little recursive "gotcha".