Re: [PATCH] pgo: add clang's Profile Guided Optimization infrastructure

2021-01-21 Thread Sedat Dilek
On Fri, Jan 22, 2021 at 2:34 AM Nick Desaulniers wrote: > > On Wed, Jan 20, 2021 at 6:21 PM Sedat Dilek wrote: > > > > Hi, > > > > When I looked through the code I wondered why we do not add a > > "CONFIG_PGO_CLANG_PROFDATA" which can be helpful when doing the PGO > > rebuild with a vmlinux.profd

Re: [PATCH] pgo: add clang's Profile Guided Optimization infrastructure

2021-01-21 Thread Nick Desaulniers
On Wed, Jan 20, 2021 at 6:21 PM Sedat Dilek wrote: > > Hi, > > When I looked through the code I wondered why we do not add a > "CONFIG_PGO_CLANG_PROFDATA" which can be helpful when doing the PGO > rebuild with a vmlinux.profdata. > > This introduces a "PGO_PROFDATA" to turn on/off to pass > "-fpro

Re: [PATCH] pgo: add clang's Profile Guided Optimization infrastructure

2021-01-20 Thread Sedat Dilek
Hi, When I looked through the code I wondered why we do not add a "CONFIG_PGO_CLANG_PROFDATA" which can be helpful when doing the PGO rebuild with a vmlinux.profdata. This introduces a "PGO_PROFDATA" to turn on/off to pass "-fprofile-use=vmlinux.profdata" (see CFLAGS_PGO_CLANG_PROFDATA in top-lev

Re: [PATCH] pgo: add clang's Profile Guided Optimization infrastructure

2021-01-11 Thread Fāng-ruì Sòng
On Mon, Jan 11, 2021 at 4:38 PM Bill Wendling wrote: > > On Mon, Jan 11, 2021 at 12:31 PM Fangrui Song wrote: > > On 2021-01-11, Bill Wendling wrote: > > >On Mon, Jan 11, 2021 at 12:12 PM Fangrui Song wrote: > > >> > > >> On 2021-01-11, 'Bill Wendling' via Clang Built Linux wrote: > > >> >From:

Re: [PATCH] pgo: add clang's Profile Guided Optimization infrastructure

2021-01-11 Thread Bill Wendling
On Mon, Jan 11, 2021 at 12:31 PM Fangrui Song wrote: > On 2021-01-11, Bill Wendling wrote: > >On Mon, Jan 11, 2021 at 12:12 PM Fangrui Song wrote: > >> > >> On 2021-01-11, 'Bill Wendling' via Clang Built Linux wrote: > >> >From: Sami Tolvanen > >> > > >> >Enable the use of clang's Profile-Guided

Re: [PATCH] pgo: add clang's Profile Guided Optimization infrastructure

2021-01-11 Thread Bill Wendling
On Mon, Jan 11, 2021 at 1:18 PM Nick Desaulniers wrote: > > On Mon, Jan 11, 2021 at 1:04 PM Nathan Chancellor > wrote: > > > > On Mon, Jan 11, 2021 at 12:18:21AM -0800, Bill Wendling wrote: > > > From: Sami Tolvanen > > > > > > Enable the use of clang's Profile-Guided Optimization[1]. To generat

Re: [PATCH] pgo: add clang's Profile Guided Optimization infrastructure

2021-01-11 Thread Nick Desaulniers
On Mon, Jan 11, 2021 at 1:04 PM Nathan Chancellor wrote: > > On Mon, Jan 11, 2021 at 12:18:21AM -0800, Bill Wendling wrote: > > From: Sami Tolvanen > > > > Enable the use of clang's Profile-Guided Optimization[1]. To generate a > > profile, the kernel is instrumented with PGO counters, a represen

Re: [PATCH] pgo: add clang's Profile Guided Optimization infrastructure

2021-01-11 Thread Nathan Chancellor
On Mon, Jan 11, 2021 at 12:18:21AM -0800, Bill Wendling wrote: > From: Sami Tolvanen > > Enable the use of clang's Profile-Guided Optimization[1]. To generate a > profile, the kernel is instrumented with PGO counters, a representative > workload is run, and the raw profile data is collected from

Re: [PATCH] pgo: add clang's Profile Guided Optimization infrastructure

2021-01-11 Thread Fangrui Song
On 2021-01-11, Bill Wendling wrote: On Mon, Jan 11, 2021 at 12:12 PM Fangrui Song wrote: On 2021-01-11, 'Bill Wendling' via Clang Built Linux wrote: >From: Sami Tolvanen > >Enable the use of clang's Profile-Guided Optimization[1]. To generate a >profile, the kernel is instrumented with PGO co

Re: [PATCH] pgo: add clang's Profile Guided Optimization infrastructure

2021-01-11 Thread Bill Wendling
On Mon, Jan 11, 2021 at 12:12 PM Fangrui Song wrote: > > On 2021-01-11, 'Bill Wendling' via Clang Built Linux wrote: > >From: Sami Tolvanen > > > >Enable the use of clang's Profile-Guided Optimization[1]. To generate a > >profile, the kernel is instrumented with PGO counters, a representative > >

Re: [PATCH] pgo: add clang's Profile Guided Optimization infrastructure

2021-01-11 Thread Fangrui Song
On 2021-01-11, 'Bill Wendling' via Clang Built Linux wrote: From: Sami Tolvanen Enable the use of clang's Profile-Guided Optimization[1]. To generate a profile, the kernel is instrumented with PGO counters, a representative workload is run, and the raw profile data is collected from /sys/kernel

Re: [PATCH] pgo: add clang's Profile Guided Optimization infrastructure

2021-01-11 Thread Nathan Chancellor
On Mon, Jan 11, 2021 at 10:57:35AM +0100, Sedat Dilek wrote: > On Mon, Jan 11, 2021 at 10:17 AM Bill Wendling wrote: > > > > On Mon, Jan 11, 2021 at 12:39 AM Sedat Dilek wrote: > > > > > > On Mon, Jan 11, 2021 at 9:18 AM 'Bill Wendling' via Clang Built Linux > > > wrote: > > > > > > > > From: Sa

Re: [PATCH] pgo: add clang's Profile Guided Optimization infrastructure

2021-01-11 Thread Sedat Dilek
On Mon, Jan 11, 2021 at 10:17 AM Bill Wendling wrote: > > On Mon, Jan 11, 2021 at 12:39 AM Sedat Dilek wrote: > > > > On Mon, Jan 11, 2021 at 9:18 AM 'Bill Wendling' via Clang Built Linux > > wrote: > > > > > > From: Sami Tolvanen > > > > > > Enable the use of clang's Profile-Guided Optimizatio

Re: [PATCH] pgo: add clang's Profile Guided Optimization infrastructure

2021-01-11 Thread Bill Wendling
On Mon, Jan 11, 2021 at 12:39 AM Sedat Dilek wrote: > > On Mon, Jan 11, 2021 at 9:18 AM 'Bill Wendling' via Clang Built Linux > wrote: > > > > From: Sami Tolvanen > > > > Enable the use of clang's Profile-Guided Optimization[1]. To generate a > > profile, the kernel is instrumented with PGO coun

Re: [PATCH] pgo: add clang's Profile Guided Optimization infrastructure

2021-01-11 Thread Sedat Dilek
On Mon, Jan 11, 2021 at 9:39 AM Sedat Dilek wrote: > > On Mon, Jan 11, 2021 at 9:18 AM 'Bill Wendling' via Clang Built Linux > wrote: > > > > From: Sami Tolvanen > > > > Enable the use of clang's Profile-Guided Optimization[1]. To generate a > > profile, the kernel is instrumented with PGO count

Re: [PATCH] pgo: add clang's Profile Guided Optimization infrastructure

2021-01-11 Thread Sedat Dilek
On Mon, Jan 11, 2021 at 9:18 AM 'Bill Wendling' via Clang Built Linux wrote: > > From: Sami Tolvanen > > Enable the use of clang's Profile-Guided Optimization[1]. To generate a > profile, the kernel is instrumented with PGO counters, a representative > workload is run, and the raw profile data is

[PATCH] pgo: add clang's Profile Guided Optimization infrastructure

2021-01-11 Thread Bill Wendling
From: Sami Tolvanen Enable the use of clang's Profile-Guided Optimization[1]. To generate a profile, the kernel is instrumented with PGO counters, a representative workload is run, and the raw profile data is collected from /sys/kernel/debug/pgo/profraw. The raw profile data must be processed by