diff options
author | Ed Schouten <ed@FreeBSD.org> | 2016-12-14 12:56:58 +0000 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-10-12 07:04:11 +0200 |
commit | a9219e7464d4ea90d0728c40c96965699cfc39f3 (patch) | |
tree | 77ed0bd23b2d82074d3199da16a1fb63b0d26fee | |
parent | timecounter: Merge FreeBSD change r304285 (diff) | |
download | rtems-a9219e7464d4ea90d0728c40c96965699cfc39f3.tar.bz2 |
timecounter: Merge FreeBSD change r310053
Add labels to sysctls related to clocks.
Sysctls like kern.eventtimer.et.*.quality currently embed the name of
the clock device. This is problematic for the Prometheus metrics
exporter for two reasons:
- Some of those clocks have dashes in their names, which Prometheus
doesn't allow to be used in metric names.
- It doesn't allow for extracting the same property of all clocks on the
system from within a single query.
Attach these nodes to have a label, so that the Prometheus metrics
exporter gives these metric a uniform name with the name of the clock
attached as a label.
Reviewed by: cem
Differential Revision: https://reviews.freebsd.org/D8775
Update #3175.
-rw-r--r-- | cpukit/score/src/kern_tc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cpukit/score/src/kern_tc.c b/cpukit/score/src/kern_tc.c index 272461d9b4..2810fd88dd 100644 --- a/cpukit/score/src/kern_tc.c +++ b/cpukit/score/src/kern_tc.c @@ -1362,9 +1362,9 @@ tc_init(struct timecounter *tc) /* * Set up sysctl tree for this counter. */ - tc_root = SYSCTL_ADD_NODE(NULL, + tc_root = SYSCTL_ADD_NODE_WITH_LABEL(NULL, SYSCTL_STATIC_CHILDREN(_kern_timecounter_tc), OID_AUTO, tc->tc_name, - CTLFLAG_RW, 0, "timecounter description"); + CTLFLAG_RW, 0, "timecounter description", "timecounter"); SYSCTL_ADD_UINT(NULL, SYSCTL_CHILDREN(tc_root), OID_AUTO, "mask", CTLFLAG_RD, &(tc->tc_counter_mask), 0, "mask for implemented bits"); |