Re: [PATCH dwarves] dwarf_loader: handle subprogram ret type with abstract_origin properly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 4/2/21 11:08 AM, Arnaldo wrote:


On April 2, 2021 2:42:21 PM GMT-03:00, Yonghong Song <yhs@xxxxxx> wrote:
On 4/2/21 10:23 AM, Yonghong Song wrote:
:> Thanks. I checked out the branch and did some testing with latest
clang
trunk (just pulled in).

With kernel LTO note support, I tested gcc non-lto, and llvm-lto
mode,
it works fine.

Without kernel LTO note support, I tested
    gcc non-lto  <=== ok
    llvm non-lto  <=== not ok
    llvm lto     <=== ok

Surprisingly llvm non-lto vmlinux had the same "tcp_slow_start"
issue.
Some previous version of clang does not have this issue.
I double checked the dwarfdump and it is indeed has the same reason
for lto vmlinux. I checked abbrev section and there is no cross-cu
references.

That means we need to adapt this patch
    dwarf_loader: Handle subprogram ret type with abstract_origin
properly
for non merging case as well.
The previous patch fixed lto subprogram abstract_origin issue,
I will submit a followup patch for this.

Actually, the change is pretty simple,

diff --git a/dwarf_loader.c b/dwarf_loader.c
index 5dea837..82d7131 100644
--- a/dwarf_loader.c
+++ b/dwarf_loader.c
@@ -2323,7 +2323,11 @@ static int die__process_and_recode(Dwarf_Die
*die, struct cu *cu)
         int ret = die__process(die, cu);
         if (ret != 0)
                 return ret;
-       return cu__recode_dwarf_types(cu);
+       ret = cu__recode_dwarf_types(cu);
+       if (ret != 0)
+               return ret;
+
+       return cu__resolve_func_ret_types(cu);
  }

Arnaldo, do you just want to fold into previous patches, or
you want me to submit a new one?

I can take care of that.

Arnaldo, just in case that you missed it, please remember
to fold the above changes to the patch:
[PATCH dwarves] dwarf_loader: handle subprogram ret type with abstract_origin properly
Thanks!


And I think it's time for to look at Jiri's test suite... :-)

It's a holiday here, so I'll take some time to get to this, hopefully I'll tag 1.21 tomorrow tho.

Cheers,

- Arnaldo




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux