Now recordmcount.pl recognizes RISC-V object files. For the mechanism to work, we have to disable the linker relaxation.
Showing the changes to scripts (1 of 3 files). Show all
Unified · Split
| @@ -376,6 +376,11 @@ if ($arch eq "x86_64") { · 375 unmodified lines | |||
| 376 | $mcount_regex = "^\\s*([0-9a-fA-F]+):.*\\s__mcount\$"; | 376 | $mcount_regex = "^\\s*([0-9a-fA-F]+):.*\\s__mcount\$"; |
| 377 | $type = ".quad"; | 377 | $type = ".quad"; |
| 378 | $alignment = 8; | 378 | $alignment = 8; |
| 379 | } elsif ($arch eq "riscv") { | ||
| 380 | $function_regex = "^([0-9a-fA-F]+)\\s+<([^.0-9][0-9a-zA-Z_\\.]+)>:"; | ||
| 381 | $mcount_regex = "^\\s*([0-9a-fA-F]+):\\sR_RISCV_CALL\\s_mcount\$"; | ||
| 382 | $type = ".quad"; | ||
| 383 | $alignment = 2; | ||
| 379 | } else { | 384 | } else { |
| 380 | die "Arch $arch is not supported with CONFIG_FTRACE_MCOUNT_RECORD"; | 385 | die "Arch $arch is not supported with CONFIG_FTRACE_MCOUNT_RECORD"; |
| 381 | } | 386 | } |