Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ref: Split DWARF line records according to inlinees #633

Merged
merged 1 commit into from
Jul 26, 2022

Conversation

Swatinem
Copy link
Member

@Swatinem Swatinem commented Jul 25, 2022

Consider the following code:

  | fn parent() {
1 |   child1();
2 |   child2();
  | }
1 | fn child1() { child2() }
1 | fn child2() {}

we assume here that we transitively inline child2 all the way into parent.
but we only have a single line record for that whole chunk of code,
even though the inlining hierarchy specifies two different call sites

addr:    0x10 0x20 0x30 0x40 0x50
         v    v    v    v    v
# DWARF hierarchy
parent:  |-------------------|
child1:       |----|           (called from parent.c line 1)
child2:       |----|           (called from child1.c line 1)
                   |----|      (called from parent.c line 2)
# line records
         |----|         |----| (parent.c line 1)
              |---------|      (child2.c line 1)

@Swatinem Swatinem marked this pull request as ready for review July 25, 2022 16:13
@Swatinem Swatinem requested a review from a team July 25, 2022 16:13
@codecov-commenter
Copy link

Codecov Report

Merging #633 (65a71bf) into master (40a0e39) will increase coverage by 0.24%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #633      +/-   ##
==========================================
+ Coverage   71.09%   71.34%   +0.24%     
==========================================
  Files          96       96              
  Lines       18200    18341     +141     
==========================================
+ Hits        12940    13085     +145     
+ Misses       5260     5256       -4     

@Swatinem Swatinem merged commit 59a4fc2 into master Jul 26, 2022
@Swatinem Swatinem deleted the ref/split-dwarf-line branch July 26, 2022 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants