Adjust event counters to report only new events
Previously, RSMI assumed that the event counter values returned
from perf were only new events. But in fact, when we read the
counter values, they are running totals. To account for this, we
now record the value we read and take the difference between the
current value and the previously recorded value.
Change-Id: I1e04b514e89c7c4d4719889f2dae3a1283864e7f
[ROCm/rocm_smi_lib commit: ce475b009c]
Dieser Commit ist enthalten in:
@@ -110,7 +110,7 @@ class Event {
|
||||
uint32_t dev_ind_;
|
||||
int32_t fd_;
|
||||
perf_event_attr attr_;
|
||||
|
||||
uint64_t prev_cntr_val_;
|
||||
int32_t get_event_file_info(void);
|
||||
int32_t get_event_type(uint32_t *ev_type);
|
||||
};
|
||||
|
||||
In neuem Issue referenzieren
Einen Benutzer sperren