NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/57514: Self build fails on evbarm-aarch64



The following reply was made to PR kern/57514; it has been noted by GNATS.

From: Martin Husemann <martin%duskware.de@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: kern/57514: Self build fails on evbarm-aarch64
Date: Sat, 8 Jul 2023 15:54:39 +0200

 On Sat, Jul 08, 2023 at 07:35:00AM +0000, taca%back-street.net@localhost wrote:
 > 	Below change solve the problem.
 > 	I don't know where come from a magic number 3584...
 
 In your kernel compile directory you will find *.su files, e.g.
 my uvm_bio.su file looks like:
 
 ../../../../uvm/uvm_bio.c:973:1:ubc_zerorange_process   16      static
 ../../../../uvm/uvm_bio.c:965:1:ubc_uiomove_process     16      static
 ../../../../uvm/uvm_bio.c:845:1:ubc_alloc_direct        144     static
 ../../../../uvm/uvm_bio.c:931:1:ubc_direct_release      80      static
 ../../../../uvm/uvm_bio.c:980:1:ubc_uiomove_direct      256     static
 ../../../../uvm/uvm_bio.c:1050:1:ubc_zerorange_direct   208     static
 ../../../../uvm/uvm_bio.c:643:1:ubc_release     160     static
 ../../../../uvm/uvm_bio.c:1115:1:ubchash_stats  48      static
 ../../../../uvm/uvm_bio.c:482:1:ubc_alloc.constprop     144     static
 ../../../../uvm/uvm_bio.c:308:1:ubc_fault       272     static
 ../../../../uvm/uvm_bio.c:166:1:ubc_init        32      static
 ../../../../uvm/uvm_bio.c:225:1:ubchist_init    16      static
 ../../../../uvm/uvm_bio.c:740:1:ubc_uiomove     240     static
 ../../../../uvm/uvm_bio.c:807:1:ubc_zerorange   224     static
 ../../../../uvm/uvm_bio.c:1085:1:ubc_purge      96      static
 
 
 and the 2nd column is the stack size in byte for the function in the
 first column.
 
 cat *.su | sort -n -r -k2 | head
 
 will display the functions with the biggest stack usage in that kernel:
 
 ../../../../arch/arm/broadcom/bcm283x_platform.c:896:1:rpi_fb_get_edid_mode.isra 3280    static
 ../../../../arch/aarch64/aarch64/db_machdep.c:338:1:show_cpuinfo        2608   static
 ../../../../dev/acpi/acpi_mcfg.c:769:1:acpimcfg_configure_bus   2512    static
 ../../../../arch/aarch64/aarch64/db_machdep.c:416:1:db_md_lwp_cmd.part.0       1744     static
 ../../../../crypto/blake2/blake2s.c:294:1:blake2s_selftest      1488    static
 ../../../../arch/aarch64/aarch64/db_trace.c:681:1:db_stack_trace_print  1392   static
 ../../../../dev/usb/usb.c:1289:1:usb_add_event  1360    static
 ../../../../nfs/nfs_serv.c:1899:1:nfsrv_rename  1328    static
 acpi_cpu_md.c:199:1:acpicpu_md_pstate_sysctl_available  1296    static
 acpi_cpu.c:266:1:acpicpu_start  1280    static
 
 
 However, I have no idea why gcc gets the stack usage wrong in your build,
 but not in a cross compile.
 
 Martin
 


Home | Main Index | Thread Index | Old Index