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