Module Name:    src
Committed By:   riastradh
Date:           Mon Jul  1 13:13:37 UTC 2024

Modified Files:
        src/sys/net: if_stats.h

Log Message:
if_stats(9): New dtrace probes on if_statinc/dec/add/sub_ref.

PR kern/58377


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/net/if_stats.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/net/if_stats.h
diff -u src/sys/net/if_stats.h:1.5 src/sys/net/if_stats.h:1.6
--- src/sys/net/if_stats.h:1.5	Sat Jun 29 12:11:12 2024
+++ src/sys/net/if_stats.h	Mon Jul  1 13:13:37 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_stats.h,v 1.5 2024/06/29 12:11:12 riastradh Exp $	*/
+/*	$NetBSD: if_stats.h,v 1.6 2024/07/01 13:13:37 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -72,7 +72,7 @@ if_statinc(ifnet_t *ifp, if_stat_t x)
 static inline void
 if_statinc_ref(ifnet_t *ifp, net_stat_ref_t nsr, if_stat_t x)
 {
-	/* XXX sdt probe needs ifp */
+	SDT_PROBE3(sdt, net, interface, stat,  ifp, x, +1);
 	_NET_STATINC_REF(nsr, x);
 }
 
@@ -86,7 +86,7 @@ if_statdec(ifnet_t *ifp, if_stat_t x)
 static inline void
 if_statdec_ref(ifnet_t *ifp, net_stat_ref_t nsr, if_stat_t x)
 {
-	/* XXX sdt probe needs ifp */
+	SDT_PROBE3(sdt, net, interface, stat,  ifp, x, -1);
 	_NET_STATDEC_REF(nsr, x);
 }
 
@@ -100,7 +100,7 @@ if_statadd(ifnet_t *ifp, if_stat_t x, ui
 static inline void
 if_statadd_ref(ifnet_t *ifp, net_stat_ref_t nsr, if_stat_t x, uint64_t v)
 {
-	/* XXX sdt probe needs ifp */
+	SDT_PROBE3(sdt, net, interface, stat,  ifp, x, v);
 	_NET_STATADD_REF(nsr, x, v);
 }
 
@@ -125,7 +125,7 @@ if_statsub(ifnet_t *ifp, if_stat_t x, ui
 static inline void
 if_statsub_ref(ifnet_t *ifp, net_stat_ref_t nsr, if_stat_t x, uint64_t v)
 {
-	/* XXX sdt probe needs ifp */
+	SDT_PROBE3(sdt, net, interface, stat,  ifp, x, -v);
 	_NET_STATSUB_REF(nsr, x, v);
 }
 

Reply via email to