This is an archive of the discontinued LLVM Phabricator instance.

[Debuginfod] Prune cache after fetch.
ClosedPublic

Authored by mysterymath on Mar 8 2023, 2:33 PM.

Details

Summary

Previously, the size of the debuginfod cache would grow without bound.
This change prunes the cache after a successful debuginfod lookup, as is
done in libdebuginfod.

The cache pruning behavior is configured by a new
DEBUGINFOD_CACHE_POLICY environment variable. The semantics of this are
the same as --thinlto_cache_policy.

Diff Detail

Event Timeline

mysterymath created this revision.Mar 8 2023, 2:33 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 8 2023, 2:33 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
mysterymath requested review of this revision.Mar 8 2023, 2:33 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 8 2023, 2:33 PM
gulfem added a comment.EditedMar 8 2023, 3:32 PM

Can you please add a test with DEBUGINFOD_CACHE_POLICY environment variable?

Add tests for caching behavior; fix timing issue.

Require curl in test.

gulfem accepted this revision.Mar 10 2023, 12:11 PM
This revision is now accepted and ready to land.Mar 10 2023, 12:11 PM
This revision was landed with ongoing or failed builds.Mar 10 2023, 12:12 PM
This revision was automatically updated to reflect the committed changes.