geopm  3.1.1.dev296+g5916b956
GEOPM - Global Extensible Open Power Manager
record.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 - 2024 Intel Corporation
3  * SPDX-License-Identifier: BSD-3-Clause
4  */
5 
6 #ifndef RECORD_HPP_INCLUDE
7 #define RECORD_HPP_INCLUDE
8 
9 #include <cstdint>
10 #include <string>
11 #include "geopm_time.h"
12 
13 namespace geopm
14 {
23  enum event_e {
41  };
42 
44  std::string event_name(int event_type);
47  int event_type(const std::string &event_name);
53  std::string hint_name(uint64_t hint);
58  uint64_t hint_type(const std::string &hint_name);
59 
61  struct record_s {
63  geopm_time_s time;
65  int32_t process;
67  int32_t event;
69  uint64_t signal;
70  };
71 
72  struct short_region_s {
73  uint64_t hash;
74  int32_t num_complete;
75  double total_time;
76  };
77 }
78 
79 #endif
Definition: Accumulator.cpp:12
uint64_t hint_type(const std::string &hint_name)
Parse a string representing the hint name.
Definition: record.cpp:80
int event_type(const std::string &event_name)
Convert a human-readable event type string to an event_e.
Definition: record.cpp:37
std::string hint_name(uint64_t hint)
Format a string to represent a hint enum from the geopm_region_hint_e.
Definition: record.cpp:57
event_e
Enumeration of event types that can be stored in a record.
Definition: record.hpp:23
@ EVENT_SHORT_REGION
Definition: record.hpp:30
@ EVENT_AFFINITY
Definition: record.hpp:33
@ EVENT_STOP_PROFILE
Definition: record.hpp:37
@ EVENT_REGION_EXIT
Definition: record.hpp:26
@ EVENT_OVERHEAD
Definition: record.hpp:39
@ EVENT_EPOCH_COUNT
Definition: record.hpp:28
@ EVENT_REGION_ENTRY
Definition: record.hpp:24
@ EVENT_START_PROFILE
Definition: record.hpp:35
std::string event_name(int event_type)
Format an event_e type as a string.
Definition: record.cpp:17
Record of an application event.
Definition: record.hpp:61
uint64_t signal
The signal associated with the event type.
Definition: record.hpp:69
int32_t process
The process identifier where event occurred.
Definition: record.hpp:65
int32_t event
One of the m_event_e event types.
Definition: record.hpp:67
geopm_time_s time
System time when event was recorded.
Definition: record.hpp:63
Definition: record.hpp:72
int32_t num_complete
Definition: record.hpp:74
uint64_t hash
Definition: record.hpp:73
double total_time
Definition: record.hpp:75