6 #ifndef ENDPOINTIMP_HPP_INCLUDE
7 #define ENDPOINTIMP_HPP_INCLUDE
12 #include "geopm_time.h"
25 char agent[GEOPM_ENDPOINT_AGENT_NAME_MAX];
45 char agent[GEOPM_ENDPOINT_AGENT_NAME_MAX];
72 std::shared_ptr<SharedMemory> policy_shmem,
73 std::shared_ptr<SharedMemory> sample_shmem,
78 void open(
void)
override;
79 void close(
void)
override;
80 void write_policy(
const std::vector<double> &policy)
override;
81 double read_sample(std::vector<double> &sample)
override;
93 std::shared_ptr<SharedMemory> m_policy_shmem;
94 std::shared_ptr<SharedMemory> m_sample_shmem;
98 volatile bool m_continue_loop;
Definition: Endpoint.hpp:20
Definition: EndpointImp.hpp:64
void write_policy(const std::vector< double > &policy) override
Write a set of policy values for the Agent.
Definition: Endpoint.cpp:103
void reset_wait_loop(void) override
Re-enables wait loops occurring after this call.
Definition: Endpoint.cpp:199
virtual ~EndpointImp()
Definition: Endpoint.cpp:65
std::string get_agent(void) override
Returns the Agent name, or empty string if no Agent is attached.
Definition: Endpoint.cpp:143
std::string get_profile_name(void) override
Returns the profile name associated with the attached application, or empty if no controller is attac...
Definition: Endpoint.cpp:204
EndpointImp & operator=(const EndpointImp &other)=delete
void close(void) override
Unlink the shared memory regions belonging to the Endpoint.
Definition: Endpoint.cpp:90
EndpointImp(const EndpointImp &other)=delete
void stop_wait_loop(void) override
Cancels any current wait loops in this Endpoint.
Definition: Endpoint.cpp:194
static std::string shm_sample_postfix(void)
Definition: Endpoint.cpp:38
void wait_for_agent_detach(double timeout) override
Blocks as long as the same agent is still attached to the endpoint, a timeout is reached,...
Definition: Endpoint.cpp:178
double read_sample(std::vector< double > &sample) override
Read a set of samples from the Agent.
Definition: Endpoint.cpp:120
void wait_for_agent_attach(double timeout) override
Blocks until an agent attaches to the endpoint, a timeout is reached, or the operation is canceled wi...
Definition: Endpoint.cpp:162
static std::string shm_policy_postfix(void)
Definition: Endpoint.cpp:33
std::set< std::string > get_hostnames(void) override
Returns the list of hostnames used by the attached application, or empty if no controller is attached...
Definition: Endpoint.cpp:219
void open(void) override
Create the shared memory regions belonging to the Endpoint.
Definition: Endpoint.cpp:70
Definition: Accumulator.cpp:12
Definition: EndpointImp.hpp:32
double values[(4096 - offsetof(struct geopm_endpoint_policy_shmem_header, values))/sizeof(double)]
Holds resource manager data.
Definition: EndpointImp.hpp:38
geopm_time_s timestamp
Time that the memory was last updated.
Definition: EndpointImp.hpp:34
size_t count
Specifies the size of the following array.
Definition: EndpointImp.hpp:36
Definition: EndpointImp.hpp:41
char profile_name[GEOPM_ENDPOINT_PROFILE_NAME_MAX]
Holds the profile name associated with the attached job.
Definition: EndpointImp.hpp:48
double values[(4096 - offsetof(struct geopm_endpoint_sample_shmem_header, values))/sizeof(double)]
Holds resource manager data.
Definition: EndpointImp.hpp:55
size_t count
Specifies the size of the following array.
Definition: EndpointImp.hpp:53
char agent[GEOPM_ENDPOINT_AGENT_NAME_MAX]
Holds the name of the Agent attached, if any.
Definition: EndpointImp.hpp:45
char hostlist_path[GEOPM_ENDPOINT_HOSTLIST_PATH_MAX]
Path to a file containing the list of hostnames in the attached job.
Definition: EndpointImp.hpp:51
geopm_time_s timestamp
Time that the memory was last updated.
Definition: EndpointImp.hpp:43