diff --git a/CHANGELOG b/CHANGELOG index ffbc52c9..a3f7f73b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -6,6 +6,9 @@ HISTORY ++ New features: + 2015-02-11: Frederick Baksik + opt.h, def.h, others: patch #8423 "arch/perf.h" should be made an optional item + 2015-02-11: Simon Goldschmidt * api_msg.c, opt.h: started to implement fullduplex sockets/netconns (note that this is highly unstable yet!) diff --git a/src/core/ipv4/ip4.c b/src/core/ipv4/ip4.c index 1c7129c3..5a6b1185 100644 --- a/src/core/ipv4/ip4.c +++ b/src/core/ipv4/ip4.c @@ -54,7 +54,6 @@ #include "lwip/dhcp.h" #include "lwip/autoip.h" #include "lwip/stats.h" -#include "arch/perf.h" #include diff --git a/src/core/pbuf.c b/src/core/pbuf.c index 1a91d750..d7508312 100644 --- a/src/core/pbuf.c +++ b/src/core/pbuf.c @@ -69,7 +69,6 @@ #include "lwip/memp.h" #include "lwip/pbuf.h" #include "lwip/sys.h" -#include "arch/perf.h" #if LWIP_TCP && TCP_QUEUE_OOSEQ #include "lwip/tcp_impl.h" #endif diff --git a/src/core/raw.c b/src/core/raw.c index 243dd66b..a0bf0e55 100644 --- a/src/core/raw.c +++ b/src/core/raw.c @@ -48,7 +48,6 @@ #include "lwip/netif.h" #include "lwip/raw.h" #include "lwip/stats.h" -#include "arch/perf.h" #include "lwip/ip6.h" #include "lwip/ip6_addr.h" #include "lwip/inet_chksum.h" diff --git a/src/core/tcp_in.c b/src/core/tcp_in.c index 9eedfc22..2f3dbd6b 100644 --- a/src/core/tcp_in.c +++ b/src/core/tcp_in.c @@ -54,7 +54,6 @@ #include "lwip/inet_chksum.h" #include "lwip/stats.h" #include "lwip/snmp.h" -#include "arch/perf.h" #include "lwip/ip6.h" #include "lwip/ip6_addr.h" #include "lwip/inet_chksum.h" diff --git a/src/core/udp.c b/src/core/udp.c index b2eb1a14..47c6cfe5 100644 --- a/src/core/udp.c +++ b/src/core/udp.c @@ -63,7 +63,6 @@ #include "lwip/icmp6.h" #include "lwip/stats.h" #include "lwip/snmp.h" -#include "arch/perf.h" #include "lwip/dhcp.h" #include diff --git a/src/include/lwip/def.h b/src/include/lwip/def.h index c985a875..5d2c7b14 100644 --- a/src/include/lwip/def.h +++ b/src/include/lwip/def.h @@ -35,6 +35,12 @@ /* arch.h might define NULL already */ #include "lwip/arch.h" #include "lwip/opt.h" +#if LWIP_PERF +#include "arch/perf.h" +#else /* LWIP_PERF */ +#define PERF_START /* null definition */ +#define PERF_STOP(x) /* null definition */ +#endif /* LWIP_PERF */ #ifdef __cplusplus extern "C" { diff --git a/src/include/lwip/opt.h b/src/include/lwip/opt.h index 690bc951..e3895737 100644 --- a/src/include/lwip/opt.h +++ b/src/include/lwip/opt.h @@ -2796,4 +2796,17 @@ #define IP6_DEBUG LWIP_DBG_OFF #endif +/* + -------------------------------------------------- + ---------- Performance tracking options ---------- + -------------------------------------------------- +*/ +/** + * LWIP_PERF: Enable performance testing for lwIP + * (if enabled, arch/perf.h is included) + */ +#ifndef LWIP_PERF +#define LWIP_PERF 0 +#endif + #endif /* LWIP_HDR_OPT_H */