tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

missing SDT_PROVIDER_DEFINE(sdt)



Hi,

There is SDT_PROVIDER_DECLARE(sdt) in sdt.h.
    http://nxr.netbsd.org/xref/src/sys/sys/sdt.h#416
However, there is no SDT_PROVIDER_DEFINE(sdt). I think this is
inconsistent.

Currently, "sdt" provider is not used yet, so this inconsistency doesn't
cause problems. "sdt" provider will be used by ipf if it enable sdt.
That is, when it enabled the following macros.
    http://nxr.netbsd.org/xref/src/sys/external/bsd/ipf/netinet/ip_compat.h#2831

I think the following patch is required to prevent future problems such
as ipf enabled sdt.
====================
--- a/sys/kern/kern_sdt.c
+++ b/sys/kern/kern_sdt.c
@@ -71,6 +71,8 @@
 #include <sys/systm.h>
 #include <sys/sdt.h>
 
+SDT_PROVIDER_DEFINE(sdt);
+
 void sdt_probe_stub(u_int32_t, uintptr_t, uintptr_t,
        uintptr_t, uintptr_t, uintptr_t);
====================

Could you comment this patch?


Thanks,

-- 
//////////////////////////////////////////////////////////////////////
Internet Initiative Japan Inc.

Device Engineering Section,
IoT Platform Development Department,
Network Division,
Technology Unit

Kengo NAKAHARA <k-nakahara%iij.ad.jp@localhost>


Home | Main Index | Thread Index | Old Index