netfilter: add option for GCOV profiling
Subsystems (3)
Florian Westphal
maintainerPATCH 1/1 netfilter: add option for GCOV profiling
Similar to a few other subsystems: add a new config toggle to enable netfilter gcov profiling in netfilter, including ebtables, arptables and so on.
Signed-off-by Florian Westphal <[email protected]>
---
NB: This doesn't enable profiling for br_netfilter kludge, because it resides in net/bridge/ dir. As I'm not interested in extending coverage for that thing I did not extend this.
net/bridge/netfilter/Makefile | 4 ++++ net/ipv4/netfilter/Makefile | 4 ++++ net/ipv6/netfilter/Makefile | 4 ++++ net/netfilter/Kconfig | 8 ++++++++ net/netfilter/Makefile | 4 ++++ 5 files changed, 24 insertions(+)
net/bridge/netfilter/Makefile +4 -0
@@ -38,3 +38,7 @@ obj-$(CONFIG_BRIDGE_EBT_SNAT) += ebt_snat.o # watchers obj-$(CONFIG_BRIDGE_EBT_LOG) += ebt_log.o obj-$(CONFIG_BRIDGE_EBT_NFLOG) += ebt_nflog.o + +ifdef CONFIG_GCOV_PROFILE_NETFILTER +GCOV_PROFILE := y +endif
net/ipv4/netfilter/Makefile +4 -0
@@ -51,3 +51,7 @@ obj-$(CONFIG_IP_NF_ARP_MANGLE) += arpt_mangle.o obj-$(CONFIG_IP_NF_ARPFILTER) += arptable_filter.o obj-$(CONFIG_NF_DUP_IPV4) += nf_dup_ipv4.o + +ifdef CONFIG_GCOV_PROFILE_NETFILTER +GCOV_PROFILE := y +endif
net/ipv6/netfilter/Makefile +4 -0
@@ -43,3 +43,7 @@ obj-$(CONFIG_IP6_NF_MATCH_SRH) += ip6t_srh.o obj-$(CONFIG_IP6_NF_TARGET_NPT) += ip6t_NPT.o obj-$(CONFIG_IP6_NF_TARGET_REJECT) += ip6t_REJECT.o obj-$(CONFIG_IP6_NF_TARGET_SYNPROXY) += ip6t_SYNPROXY.o + +ifdef CONFIG_GCOV_PROFILE_NETFILTER +GCOV_PROFILE := y +endif
net/netfilter/Kconfig +8 -0
@@ -1648,6 +1648,14 @@ config NETFILTER_XT_MATCH_U32 endif # NETFILTER_XTABLES +config GCOV_PROFILE_NETFILTER + bool "Enable GCOV profiling for netilter" + depends on GCOV_KERNEL + help + Enable GCOV profiling for netfilter for checking which functions/lines + are executed. + + If unsure, say N. endmenu source "net/netfilter/ipset/Kconfig"
net/netfilter/Makefile +4 -0
@@ -240,3 +240,7 @@ obj-$(CONFIG_IP_VS) += ipvs/ # lwtunnel obj-$(CONFIG_LWTUNNEL) += nf_hooks_lwtunnel.o + +ifdef CONFIG_GCOV_PROFILE_NETFILTER +GCOV_PROFILE := y +endif
Signature · 1 line
2.53.0