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/7/21 8:37 AM, Arnaldo Carvalho de Melo wrote:
Em Wed, Apr 07, 2021 at 07:54:26AM -0700, Yonghong Song escreveu:
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!

Its there, I did it Sunday, IIRC:

https://git.kernel.org/pub/scm/devel/pahole/pahole.git/commit/?h=tmp.master&id=9adb014930f31c66608fa39a35ccea2daa5586ad

@@ -2295,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);
  }

  static int class_member__cache_byte_size(struct tag *tag, struct cu *cu,

----

Thanks! I just saw it in the master branch now. Somehow I did not see
it in tmp.master branch yesterday and I don't know why.


My latest tests were all with it in place.

- Arnaldo

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