From: kn Date: Wed, 26 Jan 2022 06:31:31 +0000 (+0000) Subject: Make vmm(4/amd64) tracepoints amd64-only X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=4dfa972bbf3685b45a4b499794b077ec49b72b83;p=openbsd Make vmm(4/amd64) tracepoints amd64-only One can use them on non-VMM architectures, but they obviously won't hit: # arch -s ; btrace -l | grep vmm sparc64 tracepoint:vmm:guest_enter tracepoint:vmm:guest_exit Move them under __amd64__ to avoid confusion and safe a few bytes. OK dv --- diff --git a/sys/dev/dt/dt_prov_static.c b/sys/dev/dt/dt_prov_static.c index c1371c311a3..0555e47c13e 100644 --- a/sys/dev/dt/dt_prov_static.c +++ b/sys/dev/dt/dt_prov_static.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dt_prov_static.c,v 1.11 2021/11/24 09:47:49 claudio Exp $ */ +/* $OpenBSD: dt_prov_static.c,v 1.12 2022/01/26 06:31:31 kn Exp $ */ /* * Copyright (c) 2019 Martin Pieuchot @@ -69,11 +69,13 @@ DT_STATIC_PROBE3(vfs, bufcache_rel, "long", "int", "int64_t"); DT_STATIC_PROBE3(vfs, bufcache_take, "long", "int", "int64_t"); DT_STATIC_PROBE4(vfs, cleaner, "long", "int", "long", "long"); +#ifdef __amd64__ /* * VMM */ DT_STATIC_PROBE2(vmm, guest_enter, "void *", "void *"); DT_STATIC_PROBE3(vmm, guest_exit, "void *", "void *", "uint64_t"); +#endif /* __amd64__ */ /* * SMR @@ -113,9 +115,11 @@ struct dt_probe *dtps_static[] = { &_DT_STATIC_P(vfs, bufcache_rel), &_DT_STATIC_P(vfs, bufcache_take), &_DT_STATIC_P(vfs, cleaner), +#ifdef __amd64__ /* VMM */ &_DT_STATIC_P(vmm, guest_enter), &_DT_STATIC_P(vmm, guest_exit), +#endif /* __amd64__ */ /* SMR */ &_DT_STATIC_P(smr, call), &_DT_STATIC_P(smr, called),