<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/rss.xsl.xml"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Changes in gendwarfksyms</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2015</copyright>
    <generator>Java</generator><item>
        <title>10e9510a - gendwarfksyms: Add a separate pass to resolve FQNs</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/scripts/gendwarfksyms/#10e9510a</link>
        <description>gendwarfksyms: Add a separate pass to resolve FQNsUsing dwarf_getscopes_die to resolve fully-qualified names turns out tobe rather slow, and also results in duplicate scopes being processed,which doesn&apos;t help. Simply adding an extra pass to resolve names for allDIEs before processing exports is noticeably faster.For the object files with the most exports in a defconfig+Rust build,the performance improvement is consistently &gt;50%:rust/bindings.o: 1038 exports    before: 9.5980 +- 0.0183 seconds time elapsed  ( +-  0.19% )     after: 4.3116 +- 0.0287 seconds time elapsed  ( +-  0.67% )rust/core.o: 424 exports    before: 5.3584 +- 0.0204 seconds time elapsed  ( +-  0.38% )     after: 0.05348 +- 0.00129 seconds time elapsed  ( +-  2.42% )            ^ Not a mistake.net/core/dev.o: 190 exports    before: 9.0507 +- 0.0297 seconds time elapsed  ( +-  0.33% )     after: 3.2882 +- 0.0165 seconds time elapsed  ( +-  0.50% )rust/kernel.o: 129 exports    before: 6.8571 +- 0.0317 seconds time elapsed  ( +-  0.46% )     after: 2.9096 +- 0.0316 seconds time elapsed  ( +-  1.09% )net/core/skbuff.o: 120 exports    before: 5.4805 +- 0.0291 seconds time elapsed  ( +-  0.53% )     after: 2.0339 +- 0.0231 seconds time elapsed  ( +-  1.14% )drivers/gpu/drm/display/drm_dp_helper.o: 101 exports    before: 1.7877 +- 0.0187 seconds time elapsed  ( +-  1.05% )     after: 0.69245 +- 0.00994 seconds time elapsed  ( +-  1.44% )net/core/sock.o: 97 exports    before: 5.8327 +- 0.0653 seconds time elapsed  ( +-  1.12% )     after: 2.0784 +- 0.0291 seconds time elapsed  ( +-  1.40% )drivers/net/phy/phy_device.o: 95 exports    before: 3.0671 +- 0.0371 seconds time elapsed  ( +-  1.21% )     after: 1.2127 +- 0.0207 seconds time elapsed  ( +-  1.70% )drivers/pci/pci.o: 93 exports    before: 1.1130 +- 0.0113 seconds time elapsed  ( +-  1.01% )     after: 0.4848 +- 0.0127 seconds time elapsed  ( +-  2.63% )kernel/sched/core.o: 83 exports    before: 3.5092 +- 0.0223 seconds time elapsed  ( +-  0.64% )     after: 1.1231 +- 0.0145 seconds time elapsed  ( +-  1.29% )Overall, a defconfig+DWARF5 build with gendwarfksyms and Rust is 14.8%faster with this patch applied on my test system. Without Rust, there&apos;sstill a 10.4% improvement in build time when gendwarfksyms is used.Note that symbol versions are unchanged with this patch.Suggested-by: Giuliano Procida &lt;gprocida@google.com&gt;Signed-off-by: Sami Tolvanen &lt;samitolvanen@google.com&gt;Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;

            List of files:
            /linux-6.15/scripts/gendwarfksyms/dwarf.c/linux-6.15/scripts/gendwarfksyms/gendwarfksyms.h/linux-6.15/scripts/gendwarfksyms/types.c</description>
        <pubDate>Mon, 03 Feb 2025 21:00:00 +0000</pubDate>
        <dc:creator>Sami Tolvanen &lt;samitolvanen@google.com&gt;</dc:creator>
    </item>
<item>
        <title>936cf61c - gendwarfksyms: Add support for kABI rules</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/scripts/gendwarfksyms/#936cf61c</link>
        <description>gendwarfksyms: Add support for kABI rulesDistributions that want to maintain a stable kABI need the abilityto make ABI compatible changes to kernel without affecting symbolversions, either because of LTS updates or backports.With genksyms, developers would typically hide these changes fromversion calculation with #ifndef __GENKSYMS__, which would resultin the symbol version not changing even though the actual type haschanged.  When we process precompiled object files, this isn&apos;t anoption.To support this use case, add a --stable command line flag thatgates kABI stability features that are not needed in mainlinekernels, but can be useful for distributions, and add support forkABI rules, which can be used to restrict gendwarfksyms output.The rules are specified as a set of null-terminated strings storedin the .discard.gendwarfksyms.kabi_rules section. Each rule consistsof four strings as follows:  &quot;version\0type\0target\0value&quot;The version string ensures the structure can be changed in abackwards compatible way. The type string indicates the type of therule, and target and value strings contain rule-specific data.Initially support two simple rules:  1. Declaration-only types     A type declaration can change into a full definition when     additional includes are pulled in to the TU, which changes the     versions of any symbol that references the type. Add support     for defining declaration-only types whose definition is not     expanded during versioning.  2. Ignored enumerators     It&apos;s possible to add new enum fields without changing the ABI,     but as the fields are included in symbol versioning, this would     change the versions. Add support for ignoring specific fields.  3. Overridden enumerator values     Add support for overriding enumerator values when calculating     versions. This may be needed when the last field of the enum     is used as a sentinel and new fields must be added before it.Add examples for using the rules under the examples/ directory.Signed-off-by: Sami Tolvanen &lt;samitolvanen@google.com&gt;Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;

            List of files:
            /linux-6.15/scripts/gendwarfksyms/kabi.c</description>
        <pubDate>Fri, 03 Jan 2025 20:00:00 +0000</pubDate>
        <dc:creator>Sami Tolvanen &lt;samitolvanen@google.com&gt;</dc:creator>
    </item>
<item>
        <title>a9369418 - gendwarfksyms: Add support for reserved and ignored fields</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/scripts/gendwarfksyms/#a9369418</link>
        <description>gendwarfksyms: Add support for reserved and ignored fieldsDistributions that want to maintain a stable kABI need the abilityto make ABI compatible changes to kernel data structures withoutaffecting symbol versions, either because of LTS updates or backports.With genksyms, developers would typically hide these changes fromversion calculation with #ifndef __GENKSYMS__, which would resultin the symbol version not changing even though the actual type haschanged.  When we process precompiled object files, this isn&apos;t anoption.Change union processing to recognize field name prefixes that allowthe user to ignore the union completely during symbol versioning witha __kabi_ignored prefix in a field name, or to replace the type of aplaceholder field using a __kabi_reserved field name prefix.For example, assume we want to add a new field to an existingalignment hole in a data structure, and ignore the new field whencalculating symbol versions:  struct struct1 {    int a;    /* a 4-byte alignment hole */    unsigned long b;  };To add `int n` to the alignment hole, we can add a union that includesa __kabi_ignored field that causes gendwarfksyms to ignore the entireunion:  struct struct1 {    int a;    union {      char __kabi_ignored_0;      int n;    };    unsigned long b;  };With --stable, both structs produce the same symbol version.Alternatively, when a distribution expects future modification to adata structure, they can explicitly add reserved fields:  struct struct2 {    long a;    long __kabi_reserved_0; /* reserved for future use */  };To take the field into use, we can again replace it with a union, withone of the fields keeping the __kabi_reserved name prefix to indicatethe original type:  struct struct2 {    long a;    union {      long __kabi_reserved_0;      struct {          int b;          int v;      };    };Here gendwarfksyms --stable replaces the union with the type of theplaceholder field when calculating versions.Signed-off-by: Sami Tolvanen &lt;samitolvanen@google.com&gt;Reviewed-by: Petr Pavlu &lt;petr.pavlu@suse.com&gt;Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;

            List of files:
            /linux-6.15/scripts/gendwarfksyms/examples/kabi.h/linux-6.15/scripts/gendwarfksyms/examples/kabi_ex.c/linux-6.15/scripts/gendwarfksyms/examples/kabi_ex.h</description>
        <pubDate>Fri, 03 Jan 2025 20:00:00 +0000</pubDate>
        <dc:creator>Sami Tolvanen &lt;samitolvanen@google.com&gt;</dc:creator>
    </item>
</channel>
</rss>
