Skip to content

more control over optimized debuginfo#151

Merged
vchuravy merged 3 commits into
masterfrom
sds/ircode_printing
Apr 19, 2021
Merged

more control over optimized debuginfo#151
vchuravy merged 3 commits into
masterfrom
sds/ircode_printing

Conversation

@simeonschaub
Copy link
Copy Markdown
Collaborator

This introduces three levels of debuginfo: none, compact, which is
equivalent to source for unoptimized code, but for optimized code
gives the same compact lineinfo printing as in previous Cthulhu
versions, and source which now always uses the same printing.

depends on JuliaLang/julia#40459
closes #149, closes #150

This introduces three levels of debuginfo: `none`, `compact`, which is
equivalent to `source` for unoptimized code, but for optimized code
gives the same compact lineinfo printing as in previous Cthulhu
versions, and `source` which now always uses the same printing.

depends on JuliaLang/julia#40459
closes #149, closes #150
@simeonschaub
Copy link
Copy Markdown
Collaborator Author

Just needs the nightliy builds to propagate through.

Comment thread src/Cthulhu.jl Outdated
##
function _descend(interp::CthulhuInterpreter, mi::MethodInstance; override::Union{Nothing, InferenceResult} = nothing, iswarn::Bool, params=current_params(), optimize::Bool=true, interruptexc::Bool=true, verbose=true, kwargs...)
debuginfo = true
debuginfo = 1 # default is compact debuginfo
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any specific reason to not use 1-based index here ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really. Using 0 for no debuginfo felt a little more natural, but I can also just change it to use one based indexing.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

imho something like debuginfo_keys[debuginfo + 1] looks a bit verbose, but I'm okay with either way. Your choice :)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The right thing to do is to use enums ;)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this look like a reasonable compromise?

Comment thread src/codeview.jl Outdated
Co-authored-by: Shuhei Kadowaki <[email protected]>
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 18, 2021

Codecov Report

❗ No coverage uploaded for pull request base (master@8d5169d). Click here to learn what that means.
The diff coverage is 43.47%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #151   +/-   ##
=========================================
  Coverage          ?   44.64%           
=========================================
  Files             ?        7           
  Lines             ?      887           
  Branches          ?        0           
=========================================
  Hits              ?      396           
  Misses            ?      491           
  Partials          ?        0           
Impacted Files Coverage Δ
src/Cthulhu.jl 18.53% <0.00%> (ø)
src/codeview.jl 46.93% <52.63%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8d5169d...575fed4. Read the comment docs.

@simeonschaub simeonschaub changed the title RFC: more control over optimized debuginfo more control over optimized debuginfo Apr 18, 2021
@simeonschaub
Copy link
Copy Markdown
Collaborator Author

OK if I merge this like this? This is currently preventing Cthulhu from working on Julia nightly.

@vchuravy vchuravy merged commit e9e1d62 into master Apr 19, 2021
@vchuravy vchuravy deleted the sds/ircode_printing branch April 19, 2021 16:32
simeonschaub added a commit that referenced this pull request Jul 23, 2021
This was accidentally broken by #151.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

debuginfo=false is still printing debuginfo line number now visually hard to distinguishable from code

4 participants