aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-06-10 22:53:40 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-10 22:53:40 -0400
commit862366118026a358882eefc70238dbcc3db37aac (patch)
tree4eb62bc10327a5afac064a95a091ea05ecd2acc1 /scripts
parent57eee9ae7bbcfb692dc96c739a5184adb6349733 (diff)
parent511b01bdf64ad8a38414096eab283c7784aebfc4 (diff)
Merge branch 'tracing-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'tracing-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (244 commits) Revert "x86, bts: reenable ptrace branch trace support" tracing: do not translate event helper macros in print format ftrace/documentation: fix typo in function grapher name tracing/events: convert block trace points to TRACE_EVENT(), fix !CONFIG_BLOCK tracing: add protection around module events unload tracing: add trace_seq_vprint interface tracing: fix the block trace points print size tracing/events: convert block trace points to TRACE_EVENT() ring-buffer: fix ret in rb_add_time_stamp ring-buffer: pass in lockdep class key for reader_lock tracing: add annotation to what type of stack trace is recorded tracing: fix multiple use of __print_flags and __print_symbolic tracing/events: fix output format of user stack tracing/events: fix output format of kernel stack tracing/trace_stack: fix the number of entries in the header ring-buffer: discard timestamps that are at the start of the buffer ring-buffer: try to discard unneeded timestamps ring-buffer: fix bug in ring_buffer_discard_commit ftrace: do not profile functions when disabled tracing: make trace pipe recognize latency format flag ...
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/kernel-doc22
-rwxr-xr-xscripts/recordmcount.pl6
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
1831sub 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
1831sub syscall_munge() { 1850sub 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)