diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/kernel-doc | 22 | ||||
-rwxr-xr-x | scripts/recordmcount.pl | 6 |
2 files changed, 25 insertions, 3 deletions
diff --git a/scripts/kernel-doc b/scripts/kernel-doc index 3208a3a7e7fe..acd8c4a8e3e0 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc | |||
@@ -1828,6 +1828,25 @@ sub reset_state { | |||
1828 | $state = 0; | 1828 | $state = 0; |
1829 | } | 1829 | } |
1830 | 1830 | ||
1831 | sub tracepoint_munge($) { | ||
1832 | my $file = shift; | ||
1833 | my $tracepointname = 0; | ||
1834 | my $tracepointargs = 0; | ||
1835 | |||
1836 | if($prototype =~ m/TRACE_EVENT\((.*?),/) { | ||
1837 | $tracepointname = $1; | ||
1838 | } | ||
1839 | if($prototype =~ m/TP_PROTO\((.*?)\)/) { | ||
1840 | $tracepointargs = $1; | ||
1841 | } | ||
1842 | if (($tracepointname eq 0) || ($tracepointargs eq 0)) { | ||
1843 | print STDERR "Warning(${file}:$.): Unrecognized tracepoint format: \n". | ||
1844 | "$prototype\n"; | ||
1845 | } else { | ||
1846 | $prototype = "static inline void trace_$tracepointname($tracepointargs)"; | ||
1847 | } | ||
1848 | } | ||
1849 | |||
1831 | sub syscall_munge() { | 1850 | sub syscall_munge() { |
1832 | my $void = 0; | 1851 | my $void = 0; |
1833 | 1852 | ||
@@ -1882,6 +1901,9 @@ sub process_state3_function($$) { | |||
1882 | if ($prototype =~ /SYSCALL_DEFINE/) { | 1901 | if ($prototype =~ /SYSCALL_DEFINE/) { |
1883 | syscall_munge(); | 1902 | syscall_munge(); |
1884 | } | 1903 | } |
1904 | if ($prototype =~ /TRACE_EVENT/) { | ||
1905 | tracepoint_munge($file); | ||
1906 | } | ||
1885 | dump_function($prototype, $file); | 1907 | dump_function($prototype, $file); |
1886 | reset_state(); | 1908 | reset_state(); |
1887 | } | 1909 | } |
diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl index 409596eca124..0fae7da0529c 100755 --- a/scripts/recordmcount.pl +++ b/scripts/recordmcount.pl | |||
@@ -26,7 +26,7 @@ | |||
26 | # which will also be the location of that section after final link. | 26 | # which will also be the location of that section after final link. |
27 | # e.g. | 27 | # e.g. |
28 | # | 28 | # |
29 | # .section ".text.sched" | 29 | # .section ".sched.text", "ax" |
30 | # .globl my_func | 30 | # .globl my_func |
31 | # my_func: | 31 | # my_func: |
32 | # [...] | 32 | # [...] |
@@ -39,7 +39,7 @@ | |||
39 | # [...] | 39 | # [...] |
40 | # | 40 | # |
41 | # Both relocation offsets for the mcounts in the above example will be | 41 | # Both relocation offsets for the mcounts in the above example will be |
42 | # offset from .text.sched. If we make another file called tmp.s with: | 42 | # offset from .sched.text. If we make another file called tmp.s with: |
43 | # | 43 | # |
44 | # .section __mcount_loc | 44 | # .section __mcount_loc |
45 | # .quad my_func + 0x5 | 45 | # .quad my_func + 0x5 |
@@ -51,7 +51,7 @@ | |||
51 | # But this gets hard if my_func is not globl (a static function). | 51 | # But this gets hard if my_func is not globl (a static function). |
52 | # In such a case we have: | 52 | # In such a case we have: |
53 | # | 53 | # |
54 | # .section ".text.sched" | 54 | # .section ".sched.text", "ax" |
55 | # my_func: | 55 | # my_func: |
56 | # [...] | 56 | # [...] |
57 | # call mcount (offset: 0x5) | 57 | # call mcount (offset: 0x5) |