CONFIG_DEBUG_INFO Impact Analysis

CONFIG_DEBUG_INFO Impact Analysis

Build Size Comparison

Article content

Runtime Impact

Article content

Tools That Benefit from DEBUG_INFO

Crash Analysis Tools

  • crash utility can analyze vmcore dumps
  • addr2line can resolve addresses to source lines
  • objdump -S shows interleaved source/assembly
  • gdb provides full source-level debugging

Profiling Tools

  • perf can show function names and line numbers
  • SystemTap can hook into specific source lines
  • kgdb can do live kernel debugging

Example: perf with DEBUG_INFO

# Without DEBUG_INFO - only addresses
$ perf report
# Overhead  Command  Symbol
    45.23%  my_app   [kernel] [k] 0xffffffff81234567
    12.34%  my_app   [kernel] [k] 0xffffffff82345678

# With DEBUG_INFO - function names and source info
$ perf report
# Overhead  Command  Symbol
    45.23%  my_app   [kernel] [k] my_driver_interrupt  my_driver.c:234
    12.34%  my_app   [kernel] [k] kmalloc               slab.c:3456
        

When to Enable DEBUG_INFO

✅ Enable When:

  • Developing kernel modules
  • Debugging kernel crashes
  • Profiling kernel performance
  • Using crash dump analysis
  • Learning kernel internals

❌ Don't Enable When:

  • Building production kernels
  • Limited disk space
  • Only running stable, tested code
  • Build time is critical

Suboptions of DEBUG_INFO

Article content


徐天宇

Software Engineer at Cisco

6d

only increase ~40MB (508M - 470M) for my bzImage.

Like
Reply
David L.

Embedded devices HW/SW design, M2M/IoT , edge ML

2mo

you can always deploy a production artifact and store a checked build with symbols just in case :)

Like
Reply

To view or add a comment, sign in

Others also viewed

Explore topics