Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 4 Oct 2015 08:21:16 +0000 (UTC)
From:      "Alexander V. Chernikov" <melifaro@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r288657 - head/sys/netinet6
Message-ID:  <201510040821.t948LGH7000421@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: melifaro
Date: Sun Oct  4 08:21:15 2015
New Revision: 288657
URL: https://svnweb.freebsd.org/changeset/base/288657

Log:
  Add __noinline attribute to several functions to ease dtrace instrumentation

Modified:
  head/sys/netinet6/nd6.c

Modified: head/sys/netinet6/nd6.c
==============================================================================
--- head/sys/netinet6/nd6.c	Sun Oct  4 08:18:37 2015	(r288656)
+++ head/sys/netinet6/nd6.c	Sun Oct  4 08:21:15 2015	(r288657)
@@ -512,12 +512,13 @@ nd6_llinfo_settimer_locked(struct llentr
 }
 
 /*
-* Gets source address of the first packet in hold queue
-* and stores it in @src.
-* Returns pointer to @src (if hold queue is not empty) or NULL.
-*
-*/
-static struct in6_addr *
+ * Gets source address of the first packet in hold queue
+ * and stores it in @src.
+ * Returns pointer to @src (if hold queue is not empty) or NULL.
+ *
+ * Set noinline to be dtrace-friendly
+ */
+static __noinline struct in6_addr *
 nd6_llinfo_get_holdsrc(struct llentry *ln, struct in6_addr *src)
 {
 	struct ip6_hdr hdr;
@@ -541,8 +542,10 @@ nd6_llinfo_get_holdsrc(struct llentry *l
 
 /*
  * Switch @lle state to new state optionally arming timers.
+ *
+ * Set noinline to be dtrace-friendly
  */
-void
+__noinline void
 nd6_llinfo_setstate(struct llentry *lle, int newstate)
 {
 	struct ifnet *ifp;
@@ -586,7 +589,12 @@ nd6_llinfo_settimer(struct llentry *ln, 
 	LLE_WUNLOCK(ln);
 }
 
-static void
+/*
+ * Timer-dependent part of nd state machine.
+ *
+ * Set noinline to be dtrace-friendly
+ */
+static __noinline void
 nd6_llinfo_timer(void *arg)
 {
 	struct llentry *ln;
@@ -1179,8 +1187,10 @@ nd6_is_addr_neighbor(const struct sockad
  * Since the function would cause significant changes in the kernel, DO NOT
  * make it global, unless you have a strong reason for the change, and are sure
  * that the change is safe.
+ *
+ * Set noinline to be dtrace-friendly
  */
-static void
+static __noinline void
 nd6_free(struct llentry *ln, int gc)
 {
 	struct nd_defrouter *dr;
@@ -2036,8 +2046,10 @@ nd6_resolve(struct ifnet *ifp, int is_gw
  * Heavy version.
  * Function assume that destination LLE does not exist,
  * is invalid or stale, so LLE_EXCLUSIVE lock needs to be acquired.
+ *
+ * Set noinline to be dtrace-friendly
  */
-static int
+static __noinline int
 nd6_resolve_slow(struct ifnet *ifp, struct mbuf *m,
     const struct sockaddr_in6 *dst, u_char *desten, uint32_t *pflags)
 {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201510040821.t948LGH7000421>