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

- From: Sedat Dilek \<hidden\>
- Date: 2021-01-21 02:45:47 
- List: linux-doc
- Page: https://ratatoskr.run/linux-doc/2021/01/6242075
- Thread: https://ratatoskr.run/linux-doc/2021/01/6229274/t.md

```text
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-level Makefile).

If we turn off via "PGO_PROFILE := n" in several Makefiles - we should
do the same and add "PGO_PROFDATA := n" to the same Makefiles?

Please see the attached diff.

Regards,
- Sedat -
```

## Attachments

- [CONFIG\_PGO\_CLANG\_PROFDATA.diff](https://ratatoskr.run/linux-doc/2021/01/6242075/attachment/0) (text/x-patch, 4769 bytes)
