Skip to content

Profile.print() throws exception with poor explenation #4077

Closed
@ivarne

Description

@ivarne

If the profiler does not run long enough to capture backtraces Profile.print() throws an error with poor explanation. Maybe it should check if there is captured profiles before trying to print?

               _
   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: http://docs.julialang.org
   _ _   _| |_  __ _   |  Type "help()" to list help topics
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.2.0-prerelease+3285
 _/ |\__'_|_|_|\__'_|  |  Commit new_reload/17cc3b6* 2013-08-16 09:15:37 UTC
|__/                   |  x86_64-apple-darwin12.4.0

julia> 2/2
1.0

julia> @profile 2/2
1.0

julia> Profile.print()
ERROR: max: argument is empty
 in max at abstractarray.jl:1545
 in tree_format at profile.jl:243
 in tree at profile.jl:338
 in tree at profile.jl:369
 in tree at profile.jl:357
 in print at profile.jl:35
 in print at profile.jl:42
 in print#g171 at no file

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions