Created
December 16, 2012 20:03
-
-
Save binarybana/4312218 to your computer and use it in GitHub Desktop.
A minimal test case for an inter-module profiling bug.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require("fancy") | |
using Fancy | |
do_fancy(100) | |
Fancy.@profile report |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require("fancy") | |
using Fancy | |
require("profile") | |
using Profile | |
do_fancy(100) | |
@profile report |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Fancy | |
export do_fancy | |
require("profile") | |
using Profile | |
@profile begin | |
function do_fancy(x::Int) | |
myarray = randn(x,x) | |
for i in 1:x | |
myarray[i,i] = calc_diag(i) | |
end | |
myarray | |
end | |
function calc_diag(i::Int) | |
exp(i) | |
end | |
end #@profile | |
end # module Fancy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bana-desktop:~/G/c/j/prof$ julia driver.jl # driver_1 | |
type error: getfield: expected Symbol, got Expr | |
in include at boot.jl:237 | |
at driver.jl:5 | |
bana-desktop:~/G/c/j/prof$ julia driver.jl # driver_2 | |
in module path: Profile not defined | |
in include at boot.jl:237 | |
at driver.jl:5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment