|
1 | | -/* $NetBSD: cpu.c,v 1.7 2024/08/10 07:27:04 skrll Exp $ */ |
| 1 | +/* $NetBSD: cpu.c,v 1.7.2.1 2025/10/09 09:25:52 martin Exp $ */ |
2 | 2 |
|
3 | 3 | /*- |
4 | 4 | * Copyright (c) 2023 The NetBSD Foundation, Inc. |
|
32 | 32 | #include "opt_multiprocessor.h" |
33 | 33 |
|
34 | 34 | #include <sys/cdefs.h> |
35 | | -__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.7 2024/08/10 07:27:04 skrll Exp $"); |
| 35 | +__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.7.2.1 2025/10/09 09:25:52 martin Exp $"); |
36 | 36 |
|
37 | 37 | #include <sys/param.h> |
38 | 38 |
|
@@ -183,7 +183,7 @@ cpu_identify(device_t self, struct cpu_info *ci) |
183 | 183 |
|
184 | 184 | aprint_naive("\n"); |
185 | 185 | aprint_normal(": %s %s imp. %" PRIx32 "\n", cv_name, ca_name, mimpid); |
186 | | - aprint_verbose_dev(ci->ci_dev, |
| 186 | + aprint_verbose_dev(ci->ci_dev, |
187 | 187 | "vendor 0x%" PRIxREGISTER " arch. %" PRIxREGISTER " imp. %" PRIx32 "\n", |
188 | 188 | mvendorid, marchid, mimpid); |
189 | 189 | } |
@@ -235,6 +235,15 @@ cpu_attach(device_t dv, cpuid_t hartid) |
235 | 235 | ci->ci_dev = dv; |
236 | 236 | device_set_private(dv, ci); |
237 | 237 |
|
| 238 | + const char * const xname = device_xname(dv); |
| 239 | + |
| 240 | + evcnt_attach_dynamic(&ci->ci_ev_fpu_loads, EVCNT_TYPE_MISC, NULL, |
| 241 | + xname, "fpu loads"); |
| 242 | + evcnt_attach_dynamic(&ci->ci_ev_fpu_saves, EVCNT_TYPE_MISC, NULL, |
| 243 | + xname, "fpu saves"); |
| 244 | + evcnt_attach_dynamic(&ci->ci_ev_fpu_reenables, EVCNT_TYPE_MISC, NULL, |
| 245 | + xname, "fpu reenables"); |
| 246 | + |
238 | 247 | cpu_identify(dv, ci); |
239 | 248 |
|
240 | 249 | #ifdef MULTIPROCESSOR |
|
0 commit comments