geopm  3.1.1.dev214+gba4f9f6d
GEOPM - Global Extensible Open Power Manager
Public Member Functions | Static Public Member Functions | List of all members
geopm::ProxyEpochRecordFilter Class Reference

Filter that can be used to synthesize epoch events from a sequence of region entry events. The filter suppresses received epoch events and passes through all other events. More...

#include <ProxyEpochRecordFilter.hpp>

Inheritance diagram for geopm::ProxyEpochRecordFilter:
Inheritance graph
[legend]
Collaboration diagram for geopm::ProxyEpochRecordFilter:
Collaboration graph
[legend]

Public Member Functions

 ProxyEpochRecordFilter (uint64_t region_hash, int calls_per_epoch, int startup_count)
 Constructor for a process specific proxy-region EpochIOGroup record filter. More...
 
 ProxyEpochRecordFilter (const std::string &filter_name)
 
virtual ~ProxyEpochRecordFilter ()=default
 Default destructor. More...
 
std::vector< record_sfilter (const record_s &record)
 If input record matches the periodic entry into the proxy-region matching the construction arguments, then the output will be a vector of length one containing the inferred M_EVENT_EPOCH_COUNT event. In all other cases the method returns an empty vector. More...
 
- Public Member Functions inherited from geopm::RecordFilter
 RecordFilter ()=default
 Default constructor for pure virtual interface. More...
 
virtual ~RecordFilter ()=default
 Default destructor for pure virtual interface. More...
 

Static Public Member Functions

static void parse_name (const std::string &name, uint64_t &region_hash, int &calls_per_epoch, int &startup_count)
 Static function that will parse the filter string for the proxy_epoch into the constructor arguments for a ProxyEpochRecordFilter. Failure to parse will result in a thrown Exception with GEOPM_ERROR_INVALID type. More...
 
- Static Public Member Functions inherited from geopm::RecordFilter
static std::unique_ptr< RecordFiltermake_unique (const std::string &name)
 

Detailed Description

Filter that can be used to synthesize epoch events from a sequence of region entry events. The filter suppresses received epoch events and passes through all other events.

This filter is used to insert synthetic epoch events into the stream received by an application process. This provides users of the ApplicationSampler with epoch events even if the application does not provide them directly through calls to geopm_prof_epoch(). When this filter is selected, any epoch events that arrive though the application calls into geopm_prof_epoch() are removed from the record stream. The output of this filter is a pass through of all non-epoch events and may include synthesized epoch events. The epoch events are synthesized from region entry of a specified region that may be detected through runtimes like MPI function calls or OpenMP parallel regions. This proxy-region is specified at filter construction time by the region hash. Typically, this region hash value is determined by inspection of a report from a previous run. There are two other constructor parameters that enable support for multiple proxy-region entries per outer loop, and for application calls into the proxy-region prior to the beginning of the outer loop. The filter assumes that the provided records have been collected from a single process.

Constructor & Destructor Documentation

◆ ProxyEpochRecordFilter() [1/2]

geopm::ProxyEpochRecordFilter::ProxyEpochRecordFilter ( uint64_t  region_hash,
int  calls_per_epoch,
int  startup_count 
)

Constructor for a process specific proxy-region EpochIOGroup record filter.

Parameters
[in]region_hashThe hash for the region that will be used as a proxy for the epoch events.
[in]calls_per_epochNumber of calls to the proxy-region that are expected in each outer loop of the application per process.
[in]startup_countNumber of calls to the proxy- region that are to be ignored at application startup. These calls are expected prior to entering the outer loop of the application.

◆ ProxyEpochRecordFilter() [2/2]

geopm::ProxyEpochRecordFilter::ProxyEpochRecordFilter ( const std::string &  filter_name)

◆ ~ProxyEpochRecordFilter()

virtual geopm::ProxyEpochRecordFilter::~ProxyEpochRecordFilter ( )
virtualdefault

Default destructor.

Member Function Documentation

◆ filter()

std::vector< record_s > geopm::ProxyEpochRecordFilter::filter ( const record_s record)
virtual

If input record matches the periodic entry into the proxy-region matching the construction arguments, then the output will be a vector of length one containing the inferred M_EVENT_EPOCH_COUNT event. In all other cases the method returns an empty vector.

Returns
An empty vector or a vector of length one containing a record of an epoch event.

Implements geopm::RecordFilter.

◆ parse_name()

void geopm::ProxyEpochRecordFilter::parse_name ( const std::string &  name,
uint64_t &  region_hash,
int &  calls_per_epoch,
int &  startup_count 
)
static

Static function that will parse the filter string for the proxy_epoch into the constructor arguments for a ProxyEpochRecordFilter. Failure to parse will result in a thrown Exception with GEOPM_ERROR_INVALID type.

Parameters
[in]nameThe filter name which is of the form "proxy_epoch,<HASH>[,<CALLS>[,<STARTUP>]]" The region hash is always parsed (i.e. required). If the calls per epoch is provided or if both the call per epoch and startup count are provided they are also parsed. The default value for calls_per_epoch is 1 and for startup_count is 0.
[out]region_hashThe hash of the region that will serve as the proxy for the epoch.
[out]calls_per_epochNumber of entries into the proxy-region expected in each outer loop of the application.
[out]startup_countNumber of entries into the proxy-region expected prior to the beginning of the outer loop of the application.

The documentation for this class was generated from the following files: