diff options
author | melifaro <melifaro@FreeBSD.org> | 2015-10-04 08:21:15 +0000 |
---|---|---|
committer | melifaro <melifaro@FreeBSD.org> | 2015-10-04 08:21:15 +0000 |
commit | 02d9938404f08a2f46ca258feb3e7345112b722e (patch) | |
tree | 0208e4aa8e78bb729e10ace89eee5f27e4c52936 /sys/netinet6/nd6.c | |
parent | 2bbb4de4555704193177dcf7eb429d90268ef223 (diff) | |
download | FreeBSD-src-02d9938404f08a2f46ca258feb3e7345112b722e.zip FreeBSD-src-02d9938404f08a2f46ca258feb3e7345112b722e.tar.gz |
Add __noinline attribute to several functions to ease dtrace instrumentation
Diffstat (limited to 'sys/netinet6/nd6.c')
-rw-r--r-- | sys/netinet6/nd6.c | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c index 7d7f23c..b319982 100644 --- a/sys/netinet6/nd6.c +++ b/sys/netinet6/nd6.c @@ -512,12 +512,13 @@ nd6_llinfo_settimer_locked(struct llentry *ln, long tick) } /* -* 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 *ln, struct in6_addr *src) /* * 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, long tick) 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 sockaddr_in6 *addr, struct ifnet *ifp) * 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, struct mbuf *m, * 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) { |