-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
shrink ThreadLocalStatsMap mapped items
Summary: {D68659181} incorporated a cache of export-types into ThreadLocalStatsMap by embedding the list of per-stat export-types into the mapped items as a separate pointer-sized value. But we can embed the list into pre-existing words in the mapped items. Here, we embed them into the high bits of the shared-ptr control-block pointer. To do this, we use the well-known cross-library layout of `std::shared_ptr`. As an alternative, we could embed the export-type list into the high bits of the shared-ptr object pointer. If done this way, it is possible to make the whole thing work with only the `std::shared_ptr` aliasing constructor and without taking advantage of the well-known cross-library layout. Differential Revision: D68665021 fbshipit-source-id: 0c6999758c1928703b4d10485d3db12765066033
- Loading branch information
1 parent
057f91f
commit 3a66ed4
Showing
2 changed files
with
135 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters