Framework with PGO is bigger then without

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Framework with PGO is bigger then without

Postby Elviin » Tue Nov 12, 2024 5:02 pm

Hi,

I have build two versions of the CEF in arm64-release configuration:

A) export GN_DEFINES="is_official_build=true proprietary_codecs=true ffmpeg_branding=Chrome chrome_pgo_phase=0"
B) export GN_DEFINES="is_official_build=true proprietary_codecs=true ffmpeg_branding=Chrome chrome_pgo_phase=1"

Why is the build product B (489MB) significantly larger than A (250MB)? I didn’t expect PGO optimizations to have such a significant impact on size.

My configuration:
mac/arm64/release/v6668
python ../automate/automate-git.py \
--download-dir="$MY_CEF_SOURCE/code/chromium_git" \
--depot-tools-dir="$MY_CEF_SOURCE/code/depot_tools" \
--no-distrib --no-build --with-pgo-profiles\
--arm64-build \
--branch=6668

Thank you.

Elviin
Elviin
Techie
 
Posts: 20
Joined: Tue Oct 22, 2024 3:06 am

Re: Framework with PGO is bigger then without

Postby magreenblatt » Tue Nov 12, 2024 7:40 pm

Are you comparing Release builds in both cases? We did not see large binary size changes in our testing. https://github.com/chromiumembedded/cef/issues/2956
magreenblatt
Site Admin
 
Posts: 12810
Joined: Fri May 29, 2009 6:57 pm

Re: Framework with PGO is bigger then without

Postby Elviin » Wed Nov 13, 2024 9:32 am

The minimal size I can reach this one.

Code: Select all
Release_GN_arm64 % du -hs Chromium\ Embedded\ Framework.framework
607M   Chromium Embedded Framework.framework
Release_GN_arm64 % echo $GN_DEFINES


It is almost 300MB more just because of the chrome_pgo_phase set to 1. That is way more than +/- 7%.

Code: Select all
export GN_DEFINES="is_official_build=true proprietary_codecs=true ffmpeg_branding=Chrome chrome_pgo_phase=1"


Can I add some switches, or debug the issue? Thank you.

Elviin
Elviin
Techie
 
Posts: 20
Joined: Tue Oct 22, 2024 3:06 am

Re: Framework with PGO is bigger then without

Postby Elviin » Wed Nov 13, 2024 12:24 pm

Ok, now I understand it.
First I have to compile the CEF with
chrome_pgo_phase=1

Integrate the framework into my main app

Generate the report profdata

Create the build again, but this time with chrome_pgo_phase=2

I expect to have a way smaller binaries.
Elviin
Techie
 
Posts: 20
Joined: Tue Oct 22, 2024 3:06 am


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 63 guests