[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+icZUWJu0FWdRY0DMQxpYwjqq1WTB87y9u1-6t3YMmkR3UsBQ@mail.gmail.com>
Date: Thu, 28 Jan 2021 22:19:10 +0100
From: Sedat Dilek <sedat.dilek@...il.com>
To: Nick Desaulniers <ndesaulniers@...gle.com>
Cc: Bill Wendling <morbo@...gle.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Jonathan Corbet <corbet@....net>,
Masahiro Yamada <masahiroy@...nel.org>,
Linux Doc Mailing List <linux-doc@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>,
Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
clang-built-linux <clang-built-linux@...glegroups.com>,
Nathan Chancellor <natechancellor@...il.com>,
Sami Tolvanen <samitolvanen@...gle.com>
Subject: Re: [PATCH v7] pgo: add clang's Profile Guided Optimization infrastructure
On Thu, Jan 28, 2021 at 10:12 PM Nick Desaulniers
<ndesaulniers@...gle.com> wrote:
>
> On Thu, Jan 28, 2021 at 12:46 PM Sedat Dilek <sedat.dilek@...il.com> wrote:
> >
> > [ LLVM ]
> >
> > Today, I switched over to LLVM version 12.0.0-rc1.
> >
> >
> > [ Step #1: 5.11.0-rc5-5-amd64-clang12-pgo ]
> >
> > My first kernel was built with CONFIG_PGO_CLANG=y and LLVM=1 plus LLVM_IAS=1.
> >
> > [ start-build_5.11.0-rc5-5-amd64-clang12-pgo.txt ]
> > dileks 193090 193065 0 06:54 pts/2 00:00:00 /usr/bin/perf_5.10
> > stat make V=1 -j4 HOSTCC=clang HOSTCXX=clang++ HOSTLD=ld.lld CC=clang
> > LD=ld.lld LLVM=1 LLVM_IAS=1 PAHOLE=/opt/pahole/bin/pahole
> > LOCALVERSION=-5-amd64-clang12-pgo KBUILD_VERBOSE=1
> > KBUILD_BUILD_HOST=iniza KBUILD_BUILD_USER=sedat.dilek@...il.com
> > KBUILD_BUILD_TIMESTAMP=2021-01-28 bindeb-pkg
> > KDEB_PKGVERSION=5.11.0~rc5-5~bullseye+dileks1
> >
> > Config: config-5.11.0-rc5-5-amd64-clang12-pgo
> >
> >
> > [ Step #2: x86-64 defconfig & vmlinux.profdata ]
> >
> > Booted into 5.11.0-rc5-5-amd64-clang12-pgo and built an x86-64
> > defconfig to generate/merge a vmlinux.profdata file.
> >
> > [ start-build_x86-64-defconfig.txt ]
> > dileks 18430 15640 0 11:15 pts/2 00:00:00 make V=1 -j4
> > HOSTCC=clang HOSTCXX=clang++ HOSTLD=ld.lld CC=clang LD=ld.lld LLVM=1
> > LLVM_IAS=1
> >
> > Script: profile_clang-pgo.sh
> > Config: dot-config.x86-64-defconfig
> >
> >
> > [ Step #3.1: 5.11.0-rc5-6-amd64-clang12-pgo & GNU-AS ]
> >
> > The first rebuild with CONFIG_PGO_CLANG=n and "LLVM=1
> > KCFLAGS=-fprofile-use=vmlinux.profdata".
> > I was able to boot into this one.
> > Used assembler: GNU-AS 2.35.1
> >
> > [ start-build_5.11.0-rc5-6-amd64-clang12-pgo.txt ]
> > dileks 65734 65709 0 11:54 pts/2 00:00:00 /usr/bin/perf_5.10
> > stat make V=1 -j4 HOSTCC=clang HOSTCXX=clang++ HOSTLD=ld.lld CC=clang
> > LD=ld.lld PAHOLE=/opt/pahole/bin/pahole
> > LOCALVERSION=-6-amd64-clang12-pgo KBUILD_VERBOSE=1
> > KBUILD_BUILD_HOST=iniza KBUILD_BUILD_USER=sedat.dilek@...il.com
> > KBUILD_BUILD_TIMESTAMP=2021-01-28 bindeb-pkg
> > KDEB_PKGVERSION=5.11.0~rc5-6~bullseye+dileks1 LLVM=1
> > KCFLAGS=-fprofile-use=vmlinux.profdata
> >
> > Config: config-5.11.0-rc5-6-amd64-clang12-pgo
> >
> >
> > [ Step #3.2: 5.11.0-rc5-7-amd64-clang12-pgo & Clang-IAS ]
> >
> > The second rebuild with CONFIG_PGO_CLANG=n and "LLVM=1
> > KCFLAGS=-fprofile-use=vmlinux.profdata" plus LLVM_IAS=1.
> > Compilable but NOT bootable in QEMU and on bare metal.
> > Used assembler: Clang-IAS v12.0.0-rc1
> >
> > [ start-build_5.11.0-rc5-7-amd64-clang12-pgo.txt ]
> > dileks 6545 6520 0 16:31 pts/2 00:00:00 /usr/bin/perf_5.10
> > stat make V=1 -j4 HOSTCC=clang HOSTCXX=clang++ HOSTLD=ld.lld CC=clang
> > LD=ld.lld PAHOLE=/opt/pahole/bin/pahole
> > LOCALVERSION=-7-amd64-clang12-pgo KBUILD_VERBOSE=1
> > KBUILD_BUILD_HOST=iniza KBUILD_BUILD_USER=sedat.dilek@...il.com
> > KBUILD_BUILD_TIMESTAMP=2021-01-28 bindeb-pkg
> > KDEB_PKGVERSION=5.11.0~rc5-7~bullseye+dileks1 LLVM=1
> > KCFLAGS=-fprofile-use=vmlinux.profdata LLVM_IAS=1
> >
> > Config: config-5.11.0-rc5-7-amd64-clang12-pgo
> >
> >
> > [ Conclusion ]
> >
> > The only statement I can tell you is a "PGO optimized" rebuild with
> > LLVM_IAS=1 is compilable but NOT bootable.
>
> Thanks for the extensive testing and report. Can you compress, upload,
> and post a link to your kernel image? I would like to take it for a
> spin in QEMU and see if I can find what it's doing, then work
> backwards from there.
>
Which files do you need?
For QEMU: bzImage and initrd.img enough?
- Sedat -
Powered by blists - more mailing lists