|
|
DescriptionOptimized layout padding in 4 classes in ast.h
This reduces sizeof of these classes by 8 bytes on 64-bit
(16 bytes considering allocation size granularity for some of these classes).
I don't know how many instances remain at the end of loading a page. These objects are Zone objects which makes it more difficult to count the number
of instances. But looking at allocations only on cnn.com I've got 70K for
BinaryOperation, 20K for CompareOperation, 1.5K for CaseClause. There aren't
not many allocations of NativeFunctionLiteral but I decided to fix it too to
keep the same layout pattern.
Before:
class v8::internal::CaseClause [sizeof = 56]
: public v8::internal::Expression {
[sizeof=12] v8::internal::Expression
<padding> (4 bytes)
[sizeof=8] v8::internal::Expression* label_
[sizeof=8] v8::internal::Label body_target_
[sizeof=8] v8::internal::ZoneList<v8::internal::Statement *>* statements_
[sizeof=8] v8::internal::AstType* compare_type_
[sizeof=4] v8::internal::FeedbackSlot feedback_slot_
<padding> (4 bytes)
}
After:
class v8::internal::CaseClause [sizeof = 48]
: public v8::internal::Expression {
[sizeof=12] v8::internal::Expression
[sizeof=4] v8::internal::FeedbackSlot feedback_slot_
[sizeof=8] v8::internal::Expression* label_
[sizeof=8] v8::internal::Label body_target_
[sizeof=8] v8::internal::ZoneList<v8::internal::Statement *>* statements_
[sizeof=8] v8::internal::AstType* compare_type_
}
Before:
class v8::internal::BinaryOperation [sizeof = 56]
: public v8::internal::Expression {
[sizeof=12] v8::internal::Expression
[sizeof=1] bool has_fixed_right_arg_
<padding> (3 bytes)
[sizeof=4] int fixed_right_arg_value_
<padding> (4 bytes)
[sizeof=8] v8::internal::Expression* left_
[sizeof=8] v8::internal::Expression* right_
[sizeof=8] v8::internal::Handle<v8::internal::AllocationSite> allocation_site_
[sizeof=4] v8::internal::FeedbackSlot feedback_slot_
<padding> (4 bytes)
}
After:
class v8::internal::BinaryOperation [sizeof = 48]
: public v8::internal::Expression {
[sizeof=12] v8::internal::Expression
[sizeof=4] v8::internal::FeedbackSlot feedback_slot_
[sizeof=8] v8::internal::Expression* left_
[sizeof=8] v8::internal::Expression* right_
[sizeof=8] v8::internal::Handle<v8::internal::AllocationSite> allocation_site_
[sizeof=1] bool has_fixed_right_arg_
<padding> (3 bytes)
[sizeof=4] int fixed_right_arg_value_
}
Before:
class v8::internal::CompareOperation [sizeof = 48]
: public v8::internal::Expression {
[sizeof=12] v8::internal::Expression
<padding> (4 bytes)
[sizeof=8] v8::internal::Expression* left_
[sizeof=8] v8::internal::Expression* right_
[sizeof=8] v8::internal::AstType* combined_type_
[sizeof=4] v8::internal::FeedbackSlot feedback_slot_
<padding> (4 bytes)
}
After:
class v8::internal::CompareOperation [sizeof = 40]
: public v8::internal::Expression {
[sizeof=12] v8::internal::Expression
[sizeof=4] v8::internal::FeedbackSlot feedback_slot_
[sizeof=8] v8::internal::Expression* left_
[sizeof=8] v8::internal::Expression* right_
[sizeof=8] v8::internal::AstType* combined_type_
}
Before:
class v8::internal::NativeFunctionLiteral [sizeof = 40]
: public v8::internal::Expression {
[sizeof=12] v8::internal::Expression
<padding> (4 bytes)
[sizeof=8] v8::internal::AstRawString* name_
[sizeof=8] v8::Extension* extension_
[sizeof=4] v8::internal::FeedbackSlot literal_feedback_slot_
<padding> (4 bytes)
}
After:
class v8::internal::NativeFunctionLiteral [sizeof = 32]
: public v8::internal::Expression {
[sizeof=12] v8::internal::Expression
[sizeof=4] v8::internal::FeedbackSlot literal_feedback_slot_
[sizeof=8] v8::internal::AstRawString* name_
[sizeof=8] v8::Extension* extension_
}
BUG=chromium:710933
Review-Url: https://codereview.chromium.org/2843293003
Cr-Commit-Position: refs/heads/master@{#44989}
Committed: https://chromium.googlesource.com/v8/v8/+/6408032e6164f7f1b2f9edab75d1b14e4cbb32e4
Patch Set 1 #
Messages
Total messages: 15 (11 generated)
The CQ bit was checked by stanisc@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: v8_linux_arm64_rel_ng on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_arm64_rel_ng/build...)
Description was changed from ========== Optimized padding in 4 classes in ast.h BUG= ========== to ========== Optimized layout padding in 4 classes in ast.h This reduces sizeof of these classes by 8 bytes on 64-bit (16 bytes considering allocation size granularity for some of these classes). I don't know how many instances remain at the end of loading a page. These objects are Zone objects which makes it more difficult to count the number of instances. But looking at allocations only on cnn.com I've got 70K for BinaryOperation, 20K for CompareOperation, 1.5K for CaseClause. There aren't not many allocations of NativeFunctionLiteral but I decided to fix it too to keep the same layout pattern. Before: class v8::internal::CaseClause [sizeof = 56] : public v8::internal::Expression { [sizeof=12] v8::internal::Expression <padding> (4 bytes) [sizeof=8] v8::internal::Expression* label_ [sizeof=8] v8::internal::Label body_target_ [sizeof=8] v8::internal::ZoneList<v8::internal::Statement *>* statements_ [sizeof=8] v8::internal::AstType* compare_type_ [sizeof=4] v8::internal::FeedbackSlot feedback_slot_ <padding> (4 bytes) } After: class v8::internal::CaseClause [sizeof = 48] : public v8::internal::Expression { [sizeof=12] v8::internal::Expression [sizeof=4] v8::internal::FeedbackSlot feedback_slot_ [sizeof=8] v8::internal::Expression* label_ [sizeof=8] v8::internal::Label body_target_ [sizeof=8] v8::internal::ZoneList<v8::internal::Statement *>* statements_ [sizeof=8] v8::internal::AstType* compare_type_ } Before: class v8::internal::BinaryOperation [sizeof = 56] : public v8::internal::Expression { [sizeof=12] v8::internal::Expression [sizeof=1] bool has_fixed_right_arg_ <padding> (3 bytes) [sizeof=4] int fixed_right_arg_value_ <padding> (4 bytes) [sizeof=8] v8::internal::Expression* left_ [sizeof=8] v8::internal::Expression* right_ [sizeof=8] v8::internal::Handle<v8::internal::AllocationSite> allocation_site_ [sizeof=4] v8::internal::FeedbackSlot feedback_slot_ <padding> (4 bytes) } After: class v8::internal::BinaryOperation [sizeof = 48] : public v8::internal::Expression { [sizeof=12] v8::internal::Expression [sizeof=4] v8::internal::FeedbackSlot feedback_slot_ [sizeof=8] v8::internal::Expression* left_ [sizeof=8] v8::internal::Expression* right_ [sizeof=8] v8::internal::Handle<v8::internal::AllocationSite> allocation_site_ [sizeof=1] bool has_fixed_right_arg_ <padding> (3 bytes) [sizeof=4] int fixed_right_arg_value_ } Before: class v8::internal::CompareOperation [sizeof = 48] : public v8::internal::Expression { [sizeof=12] v8::internal::Expression <padding> (4 bytes) [sizeof=8] v8::internal::Expression* left_ [sizeof=8] v8::internal::Expression* right_ [sizeof=8] v8::internal::AstType* combined_type_ [sizeof=4] v8::internal::FeedbackSlot feedback_slot_ <padding> (4 bytes) } After: class v8::internal::CompareOperation [sizeof = 40] : public v8::internal::Expression { [sizeof=12] v8::internal::Expression [sizeof=4] v8::internal::FeedbackSlot feedback_slot_ [sizeof=8] v8::internal::Expression* left_ [sizeof=8] v8::internal::Expression* right_ [sizeof=8] v8::internal::AstType* combined_type_ } Before: class v8::internal::NativeFunctionLiteral [sizeof = 40] : public v8::internal::Expression { [sizeof=12] v8::internal::Expression <padding> (4 bytes) [sizeof=8] v8::internal::AstRawString* name_ [sizeof=8] v8::Extension* extension_ [sizeof=4] v8::internal::FeedbackSlot literal_feedback_slot_ <padding> (4 bytes) } After: class v8::internal::NativeFunctionLiteral [sizeof = 32] : public v8::internal::Expression { [sizeof=12] v8::internal::Expression [sizeof=4] v8::internal::FeedbackSlot literal_feedback_slot_ [sizeof=8] v8::internal::AstRawString* name_ [sizeof=8] v8::Extension* extension_ } BUG=710933 ==========
Description was changed from ========== Optimized layout padding in 4 classes in ast.h This reduces sizeof of these classes by 8 bytes on 64-bit (16 bytes considering allocation size granularity for some of these classes). I don't know how many instances remain at the end of loading a page. These objects are Zone objects which makes it more difficult to count the number of instances. But looking at allocations only on cnn.com I've got 70K for BinaryOperation, 20K for CompareOperation, 1.5K for CaseClause. There aren't not many allocations of NativeFunctionLiteral but I decided to fix it too to keep the same layout pattern. Before: class v8::internal::CaseClause [sizeof = 56] : public v8::internal::Expression { [sizeof=12] v8::internal::Expression <padding> (4 bytes) [sizeof=8] v8::internal::Expression* label_ [sizeof=8] v8::internal::Label body_target_ [sizeof=8] v8::internal::ZoneList<v8::internal::Statement *>* statements_ [sizeof=8] v8::internal::AstType* compare_type_ [sizeof=4] v8::internal::FeedbackSlot feedback_slot_ <padding> (4 bytes) } After: class v8::internal::CaseClause [sizeof = 48] : public v8::internal::Expression { [sizeof=12] v8::internal::Expression [sizeof=4] v8::internal::FeedbackSlot feedback_slot_ [sizeof=8] v8::internal::Expression* label_ [sizeof=8] v8::internal::Label body_target_ [sizeof=8] v8::internal::ZoneList<v8::internal::Statement *>* statements_ [sizeof=8] v8::internal::AstType* compare_type_ } Before: class v8::internal::BinaryOperation [sizeof = 56] : public v8::internal::Expression { [sizeof=12] v8::internal::Expression [sizeof=1] bool has_fixed_right_arg_ <padding> (3 bytes) [sizeof=4] int fixed_right_arg_value_ <padding> (4 bytes) [sizeof=8] v8::internal::Expression* left_ [sizeof=8] v8::internal::Expression* right_ [sizeof=8] v8::internal::Handle<v8::internal::AllocationSite> allocation_site_ [sizeof=4] v8::internal::FeedbackSlot feedback_slot_ <padding> (4 bytes) } After: class v8::internal::BinaryOperation [sizeof = 48] : public v8::internal::Expression { [sizeof=12] v8::internal::Expression [sizeof=4] v8::internal::FeedbackSlot feedback_slot_ [sizeof=8] v8::internal::Expression* left_ [sizeof=8] v8::internal::Expression* right_ [sizeof=8] v8::internal::Handle<v8::internal::AllocationSite> allocation_site_ [sizeof=1] bool has_fixed_right_arg_ <padding> (3 bytes) [sizeof=4] int fixed_right_arg_value_ } Before: class v8::internal::CompareOperation [sizeof = 48] : public v8::internal::Expression { [sizeof=12] v8::internal::Expression <padding> (4 bytes) [sizeof=8] v8::internal::Expression* left_ [sizeof=8] v8::internal::Expression* right_ [sizeof=8] v8::internal::AstType* combined_type_ [sizeof=4] v8::internal::FeedbackSlot feedback_slot_ <padding> (4 bytes) } After: class v8::internal::CompareOperation [sizeof = 40] : public v8::internal::Expression { [sizeof=12] v8::internal::Expression [sizeof=4] v8::internal::FeedbackSlot feedback_slot_ [sizeof=8] v8::internal::Expression* left_ [sizeof=8] v8::internal::Expression* right_ [sizeof=8] v8::internal::AstType* combined_type_ } Before: class v8::internal::NativeFunctionLiteral [sizeof = 40] : public v8::internal::Expression { [sizeof=12] v8::internal::Expression <padding> (4 bytes) [sizeof=8] v8::internal::AstRawString* name_ [sizeof=8] v8::Extension* extension_ [sizeof=4] v8::internal::FeedbackSlot literal_feedback_slot_ <padding> (4 bytes) } After: class v8::internal::NativeFunctionLiteral [sizeof = 32] : public v8::internal::Expression { [sizeof=12] v8::internal::Expression [sizeof=4] v8::internal::FeedbackSlot literal_feedback_slot_ [sizeof=8] v8::internal::AstRawString* name_ [sizeof=8] v8::Extension* extension_ } BUG=710933 ========== to ========== Optimized layout padding in 4 classes in ast.h This reduces sizeof of these classes by 8 bytes on 64-bit (16 bytes considering allocation size granularity for some of these classes). I don't know how many instances remain at the end of loading a page. These objects are Zone objects which makes it more difficult to count the number of instances. But looking at allocations only on cnn.com I've got 70K for BinaryOperation, 20K for CompareOperation, 1.5K for CaseClause. There aren't not many allocations of NativeFunctionLiteral but I decided to fix it too to keep the same layout pattern. Before: class v8::internal::CaseClause [sizeof = 56] : public v8::internal::Expression { [sizeof=12] v8::internal::Expression <padding> (4 bytes) [sizeof=8] v8::internal::Expression* label_ [sizeof=8] v8::internal::Label body_target_ [sizeof=8] v8::internal::ZoneList<v8::internal::Statement *>* statements_ [sizeof=8] v8::internal::AstType* compare_type_ [sizeof=4] v8::internal::FeedbackSlot feedback_slot_ <padding> (4 bytes) } After: class v8::internal::CaseClause [sizeof = 48] : public v8::internal::Expression { [sizeof=12] v8::internal::Expression [sizeof=4] v8::internal::FeedbackSlot feedback_slot_ [sizeof=8] v8::internal::Expression* label_ [sizeof=8] v8::internal::Label body_target_ [sizeof=8] v8::internal::ZoneList<v8::internal::Statement *>* statements_ [sizeof=8] v8::internal::AstType* compare_type_ } Before: class v8::internal::BinaryOperation [sizeof = 56] : public v8::internal::Expression { [sizeof=12] v8::internal::Expression [sizeof=1] bool has_fixed_right_arg_ <padding> (3 bytes) [sizeof=4] int fixed_right_arg_value_ <padding> (4 bytes) [sizeof=8] v8::internal::Expression* left_ [sizeof=8] v8::internal::Expression* right_ [sizeof=8] v8::internal::Handle<v8::internal::AllocationSite> allocation_site_ [sizeof=4] v8::internal::FeedbackSlot feedback_slot_ <padding> (4 bytes) } After: class v8::internal::BinaryOperation [sizeof = 48] : public v8::internal::Expression { [sizeof=12] v8::internal::Expression [sizeof=4] v8::internal::FeedbackSlot feedback_slot_ [sizeof=8] v8::internal::Expression* left_ [sizeof=8] v8::internal::Expression* right_ [sizeof=8] v8::internal::Handle<v8::internal::AllocationSite> allocation_site_ [sizeof=1] bool has_fixed_right_arg_ <padding> (3 bytes) [sizeof=4] int fixed_right_arg_value_ } Before: class v8::internal::CompareOperation [sizeof = 48] : public v8::internal::Expression { [sizeof=12] v8::internal::Expression <padding> (4 bytes) [sizeof=8] v8::internal::Expression* left_ [sizeof=8] v8::internal::Expression* right_ [sizeof=8] v8::internal::AstType* combined_type_ [sizeof=4] v8::internal::FeedbackSlot feedback_slot_ <padding> (4 bytes) } After: class v8::internal::CompareOperation [sizeof = 40] : public v8::internal::Expression { [sizeof=12] v8::internal::Expression [sizeof=4] v8::internal::FeedbackSlot feedback_slot_ [sizeof=8] v8::internal::Expression* left_ [sizeof=8] v8::internal::Expression* right_ [sizeof=8] v8::internal::AstType* combined_type_ } Before: class v8::internal::NativeFunctionLiteral [sizeof = 40] : public v8::internal::Expression { [sizeof=12] v8::internal::Expression <padding> (4 bytes) [sizeof=8] v8::internal::AstRawString* name_ [sizeof=8] v8::Extension* extension_ [sizeof=4] v8::internal::FeedbackSlot literal_feedback_slot_ <padding> (4 bytes) } After: class v8::internal::NativeFunctionLiteral [sizeof = 32] : public v8::internal::Expression { [sizeof=12] v8::internal::Expression [sizeof=4] v8::internal::FeedbackSlot literal_feedback_slot_ [sizeof=8] v8::internal::AstRawString* name_ [sizeof=8] v8::Extension* extension_ } BUG=710933 ==========
stanisc@chromium.org changed reviewers: + adamk@chromium.org
PTAL!
Description was changed from ========== Optimized layout padding in 4 classes in ast.h This reduces sizeof of these classes by 8 bytes on 64-bit (16 bytes considering allocation size granularity for some of these classes). I don't know how many instances remain at the end of loading a page. These objects are Zone objects which makes it more difficult to count the number of instances. But looking at allocations only on cnn.com I've got 70K for BinaryOperation, 20K for CompareOperation, 1.5K for CaseClause. There aren't not many allocations of NativeFunctionLiteral but I decided to fix it too to keep the same layout pattern. Before: class v8::internal::CaseClause [sizeof = 56] : public v8::internal::Expression { [sizeof=12] v8::internal::Expression <padding> (4 bytes) [sizeof=8] v8::internal::Expression* label_ [sizeof=8] v8::internal::Label body_target_ [sizeof=8] v8::internal::ZoneList<v8::internal::Statement *>* statements_ [sizeof=8] v8::internal::AstType* compare_type_ [sizeof=4] v8::internal::FeedbackSlot feedback_slot_ <padding> (4 bytes) } After: class v8::internal::CaseClause [sizeof = 48] : public v8::internal::Expression { [sizeof=12] v8::internal::Expression [sizeof=4] v8::internal::FeedbackSlot feedback_slot_ [sizeof=8] v8::internal::Expression* label_ [sizeof=8] v8::internal::Label body_target_ [sizeof=8] v8::internal::ZoneList<v8::internal::Statement *>* statements_ [sizeof=8] v8::internal::AstType* compare_type_ } Before: class v8::internal::BinaryOperation [sizeof = 56] : public v8::internal::Expression { [sizeof=12] v8::internal::Expression [sizeof=1] bool has_fixed_right_arg_ <padding> (3 bytes) [sizeof=4] int fixed_right_arg_value_ <padding> (4 bytes) [sizeof=8] v8::internal::Expression* left_ [sizeof=8] v8::internal::Expression* right_ [sizeof=8] v8::internal::Handle<v8::internal::AllocationSite> allocation_site_ [sizeof=4] v8::internal::FeedbackSlot feedback_slot_ <padding> (4 bytes) } After: class v8::internal::BinaryOperation [sizeof = 48] : public v8::internal::Expression { [sizeof=12] v8::internal::Expression [sizeof=4] v8::internal::FeedbackSlot feedback_slot_ [sizeof=8] v8::internal::Expression* left_ [sizeof=8] v8::internal::Expression* right_ [sizeof=8] v8::internal::Handle<v8::internal::AllocationSite> allocation_site_ [sizeof=1] bool has_fixed_right_arg_ <padding> (3 bytes) [sizeof=4] int fixed_right_arg_value_ } Before: class v8::internal::CompareOperation [sizeof = 48] : public v8::internal::Expression { [sizeof=12] v8::internal::Expression <padding> (4 bytes) [sizeof=8] v8::internal::Expression* left_ [sizeof=8] v8::internal::Expression* right_ [sizeof=8] v8::internal::AstType* combined_type_ [sizeof=4] v8::internal::FeedbackSlot feedback_slot_ <padding> (4 bytes) } After: class v8::internal::CompareOperation [sizeof = 40] : public v8::internal::Expression { [sizeof=12] v8::internal::Expression [sizeof=4] v8::internal::FeedbackSlot feedback_slot_ [sizeof=8] v8::internal::Expression* left_ [sizeof=8] v8::internal::Expression* right_ [sizeof=8] v8::internal::AstType* combined_type_ } Before: class v8::internal::NativeFunctionLiteral [sizeof = 40] : public v8::internal::Expression { [sizeof=12] v8::internal::Expression <padding> (4 bytes) [sizeof=8] v8::internal::AstRawString* name_ [sizeof=8] v8::Extension* extension_ [sizeof=4] v8::internal::FeedbackSlot literal_feedback_slot_ <padding> (4 bytes) } After: class v8::internal::NativeFunctionLiteral [sizeof = 32] : public v8::internal::Expression { [sizeof=12] v8::internal::Expression [sizeof=4] v8::internal::FeedbackSlot literal_feedback_slot_ [sizeof=8] v8::internal::AstRawString* name_ [sizeof=8] v8::Extension* extension_ } BUG=710933 ========== to ========== Optimized layout padding in 4 classes in ast.h This reduces sizeof of these classes by 8 bytes on 64-bit (16 bytes considering allocation size granularity for some of these classes). I don't know how many instances remain at the end of loading a page. These objects are Zone objects which makes it more difficult to count the number of instances. But looking at allocations only on cnn.com I've got 70K for BinaryOperation, 20K for CompareOperation, 1.5K for CaseClause. There aren't not many allocations of NativeFunctionLiteral but I decided to fix it too to keep the same layout pattern. Before: class v8::internal::CaseClause [sizeof = 56] : public v8::internal::Expression { [sizeof=12] v8::internal::Expression <padding> (4 bytes) [sizeof=8] v8::internal::Expression* label_ [sizeof=8] v8::internal::Label body_target_ [sizeof=8] v8::internal::ZoneList<v8::internal::Statement *>* statements_ [sizeof=8] v8::internal::AstType* compare_type_ [sizeof=4] v8::internal::FeedbackSlot feedback_slot_ <padding> (4 bytes) } After: class v8::internal::CaseClause [sizeof = 48] : public v8::internal::Expression { [sizeof=12] v8::internal::Expression [sizeof=4] v8::internal::FeedbackSlot feedback_slot_ [sizeof=8] v8::internal::Expression* label_ [sizeof=8] v8::internal::Label body_target_ [sizeof=8] v8::internal::ZoneList<v8::internal::Statement *>* statements_ [sizeof=8] v8::internal::AstType* compare_type_ } Before: class v8::internal::BinaryOperation [sizeof = 56] : public v8::internal::Expression { [sizeof=12] v8::internal::Expression [sizeof=1] bool has_fixed_right_arg_ <padding> (3 bytes) [sizeof=4] int fixed_right_arg_value_ <padding> (4 bytes) [sizeof=8] v8::internal::Expression* left_ [sizeof=8] v8::internal::Expression* right_ [sizeof=8] v8::internal::Handle<v8::internal::AllocationSite> allocation_site_ [sizeof=4] v8::internal::FeedbackSlot feedback_slot_ <padding> (4 bytes) } After: class v8::internal::BinaryOperation [sizeof = 48] : public v8::internal::Expression { [sizeof=12] v8::internal::Expression [sizeof=4] v8::internal::FeedbackSlot feedback_slot_ [sizeof=8] v8::internal::Expression* left_ [sizeof=8] v8::internal::Expression* right_ [sizeof=8] v8::internal::Handle<v8::internal::AllocationSite> allocation_site_ [sizeof=1] bool has_fixed_right_arg_ <padding> (3 bytes) [sizeof=4] int fixed_right_arg_value_ } Before: class v8::internal::CompareOperation [sizeof = 48] : public v8::internal::Expression { [sizeof=12] v8::internal::Expression <padding> (4 bytes) [sizeof=8] v8::internal::Expression* left_ [sizeof=8] v8::internal::Expression* right_ [sizeof=8] v8::internal::AstType* combined_type_ [sizeof=4] v8::internal::FeedbackSlot feedback_slot_ <padding> (4 bytes) } After: class v8::internal::CompareOperation [sizeof = 40] : public v8::internal::Expression { [sizeof=12] v8::internal::Expression [sizeof=4] v8::internal::FeedbackSlot feedback_slot_ [sizeof=8] v8::internal::Expression* left_ [sizeof=8] v8::internal::Expression* right_ [sizeof=8] v8::internal::AstType* combined_type_ } Before: class v8::internal::NativeFunctionLiteral [sizeof = 40] : public v8::internal::Expression { [sizeof=12] v8::internal::Expression <padding> (4 bytes) [sizeof=8] v8::internal::AstRawString* name_ [sizeof=8] v8::Extension* extension_ [sizeof=4] v8::internal::FeedbackSlot literal_feedback_slot_ <padding> (4 bytes) } After: class v8::internal::NativeFunctionLiteral [sizeof = 32] : public v8::internal::Expression { [sizeof=12] v8::internal::Expression [sizeof=4] v8::internal::FeedbackSlot literal_feedback_slot_ [sizeof=8] v8::internal::AstRawString* name_ [sizeof=8] v8::Extension* extension_ } BUG=chromium:710933 ==========
lgtm, thanks! One note on V8 changes: when listing an attached bug, please prefix with the Monorail project under which that bug lives, e.g., v8:1234 or chromium:712345. I've edited your current description to match that already.
The CQ bit was checked by stanisc@chromium.org
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 1, "attempt_start_ts": 1493413056248400, "parent_rev": "7e4282d5031cbf9f596747cd4db84c740a2b93c9", "commit_rev": "6408032e6164f7f1b2f9edab75d1b14e4cbb32e4"}
Message was sent while issue was closed.
Description was changed from ========== Optimized layout padding in 4 classes in ast.h This reduces sizeof of these classes by 8 bytes on 64-bit (16 bytes considering allocation size granularity for some of these classes). I don't know how many instances remain at the end of loading a page. These objects are Zone objects which makes it more difficult to count the number of instances. But looking at allocations only on cnn.com I've got 70K for BinaryOperation, 20K for CompareOperation, 1.5K for CaseClause. There aren't not many allocations of NativeFunctionLiteral but I decided to fix it too to keep the same layout pattern. Before: class v8::internal::CaseClause [sizeof = 56] : public v8::internal::Expression { [sizeof=12] v8::internal::Expression <padding> (4 bytes) [sizeof=8] v8::internal::Expression* label_ [sizeof=8] v8::internal::Label body_target_ [sizeof=8] v8::internal::ZoneList<v8::internal::Statement *>* statements_ [sizeof=8] v8::internal::AstType* compare_type_ [sizeof=4] v8::internal::FeedbackSlot feedback_slot_ <padding> (4 bytes) } After: class v8::internal::CaseClause [sizeof = 48] : public v8::internal::Expression { [sizeof=12] v8::internal::Expression [sizeof=4] v8::internal::FeedbackSlot feedback_slot_ [sizeof=8] v8::internal::Expression* label_ [sizeof=8] v8::internal::Label body_target_ [sizeof=8] v8::internal::ZoneList<v8::internal::Statement *>* statements_ [sizeof=8] v8::internal::AstType* compare_type_ } Before: class v8::internal::BinaryOperation [sizeof = 56] : public v8::internal::Expression { [sizeof=12] v8::internal::Expression [sizeof=1] bool has_fixed_right_arg_ <padding> (3 bytes) [sizeof=4] int fixed_right_arg_value_ <padding> (4 bytes) [sizeof=8] v8::internal::Expression* left_ [sizeof=8] v8::internal::Expression* right_ [sizeof=8] v8::internal::Handle<v8::internal::AllocationSite> allocation_site_ [sizeof=4] v8::internal::FeedbackSlot feedback_slot_ <padding> (4 bytes) } After: class v8::internal::BinaryOperation [sizeof = 48] : public v8::internal::Expression { [sizeof=12] v8::internal::Expression [sizeof=4] v8::internal::FeedbackSlot feedback_slot_ [sizeof=8] v8::internal::Expression* left_ [sizeof=8] v8::internal::Expression* right_ [sizeof=8] v8::internal::Handle<v8::internal::AllocationSite> allocation_site_ [sizeof=1] bool has_fixed_right_arg_ <padding> (3 bytes) [sizeof=4] int fixed_right_arg_value_ } Before: class v8::internal::CompareOperation [sizeof = 48] : public v8::internal::Expression { [sizeof=12] v8::internal::Expression <padding> (4 bytes) [sizeof=8] v8::internal::Expression* left_ [sizeof=8] v8::internal::Expression* right_ [sizeof=8] v8::internal::AstType* combined_type_ [sizeof=4] v8::internal::FeedbackSlot feedback_slot_ <padding> (4 bytes) } After: class v8::internal::CompareOperation [sizeof = 40] : public v8::internal::Expression { [sizeof=12] v8::internal::Expression [sizeof=4] v8::internal::FeedbackSlot feedback_slot_ [sizeof=8] v8::internal::Expression* left_ [sizeof=8] v8::internal::Expression* right_ [sizeof=8] v8::internal::AstType* combined_type_ } Before: class v8::internal::NativeFunctionLiteral [sizeof = 40] : public v8::internal::Expression { [sizeof=12] v8::internal::Expression <padding> (4 bytes) [sizeof=8] v8::internal::AstRawString* name_ [sizeof=8] v8::Extension* extension_ [sizeof=4] v8::internal::FeedbackSlot literal_feedback_slot_ <padding> (4 bytes) } After: class v8::internal::NativeFunctionLiteral [sizeof = 32] : public v8::internal::Expression { [sizeof=12] v8::internal::Expression [sizeof=4] v8::internal::FeedbackSlot literal_feedback_slot_ [sizeof=8] v8::internal::AstRawString* name_ [sizeof=8] v8::Extension* extension_ } BUG=chromium:710933 ========== to ========== Optimized layout padding in 4 classes in ast.h This reduces sizeof of these classes by 8 bytes on 64-bit (16 bytes considering allocation size granularity for some of these classes). I don't know how many instances remain at the end of loading a page. These objects are Zone objects which makes it more difficult to count the number of instances. But looking at allocations only on cnn.com I've got 70K for BinaryOperation, 20K for CompareOperation, 1.5K for CaseClause. There aren't not many allocations of NativeFunctionLiteral but I decided to fix it too to keep the same layout pattern. Before: class v8::internal::CaseClause [sizeof = 56] : public v8::internal::Expression { [sizeof=12] v8::internal::Expression <padding> (4 bytes) [sizeof=8] v8::internal::Expression* label_ [sizeof=8] v8::internal::Label body_target_ [sizeof=8] v8::internal::ZoneList<v8::internal::Statement *>* statements_ [sizeof=8] v8::internal::AstType* compare_type_ [sizeof=4] v8::internal::FeedbackSlot feedback_slot_ <padding> (4 bytes) } After: class v8::internal::CaseClause [sizeof = 48] : public v8::internal::Expression { [sizeof=12] v8::internal::Expression [sizeof=4] v8::internal::FeedbackSlot feedback_slot_ [sizeof=8] v8::internal::Expression* label_ [sizeof=8] v8::internal::Label body_target_ [sizeof=8] v8::internal::ZoneList<v8::internal::Statement *>* statements_ [sizeof=8] v8::internal::AstType* compare_type_ } Before: class v8::internal::BinaryOperation [sizeof = 56] : public v8::internal::Expression { [sizeof=12] v8::internal::Expression [sizeof=1] bool has_fixed_right_arg_ <padding> (3 bytes) [sizeof=4] int fixed_right_arg_value_ <padding> (4 bytes) [sizeof=8] v8::internal::Expression* left_ [sizeof=8] v8::internal::Expression* right_ [sizeof=8] v8::internal::Handle<v8::internal::AllocationSite> allocation_site_ [sizeof=4] v8::internal::FeedbackSlot feedback_slot_ <padding> (4 bytes) } After: class v8::internal::BinaryOperation [sizeof = 48] : public v8::internal::Expression { [sizeof=12] v8::internal::Expression [sizeof=4] v8::internal::FeedbackSlot feedback_slot_ [sizeof=8] v8::internal::Expression* left_ [sizeof=8] v8::internal::Expression* right_ [sizeof=8] v8::internal::Handle<v8::internal::AllocationSite> allocation_site_ [sizeof=1] bool has_fixed_right_arg_ <padding> (3 bytes) [sizeof=4] int fixed_right_arg_value_ } Before: class v8::internal::CompareOperation [sizeof = 48] : public v8::internal::Expression { [sizeof=12] v8::internal::Expression <padding> (4 bytes) [sizeof=8] v8::internal::Expression* left_ [sizeof=8] v8::internal::Expression* right_ [sizeof=8] v8::internal::AstType* combined_type_ [sizeof=4] v8::internal::FeedbackSlot feedback_slot_ <padding> (4 bytes) } After: class v8::internal::CompareOperation [sizeof = 40] : public v8::internal::Expression { [sizeof=12] v8::internal::Expression [sizeof=4] v8::internal::FeedbackSlot feedback_slot_ [sizeof=8] v8::internal::Expression* left_ [sizeof=8] v8::internal::Expression* right_ [sizeof=8] v8::internal::AstType* combined_type_ } Before: class v8::internal::NativeFunctionLiteral [sizeof = 40] : public v8::internal::Expression { [sizeof=12] v8::internal::Expression <padding> (4 bytes) [sizeof=8] v8::internal::AstRawString* name_ [sizeof=8] v8::Extension* extension_ [sizeof=4] v8::internal::FeedbackSlot literal_feedback_slot_ <padding> (4 bytes) } After: class v8::internal::NativeFunctionLiteral [sizeof = 32] : public v8::internal::Expression { [sizeof=12] v8::internal::Expression [sizeof=4] v8::internal::FeedbackSlot literal_feedback_slot_ [sizeof=8] v8::internal::AstRawString* name_ [sizeof=8] v8::Extension* extension_ } BUG=chromium:710933 Review-Url: https://codereview.chromium.org/2843293003 Cr-Commit-Position: refs/heads/master@{#44989} Committed: https://chromium.googlesource.com/v8/v8/+/6408032e6164f7f1b2f9edab75d1b14e4cb... ==========
Message was sent while issue was closed.
Committed patchset #1 (id:1) as https://chromium.googlesource.com/v8/v8/+/6408032e6164f7f1b2f9edab75d1b14e4cb... |