[PATCH] find-debuginfo: Pass -j down to dwz
Mark Wielaard
mark@klomp.org
Thu Jan 26 14:34:12 GMT 2023
Hi Kalev,
On Thu, 2023-01-19 at 17:03 +0100, Kalev Lember wrote:
> Now that dwz 0.15 supports parallel jobs, add a way to control it from
> here. find-debuginfo already has a -j parameter so we can just extend it
> and pass the value down to dwz as well.
>
> This should fix building large packages on memory constrained builders,
> such as webkitgtk on s390x in Fedora koji build system, where we can now
> use the -j option to tune down parallelism to avoid running out of
> memory during dwz run.
Aha, you want to reduce the default parallelism (processors / 2)?
> diff --git a/scripts/find-debuginfo.in b/scripts/find-debuginfo.in
> index b07a52f..8cc1bfd 100755
> --- a/scripts/find-debuginfo.in
> +++ b/scripts/find-debuginfo.in
> @@ -585,7 +585,7 @@ if $run_dwz \
> dwz_multifile_suffix=".${dwz_multifile_idx}"
> done
> dwz_multifile_name="${dwz_multifile_name}${dwz_multifile_suffix}"
> - dwz_opts="-h -q -r"
> + dwz_opts="-h -q -r -j ${n_jobs}"
> [ ${#dwz_files[@]} -gt 1 ] && [ "$dwz_single_file_mode" = "false" ] \
> && dwz_opts="${dwz_opts} -m .dwz/${dwz_multifile_name}"
> mkdir -p "${RPM_BUILD_ROOT}/usr/lib/debug/.dwz"
I agree with Panu that a configure check would be nice to make sure the
installed dwz does support -j. Would the attached patch work for you?
Thanks,
Mark
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dwz_j.patch
Type: text/x-patch
Size: 2047 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/debugedit/attachments/20230126/e6321efc/attachment.bin>
More information about the Debugedit
mailing list