-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
94 lines (71 loc) · 3.23 KB
/
Copy pathMakefile
File metadata and controls
94 lines (71 loc) · 3.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
.PHONY: test big-test update-expects fmt fmt-check check bench bench-export bench-diff bench-compile analyze bench-vm vm-bench vm-throughput vm-throughput-verify vm-microbench vm-model vm-bootstrap vm-profile-model vm-profile vm-profile-remote mem-topo zhc-profile
# Wall-clock seconds the profiled bench_vm run loops for (override: make vm-profile SECS=30).
SECS ?= 20
test:
cargo test --locked --release
big-test:
cargo test --release -- --ignored
brrr:
cargo test --locked --release -- brrr
update-expects:
cargo run --locked --bin update-expects
fmt:
cargo +nightly fmt
fmt-check:
cargo +nightly fmt --check
mem-topo:
cargo run --locked -p zhc_utils --example mem_topo
check:
RUSTFLAGS="-D warnings" cargo check --locked
RUSTDOCFLAGS="-D warnings" cargo doc --locked --no-deps
bench:
cargo run --locked --release -p zhc_bench
bench-export:
cargo run --locked --release -p zhc_bench -- export
bench-diff:
RUSTFLAGS="-A warnings" cargo run --locked --release -p zhc_bench -- diff
bench-compile:
cargo run --locked --release -p zhc_bench -- compile
analyze:
cargo run --locked --release -p zhc_bench -- analyze
vm-test:
cargo test --locked -p zhc_vm --release
vm-check:
RUSTFLAGS="-D warnings" cargo check --locked -p zhc_vm
RUSTDOCFLAGS="-D warnings" cargo doc --locked --no-deps -p zhc_vm
vm-bench:
RUSTFLAGS="-C target-cpu=native -A warnings" CARGO_PROFILE_RELEASE_LTO=fat \
cargo +nightly-2026-04-22 bench --locked -p zhc_vm --bench vm --profile profiling
vm-throughput:
RUSTFLAGS="-C target-cpu=native -A warnings" CARGO_PROFILE_RELEASE_LTO=fat \
cargo +nightly-2026-04-22 bench --locked -p zhc_vm --bench throughput --profile profiling
vm-throughput-verify:
VM_VERIFY=1 \
RUSTFLAGS="-C target-cpu=native -A warnings" CARGO_PROFILE_RELEASE_LTO=fat \
cargo +nightly-2026-04-22 bench --locked -p zhc_vm --bench throughput --profile profiling
vm-microbench:
RUSTFLAGS="-C target-cpu=native -A warnings" CARGO_PROFILE_RELEASE_LTO=fat \
cargo +nightly-2026-04-22 run --locked --profile profiling -p zhc_vm --example microbench
vm-profile-throughput:
RUSTFLAGS="-C target-cpu=native -A warnings" CARGO_PROFILE_RELEASE_LTO=fat \
cargo +nightly-2026-04-22 bench --locked -p zhc_vm --bench throughput --profile profiling --features profiling
vm-profile:
rm -rf bench_vm.trace
BENCH_BIN=$$(RUSTFLAGS="-C target-cpu=native -A warnings" CARGO_PROFILE_RELEASE_LTO=fat \
cargo +nightly-2026-04-22 bench --locked -p zhc_vm --bench vm --profile profiling --no-run \
--message-format=json 2>/dev/null \
| grep -o '"executable":"[^"]*/vm-[^"]*"' | tail -1 | sed 's/.*:"//;s/"$$//'); \
xcrun xctrace record --template "CPU Counters" \
--output bench_vm.trace \
--launch -- $$BENCH_BIN --bench --profile-time $(SECS)
open bench_vm.trace
zhc-profile:
rm -rf zhc_profile_pipeline.trace
EXAMPLE_BIN=$$(RUSTFLAGS="-C target-cpu=native -A warnings" CARGO_PROFILE_RELEASE_LTO=fat \
cargo build --locked -p zhc --example profile_pipeline --profile profiling \
--message-format=json 2>/dev/null \
| grep -o '"executable":"[^"]*/profile_pipeline[^"]*"' | tail -1 | sed 's/.*:"//;s/"$$//'); \
xcrun xctrace record --template "Time Profiler (High Freq)" \
--output zhc_profile_pipeline.trace \
--launch -- $$EXAMPLE_BIN
open zhc_profile_pipeline.trace