Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Refactor - LoadedPrograms #33482

Merged
merged 5 commits into from
Oct 2, 2023
Merged

Conversation

Lichtso
Copy link
Contributor

@Lichtso Lichtso commented Oct 2, 2023

Problem

Preparation for #33477.

Summary of Changes

  • Adds type ProgramRuntimeEnvironment: For slightly improved code readability.
  • Moves LoadedPrograms::remove_expired_entries() into LoadedPrograms::prune(): As an optimization as we don't need to retain / collect the secondary index level twice.
  • Adds Stats::prunes_environment and renames Stats::prunes_orphan and Stats::prunes_expired: So that all three reasons for pruning entries on rerooting have the same naming scheme.
  • Adds LoadedPrograms::latest_root_epoch: To detect the first rerooting after an epoch boundary, ending the recompilation phase.

@Lichtso Lichtso requested review from dmakarov and pgarg66 October 2, 2023 12:11
@Lichtso Lichtso changed the title Refactor/loaded programs Refactor - LoadedPrograms Oct 2, 2023
@Lichtso Lichtso force-pushed the refactor/loaded_programs branch from 76282cf to cd3d686 Compare October 2, 2023 12:23
@codecov
Copy link

codecov bot commented Oct 2, 2023

Codecov Report

Merging #33482 (8581a55) into master (9f6ef2f) will decrease coverage by 0.1%.
Report is 1 commits behind head on master.
The diff coverage is 100.0%.

@@            Coverage Diff            @@
##           master   #33482     +/-   ##
=========================================
- Coverage    81.7%    81.7%   -0.1%     
=========================================
  Files         802      802             
  Lines      217801   217802      +1     
=========================================
- Hits       178110   178102      -8     
- Misses      39691    39700      +9     

Co-authored-by: Dmitri Makarov <dmakarov@users.noreply.github.com>
@Lichtso Lichtso merged commit 8033be3 into solana-labs:master Oct 2, 2023
@Lichtso Lichtso deleted the refactor/loaded_programs branch October 2, 2023 17:01
@Lichtso Lichtso added the v1.17 PRs that should be backported to v1.17 label Oct 2, 2023
mergify bot pushed a commit that referenced this pull request Oct 2, 2023
* Adds type ProgramRuntimeEnvironment.

* Moves LoadedPrograms::remove_expired_entries() into LoadedPrograms::prune().

* Adds Stats::prunes_environment and renames Stats::prunes_orphan and Stats::prunes_expired.

* Adds LoadedPrograms::latest_root_epoch.

* Typo fix, authored-by: Dmitri Makarov <dmakarov@users.noreply.github.com>

(cherry picked from commit 8033be3)
@Lichtso Lichtso removed the v1.17 PRs that should be backported to v1.17 label Oct 2, 2023
Lichtso added a commit that referenced this pull request Oct 3, 2023
* Adds type ProgramRuntimeEnvironment.

* Moves LoadedPrograms::remove_expired_entries() into LoadedPrograms::prune().

* Adds Stats::prunes_environment and renames Stats::prunes_orphan and Stats::prunes_expired.

* Adds LoadedPrograms::latest_root_epoch.

* Typo fix, authored-by: Dmitri Makarov <dmakarov@users.noreply.github.com>

(cherry picked from commit 8033be3)
Lichtso added a commit that referenced this pull request Oct 3, 2023
Refactor - `LoadedPrograms` (#33482)

* Adds type ProgramRuntimeEnvironment.

* Moves LoadedPrograms::remove_expired_entries() into LoadedPrograms::prune().

* Adds Stats::prunes_environment and renames Stats::prunes_orphan and Stats::prunes_expired.

* Adds LoadedPrograms::latest_root_epoch.

* Typo fix, authored-by: Dmitri Makarov <dmakarov@users.noreply.github.com>

(cherry picked from commit 8033be3)

Co-authored-by: Alexander Meißner <AlexanderMeissner@gmx.net>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants