Commit graph

7 commits

Author SHA1 Message Date
Zihan Chen
0c57e655ed crosvm: Add more release build profiles
Add codegen-units=1 build profile to further reduce binary size
and potentially improve performance.
tools/build_release is updated to allow choice of build profiles.
To keep binary size measurement trend consistent, release build
recipe is running with chromeos profile.

crosvm size of different profiles at current cl:
relase profile (w/o strip symbols) 24192680,
chromeos profile (strip symbols from release) 15088272,
lto profile (fat lto & strip symbols) 14326144,
largecodegen profile (codegen-units=1 w/ fat lto) 13764896

TEST=./tools/build_release --profile largecodegen

BUG=b:181105093

Change-Id: I057ddfce3e78aa4dfe6b4810f4bcb1f13b954bb4
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5027712
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Auto-Submit: Zihan Chen <zihanchen@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2023-11-16 20:18:01 +00:00
Dennis Kempin
d385d47365 build_release: Handle riscv64 excludes
This is called during CI builds.

BUG=b:280448021
TEST=https://ci.chromium.org/swarming/task/620097348c96e910

Change-Id: I037124f71343bb646297e20ff8e1082d3556caec
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4505940
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2023-05-04 18:05:05 +00:00
Zihan Chen
e9a3515de7 tools: Add PGO support
Enable building PGO-instrumented and tuned release binary.

TEST=mkdir /workspace/profiles && ./tools/build_release --profile-generate /workspace/profiles && llvm-profdata merge -o /workspace/profiles/merged.profdata /workspace/profiles/ && ./tools/build_release --profile-use /workspace/profiles/merged.profdata

BUG=b:181105093

Change-Id: I2f25286017a441c303206037b00de21b912a1e42
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4363337
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Zihan Chen <zihanchen@google.com>
2023-03-29 00:14:01 +00:00
Zihan Chen
e670159c2e crosvm: Add seccomp_trace feature
Add a minijail's mode of operation where an always-allow seccomp
filter is attached to forked device processes. This facilitates
capturing seccomp filters used by each device process separately.

TESTED=./tools/build_release -- --features seccomp_trace && strace -ff crosvm --log-level debug run <args>

BUG=b:258316090

Change-Id: Ic4d3f5178e6a2dcbd748d101db43574f3224ff78
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4289510
Commit-Queue: Zihan Chen <zihanchen@google.com>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
2023-03-01 19:18:12 +00:00
Dennis Kempin
a53130345e tools: Clean up old test runner code
test_runner.py and test_target.py are mostly no longer needed. Some
common utility code has been moved to common.py

BUG=b:268530960
TEST=presubmit

Change-Id: I5f616cd4fdd496eae49adfcae80ad5472efc9562
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4289247
Reviewed-by: Zihan Chen <zihanchen@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2023-02-28 19:33:44 +00:00
Zihan Chen
2518440768 infra: Strip release binary for size measurements
Cargo by default does not strip symbols for release profile builds.
Specify strip symbols for binary size measurements make it more
meaningful (chromeOS builds are already doing so). We don't want to
make this the default for all release builds as that will hinder
user's ability to report bugs and crashes.

TEST=./tools/dev_container ./tools/build_release --strip

BUG=b:257303497

Change-Id: Ic46393fbb4176bd7631dd838d72ddbead9626774
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4251718
Auto-Submit: Zihan Chen <zihanchen@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Zihan Chen <zihanchen@google.com>
2023-02-14 23:43:53 +00:00
Zihan Chen
38a9a2a7f4 tools/build_release: Add tool to build release binaries
Previously our CI only generates debug builds for testing. A release
build should be used for useful binary size and performance measurements.

TEST=./tools/dev_container ./tools/build_release --platform=armhf
TEST=./tools/dev_container ./tools/build_release --json

BUG=b:257303497

Change-Id: I4c6e59b9aefe787f02b3d8a7e7ad5ea362f3cf0a
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4149733
Auto-Submit: Zihan Chen <zihanchen@google.com>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2023-01-12 19:08:57 +00:00