Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor - LoadedPrograms::get_entries_sorted_by_tx_usage() #32874

Merged

Conversation

Lichtso
Copy link
Contributor

@Lichtso Lichtso commented Aug 17, 2023

Problem

This PR was split from #32172.

At the moment only LoadedPrograms::sort_and_unload() uses the sorted list of verified and compiled programs to evict them, but the recompilation phase before epoch boundaries will soon need that as well.

Summary of Changes

Adds LoadedPrograms::get_entries_sorted_by_tx_usage() which returns the list of loaded programs which are verified and compiled sorted by tx_usage_counter and can filter the result depending on the selected program runtime versions.

@Lichtso Lichtso added the runtime Issues related to runtime, BPF, and LLVM label Aug 17, 2023
@Lichtso Lichtso requested review from dmakarov and pgarg66 August 17, 2023 15:37
@dmakarov
Copy link
Contributor

LGTM

@codecov
Copy link

codecov bot commented Aug 17, 2023

Codecov Report

Merging #32874 (ba1864f) into master (fea5460) will increase coverage by 0.0%.
The diff coverage is 80.0%.

@@           Coverage Diff           @@
##           master   #32874   +/-   ##
=======================================
  Coverage    82.0%    82.0%           
=======================================
  Files         785      785           
  Lines      212412   212418    +6     
=======================================
+ Hits       174212   174234   +22     
+ Misses      38200    38184   -16     

@Lichtso Lichtso merged commit be6d6fa into solana-labs:master Aug 17, 2023
@Lichtso Lichtso deleted the refactor/get_entries_sorted_by_tx_usage branch August 17, 2023 17:15
wen-coding pushed a commit to wen-coding/solana that referenced this pull request Aug 21, 2023
…-labs#32874)

Factor get_entries_sorted_by_tx_usage() out of sort_and_unload().
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
runtime Issues related to runtime, BPF, and LLVM
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants