diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c index b9e716b411be..74c8ef62eb8d 100644 --- a/sys/kern/uipc_mbuf.c +++ b/sys/kern/uipc_mbuf.c @@ -62,11 +62,21 @@ SDT_PROBE_DEFINE5_XLATE(sdt, , , m__init, "uint32_t", "uint32_t", "uint32_t", "uint32_t"); +SDT_PROBE_DEFINE3_XLATE(sdt, , , m__gethdr_raw, + "uint32_t", "uint32_t", + "uint16_t", "uint16_t", + "struct mbuf *", "mbufinfo_t *"); + SDT_PROBE_DEFINE3_XLATE(sdt, , , m__gethdr, "uint32_t", "uint32_t", "uint16_t", "uint16_t", "struct mbuf *", "mbufinfo_t *"); +SDT_PROBE_DEFINE3_XLATE(sdt, , , m__get_raw, + "uint32_t", "uint32_t", + "uint16_t", "uint16_t", + "struct mbuf *", "mbufinfo_t *"); + SDT_PROBE_DEFINE3_XLATE(sdt, , , m__get, "uint32_t", "uint32_t", "uint16_t", "uint16_t", diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h index 1dac5fcf32b7..2936966f6acc 100644 --- a/sys/sys/mbuf.h +++ b/sys/sys/mbuf.h @@ -62,7 +62,9 @@ SDT_PROBE5(sdt, , , probe, arg0, arg1, arg2, arg3, arg4) SDT_PROBE_DECLARE(sdt, , , m__init); +SDT_PROBE_DECLARE(sdt, , , m__gethdr_raw); SDT_PROBE_DECLARE(sdt, , , m__gethdr); +SDT_PROBE_DECLARE(sdt, , , m__get_raw); SDT_PROBE_DECLARE(sdt, , , m__get); SDT_PROBE_DECLARE(sdt, , , m__getcl); SDT_PROBE_DECLARE(sdt, , , m__getjcl); @@ -956,6 +958,19 @@ m_init(struct mbuf *m, int how, short type, int flags) return (error); } +static __inline struct mbuf * +m_get_raw(int how, short type) +{ + struct mbuf *m; + struct mb_args args; + + args.flags = 0; + args.type = type | MT_NOINIT; + m = uma_zalloc_arg(zone_mbuf, &args, how); + MBUF_PROBE3(m__get_raw, how, type, m); + return (m); +} + static __inline struct mbuf * m_get(int how, short type) { @@ -969,6 +984,19 @@ m_get(int how, short type) return (m); } +static __inline struct mbuf * +m_gethdr_raw(int how, short type) +{ + struct mbuf *m; + struct mb_args args; + + args.flags = M_PKTHDR; + args.type = type | MT_NOINIT; + m = uma_zalloc_arg(zone_mbuf, &args, how); + MBUF_PROBE3(m__gethdr_raw, how, type, m); + return (m); +} + static __inline struct mbuf * m_gethdr(int how, short type) {