Re: Applying code layout optimization to postgresql16 RPMs in Fedora 41 gave a 3%-6% improvement in IPC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Jan 26, 2025 at 09:20:59PM -0500, William Cohen wrote:
> I have reworked the technique to avoid using a .rpmmacros file and have everything in the spec file.  The upstream sediment documentation page has been updated to describe how to do this: 
> 
> https://github.com/wcohen/sediment/blob/master/docs/pop.rst#providing-compiler-and-linker-options-in-a-rpm-spec-file
> 
> There is an example patch for the python3.13.spec file at :
> 
> https://github.com/wcohen/sediment/blob/master/docs/examples/python_layout.patch

That spec file patch uses a style that is a bit dated.
Some comments:

> +%bcond_without opt
'%bcond foo' is a more modern alternative that is easier for humans to understand.
  → %bcond opt 1

> +%global layout _opt
> +Release: 1%{?dist}%{?layout}
In various places the patch does such indirections… Please kill them, they
make the diff much more verbose and actually harder to follow.

→ Release: 1%{?dist}%{?_with_opt:_opt}

Same for %{call_graph} as alias for %SOURCE12.

> +%define _distro_extra_cflags -ffunction-sections -fdata-sections
> +%define _distro_extra_cxxflags -ffunction-sections -fdata-sections
> +%define _distro_extra_fflags -ffunction-sections -fdata-sections
→ https://docs.fedoraproject.org/en-US/packaging-guidelines/#_global_preferred_over_define

> +gv2link < %{call_graph} > %{__global_link_order}
The redirection op is not a binary operator. There is a long tradition of
writing it with extra whitespace, but that's just confusing.
For example, it makes sense to write 'cat /dev/urandom | grep 42' because
the pipe is a binary operator. But '>', '<', '1>', '2>', '&>', etc, are
unary operators.
→ gv2link <%{call_graph} >%{__global_link_order}

Zbyszek
-- 
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux