6 #ifndef APPLICATIONSAMPLERIMP_HPP_INCLUDE
7 #define APPLICATIONSAMPLERIMP_HPP_INCLUDE
11 #include "geopm_hint.h"
13 struct geopm_prof_message_s;
17 class ApplicationStatus;
26 std::shared_ptr<RecordFilter>
filter;
35 const PlatformTopo &platform_topo,
36 const std::map<int, m_process_s> &process_map,
38 const std::string &filter_name,
39 const std::vector<bool> &is_cpu_active,
40 const std::string &profile_name,
41 const std::map<
int, std::set<int> > &client_cpu_map,
42 std::shared_ptr<Scheduler> scheduler);
44 void update(
const geopm_time_s &curr_time)
override;
45 std::vector<record_s>
get_records(
void)
const override;
48 uint64_t
cpu_hint(
int cpu_idx)
const override;
49 double cpu_hint_time(
int cpu_idx, uint64_t hint)
const override;
59 std::map<int, m_process_s> connect_record_log(
const std::vector<int> &
client_pids);
60 void connect_status(
void);
61 void update_cpu_active(
void);
62 void update_start(
void);
63 void update_stop(
void);
64 std::vector<record_s> m_record_buffer;
65 std::vector<short_region_s> m_short_region_buffer;
66 std::shared_ptr<ApplicationStatus> m_status;
67 const PlatformTopo &m_topo;
69 std::map<int, m_process_s> m_process_map;
70 const bool m_is_filtered;
71 const std::string m_filter_name;
72 std::vector<std::array<double, GEOPM_NUM_REGION_HINT>> m_hint_time;
73 std::vector<bool> m_is_cpu_active;
74 geopm_time_s m_update_time;
75 bool m_is_first_update;
76 std::vector<uint64_t> m_hint_last;
77 std::string m_profile_name;
78 std::map<int, std::set<int> > m_client_cpu_map;
79 std::shared_ptr<Scheduler> m_scheduler;
80 std::set<int> m_client_pids;
82 geopm_time_s m_last_stop;
84 double m_overhead_time;
Definition: ApplicationSampler.hpp:27
Definition: ApplicationSamplerImp.hpp:23
bool do_shutdown(void) const override
Definition: ApplicationSampler.cpp:433
double cpu_hint_time(int cpu_idx, uint64_t hint) const override
Get the amount of time a CPU has been measured running with a hint.
Definition: ApplicationSampler.cpp:319
std::set< int > client_cpu_set(int client_pid) const override
Definition: ApplicationSampler.cpp:417
uint64_t cpu_region_hash(int cpu_idx) const override
Get the region hash associated with a CPU.
Definition: ApplicationSampler.cpp:295
std::vector< record_s > get_records(void) const override
Get all of the application events that have been recorded since the last call to update_records().
Definition: ApplicationSampler.cpp:281
double overhead_time(void) const override
Definition: ApplicationSampler.cpp:448
void update(const geopm_time_s &curr_time) override
Update the record buffer by clearing out old records and providing a new cache for subsequent calls t...
Definition: ApplicationSampler.cpp:144
void connect(const std::vector< int > &client_pids) override
Connect with an application using a key.
Definition: ApplicationSampler.cpp:405
uint64_t cpu_hint(int cpu_idx) const override
Get the hint associated with a CPU.
Definition: ApplicationSampler.cpp:307
short_region_s get_short_region(uint64_t event_signal) const override
Definition: ApplicationSampler.cpp:286
double total_time(void) const override
Definition: ApplicationSampler.cpp:438
std::vector< int > client_pids(void) const override
Definition: ApplicationSampler.cpp:427
ApplicationSamplerImp()
Definition: ApplicationSampler.cpp:95
int sampler_cpu(void)
Definition: ApplicationSampler.cpp:457
virtual ~ApplicationSamplerImp()=default
double cpu_progress(int cpu_idx) const override
Get the progress reported on a CPU.
Definition: ApplicationSampler.cpp:334
Checks validity and self consistency of a record stream from a single process. This check is applied ...
Definition: ValidateRecord.hpp:19
Definition: Accumulator.cpp:12
Definition: ApplicationSamplerImp.hpp:25
std::vector< record_s > records
Definition: ApplicationSamplerImp.hpp:30
std::vector< short_region_s > short_regions
Definition: ApplicationSamplerImp.hpp:31
ValidateRecord valid
Definition: ApplicationSamplerImp.hpp:27
std::shared_ptr< RecordFilter > filter
Definition: ApplicationSamplerImp.hpp:26
std::shared_ptr< SharedMemory > record_log_shmem
Definition: ApplicationSamplerImp.hpp:28
std::shared_ptr< ApplicationRecordLog > record_log
Definition: ApplicationSamplerImp.hpp:29
Definition: record.hpp:72