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

Function build_block_profile

crates/ffi/src/kernel.rs:1723–1747  ·  view source on GitHub ↗

Aggregate per-constant records into a block-level [`BlockProfile`]: map each consumer/producer constant to its home block, attach serialized sizes, and accumulate heartbeats + delta edges.

(env: &IxonEnv, merged: &ProfileSink)

Source from the content-addressed store, hash-verified

1721
1722 build_anon_result_array(&addrs_for_return, &results)
1723}
1724
1725/// Shared anon-mode seed context: the anon-view env, its whole-env work
1726/// items, and each requested name resolved to its covering work item
1727/// (standalone → itself; a mutual-block member → the whole block, checked
1728/// atomically).
1729struct AnonSeedContext {
1730 env: Arc<IxonEnv>,
1731 kernel_work: Vec<ix_kernel::anon_work::AnonWorkItem>,
1732 /// One `(displayed name, work-item index)` per requested name, in request
1733 /// order. Two names may share a work item (same mutual block).
1734 seeds: Vec<(String, usize)>,
1735}
1736
1737/// Load `path` once and resolve `names` for anon-mode seeded checking:
1738/// displayed names → addresses via the full view's `named` metadata (dropped
1739/// right after), then the anon view + whole-env work items. `label` prefixes
1740/// diagnostics and error messages.
1741fn load_anon_seed_context(
1742 label: &str,
1743 path: &str,
1744 names: &[String],
1745) -> Result<AnonSeedContext, String> {
1746 use ix_kernel::anon_work::{block_of_addr, work_block_addr};
1747
1748 let t0 = Instant::now();
1749 let bytes = std::fs::read(path)
1750 .map_err(|e| format!("{label}: failed to read {path}: {e}"))?;

Callers 1

profile_anon_ixeFunction · 0.85

Calls 8

profile_block_ofFunction · 0.85
profile_block_sizeFunction · 0.85
blockMethod · 0.80
delta_edgeMethod · 0.80
getMethod · 0.45
cloneMethod · 0.45
insertMethod · 0.45
finishMethod · 0.45

Tested by

no test coverage detected