I think this is a pretty reasonable trade off if you read theman pageofbpf_perf_event_read_value If youreallywant 5.4 then we can discuss that as it's not trivial.
error = bpf_perf_event_read_value(&counters, key, &buf, sizeof(buf)); if (error) return 0; val = bpf_map_lookup_elem(&values2, &key); if (val) *val = buf; else bpf_map_update_elem(&values2, &key, &buf, BPF_NOEXIST); return 0; } char _license[] SEC("license") = ...
Event ID 2001: Unable to read the "First Counter" value under the usbperf\Performance Key. Status codes returned in data. Event ID 201, 202, 200 - DeviceSetupManager Event ID 219 "The driver \Driver\WudfRd failed to load for the device..." Event ID 256 — System Catalog Database...
Event ID 2001: Unable to read the "First Counter" value under the usbperf\Performance Key. Status codes returned in data. Event ID 201, 202, 200 - DeviceSetupManager Event ID 219 "The driver \Driver\WudfRd failed to load for the device..." Event ID 256 — System Catalog Database ...