dynamorio::drmemtrace::cache_replacement_policy_t Class Referenceabstract

#include <cache_replacement_policy.h>

Inheritance diagram for dynamorio::drmemtrace::cache_replacement_policy_t:
dynamorio::drmemtrace::policy_bit_plru_t dynamorio::drmemtrace::policy_fifo_t dynamorio::drmemtrace::policy_lru_t dynamorio::drmemtrace::policy_rrip_t

Public Member Functions

virtual void access_update (int set_idx, int way, cache_access_outcome_t access_type)=0
 Informs the replacement policy that an access has occurred.
 
virtual void eviction_update (int set_idx, int way)=0
 Informs the replacement policy that an eviction has occurred.
 
virtual void invalidation_update (int set_idx, int way)=0
 Informs the replacement policy that an invalidation has occurred.
 
virtual std::string get_name () const =0
 Returns the name of the replacement policy.
 

Detailed Description

An interface for cache replacement policies.

Holds the necessary information to implement a cache replacement policy, and provides a replacement-specific get_next_way_to_replace() method for caching_device_t.

The policy receives the following updates:

The policy also provides a get_next_way_to_replace() method that returns the next way to replace in the block. This function assumes that all ways are valid, and is called by caching_device_t when it cannot just replace an invalid way.

Note that the policy receives the set index, not the block index as it is in caching_device_t, which is the index of the first way in the set when all ways are stored in a contiguous array. This can be obtained with compute_set_index() in caching_device_t.


The documentation for this class was generated from the following file:
  • /home/runner/work/dynamorio/dynamorio/build_release-64/clients/include/drmemtrace/cache_replacement_policy.h