Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use Profile::Sample::GuardedStatus for
guarded_status
instead of int.
This is the correct type and uses only 1 byte instead of 4. We can then group `guarded_status` and `allocation_type` into the padding after `allocation_time` to save 8 bytes. Cleanup the type casting that is no longer needed. Before: struct tcmalloc::tcmalloc_internal::StackTrace needs 7 bytes of padding, non-tail padding is 7 (fields: 18 padded fields: 2) total_size: 616 padding size alignment | Field name 8 8 | sampled_alloc_handle 8 8 | proxy 8 8 | requested_size 8 8 | requested_alignment 8 8 | allocated_size 1 1 | requested_size_returning 1 1 | access_hint 1 1 | cold_allocated 1 1 | has_context 4 4 | static_initialization_depth 8 8 | weight 4 12 4 | allocation_time 8 8 | span_start_address 8 8 | census_handle 4 4 | guarded_status 3 1 1 | allocation_type 8 8 | depth 512 8 | stack After: struct tcmalloc::tcmalloc_internal::StackTrace needs 2 bytes of padding, non-tail padding is 2 (fields: 18 padded fields: 1) total_size: 608 padding size alignment | Field name 8 8 | sampled_alloc_handle 8 8 | proxy 8 8 | requested_size 8 8 | requested_alignment 8 8 | allocated_size 1 1 | requested_size_returning 1 1 | access_hint 1 1 | cold_allocated 1 1 | has_context 4 4 | static_initialization_depth 8 8 | weight 12 4 | allocation_time 1 1 | guarded_status 2 1 1 | allocation_type 8 8 | span_start_address 8 8 | census_handle 8 8 | depth 512 8 | stack PiperOrigin-RevId: 716195113 Change-Id: I766ba0f572c5ebdfc891065ce75aca767b9e2a41
- Loading branch information