Skip to content

Commit

Permalink
Info how beneficial is dwz compression.
Browse files Browse the repository at this point in the history
Example output:
...
original debug info size: 120600, size after compression: 77604
...
  • Loading branch information
marxin committed Sep 10, 2018
1 parent 1bf40dd commit a9e70be
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/find-debuginfo.sh
Expand Up @@ -489,6 +489,7 @@ if $run_dwz \
&& [ -d "${RPM_BUILD_ROOT}/usr/lib/debug" ]; then
readarray dwz_files < <(cd "${RPM_BUILD_ROOT}/usr/lib/debug"; find -type f -name \*.debug | LC_ALL=C sort)
if [ ${#dwz_files[@]} -gt 0 ]; then
size_before=$(du -s ${RPM_BUILD_ROOT}/usr/lib/debug | cut -f1)
dwz_multifile_name="${RPM_PACKAGE_NAME}-${RPM_PACKAGE_VERSION}-${RPM_PACKAGE_RELEASE}.${RPM_ARCH}"
dwz_multifile_suffix=
dwz_multifile_idx=0
Expand All @@ -511,6 +512,8 @@ if $run_dwz \
echo >&2 "*** ERROR: DWARF compression requested, but no dwz installed"
exit 2
fi
size_after=$(du -s ${RPM_BUILD_ROOT}/usr/lib/debug | cut -f1)
echo "original debug info size: ${size_before}, size after compression: ${size_after}"
# Remove .dwz directory if empty
rmdir "${RPM_BUILD_ROOT}/usr/lib/debug/.dwz" 2>/dev/null
if [ -f "${RPM_BUILD_ROOT}/usr/lib/debug/.dwz/${dwz_multifile_name}" ]; then
Expand Down

0 comments on commit a9e70be

Please sign in to comment.