Blame SOURCES/macros.dwz

396caf
# Macros for reducing debug info size using dwz(1) utility.
396caf
396caf
# The two default values below should result in dwz taking at most
396caf
# 3GB of RAM or so on 64-bit hosts and 2.5GB on 32-bit hosts
396caf
# on the largest *.debug files  (in mid 2012 those are
396caf
# libreoffice-debuginfo, debuginfos containing
396caf
# libxul.so.debug and libwebkitgtk-*.so.*.debug).
396caf
# This needs to be tuned based on the amount of available RAM
396caf
# on build boxes for each architecture as well as virtual address
396caf
# space limitations if dwz is 32-bit program.  While it needs less
396caf
# memory than 64-bit program because pointers are smaller, it can
396caf
# never have more than 4GB-epsilon of RAM and on some architecture
396caf
# even less than that (e.g. 2GB).
396caf
396caf
# Number of debugging information entries (DIEs) above which
396caf
# dwz will stop considering file for multifile optimizations
396caf
# and enter a low memory mode, in which it will optimize
396caf
# in about half the memory needed otherwise.
396caf
%_dwz_low_mem_die_limit		 10000000
396caf
# Number of DIEs above which dwz will stop processing
396caf
# a file altogether.
396caf
%_dwz_max_die_limit     	 50000000
396caf
396caf
# On x86_64 increase the higher limit to make libwebkit* optimizable.
396caf
# libwebkit* in mid 2012 contains roughly 87mil DIEs, and 64-bit
396caf
# dwz is able to optimize it from ~1.1GB to ~410MB using 5.2GB of RAM.
396caf
%_dwz_max_die_limit_x86_64	110000000
396caf
396caf
# On ARM, build boxes often have only 512MB of RAM and are very slow.
396caf
# Lower both the limits.
396caf
%_dwz_low_mem_die_limit_armv5tel  4000000
396caf
%_dwz_low_mem_die_limit_armv7hl	  4000000
396caf
%_dwz_max_die_limit_armv5tel	 10000000
396caf
%_dwz_max_die_limit_armv7hl	 10000000
396caf
396caf
%_dwz_limit() %{expand:%%{?%{1}_%{_arch}}%%{!?%{1}_%{_arch}:%%%{1}}}
396caf
%_find_debuginfo_dwz_opts --run-dwz\\\
396caf
   --dwz-low-mem-die-limit %{_dwz_limit _dwz_low_mem_die_limit}\\\
396caf
   --dwz-max-die-limit %{_dwz_limit _dwz_max_die_limit}