Files
linux/scripts
Tao Zeng 1c6529b998 rodata: optimize memory usage of rodata section [5/5]
PD#SWPL-31258

Problem:
Kernel RO data is too large, about 4.5mb on 32bit and 5.9mb on
64bit kernel

Solution:
1, replace __FILE__ definition, using relative path instead of
absolute path. This can help to save about 50KB memory. For example:
[   36.820945@0] WARNING: CPU: 0 PID: 4817 at /mnt/fileroot/tao.zeng/p-android/
                                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                 common/drivers/amlogic/memory_ext/page_trace.c:973
				 ~~~~~~ absolute path
		 pagetrace_write+0x10/0x18
[   42.792868@1] WARNING: CPU: 1 PID: 4864 at drivers/amlogic/
                 memory_ext/page_trace.c:973 pagetrace_write+0x10/0x18

2, replace __FUNC__ definition. using kallsyms interface to print function
instead of build in const string. This change can save about 100KB rodata.

Verify:
x301

Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
Change-Id: I65e4e9eb61a2226002557759833e4e16ed37b92e
2023-04-21 13:52:34 +09:00
..
2016-08-24 22:34:19 +02:00
2005-04-16 15:20:36 -07:00
2014-08-20 16:03:45 +02:00
2011-08-31 16:12:17 +02:00
2014-08-20 16:03:45 +02:00
2014-08-20 16:03:45 +02:00
2014-08-20 16:03:45 +02:00
2012-06-27 12:44:29 -07:00
2010-03-23 12:26:38 +01:00
2014-12-20 00:01:12 +01:00
2018-07-11 16:40:16 +02:00
2014-08-20 16:03:45 +02:00
2014-08-20 16:03:45 +02:00
2005-04-16 15:20:36 -07:00
2015-08-28 17:04:40 +02:00
2015-08-28 17:04:40 +02:00
2014-08-20 16:03:45 +02:00