breadcrumbs:
export USE="$USE -reorder" export EXTRA_BUILD_ARGS="order_profiling=1 order_text_section=''"
Add --no-sandbox to chrome start arguments (in the buttom of /sbin/session_manager_setup.sh).
As you prepare, you may have run chrome collecting logs (which you don't want yet). Remove them and reboot.
rm /var/log/chrome/cyglog.*; sudo reboot
After you browse several sites (google.com, maps.google.com, youtube.com), copy logs to your host machine to some directory.
Sanitize logs.
head -1 cyglog.*
If some log does not contain header (containing /opt/google/chrome/chrome), remove it. This log left from before you removed all cyglogs last boot.
$CHROME_SRC/tools/cygprofile/mergetraces.py `ls cyglog.* -Sr` > merged_cyglog
$CHROME_SRC/tools/cygprofile/symbolize.py -t orderfile merged_cyglog /build/x86-alex/opt/google/chrome/chrome > unpatched_orderfile
export USE="$USE -reorder" export EXTRA_BUILD_ARGS="order_profiling=0 order_text_section='/home/$USER/trunk/src/scripts/cyglog/unpatched_orderfile'"
$CHROME_SRC/tools/cygprofile/patch_orderfile.py unpatched_orderfile /build/x86-alex/opt/google/chrome/chrome > orderfile
nm -Sn /build/x86-alex/opt/google/chrome/chrome | less
And note, that ChromeMain symbol is not at the beginning of symbols.
In the image built without reordering, ChromeMain immediately follows main and is about 10th symbol in the image.
The repo, containing orderfiles is here: http://git.chromium.org/gitweb/?p=chromiumos/profile/chromium.git
Intructions on how to update the repo: https://www.chromium.org/chromium-os/developer-library/reference/development/source-layout#git-server-layout