Kconfig 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. # SPDX-License-Identifier: GPL-2.0-only
  2. menu "GCOV-based kernel profiling"
  3. config GCOV_KERNEL
  4. bool "Enable gcov-based kernel profiling"
  5. depends on DEBUG_FS
  6. select CONSTRUCTORS if !UML
  7. default n
  8. help
  9. This option enables gcov-based code profiling (e.g. for code coverage
  10. measurements).
  11. If unsure, say N.
  12. Additionally specify CONFIG_GCOV_PROFILE_ALL=y to get profiling data
  13. for the entire kernel. To enable profiling for specific files or
  14. directories, add a line similar to the following to the respective
  15. Makefile:
  16. For a single file (e.g. main.o):
  17. GCOV_PROFILE_main.o := y
  18. For all files in one directory:
  19. GCOV_PROFILE := y
  20. To exclude files from being profiled even when CONFIG_GCOV_PROFILE_ALL
  21. is specified, use:
  22. GCOV_PROFILE_main.o := n
  23. and:
  24. GCOV_PROFILE := n
  25. Note that the debugfs filesystem has to be mounted to access
  26. profiling data.
  27. config ARCH_HAS_GCOV_PROFILE_ALL
  28. def_bool n
  29. config GCOV_PROFILE_ALL
  30. bool "Profile entire Kernel"
  31. depends on !COMPILE_TEST
  32. depends on GCOV_KERNEL
  33. depends on ARCH_HAS_GCOV_PROFILE_ALL
  34. default n
  35. help
  36. This options activates profiling for the entire kernel.
  37. If unsure, say N.
  38. Note that a kernel compiled with profiling flags will be significantly
  39. larger and run slower. Also be sure to exclude files from profiling
  40. which are not linked to the kernel image to prevent linker errors.
  41. endmenu