diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/recordmcount.pl | 20 | ||||
-rw-r--r-- | scripts/tracing/draw_functrace.py | 7 |
2 files changed, 23 insertions, 4 deletions
diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl index 91033e67321e..7109e2b5bc0a 100755 --- a/scripts/recordmcount.pl +++ b/scripts/recordmcount.pl | |||
@@ -226,6 +226,26 @@ if ($arch eq "x86_64") { | |||
226 | if ($is_module eq "0") { | 226 | if ($is_module eq "0") { |
227 | $cc .= " -mconstant-gp"; | 227 | $cc .= " -mconstant-gp"; |
228 | } | 228 | } |
229 | } elsif ($arch eq "sparc64") { | ||
230 | # In the objdump output there are giblets like: | ||
231 | # 0000000000000000 <igmp_net_exit-0x18>: | ||
232 | # As there's some data blobs that get emitted into the | ||
233 | # text section before the first instructions and the first | ||
234 | # real symbols. We don't want to match that, so to combat | ||
235 | # this we use '\w' so we'll match just plain symbol names, | ||
236 | # and not those that also include hex offsets inside of the | ||
237 | # '<>' brackets. Actually the generic function_regex setting | ||
238 | # could safely use this too. | ||
239 | $function_regex = "^([0-9a-fA-F]+)\\s+<(\\w*?)>:"; | ||
240 | |||
241 | # Sparc64 calls '_mcount' instead of plain 'mcount'. | ||
242 | $mcount_regex = "^\\s*([0-9a-fA-F]+):.*\\s_mcount\$"; | ||
243 | |||
244 | $alignment = 8; | ||
245 | $type = ".xword"; | ||
246 | $ld .= " -m elf64_sparc"; | ||
247 | $cc .= " -m64"; | ||
248 | $objcopy .= " -O elf64-sparc"; | ||
229 | } else { | 249 | } else { |
230 | die "Arch $arch is not supported with CONFIG_FTRACE_MCOUNT_RECORD"; | 250 | die "Arch $arch is not supported with CONFIG_FTRACE_MCOUNT_RECORD"; |
231 | } | 251 | } |
diff --git a/scripts/tracing/draw_functrace.py b/scripts/tracing/draw_functrace.py index 902f9a992620..db40fa04cd51 100644 --- a/scripts/tracing/draw_functrace.py +++ b/scripts/tracing/draw_functrace.py | |||
@@ -12,10 +12,9 @@ calls. Only the functions's names and the the call time are provided. | |||
12 | 12 | ||
13 | Usage: | 13 | Usage: |
14 | Be sure that you have CONFIG_FUNCTION_TRACER | 14 | Be sure that you have CONFIG_FUNCTION_TRACER |
15 | # mkdir /debugfs | 15 | # mount -t debugfs nodev /sys/kernel/debug |
16 | # mount -t debug debug /debug | 16 | # echo function > /sys/kernel/debug/tracing/current_tracer |
17 | # echo function > /debug/tracing/current_tracer | 17 | $ cat /sys/kernel/debug/tracing/trace_pipe > ~/raw_trace_func |
18 | $ cat /debug/tracing/trace_pipe > ~/raw_trace_func | ||
19 | Wait some times but not too much, the script is a bit slow. | 18 | Wait some times but not too much, the script is a bit slow. |
20 | Break the pipe (Ctrl + Z) | 19 | Break the pipe (Ctrl + Z) |
21 | $ scripts/draw_functrace.py < raw_trace_func > draw_functrace | 20 | $ scripts/draw_functrace.py < raw_trace_func > draw_functrace |