diff options
author | Andreas Kling <kling@serenityos.org> | 2020-11-08 22:39:39 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-11-08 22:39:39 +0100 |
commit | fc948ea3df4919b6d1b36c37607978c88936dbb1 (patch) | |
tree | 7144604df28bda85f8601866314b758580cff4ee /Libraries | |
parent | 81b7c072edb79fa8588a0cf7a2becee42290d9a3 (diff) | |
download | serenity-fc948ea3df4919b6d1b36c37607978c88936dbb1.zip |
LibDebug: Shrink some of the high-volume data structures
We quickly allocate a *ton* of these when loading large executables.
Diffstat (limited to 'Libraries')
-rw-r--r-- | Libraries/LibDebug/Dwarf/DIE.h | 2 | ||||
-rw-r--r-- | Libraries/LibDebug/Dwarf/DwarfTypes.h | 9 |
2 files changed, 6 insertions, 5 deletions
diff --git a/Libraries/LibDebug/Dwarf/DIE.h b/Libraries/LibDebug/Dwarf/DIE.h index 713609b772..3ba68eafa8 100644 --- a/Libraries/LibDebug/Dwarf/DIE.h +++ b/Libraries/LibDebug/Dwarf/DIE.h @@ -43,7 +43,7 @@ public: DIE(const CompilationUnit&, u32 offset); struct AttributeValue { - enum class Type { + enum class Type : u8 { UnsignedNumber, SignedNumber, String, diff --git a/Libraries/LibDebug/Dwarf/DwarfTypes.h b/Libraries/LibDebug/Dwarf/DwarfTypes.h index 86304b067a..48c9f6c296 100644 --- a/Libraries/LibDebug/Dwarf/DwarfTypes.h +++ b/Libraries/LibDebug/Dwarf/DwarfTypes.h @@ -38,7 +38,7 @@ struct [[gnu::packed]] CompilationUnitHeader u8 address_size; }; -enum class EntryTag : u32 { +enum class EntryTag : u16 { None = 0, ArrayType = 0x1, ClassType = 0x2, @@ -113,7 +113,7 @@ enum class EntryTag : u32 { HiUser = 0xffff, }; -enum class Attribute : u32 { +enum class Attribute : u16 { None = 0, Sibling = 0x1, Location = 0x2, @@ -240,7 +240,7 @@ enum class Attribute : u32 { HiUser = 0x3fff, }; -enum class AttributeDataForm : u32 { +enum class AttributeDataForm : u8 { None = 0, Addr = 0x1, Block2 = 0x3, @@ -287,7 +287,8 @@ enum class AttributeDataForm : u32 { AddrX4 = 0x2c }; -struct AttributeSpecification { +struct [[gnu::packed]] AttributeSpecification +{ Attribute attribute; AttributeDataForm form; }; |