MCPcopy Create free account
hub / github.com/argumentcomputer/ix / profile_block_of

Function profile_block_of

crates/ffi/src/kernel.rs:1644–1655  ·  view source on GitHub ↗

Map a constant address to its *block* (ingress unit): the `block` address of a projection constant, otherwise the address itself.

(env: &IxonEnv, addr: &Address)

Source from the content-addressed store, hash-verified

1642 // into the mapping (`LazyConstant::from_mmap_slice`), avoiding the
1643 // ~3 GB heap copy that `std::fs::read` would impose on mathlib.
1644 // Sections 3-4 (names + named) are still parse-and-discard, but
1645 // their decoded forms drop before `get_anon_mmap` returns.
1646 let t1 = Instant::now();
1647 let ixon_env = match IxonEnv::get_anon_mmap(std::path::Path::new(&path)) {
1648 Ok(env) => env,
1649 Err(e) => {
1650 return LeanIOResult::error_string(&format!(
1651 "rs_kernel_check_anon: failed to mmap+deserialize {path}: {e}"
1652 ));
1653 },
1654 };
1655 eprintln!(
1656 "[rs_kernel_check_anon] mmap+parse: {:>8.1?} ({} consts; \
1657 named={} names={} comms={})",
1658 t1.elapsed(),

Callers 1

build_block_profileFunction · 0.85

Calls 2

get_constMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected