Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
f5d4c50
perf(size): install optional runtime features from the link step so p…
Sep 28, 2026
d9cf777
changelog: key the runtime link-time features fragment to PR 11605
Sep 28, 2026
9be8cca
lint: the feature Hook verdict names its new home in perry-runtime
Sep 28, 2026
4005d17
gates: follow the interpreter root scanner through its feature slot; …
Sep 28, 2026
a5d933a
perf(size): build release runtime archives without the GC/diagnostic …
Sep 28, 2026
cb87532
changelog: key the release-runtime instrument strip fragment to PR 11629
Sep 28, 2026
590f04a
perf(size): install optional runtime features from the link step so p…
Sep 28, 2026
dcea149
changelog: key the runtime link-time features fragment to PR 11605
Sep 28, 2026
c21cf86
lint: the feature Hook verdict names its new home in perry-runtime
Sep 28, 2026
de73848
gates: follow the interpreter root scanner through its feature slot; …
Sep 28, 2026
4b3c8ba
gc-call-effects: delegate the feature Hook indirect calls on Leaf hel…
proggeramlug Sep 28, 2026
ca25317
gc-call-effects: fix a savepoint/restore delegation that cross-matche…
proggeramlug Sep 28, 2026
a4b22de
Merge current main into #11605 and preserve explicit receiver ABI
proggeramlug Oct 1, 2026
29a593a
Integrate current runtime feature hooks and instrument gates
proggeramlug Oct 1, 2026
a4b54a4
Merge remote-tracking branch 'origin/main' into codex/11629-integration
proggeramlug Oct 1, 2026
85e0fe1
fix: retain target-specific Inkwell lock entries
proggeramlug Oct 1, 2026
ad0fd75
Merge main into runtime instrument stripping; preserve census audits
proggeramlug Oct 1, 2026
9452177
Merge commit '7b5912d4e78f5ff87e9961da5485fda5c63dac33' into codex/11…
proggeramlug Oct 1, 2026
c8c0410
Merge main into optional runtime installers; preserve census audits
proggeramlug Oct 1, 2026
b6b42d7
Merge commit '47a0c7bf1795bc5e1f85d6c96c0f52037ff1972b' into codex/11…
proggeramlug Oct 1, 2026
1732ca9
Merge commit '47a0c7bf1795bc5e1f85d6c96c0f52037ff1972b' into codex/11…
proggeramlug Oct 1, 2026
39b3a1c
Merge current installer parent and preserve both snapshot audits
proggeramlug Oct 2, 2026
309c3a5
Merge origin/main into size/release-runtime-no-instruments
proggeramlug Oct 3, 2026
19fdfea
Merge remote-tracking branch 'origin/main' into p11629
proggeramlug Oct 3, 2026
bfcb7dd
Merge origin/main into size/release-runtime-no-instruments
proggeramlug Oct 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/release-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,14 @@ concurrency:
group: release-packages-${{ github.event.release.tag_name || inputs.existing_tag || (inputs.cut_release && inputs.candidate_sha) || github.run_id }}
cancel-in-progress: false

# Shipped runtime archives carry no GC/diagnostic instruments: perry-runtime's
# build script compiles them out when this is set (see its
# `emit_instrument_cfgs`). Every cargo build in these jobs sees it, including
# the per-ext-crate invocations that rebuild the runtime, so all shipped
# archives share one feature set (#6303). The container builds pass it through.
env:
PERRY_RELEASE_STRIP_INSTRUMENTS: "1"

jobs:
# ---------------------------------------------------------------------------
# Resolve the run mode + release tag ONCE, up front. Every downstream job
Expand Down Expand Up @@ -764,6 +772,7 @@ jobs:
--env CARGO_TARGET_DIR=/work/target-glibc231 \
--env PERRY_ABORT_TARGET_DIR=/work/target-glibc231-abort \
--env PERRY_CLI_UPDATE_PUBLIC_KEYS \
--env PERRY_RELEASE_STRIP_INSTRUMENTS \
--volume "$HOME/.cargo:/tmp/cargo-home" \
--volume "$HOME/.rustup:/tmp/rustup-home" \
--volume "$GITHUB_WORKSPACE:/work" \
Expand Down Expand Up @@ -810,6 +819,7 @@ jobs:
--env CARGO_TARGET_DIR=/work/target-musl \
--env PERRY_ABORT_TARGET_DIR=/work/target-musl-abort \
--env PERRY_CLI_UPDATE_PUBLIC_KEYS \
--env PERRY_RELEASE_STRIP_INSTRUMENTS \
--volume "$HOME/.cargo:/tmp/cargo-home" \
--volume "$HOME/.rustup:/tmp/rustup-home" \
--volume "$GITHUB_WORKSPACE:/work" \
Expand Down
3 changes: 3 additions & 0 deletions changelog.d/11629-release-runtime-no-instruments.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- **perf(size): release packages build their runtime archives without the GC/diagnostic instruments.** Follow-up to #11605. perry-runtime's `diagnostics`, `gc-instruments` and `hot-diag` features are in its `default` set, so the prebuilt full-feature `libperry_runtime.a` that an installed perry links carried every census, verifier, trace and hot-path diagnostic into every program. Their code is now gated on build-script cfgs (`perry_diagnostics`, `perry_gc_instruments`, `perry_hot_diag`) that `crates/perry-runtime/build.rs` sets from the matching features unless `PERRY_RELEASE_STRIP_INSTRUMENTS=1`; `.github/workflows/release-packages.yml` sets it for every package build (including both Linux docker builds). An env var rather than a feature change keeps one feature union across every shipped archive (#6303/#7358: the ext crates and the stdlib bundle their own perry-runtime copies), and a workspace build, `cargo test` and auto-optimized links (`PERRY_GC_INSTRUMENTS=1`, or an instrument knob set while compiling) are unchanged. A stripped binary behaves as a build without the features always has: an instrument knob refuses at startup with the existing "built without the GC instruments" message. A new compile-time note explains that a prebuilt link cannot honor an instrument request and names `PERRY_WORKSPACE_ROOT`. Installed-mode sizes (Linux x86_64, release recipe, on top of #11605): the `node:net` + `fetch` + TLS backend 15.05 → 14.71 MB, a runtime-only fs program 8.76 → 8.39 MB, `node:net` 11.23 → 10.87 MB, `node:sqlite` 11.00 → 10.64 MB, fetch 12.66 → 12.29 MB; the prebuilt core runtime (already built without the instruments) and auto-optimized links unchanged.

Retain declared Windows Inkwell0.9 lock entries alongside non-Windows0.10 after integrating current dependency updates.
1 change: 1 addition & 0 deletions changelog.d/11629-stack-parent-refresh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Preserve both the parent feature-installer and child release-instrument snapshot audits while refreshing the stacked parent. The five snapshot source files and pins are unchanged from the reviewed child; no runtime code or collector behavior changes.
28 changes: 28 additions & 0 deletions crates/perry-runtime/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,35 @@ fn generate_single_byte_encodings(out_dir: &str) {
.expect("write single_byte_encodings.rs");
}

/// The GC/diagnostic instruments (`diagnostics`, `gc-instruments`, `hot-diag`)
/// compile under the `perry_diagnostics` / `perry_gc_instruments` /
/// `perry_hot_diag` cfgs, set here when the feature is on — unless
/// `PERRY_RELEASE_STRIP_INSTRUMENTS=1`. The release workflow sets that for
/// every build in its jobs, so the shipped archives carry no instruments while
/// every other build (dev, CI, auto-optimize) is unchanged. An env var rather
/// than a feature: a feature can only be added by Cargo's unification, and the
/// release co-builds each ext crate with the runtime (#6303/#7358), whose
/// `default` would switch the instruments back on; the build script sees the
/// variable in every one of those invocations alike. A shipped runtime asked
/// for an instrument knob refuses it with the existing
/// "instruments not compiled in" diagnostic.
fn emit_instrument_cfgs() {
println!("cargo:rerun-if-env-changed=PERRY_RELEASE_STRIP_INSTRUMENTS");
let strip = std::env::var("PERRY_RELEASE_STRIP_INSTRUMENTS").is_ok_and(|v| v == "1");
for (feature_env, cfg) in [
("CARGO_FEATURE_DIAGNOSTICS", "perry_diagnostics"),
("CARGO_FEATURE_GC_INSTRUMENTS", "perry_gc_instruments"),
("CARGO_FEATURE_HOT_DIAG", "perry_hot_diag"),
] {
println!("cargo:rustc-check-cfg=cfg({cfg})");
if std::env::var_os(feature_env).is_some() && !strip {
println!("cargo:rustc-cfg={cfg}");
}
}
}

fn main() {
emit_instrument_cfgs();
println!("cargo:rerun-if-changed=src/ffi/perry_memory_profile.c");
if std::env::var("CARGO_CFG_TARGET_OS").as_deref() == Ok("linux")
&& std::env::var("CARGO_CFG_TARGET_POINTER_WIDTH").as_deref() == Ok("64")
Expand Down
10 changes: 5 additions & 5 deletions crates/perry-runtime/src/arena/alloc_sample.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
// constant "off" (inlined, so every caller's guarded branch folds away and the
// instrument links nothing); the rest of the module stays compiled so it
// cannot rot, hence the allow.
#![cfg_attr(not(feature = "gc-instruments"), allow(dead_code, unused_imports))]
#![cfg_attr(not(perry_gc_instruments), allow(dead_code, unused_imports))]

use std::cell::{Cell, RefCell};
use std::collections::HashMap;
Expand Down Expand Up @@ -77,22 +77,22 @@ crate::perry_thread_local! {
/// unparsable value selects the default interval.
/// The sampling interval, or 0 when off. A constant 0 without the
/// `gc-instruments` feature, so the allocation fast paths drop the check.
#[cfg(feature = "gc-instruments")]
#[cfg(perry_gc_instruments)]
#[inline(always)]
fn current_interval() -> usize {
INTERVAL.load(Ordering::Relaxed)
}

#[cfg(not(feature = "gc-instruments"))]
#[cfg(not(perry_gc_instruments))]
#[inline(always)]
fn current_interval() -> usize {
0
}

#[cfg(not(feature = "gc-instruments"))]
#[cfg(not(perry_gc_instruments))]
pub(crate) fn init_from_env() {}

#[cfg(feature = "gc-instruments")]
#[cfg(perry_gc_instruments)]
pub(crate) fn init_from_env() {
let raw = std::env::var("PERRY_ALLOC_SITE_SAMPLE").ok();
let interval = parse_interval(raw.as_deref());
Expand Down
2 changes: 1 addition & 1 deletion crates/perry-runtime/src/arena/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ pub(crate) use allocators::{
};

// walk.rs
#[cfg(feature = "diagnostics")]
#[cfg(perry_diagnostics)]
pub(crate) use walk::ArenaRegionTelemetry;
pub use walk::{
arena_block_count, arena_in_use_bytes, arena_total_bytes, arena_walk_objects,
Expand Down
6 changes: 3 additions & 3 deletions crates/perry-runtime/src/arena/quarantine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
// constant "off" (inlined, so every caller's guarded branch folds away and the
// instrument links nothing); the rest of the module stays compiled so it
// cannot rot, hence the allow.
#![cfg_attr(not(feature = "gc-instruments"), allow(dead_code, unused_imports))]
#![cfg_attr(not(perry_gc_instruments), allow(dead_code, unused_imports))]

use super::*;
use std::sync::atomic::{AtomicBool, AtomicU64, Ordering as AtomicOrdering};
Expand Down Expand Up @@ -149,13 +149,13 @@ thread_local! {
static MODE_OVERRIDE: Cell<Option<FromSpaceProtection>> = const { Cell::new(None) };
}

#[cfg(not(feature = "gc-instruments"))]
#[cfg(not(perry_gc_instruments))]
#[inline(always)]
pub(crate) fn fromspace_protection_mode() -> FromSpaceProtection {
FromSpaceProtection::Off
}

#[cfg(feature = "gc-instruments")]
#[cfg(perry_gc_instruments)]
pub(crate) fn fromspace_protection_mode() -> FromSpaceProtection {
#[cfg(test)]
if let Some(mode) = MODE_OVERRIDE.with(Cell::get) {
Expand Down
2 changes: 1 addition & 1 deletion crates/perry-runtime/src/arena/walk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ pub(crate) struct ArenaRegionTelemetry {
}

#[derive(Clone, Copy, Default)]
#[cfg_attr(not(feature = "diagnostics"), allow(dead_code))]
#[cfg_attr(not(perry_diagnostics), allow(dead_code))]
pub(crate) struct ArenaTelemetrySnapshot {
pub(crate) arena: ArenaRegionTelemetry,
pub(crate) survivor0: ArenaRegionTelemetry,
Expand Down
4 changes: 2 additions & 2 deletions crates/perry-runtime/src/bun_compat/cli_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ pub extern "C" fn js_bun_generate_heap_snapshot(format: f64, encoding: f64) -> f
if value_to_string(format) != "v8" {
throw_type_error("Bun.generateHeapSnapshot format must be 'v8'");
}
#[cfg(feature = "diagnostics")]
#[cfg(perry_diagnostics)]
{
let json = crate::gc::gc_build_v8_heap_snapshot_json();
if !is_undefined_or_null(encoding) && value_to_string(encoding) == "arraybuffer" {
Expand All @@ -637,7 +637,7 @@ pub extern "C" fn js_bun_generate_heap_snapshot(format: f64, encoding: f64) -> f
}
boxed_str(json.as_bytes())
}
#[cfg(not(feature = "diagnostics"))]
#[cfg(not(perry_diagnostics))]
{
let _ = encoding;
throw_type_error("Heap snapshot diagnostics are not enabled in this Perry runtime")
Expand Down
4 changes: 2 additions & 2 deletions crates/perry-runtime/src/error_stack_frames.rs
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ fn dladdr_info(ip: usize) -> Option<libc::Dl_info> {
/// `gc::instruments::INSTRUMENT_KNOBS`).
#[cfg(unix)]
fn stack_symbols_enabled() -> bool {
if !cfg!(feature = "gc-instruments") {
if !cfg!(perry_gc_instruments) {
return false;
}
static ENABLED: OnceLock<bool> = OnceLock::new();
Expand Down Expand Up @@ -1011,7 +1011,7 @@ mod tests {
/// `PERRY_STACK_SYMBOLS`; no in-process test mutates the cached flag.
/// The table is served by `gc-instruments` (#11541): without the feature
/// the knob aborts at startup, so there is no opted-in state to test.
#[cfg(all(unix, feature = "gc-instruments"))]
#[cfg(all(unix, perry_gc_instruments))]
#[test]
fn describe_ip_names_a_kept_runtime_symbol_when_nm_is_opted_in() {
const CHILD_ENV: &str = "PERRY_TEST_STACK_SYMBOLS_NM_CHILD";
Expand Down
2 changes: 1 addition & 1 deletion crates/perry-runtime/src/gc/barrier_arming.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ thread_local! {
// which is itself `allow(dead_code)` without the `diagnostics` feature — so a
// product build (`cargo check -p perry --bins`, `-D warnings`) sees this as
// unused. Same `cfg_attr` the three sibling sites in `telemetry.rs` use.
#[cfg_attr(not(feature = "diagnostics"), allow(dead_code))]
#[cfg_attr(not(perry_diagnostics), allow(dead_code))]
pub(super) fn remembered_reconstruct_census() -> RememberedReconstructCensus {
RECONSTRUCT_CENSUS.with(Cell::get)
}
Expand Down
14 changes: 7 additions & 7 deletions crates/perry-runtime/src/gc/census.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
// collection passes below compile to nothing; the walk, the classifier and
// the JSON writer then have no caller. `allow` rather than a cascade of cfgs:
// they stay compiled, so they cannot rot in the default build either.
#![cfg_attr(not(feature = "gc-instruments"), allow(dead_code, unused_imports))]
#![cfg_attr(not(perry_gc_instruments), allow(dead_code, unused_imports))]

use super::*;
use std::sync::atomic::{AtomicBool, Ordering};
Expand Down Expand Up @@ -86,9 +86,9 @@ pub(crate) fn census_path() -> Option<&'static str> {
}
// Built without the instruments: never enabled (`gc_init` aborted if the
// knob was set).
#[cfg(not(feature = "gc-instruments"))]
#[cfg(not(perry_gc_instruments))]
return None;
#[cfg(feature = "gc-instruments")]
#[cfg(perry_gc_instruments)]
CENSUS_PATH
.get_or_init(|| {
std::env::var("PERRY_GC_CENSUS")
Expand Down Expand Up @@ -211,11 +211,11 @@ fn header_is_marked(header: *const GcHeader) -> bool {
/// the reachable set so the sweep-entry pass can tell reachability from
/// block-persistence retention. No-op unless armed.
pub(super) fn census_pass1_if_armed() {
#[cfg(feature = "gc-instruments")]
#[cfg(perry_gc_instruments)]
census_pass1_if_armed_impl();
}

#[cfg(feature = "gc-instruments")]
#[cfg(perry_gc_instruments)]
fn census_pass1_if_armed_impl() {
if !ARMED.with(|c| c.get()) {
return;
Expand All @@ -240,11 +240,11 @@ fn census_pass1_if_armed_impl() {
/// Pass 2: sweep entry of the same synchronous full cycle (all marks final,
/// nothing swept, block persistence already applied). Consumes the arm.
pub(super) fn census_take_if_armed_at_full_sweep_start() {
#[cfg(feature = "gc-instruments")]
#[cfg(perry_gc_instruments)]
census_take_if_armed_at_full_sweep_start_impl();
}

#[cfg(feature = "gc-instruments")]
#[cfg(perry_gc_instruments)]
fn census_take_if_armed_at_full_sweep_start_impl() {
if !ARMED.with(|c| c.replace(false)) {
return;
Expand Down
2 changes: 1 addition & 1 deletion crates/perry-runtime/src/gc/cycle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub(super) enum GcCyclePhase {
}

impl GcCyclePhase {
#[cfg(feature = "diagnostics")]
#[cfg(perry_diagnostics)]
#[inline]
pub(super) const fn as_str(self) -> &'static str {
match self {
Expand Down
6 changes: 1 addition & 5 deletions crates/perry-runtime/src/gc/forwarding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,7 @@ pub(super) fn accept_forwarding_target(user_addr: usize) -> bool {
/// Resolve a live field's closure while collector traversal may still see a
/// forwarding stub. Use the same validated source/target gates as the copying
/// rewrite walk; never read closure payload metadata from a forwarded stub.
#[cfg(any(
debug_assertions,
feature = "field-rep-assert",
feature = "gc-instruments"
))]
#[cfg(any(debug_assertions, feature = "field-rep-assert", perry_gc_instruments))]
pub(crate) fn field_rep_live_address(mut addr: usize) -> Option<usize> {
for _ in 0..64 {
let Some(header) = forwarding_walk_header(addr) else {
Expand Down
6 changes: 3 additions & 3 deletions crates/perry-runtime/src/gc/fromspace_scan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
// constant "off" (inlined, so every caller's guarded branch folds away and the
// instrument links nothing); the rest of the module stays compiled so it
// cannot rot, hence the allow.
#![cfg_attr(not(feature = "gc-instruments"), allow(dead_code, unused_imports))]
#![cfg_attr(not(perry_gc_instruments), allow(dead_code, unused_imports))]

use super::*;

Expand Down Expand Up @@ -142,13 +142,13 @@ pub(super) fn resolve_scan_knobs(scan: Option<&str>, abort: Option<&str>) -> (bo
(truthy(scan) || abort, abort)
}

#[cfg(not(feature = "gc-instruments"))]
#[cfg(not(perry_gc_instruments))]
#[inline(always)]
pub(super) fn fromspace_scan_enabled() -> bool {
false
}

#[cfg(feature = "gc-instruments")]
#[cfg(perry_gc_instruments)]
pub(super) fn fromspace_scan_enabled() -> bool {
use std::sync::OnceLock;
static CACHED: OnceLock<bool> = OnceLock::new();
Expand Down
8 changes: 4 additions & 4 deletions crates/perry-runtime/src/gc/instruments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ impl Drop for FinalRemarkTimer {
/// built on the knob pass having exercised nothing, so the process aborts at
/// startup instead — see CLAUDE.md "Four ways a gate can be unable to fail".
// Read only by the feature-off startup check below.
#[cfg_attr(feature = "gc-instruments", allow(dead_code))]
#[cfg_attr(perry_gc_instruments, allow(dead_code))]
pub(crate) const INSTRUMENT_KNOBS: &[&str] = &[
"PERRY_GC_CENSUS",
"PERRY_GC_PROTECT_FROMSPACE",
Expand All @@ -511,7 +511,7 @@ pub(crate) const INSTRUMENT_KNOBS: &[&str] = &[
];

/// The first instrument knob set (non-empty) in the environment, if any.
#[cfg_attr(feature = "gc-instruments", allow(dead_code))]
#[cfg_attr(perry_gc_instruments, allow(dead_code))]
pub(crate) fn requested_instrument_knob() -> Option<&'static str> {
INSTRUMENT_KNOBS
.iter()
Expand All @@ -520,14 +520,14 @@ pub(crate) fn requested_instrument_knob() -> Option<&'static str> {
}

/// Startup check for binaries built without the instruments (see above).
#[cfg(not(feature = "gc-instruments"))]
#[cfg(not(perry_gc_instruments))]
pub(crate) fn refuse_instrument_knobs_without_instruments() {
if let Some(knob) = requested_instrument_knob() {
instruments_unavailable(knob);
}
}

#[cfg(not(feature = "gc-instruments"))]
#[cfg(not(perry_gc_instruments))]
#[cold]
#[inline(never)]
fn instruments_unavailable(knob: &str) -> ! {
Expand Down
4 changes: 2 additions & 2 deletions crates/perry-runtime/src/gc/malloc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ impl MallocKindTelemetry {
}
}

#[cfg(feature = "diagnostics")]
#[cfg(perry_diagnostics)]
pub(super) fn reset_cycle_deltas(&mut self) {
self.allocated_count = 0;
self.allocated_bytes = 0;
Expand Down Expand Up @@ -435,7 +435,7 @@ impl MallocState {
counters.copied_minor_validation_lookups.saturating_add(1);
}

#[cfg(feature = "diagnostics")]
#[cfg(perry_diagnostics)]
pub(super) fn take_kind_telemetry(
&mut self,
) -> [MallocKindTelemetry; MALLOC_KIND_BUCKET_COUNT] {
Expand Down
14 changes: 5 additions & 9 deletions crates/perry-runtime/src/gc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,7 @@ use copying_first_cycle::*;
// Named rather than glob-imported: a glob does not propagate through the
// transitive re-exports the gc submodules reach these through.
use copying_pointer_set::{plausible_gc_header, CopyingPointer, CopyingPointerKind};
#[cfg(any(
debug_assertions,
feature = "field-rep-assert",
feature = "gc-instruments"
))]
#[cfg(any(debug_assertions, feature = "field-rep-assert", perry_gc_instruments))]
pub(crate) use forwarding::field_rep_live_address;
use forwarding::*;
use sticky_remembered::*;
Expand Down Expand Up @@ -285,12 +281,12 @@ pub use verify::*;
/// Env-gated heap census (`PERRY_GC_CENSUS`); off by default.
pub(crate) mod census;
mod census_field_repr;
#[cfg(feature = "diagnostics")]
#[cfg(perry_diagnostics)]
mod heap_snapshot;
mod heap_stats;
mod regex_census;
pub use census::{census_poll_signal, gc_census_enabled};
#[cfg(feature = "diagnostics")]
#[cfg(perry_diagnostics)]
pub use heap_snapshot::gc_build_v8_heap_snapshot_json;
pub(crate) use heap_stats::heap_stats;

Expand Down Expand Up @@ -984,9 +980,9 @@ pub fn gc_init() {
return;
}
crate::perf_hooks::init_time_origin();
#[cfg(not(feature = "gc-instruments"))]
#[cfg(not(perry_gc_instruments))]
instruments::refuse_instrument_knobs_without_instruments();
#[cfg(not(feature = "hot-diag"))]
#[cfg(not(perry_hot_diag))]
crate::hot_diag::refuse_knobs_without_hot_diag();
// `PERRY_GC_CENSUS`: remember the main thread and install the SIGUSR2
// trigger. No-op (one OnceLock read) when the env var is unset.
Expand Down
2 changes: 1 addition & 1 deletion crates/perry-runtime/src/gc/oldgen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ impl Default for EvacuationPolicyDecision {
}

#[derive(Clone, Copy, Default)]
#[cfg_attr(not(feature = "diagnostics"), allow(dead_code))]
#[cfg_attr(not(perry_diagnostics), allow(dead_code))]
pub(super) struct SweepTraceStats {
pub(super) dead_bytes: u64,
// Compatibility alias for dead_bytes.
Expand Down
Loading
Loading