diff options
author | Rafal Slawik <rslawik@google.com> | 2021-01-05 18:44:36 +0000 |
---|---|---|
committer | Rafal Slawik <rslawik@google.com> | 2021-01-05 18:51:36 +0000 |
commit | 2e2e54f8fe944981057480b6f70678ed7cf6581b (patch) | |
tree | 7c537307cc664a99ad7f4ebd783b01cf67ea39f6 /progs | |
parent | 6597d87a675d56f8d7bdaf471bcfb4eff666f7d2 (diff) | |
download | bpf-2e2e54f8fe944981057480b6f70678ed7cf6581b.tar.gz |
Measure total time in state
This measure is not affected by uid removals and is monotonic. That
makes it a good fit for CPU telemetry in statsd.
Bug: 174245730
Test: manually compare total with uid breakdown
Change-Id: I0f04f2ff09d77a4c7d9fe1e2b492f983b61987f6
Diffstat (limited to 'progs')
-rw-r--r-- | progs/include/bpf_timeinstate.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/progs/include/bpf_timeinstate.h b/progs/include/bpf_timeinstate.h index 7cb7baa..1065b6e 100644 --- a/progs/include/bpf_timeinstate.h +++ b/progs/include/bpf_timeinstate.h @@ -19,6 +19,10 @@ #define BPF_FS_PATH "/sys/fs/bpf/" +// Number of frequencies tracked in the array with total time. If some CPUs have +// more than 64 freqs +// // available, the overflow is stored in the last entry. +#define MAX_FREQS_FOR_TOTAL 64 // Number of frequencies for which a UID's times can be tracked in a single map entry. If some CPUs // have more than 32 freqs available, a single UID is tracked using 2 or more entries. #define FREQS_PER_ENTRY 32 |