Re: subl $0x<huge_number>,%esp (was Re: a.out 66% faster...)

Paul Gortmaker (paul@rasty.anu.edu.au)
Sun, 2 Mar 1997 18:27:19 +1000 (EST)


> ok, to avoid such problems in the future, here is a one-liner shell-script
> that lists the largest stacks in the system (x86). (also a good candidate
> for the ugliest shellscript ever):

...and it breaks on a.out vmlinux too. ;-)

> Brave souls might want to enable all config options and see what happens?

Okay, here are the list of 0x100+ "offenders" for v2.0.29. Out of interest
I have also included the output from gcc-2.5.8 since it appears to behave
slightly different wrt the stack as I reported earlier. (Note that gcc2.7.2
in the following list really means 2.7.2.1) This is for a kitchen sink
kernel with a whole bunch of junk compiled in (vmlinux=1779799 bytes)
I included most of the SCSI drivers, a few CD-ROM drivers, most of
the common filesystems, lots of net drivers, etc. (check out smb_*)

If you want to compare the compilers on a routine by routine basis then
pipe this output into "sort -k 3". Column #1 is the amount subtracted
from the stack pointer, same as was in Ingo's output.

Paul.
------------------------------------
d54 (gcc2.7.2) <de4x5_ioctl> <--- Wheee! 3412/4096 = 83%
c20 (gcc2.5.8) <de4x5_ioctl>
5c0 (gcc2.7.2) <UMSDOS_ioctl_dir>
51c (gcc2.7.2) <aic7xxx_isr>
48c (gcc2.5.8) <aic7xxx_isr>
48c (gcc2.5.8) <UMSDOS_ioctl_dir>
448 (gcc2.5.8) <smb_proc_readdir_long>
448 (gcc2.7.2) <smb_proc_readdir_long>
440 (gcc2.5.8) <smb_proc_setattr_trans2>
440 (gcc2.7.2) <smb_proc_setattr_trans2>
424 (gcc2.5.8) <smb_proc_getattr_trans2>
424 (gcc2.5.8) <aic7xxx_reset_device>
424 (gcc2.7.2) <smb_proc_getattr_trans2>
424 (gcc2.7.2) <aic7xxx_reset_device>
344 (gcc2.7.2) <vfat_find>
328 (gcc2.5.8) <vfat_find>
29c (gcc2.7.2) <elf_core_dump>
280 (gcc2.5.8) <block_read>
280 (gcc2.7.2) <BusLogic_InitializeAddressProbeList>
274 (gcc2.5.8) <BusLogic_InitializeAddressProbeList>
270 (gcc2.5.8) <block_write>
270 (gcc2.7.2) <umsdos_find>
270 (gcc2.7.2) <block_write>
270 (gcc2.7.2) <block_read>
26c (gcc2.5.8) <umsdos_find>
24c (gcc2.7.2) <umsdos_readdir_x>
248 (gcc2.5.8) <umsdos_rename_f>
248 (gcc2.5.8) <umsdos_readdir_x>
248 (gcc2.7.2) <umsdos_rename_f>
240 (gcc2.7.2) <UMSDOS_unlink>
22c (gcc2.5.8) <BusLogic_DetectHostAdapter>
22c (gcc2.7.2) <BusLogic_DetectHostAdapter>
228 (gcc2.5.8) <umsdos_lookup_x>
228 (gcc2.7.2) <umsdos_lookup_x>
224 (gcc2.5.8) <UMSDOS_unlink>
224 (gcc2.5.8) <UMSDOS_link>
224 (gcc2.7.2) <UMSDOS_link>
218 (gcc2.7.2) <cdrom_read_intr>
214 (gcc2.5.8) <cdrom_read_intr>
200 (gcc2.5.8) <scsi_make_blocked_list>
200 (gcc2.5.8) <cdrom_buffer_sectors>
200 (gcc2.7.2) <scsi_make_blocked_list>
200 (gcc2.7.2) <cdrom_buffer_sectors>
1c4 (gcc2.5.8) <nfsiod>
1c4 (gcc2.7.2) <nfsiod>
18c (gcc2.5.8) <smb_read_super>
18c (gcc2.7.2) <smb_read_super>
18c (gcc2.7.2) <fat_readdirx>
180 (gcc2.7.2) <aout_core_dump>
168 (gcc2.5.8) <fat_readdirx>
150 (gcc2.7.2) <set_serial_info>
14c (gcc2.5.8) <umsdos_writeentry>
14c (gcc2.5.8) <set_serial_info>
14c (gcc2.7.2) <UMSDOS_notify_change>
148 (gcc2.5.8) <UMSDOS_notify_change>
148 (gcc2.7.2) <umsdos_writeentry>
140 (gcc2.5.8) <umsdos_isempty>
140 (gcc2.5.8) <smb_lookup>
140 (gcc2.7.2) <umsdos_isempty>
140 (gcc2.7.2) <smb_lookup>
13c (gcc2.5.8) <smb_notify_change>
13c (gcc2.5.8) <do_mount_root>
13c (gcc2.7.2) <smb_notify_change>
13c (gcc2.7.2) <smb_create>
138 (gcc2.7.2) <do_mount_root>
134 (gcc2.5.8) <read_core>
134 (gcc2.7.2) <sys_recvmsg>
12c (gcc2.5.8) <sys_recvmsg>
12c (gcc2.5.8) <do_execve>
12c (gcc2.7.2) <scan_scsis>
12c (gcc2.7.2) <read_core>
12c (gcc2.7.2) <do_execve>
128 (gcc2.5.8) <aha152x_intr>
128 (gcc2.5.8) <UMSDOS_mkdir>
128 (gcc2.7.2) <sys_sendmsg>
128 (gcc2.7.2) <UMSDOS_mkdir>
128 (gcc2.7.2) <SHATransform>
124 (gcc2.5.8) <vc_resize>
124 (gcc2.5.8) <umsdos_create_any>
124 (gcc2.5.8) <sys_sendmsg>
124 (gcc2.5.8) <UMSDOS_rmdir>
124 (gcc2.7.2) <vc_resize>
124 (gcc2.7.2) <umsdos_create_any>
124 (gcc2.7.2) <UMSDOS_rmdir>
11c (gcc2.5.8) <nfs_rpc_call>
11c (gcc2.5.8) <aic7xxx_detect>
11c (gcc2.7.2) <nfs_rpc_call>
118 (gcc2.7.2) <ide_cdrom_ioctl>
118 (gcc2.7.2) <aic7xxx_detect>
110 (gcc2.5.8) <umsdos_locate_path>
110 (gcc2.5.8) <do_cdu31a_request>
110 (gcc2.5.8) <UMSDOS_readdir>
110 (gcc2.7.2) <umsdos_locate_path>
110 (gcc2.7.2) <do_cdu31a_request>
110 (gcc2.7.2) <UMSDOS_readdir>
10c (gcc2.7.2) <smb_proc_reconnect>
10c (gcc2.7.2) <load_elf_binary>
108 (gcc2.7.2) <NCR53c8xx_run_tests>
104 (gcc2.7.2) <sys_semop>
100 (gcc2.5.8) <umsdos_evalrecsize>
100 (gcc2.5.8) <sys_umount>
100 (gcc2.5.8) <msg>
100 (gcc2.5.8) <isofs_get_last_session>
100 (gcc2.7.2) <umsdos_evalrecsize>
100 (gcc2.7.2) <sys_umount>
100 (gcc2.7.2) <msg>
100 (gcc2.7.2) <isofs_get_last_session>