kernel-doc (46557bef3f3834ac33031c7be27d39d90d507442) | kernel-doc (3a9089fd78367e2c6c815129030b790a0f5c2715) |
---|---|
1#!/usr/bin/perl -w 2 3use strict; 4 5## Copyright (c) 1998 Michael Zucchi, All Rights Reserved ## 6## Copyright (C) 2000, 1 Tim Waugh <twaugh@redhat.com> ## 7## Copyright (C) 2001 Simon Huggins ## 8## Copyright (C) 2005-2009 Randy Dunlap ## --- 1838 unchanged lines hidden (view full) --- 1847 $state = 0; 1848} 1849 1850sub tracepoint_munge($) { 1851 my $file = shift; 1852 my $tracepointname = 0; 1853 my $tracepointargs = 0; 1854 | 1#!/usr/bin/perl -w 2 3use strict; 4 5## Copyright (c) 1998 Michael Zucchi, All Rights Reserved ## 6## Copyright (C) 2000, 1 Tim Waugh <twaugh@redhat.com> ## 7## Copyright (C) 2001 Simon Huggins ## 8## Copyright (C) 2005-2009 Randy Dunlap ## --- 1838 unchanged lines hidden (view full) --- 1847 $state = 0; 1848} 1849 1850sub tracepoint_munge($) { 1851 my $file = shift; 1852 my $tracepointname = 0; 1853 my $tracepointargs = 0; 1854 |
1855 if($prototype =~ m/TRACE_EVENT\((.*?),/) { | 1855 if ($prototype =~ m/TRACE_EVENT\((.*?),/) { |
1856 $tracepointname = $1; 1857 } | 1856 $tracepointname = $1; 1857 } |
1858 if($prototype =~ m/TP_PROTO\((.*?)\)/) { | 1858 if ($prototype =~ m/DEFINE_SINGLE_EVENT\((.*?),/) { 1859 $tracepointname = $1; 1860 } 1861 if ($prototype =~ m/DEFINE_EVENT\((.*?),(.*?),/) { 1862 $tracepointname = $2; 1863 } 1864 $tracepointname =~ s/^\s+//; #strip leading whitespace 1865 if ($prototype =~ m/TP_PROTO\((.*?)\)/) { |
1859 $tracepointargs = $1; 1860 } 1861 if (($tracepointname eq 0) || ($tracepointargs eq 0)) { 1862 print STDERR "Warning(${file}:$.): Unrecognized tracepoint format: \n". 1863 "$prototype\n"; 1864 } else { 1865 $prototype = "static inline void trace_$tracepointname($tracepointargs)"; 1866 } --- 48 unchanged lines hidden (view full) --- 1915 1916 if (($x =~ /\{/) || ($x =~ /\#\s*define/) || ($x =~ /;/)) { 1917 $prototype =~ s@/\*.*?\*/@@gos; # strip comments. 1918 $prototype =~ s@[\r\n]+@ @gos; # strip newlines/cr's. 1919 $prototype =~ s@^\s+@@gos; # strip leading spaces 1920 if ($prototype =~ /SYSCALL_DEFINE/) { 1921 syscall_munge(); 1922 } | 1866 $tracepointargs = $1; 1867 } 1868 if (($tracepointname eq 0) || ($tracepointargs eq 0)) { 1869 print STDERR "Warning(${file}:$.): Unrecognized tracepoint format: \n". 1870 "$prototype\n"; 1871 } else { 1872 $prototype = "static inline void trace_$tracepointname($tracepointargs)"; 1873 } --- 48 unchanged lines hidden (view full) --- 1922 1923 if (($x =~ /\{/) || ($x =~ /\#\s*define/) || ($x =~ /;/)) { 1924 $prototype =~ s@/\*.*?\*/@@gos; # strip comments. 1925 $prototype =~ s@[\r\n]+@ @gos; # strip newlines/cr's. 1926 $prototype =~ s@^\s+@@gos; # strip leading spaces 1927 if ($prototype =~ /SYSCALL_DEFINE/) { 1928 syscall_munge(); 1929 } |
1923 if ($prototype =~ /TRACE_EVENT/) { | 1930 if ($prototype =~ /TRACE_EVENT/ || $prototype =~ /DEFINE_EVENT/ || 1931 $prototype =~ /DEFINE_SINGLE_EVENT/) 1932 { |
1924 tracepoint_munge($file); 1925 } 1926 dump_function($prototype, $file); 1927 reset_state(); 1928 } 1929} 1930 1931sub process_state3_type($$) { --- 298 unchanged lines hidden --- | 1933 tracepoint_munge($file); 1934 } 1935 dump_function($prototype, $file); 1936 reset_state(); 1937 } 1938} 1939 1940sub process_state3_type($$) { --- 298 unchanged lines hidden --- |