Kconfig 1.4 KB

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