Skip to contentSkip to conversation

export symbol report: overview

RFC PATCH In review Ram Pai 3 participants 5 messages Apr 20, 2006 – Apr 21, 2006

lore
Share & tools
lore

Ram Pai

author
#0 lore raw

RFC PATCH 1/3 export symbol report: overview

This patch series enables on-demand report generation of export symbol usage by inkernel modules. The report is available at

A report generated by executing
make allmodconfig
make export_report
is available at http://www.sudhaa.com/~ram/misc/export_report.txt

This report lists:
1. the usage count of all exported symbols by in-kernel modules.
2. For each in-kernel module lists
a) the in-kernel modules it depend on.
b) list of exported symbols from that in-kernel modules it depend on.

Highlights:
On x86 architecture
(1) 880 exported symbols not used by any in-kernel modules.
(2) 1792 exported symbols used only once.

This patch series has comments by Adrian Bunk incorporated.

#1 lore raw
Quoted 14 lines · Ram Pai

This patch series enables on-demand report generation of export symbol usage by inkernel modules. The report is available at

A report generated by executing

(quoted diff) +0 -0
 	make allmodconfig
 	make export_report

is available at http://www.sudhaa.com/~ram/misc/export_report.txt

This report lists:
1. the usage count of all exported symbols by in-kernel modules.
2. For each in-kernel module lists
a) the in-kernel modules it depend on.
b) list of exported symbols from that in-kernel modules it depend on.

Quoted 6 lines

Highlights:
On x86 architecture
(1) 880 exported symbols not used by any in-kernel modules.
(2) 1792 exported symbols used only once.

This patch series has comments by Adrian Bunk incorporated.

Hi Ram Pai.

In principle what your patch does is a simple port-processign of Module.symvers.
Insead of introducing another step in the buildprocess then for this functionality we should just call your script direct. This is not something the average users will do often, so having to type:
./scripts/export-report.pl

And then let the perl script pick up default values for where to find *.mod.c files and Module.symvers.

Thoughts?

Sam

author
#2 lore raw
Quoted 32 lines · Sam Ravnborg
Quoted 14 lines · Ram Pai

This patch series enables on-demand report generation of export symbol usage by inkernel modules. The report is available at

A report generated by executing

(quoted diff) +0 -0
 	make allmodconfig
 	make export_report

is available at http://www.sudhaa.com/~ram/misc/export_report.txt

This report lists:
1. the usage count of all exported symbols by in-kernel modules.
2. For each in-kernel module lists
a) the in-kernel modules it depend on.
b) list of exported symbols from that in-kernel modules it depend on.

Quoted 6 lines

Highlights:
On x86 architecture
(1) 880 exported symbols not used by any in-kernel modules.
(2) 1792 exported symbols used only once.

This patch series has comments by Adrian Bunk incorporated.

Hi Ram Pai.

In principle what your patch does is a simple port-processign of Module.symvers.
Insead of introducing another step in the buildprocess then for this functionality we should just call your script direct. This is not something the average users will do often, so having to type:
./scripts/export-report.pl

Quoted 4 lines

And then let the perl script pick up default values for where to find *.mod.c files and Module.symvers.

Thoughts?

Well, if the Module.symvers file does not exist than the script will fail; unless the script invokes the 'make modules'.

Incorporating it into the Makefile can ease its use, because we can transparently trigger rules that can make the Module.symvers file.

I guess its a question of which way makes it easy to use? and my thoughts are leaning towards incorporating it into the Makefile.

I can make it either way. You suggest.
RP

Quoted 2 lines

Sam

#3 lore raw
Quoted 41 lines · Ram Pai
Quoted 32 lines · Sam Ravnborg
Quoted 14 lines · Ram Pai

This patch series enables on-demand report generation of export symbol usage by inkernel modules. The report is available at

A report generated by executing

(quoted diff) +0 -0
 	make allmodconfig
 	make export_report

is available at http://www.sudhaa.com/~ram/misc/export_report.txt

This report lists:
1. the usage count of all exported symbols by in-kernel modules.
2. For each in-kernel module lists
a) the in-kernel modules it depend on.
b) list of exported symbols from that in-kernel modules it depend on.

Quoted 6 lines

Highlights:
On x86 architecture
(1) 880 exported symbols not used by any in-kernel modules.
(2) 1792 exported symbols used only once.

This patch series has comments by Adrian Bunk incorporated.

Hi Ram Pai.

In principle what your patch does is a simple port-processign of Module.symvers.
Insead of introducing another step in the buildprocess then for this functionality we should just call your script direct. This is not something the average users will do often, so having to type:
./scripts/export-report.pl

Quoted 4 lines

And then let the perl script pick up default values for where to find *.mod.c files and Module.symvers.

Thoughts?

Well, if the Module.symvers file does not exist than the script will fail; unless the script invokes the 'make modules'.

Quoted 8 lines

Incorporating it into the Makefile can ease its use, because we can transparently trigger rules that can make the Module.symvers file.

I guess its a question of which way makes it easy to use? and my thoughts are leaning towards incorporating it into the Makefile.

I can make it either way. You suggest.

Sam is the one who can judge best on how to implement your proposal best, but there's one thing you should have in mind:

This is a script that isn't for users compiling their own kernel - it's a tool only a small subset of the kernel developers will use.

It does therefore not need a sophisticated error handling for cases like a not yet compiled kernel or CONFIG_MODULES=n.

Quoted 1 line

RP

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#4 lore raw
In reply to Sam Ravnborg
Quoted 24 lines · Sam Ravnborg
Quoted 14 lines · Ram Pai

This patch series enables on-demand report generation of export symbol usage by inkernel modules. The report is available at

A report generated by executing

(quoted diff) +0 -0
 	make allmodconfig
 	make export_report

is available at http://www.sudhaa.com/~ram/misc/export_report.txt

This report lists:
1. the usage count of all exported symbols by in-kernel modules.
2. For each in-kernel module lists
a) the in-kernel modules it depend on.
b) list of exported symbols from that in-kernel modules it depend on.

Quoted 6 lines

Highlights:
On x86 architecture
(1) 880 exported symbols not used by any in-kernel modules.
(2) 1792 exported symbols used only once.

This patch series has comments by Adrian Bunk incorporated.

Hi Ram Pai.

Quoted 8 lines

In principle what your patch does is a simple port-processign of Module.symvers.
Insead of introducing another step in the buildprocess then for this functionality we should just call your script direct. This is not something the average users will do often, so having to type:
./scripts/export-report.pl
...

Adding an exportcheck target similar to e.g. the namespacecheck or checkstack targets calling an external script shouldn't be a problem.

Quoted 1 line

Sam

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed