siso: Introduce Garbage Collection Engine

Adds `hfs.GarbageCollectBuildLabels(ctx, BuildLabelGCOptions)` to the Siso HashFS
backend. This applies mathematical bitwise eviction modeling based on 4
sweep strategies:
- RetainLastX (LRU cache bounding)
- OlderThan (TTL bounding)
- EvictLabels (Explicit target destruction via regex)
- KeepLabels (Explicit target retaining via regex)

It iterates over the internal dictionary ledger mapping and executes a
bitwise sweep against evicted vs kept targets to deterministically
compute cache overlap protection across shared files.

This engine cleanly separates mathematical evaluation from actual OS
execution (`opts.DryRun`), which will allow downstream CLI
layers to retrieve metrics.

This is the 3rd CL for go/targeted-build-cleaning.

Change-Id: Ie323cfaafb18862b79080537669c0d65542dbd2c
BUG=446692498
TAG=agy
CONV=ff3ec10c-40be-426f-b702-052ff5a38e57
Reviewed-on: https://chromium-review.googlesource.com/c/build/+/8141379
Reviewed-by: Yuke Liao <liaoyuke@google.com>
Commit-Queue: Saatvik Sharma <sharmasaatvik@google.com>
2 files changed
tree: 7b77fdd984f105b429553abe271ce5303669574b
  1. bench/
  2. gong/
  3. hashigo/
  4. infra/
  5. kajiya/
  6. kzipinfo/
  7. remote-apis/
  8. runmc/
  9. siso/
  10. .gitignore
  11. .golangci.yml
  12. .style.yapf
  13. BUILD_OWNERS
  14. BUILD_TEAM_OWNERS
  15. CONTRIBUTING.md
  16. LICENSE
  17. OWNERS
  18. PRESUBMIT.py
  19. README.md
  20. WATCHLISTS
README.md

build.git repository

This repository contains tools developed and owned by the Chrome Build Team.

Quick start

The steps for getting the code are:

  1. Install depot_tools
  2. Run git clone https://chromium.googlesource.com/build

We use the standard Go module workflow to work on our projects.

Links