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: Takahiro Kambe <taca%back-street.net@localhost>
To: gnats-bugs%netbsd.org@localhost, martin%duskware.de@localhost
Cc: 
Subject: Re: kern/57514: Self build fails on evbarm-aarch64
Date: Sat, 08 Jul 2023 23:56:19 +0900 (JST)

 In message <20230708135502.1080D1A9241%mollari.NetBSD.org@localhost>
 	on Sat,  8 Jul 2023 13:55:02 +0000 (UTC),
 	Martin Husemann <martin%duskware.de@localhost> wrote:
 >  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.
 Here is my case:
 
 /usr/src/sys/uvm/uvm_fault_i.h:44:1:uvmfault_unlockmaps	32	static
 /usr/src/sys/uvm/uvm_fault_i.h:72:1:uvmfault_unlockall	48	static
 /usr/src/sys/uvm/uvm_bio.c:166:1:ubc_init	48	static
 /usr/src/sys/uvm/uvm_bio.c:225:1:ubchist_init	16	static
 /usr/src/sys/uvm/uvm_bio.c:239:1:ubc_fault_page	112	static
 /usr/src/sys/uvm/uvm_bio.c:308:1:ubc_fault	176	dynamic
 /usr/src/sys/uvm/uvm_bio.c:460:1:ubc_find_mapping	48	static
 /usr/src/sys/uvm/uvm_bio.c:482:1:ubc_alloc	160	static
 /usr/src/sys/uvm/uvm_bio.c:643:1:ubc_release	128	static
 /usr/src/sys/uvm/uvm_bio.c:740:1:ubc_uiomove	128	dynamic
 /usr/src/sys/uvm/uvm_bio.c:807:1:ubc_zerorange	112	dynamic
 /usr/src/sys/uvm/uvm_bio.c:845:1:ubc_alloc_direct	112	static
 /usr/src/sys/uvm/uvm_bio.c:931:1:ubc_direct_release	64	static
 /usr/src/sys/uvm/uvm_bio.c:965:1:ubc_uiomove_process	64	static
 /usr/src/sys/uvm/uvm_bio.c:973:1:ubc_zerorange_process	48	static
 /usr/src/sys/uvm/uvm_bio.c:980:1:ubc_uiomove_direct	144	dynamic
 /usr/src/sys/uvm/uvm_bio.c:1050:1:ubc_zerorange_direct	96	dynamic
 /usr/src/sys/uvm/uvm_bio.c:1085:1:ubc_purge	48	static
 /usr/src/sys/uvm/uvm_bio.c:1115:1:ubchash_stats	64	static
 
 
 >  cat *.su | sort -n -r -k2 | head
 >  
 >  will display the functions with the biggest stack usage in that kernel:
 Here is my result.
 
 /usr/src/sys/arch/arm/broadcom/bcm283x_platform.c:896:1:rpi_fb_get_edid_mode	3280	static
 /usr/src/sys/dev/pci/if_wm.c:6550:1:wm_update_stats	2896	static
 /usr/src/sys/arch/aarch64/aarch64/db_machdep.c:338:1:show_cpuinfo	2608	static
 /usr/src/sys/dev/acpi/acpi_mcfg.c:769:1:acpimcfg_configure_bus	2480	static
 /usr/src/sys/dev/pci/ixgbe/ixgbe.c:1617:1:ixgbe_update_stats_counters	2416	static
 /usr/src/sys/dev/pci/if_wm.c:6735:1:wm_clear_evcnt	1808	static
 /usr/src/sys/arch/aarch64/aarch64/db_machdep.c:416:1:db_md_lwp_cmd	1776	static
 /usr/src/sys/crypto/aes/arch/arm/aes_neon.c:687:1:aes_neon_dec2	1664	static
 /usr/src/sys/dev/pci/ixgbe/ixgbe.c:2116:1:ixgbe_clear_evcnt	1504	static
 /usr/src/sys/crypto/aes/arch/arm/aes_neon.c:595:1:aes_neon_enc2	1408	static
 
 
 >  However, I have no idea why gcc gets the stack usage wrong in your build,
 >  but not in a cross compile.
 I noticed that cross build on arm64 fails as the same error now.
 
 -- 
 Takahiro Kambe <taca%back-street.net@localhost>
 


Home | Main Index | Thread Index | Old Index