StatProfilerHTML.jl icon indicating copy to clipboard operation
StatProfilerHTML.jl copied to clipboard

matmul.jl-... missing from output

Open jamblejoe opened this issue 3 years ago • 2 comments

See the following MWE:

    n = 1000
    A, B = rand(n,n), rand(n,n)
    C = similar(A)
    mul!(C, A, B)
    @profilehtml mul!(C, A, B)

The flamegraph is nicely produced as image

Note that this was run in a Jupyter notebook.

Clicking on mul! in the flamegraph results in a dead link. The file .../statprof/matmul.jl-QzpcYnVpbGRib3Rcd29ya2VyXHBhY2thZ2Vfd2luNjRcYnVpbGRcdXNyXHNoYXJlXGp1bGlhXHN0ZGxpYlx2MS42XExpbmVhckFsZ2VicmFcc3JjXG1hdG11bC5qbA==.html#L273 is missing. There is actually no file matmul.jl-... at all.

StatProfilerHTML version is 1.2.1.

julia> versioninfo()
Julia Version 1.6.2
Commit 1b93d53fc4 (2021-07-14 15:36 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: Intel(R) Core(TM) i7-8665U CPU @ 1.90GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-11.0.1 (ORCJIT, skylake)

EDIT:

The generated files are image

The file is missing under Ubuntu 20.04 through WSL as well.

jamblejoe avatar Aug 06 '21 08:08 jamblejoe

Thanks for the report. There's two parts to this:

  • The source file matmul.jl really isn't available on your system which is why StatProfilerHTML can't generate that part of the report for you. If you build Julia from source, the file will be found and this will work as expected. This is probably what you want if you want to understand the performance better.
  • StatProfilerHTML should notice that the file doesn't exist and not create links to non-existing files (or link to a dummy page that explains that the source is not available). This would be a minor update that I don't mind making. Or, feel free to beat me to it and send a pull request.

tkluck avatar Aug 06 '21 21:08 tkluck

Thank you for your quick reply. Maybe linking to a dummy page explaining why the file is not available and ideally how to make it available would be awesome.

I guess one could make the file available without having to build Julia. One just needs the correct file matmul.jl doesn't one? I'm mostly interested in what mul! method is called, e.g. what line it is in matmul.jl.

jamblejoe avatar Aug 08 '21 11:08 jamblejoe