Messages in this thread | | | Subject | Re: [PATCH 3/3] softirq: Use const char * const for softirq_to_name, whitespace neatening | From | Joe Perches <> | Date | Tue, 24 Dec 2013 07:27:50 -0800 |
| |
On Tue, 2013-12-24 at 23:19 +0800, Wang YanQing wrote: > On Sun, Nov 17, 2013 at 01:55:12AM -0800, Joe Perches wrote: > > Reduce data size a little. > > Reduce checkpatch noise. > > > > $ size kernel/softirq.o* > > text data bss dec hex filename > > 11554 6013 4008 21575 5447 kernel/softirq.o.new > > 11474 6093 4008 21575 5447 kernel/softirq.o.old > > Hi, could you tell me why this patch could reduce data size?
It moves the softirq_to_name array of 10 char * from data (non-const) to text (const).
-char *softirq_to_name[NR_SOFTIRQS] = { +const char * const softirq_to_name[NR_SOFTIRQS] = { "HI", "TIMER", "NET_TX", "NET_RX", "BLOCK", "BLOCK_IOPOLL", "TASKLET", "SCHED", "HRTIMER", "RCU" };
Use objdump or "make kernel/softirq.lst" and inspect the object code produced to see for yourself.
cheers, Joe
| |