MCPcopy Create free account

hub / github.com/Mic92/fast-nix-gc / functions

Functions333 in github.com/Mic92/fast-nix-gc

↓ 2 callersFunctionrun_gc_with_early_root
Connect to the gc-socket during the early window (before the graph is loaded), register a root, and let the GC continue.
crates/gc/tests/integration.rs:1210
↓ 2 callersFunctionrusqlite_open
(p: &Path)
crates/optimise/src/optimise.rs:666
↓ 2 callersMethodset_deriver
(&self, out: &Pkg, drv: &Pkg)
crates/gc/tests/integration.rs:115
↓ 2 callersMethodset_registration_time
(&self, p: &Pkg, time: i64)
crates/gc/tests/integration.rs:124
↓ 2 callersFunctionstore_listing
Store entries on disk, excluding internal `.links`/lock files.
scripts/compare-dry-run.py:156
↓ 2 callersFunctiontry_lock_dir
Lock a `tmp-*` build dir before deleting. None means a builder still holds it. Caller keeps the fd through deletion to avoid a TOCTOU race.
crates/gc/src/gc.rs:73
↓ 2 callersFunctionunshare_mount_namespace
()
crates/common/src/lib.rs:21
↓ 2 callersMethodwrite_root
(&mut self, store_path: &str)
crates/common/src/temp_roots.rs:102
↓ 1 callersFunctionaccept_loop
( listener: UnixListener, store_prefix: String, live: Arc<LiveSet>, graph: Arc<StoreGraph>,
crates/gc/src/gc_socket.rs:275
↓ 1 callersFunctionacquire_gc_lock
Same lock Nix takes. Builders hold it shared while registering temp roots; we take it exclusive so the root set can't change under us.
crates/gc/src/gc.rs:95
↓ 1 callersFunctionapply_corruptions
Apply random corruptions.
difftest/src/main.rs:306
↓ 1 callersMethodcancel
Unblock every waiting protect(): used on GC teardown, where an error path may leave pending nodes that will never finish.
crates/gc/src/gc_socket.rs:176
↓ 1 callersFunctioncli_main
()
crates/optimise/src/optimise.rs:499
↓ 1 callersFunctioncompare_gc
Compare nix-store --gc and fast-nix-gc on the store under `<tmp>/nix`. Corruption-affected paths are excluded from the set comparisons and validated s
difftest/src/main.rs:618
↓ 1 callersFunctiondep_list
(nodes: &[Node], node: &Node)
difftest/src/main.rs:148
↓ 1 callersFunctiondir_mutex
Sharded mutex pool keyed by parent directory. Bounds memory while keeping contention low for typical fan-out.
crates/optimise/src/optimise.rs:157
↓ 1 callersFunctionedit_distance
(a: &str, b: &str)
crates/common/src/lib.rs:141
↓ 1 callersMethodenabled
(&self, m: &log::Metadata)
crates/common/src/logging.rs:9
↓ 1 callersFunctionexpr
(fod_rec_hash: str)
scripts/compare-dry-run.py:58
↓ 1 callersFunctionfake_hash
(i: usize)
proptest/proptest_gc.rs:16
↓ 1 callersFunctionfilesystem_bytes
Free and total bytes on the filesystem containing `path`.
crates/gc/src/main.rs:74
↓ 1 callersFunctionfind_binary
Locate the fast-nix-gc binary: $FAST_NIX_GC or next to our own exe.
difftest/src/main.rs:469
↓ 1 callersFunctionfind_roots_in_dir
( dir: &Path, store_prefix: &str, idx: &BasenameIndex, roots: &mut HashSet<u32>, )
crates/gc/src/roots.rs:61
↓ 1 callersFunctiongen_graph
(rng: &mut StdRng, keep_outputs: bool)
difftest/src/main.rs:74
↓ 1 callersFunctiongen_graph
Random DAG: node i only references nodes < i, so closures are acyclic.
crates/gc/tests/socket_concurrency.rs:28
↓ 1 callersFunctiongraph
(paths: &[&str])
crates/gc/src/roots.rs:751
↓ 1 callersFunctionhandle_client
( stream: UnixStream, store_prefix: &str, live: &LiveSet, graph: &StoreGraph, idx: &HashMa
crates/gc/src/gc_socket.rs:334
↓ 1 callersFunctionis_store_path_basename
True if `name` matches the store-path basename grammar: `<nix32hash>-<name>` where the hash is 32 chars of `[0-9a-z]`.
crates/gc/src/roots.rs:202
↓ 1 callersFunctionis_store_path_char
True for chars allowed in a Nix store path basename. Mirrors Nix's storePathRegex: `[0-9a-z]+[0-9a-zA-Z+\-._?=]*`. We accept the union since we extrac
crates/gc/src/roots.rs:216
↓ 1 callersFunctioniteration
(binary: &Path, seed: u64)
difftest/src/main.rs:752
↓ 1 callersFunctionkern_argmax
()
crates/gc/src/roots.rs:634
↓ 1 callersFunctionlibc_emlink
()
crates/optimise/src/optimise.rs:316
↓ 1 callersFunctionlibc_enospc
()
crates/optimise/src/optimise.rs:313
↓ 1 callersFunctionlist_pids
()
crates/gc/src/roots.rs:450
↓ 1 callersMethodload_graph_in_txn
(&self)
crates/common/src/db.rs:108
↓ 1 callersFunctionmain
()
scripts/check-alloy.py:13
↓ 1 callersFunctionmain
()
scripts/mkstore.py:46
↓ 1 callersFunctionmain
()
scripts/compare-dry-run.py:183
↓ 1 callersMethodmake_writable
(&self)
crates/optimise/benches/optimise_bench.rs:99
↓ 1 callersMethodmaybe_vacuum
VACUUM if enough of the file is free pages to be worth a full rewrite: at least a quarter of the file and at least 64 pages (256 KiB at the default pa
crates/common/src/db.rs:387
↓ 1 callersFunctionnix_config
(rng: &mut StdRng, keep_outputs: bool)
difftest/src/main.rs:230
↓ 1 callersFunctionnormalize_dir
Strip trailing slashes (but keep a bare "/").
crates/common/src/db.rs:407
↓ 1 callersMethodnotify_gc
Send the root to the running GC; Ok(false) means the GC went away and the caller should restart with the lock.
crates/common/src/temp_roots.rs:110
↓ 1 callersFunctionone_run
(seed: u64)
crates/gc/tests/socket_concurrency.rs:114
↓ 1 callersFunctionoptimise_file
( path: PathBuf, meta: fs::Metadata, links_dir: Arc<PathBuf>, store_dir: Arc<PathBuf>, opt
crates/optimise/src/optimise.rs:180
↓ 1 callersFunctionparse_args
()
crates/gc/src/main.rs:84
↓ 1 callersFunctionparse_args
()
crates/optimise/src/optimise.rs:547
↓ 1 callersFunctionparse_bool
(s: &[u8])
crates/common/src/nix_config.rs:39
↓ 1 callersFunctionparse_size
Parse a size like "50G", "512M", "1024K", or plain bytes.
crates/gc/src/main.rs:57
↓ 1 callersFunctionpid_cwd_root
(pid: i32, store_prefix: &str, unchecked: &mut HashSet<String>)
crates/gc/src/roots.rs:486
↓ 1 callersFunctionpid_environ
(pid: i32, argmax: usize, store_prefix: &str, unchecked: &mut HashSet<String>)
crates/gc/src/roots.rs:610
↓ 1 callersFunctionpid_exe
(pid: i32, store_prefix: &str, unchecked: &mut HashSet<String>)
crates/gc/src/roots.rs:472
↓ 1 callersFunctionpid_fds
(pid: i32, store_prefix: &str, unchecked: &mut HashSet<String>)
crates/gc/src/roots.rs:512
↓ 1 callersFunctionpid_regions
(pid: i32, store_prefix: &str, unchecked: &mut HashSet<String>)
crates/gc/src/roots.rs:569
↓ 1 callersMethodprotect
Mark the closure of `basename` as protected and wait until none of it is still being deleted.
crates/gc/src/gc_socket.rs:139
↓ 1 callersMethodprotect_unknown_basename
Mark a basename outside the graph as protected (used to carry over roots received before the graph was loaded).
crates/gc/src/gc_socket.rs:91
↓ 1 callersMethodprotected_snapshot
Snapshot of per-node protection flags (dry-run reporting).
crates/gc/src/gc_socket.rs:80
↓ 1 callersFunctionrender_expr
(nodes: &[Node], src_dir: &Path)
difftest/src/main.rs:163
↓ 1 callersFunctionreplace_with_link
Replace `path` with a hardlink to `link_path`. Store dirs are read-only with mtime 1; toggle writable around the rename and restore afterwards. Holds
crates/optimise/src/optimise.rs:87
↓ 1 callersFunctionresolve_indirect_root
Indirect root: symlink -> symlink -> store. Nix's findRoots resolves at most one extra hop. Resolve it with lstat + readlink, never a following stat()
crates/gc/src/roots.rs:122
↓ 1 callersFunctionrun_client
Register random roots and mark each acked root's closure; the deleter must never unlink an acked node.
crates/gc/tests/socket_concurrency.rs:86
↓ 1 callersFunctionrun_deleter
Mirror of the gc.rs deletion loop: claim a chunk, drop the closures of skipped (protected) paths, then unlink each claimed node.
crates/gc/tests/socket_concurrency.rs:52
↓ 1 callersFunctionscan
(store_prefix: &str, unchecked: &mut HashSet<String>)
crates/gc/src/roots.rs:288
↓ 1 callersFunctionscopeguard
(dir: &Path, active: bool)
crates/optimise/src/optimise.rs:151
↓ 1 callersFunctionset_link_mtime
(path: &Path, t: SystemTime)
crates/gc/src/profiles.rs:368
↓ 1 callersFunctionset_mtime_to_one
(path: &Path)
crates/optimise/src/optimise.rs:167
↓ 1 callersMethodtarget_bytes
(self, total: u64)
crates/gc/src/main.rs:31
↓ 1 callersMethodtry_begin_delete_unknown
Same as `try_begin_delete_node` for paths not in the graph.
crates/gc/src/gc_socket.rs:121
↓ 1 callersFunctionvalidate_fast_alone
When Nix cannot GC the corrupted store at all, check fast-nix-gc on its own: it must run, its real GC must match its dry-run prediction, and disk must
difftest/src/main.rs:574
Methodacquire
(profile: &Path)
crates/gc/src/profiles.rs:98
Functionadd_uses_gc_socket_when_gc_holds_the_lock
()
crates/common/src/temp_roots.rs:182
Functionadd_writes_nul_terminated_roots
()
crates/common/src/temp_roots.rs:164
Methodalive
Fixpoint reachability over the modeled liveness edges, mirroring the keep-derivations/keep-outputs rules from the GC's perspective.
fuzz/fuzz_targets/gc_graph.rs:165
Functionbasename
(i: usize)
crates/gc/tests/socket_concurrency.rs:23
Functionbasename_index_lookups
()
crates/common/src/db.rs:876
Functionbasename_of
(i: usize)
fuzz/fuzz_targets/gc_graph.rs:79
Functioncanonical_file_is_not_counted_as_linked
()
crates/optimise/src/optimise.rs:853
Functionclaim_nodes_partitions_and_blocks_protect
()
crates/gc/src/gc_socket.rs:510
Functionclean_links_removes_only_unreferenced
()
crates/gc/src/gc.rs:675
Functioncompute_closure_marks_reachable_only
()
crates/common/src/db.rs:892
Functionconcurrent_clients_never_resurrect_deleted_paths
()
crates/gc/tests/socket_concurrency.rs:155
Functioncorrupt_link_with_size_mismatch_is_skipped
()
crates/optimise/src/optimise.rs:829
Functioncurrent_generation_none_when_missing
()
crates/gc/src/profiles.rs:499
Functiondedups_identical_files
()
crates/optimise/src/optimise.rs:611
Methoddefault
()
crates/optimise/src/optimise.rs:42
Functiondelete_generations_older_than_cutoff
()
crates/gc/src/profiles.rs:396
Functiondelete_old_generations_keeps_only_current
()
crates/gc/src/profiles.rs:384
Functiondelete_store_path_file_reports_disk_blocks
()
crates/gc/src/gc.rs:637
Functiondelete_store_path_missing_is_zero
()
crates/gc/src/gc.rs:622
Functiondelete_store_path_other_stat_errors_propagate
()
crates/gc/src/gc.rs:628
Functiondelete_store_path_removes_readonly_tree
()
crates/gc/src/gc.rs:648
Functiondeleted_count
Parse "<N> store paths deleted" from fast-nix-gc stdout.
crates/gc/benches/gc_bench.rs:143
Methoddrop
(&mut self)
difftest/src/main.rs:392
Methoddrop
(&mut self)
crates/gc/src/profiles.rs:133
Methoddrop
(&mut self)
crates/gc/src/gc_socket.rs:254
Methoddrop
(&mut self)
crates/optimise/src/optimise.rs:144
Functiondrop_joins_handlers_and_snapshot_sees_acked_roots
()
crates/gc/src/gc_socket.rs:542
Functiondrop_returns_when_idle_accept_loop_is_waiting
()
crates/gc/src/gc_socket.rs:392
Functiondry_run_counts_but_does_not_link
()
crates/optimise/src/optimise.rs:789
Functiondry_run_takes_no_temp_roots
()
crates/optimise/src/optimise.rs:910
← previousnext →101–200 of 333, ranked by callers