Lines Matching +full:sub +full:- +full:module

2 # SPDX-License-Identifier: GPL-2.0-only
7 # Usage: export_report.pl -k Module.symvers [-o report_file ] -f *.mod.c
14 sub numerically {
20 sub alphabetically {
26 sub print_depends_on {
30 my $list = $href->{$mod};
34 printf("\t\t%-25s\n", $symbol);
42 sub usage {
43 print "Usage: @_ -h -k Module.symvers [ -o outputfile ] \n",
44 "\t-f: treat all the non-option argument as .mod.c files. ",
46 "\t-h: print detailed help\n",
47 "\t-k: the path to Module.symvers file. By default uses ",
49 "\t-o outputfile: output the report to outputfile\n";
53 sub collectcfiles {
65 my (%SYMBOL, %MODULE, %opt, @allcfiles);
78 $opt{'k'} = "Module.symvers";
93 # Module.symvers file
97 my (undef, $symbol, $module, $gpl, $namespace) = split('\t');
98 $SYMBOL { $symbol } = [ $module , "0" , $symbol, $gpl];
108 my $module;
110 unless (open ($module, '<', $thismod)) {
116 while ( <$module> ) {
127 if ( $_ !~ /0x[0-9a-f]+,/ ) {
131 my ($module, $value, $symbol, $gpl) = @{$SYMBOL{$sym}};
132 $SYMBOL{ $sym } = [ $module, $value+1, $symbol, $gpl];
133 push(@{$MODULE{$thismod}} , $sym);
140 close($module);
143 print "\tThis file reports the exported symbols usage patterns by in-tree\n",
151 printf("%-25s\t%-25s\t%-5s\t%-25s\n", "Symbol", "Module", "Usage count",
158 my ($module, $value, $symbol, $gpl) = @{$list};
159 printf("%-25s\t%-25s\t%-10s\t", $symbol, $module, $value);
161 printf("%-25s\n",$gpl);
168 printf("SECTION 2:\n\tThis section reports export-symbol-usage of in-kernel
169 modules. Each module lists the modules, and the symbols from that module that
176 for my $thismod (sort keys %MODULE) {
177 my $list = $MODULE{$thismod};
182 my ($module, $value, undef, $gpl) = @{$SYMBOL{$symbol}};
183 push (@{$depends{"$module"}}, "$symbol $value");