-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Internal pointer support #1165
Internal pointer support #1165
Conversation
…nternal-pointer-fast
} | ||
}); | ||
|
||
c.bench_function("internal pointer - normal objects", |_b| { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is some data for this micro benchmark.
The naive implementation (find_prev_non_zero_value_simple
, similar to #1155): check every aligned data address until we find the object.
internal pointer - normal objects
time: [12.910 µs 12.911 µs 12.912 µs]
internal pointer - large objects
time: [53.164 ns 53.486 ns 53.939 ns]
Check every byte in side metadata until we find VO bit, and compute it back to the VO address
internal pointer - normal objects
time: [1.5500 µs 1.5504 µs 1.5509 µs]
change: [-88.001% -87.997% -87.994%] (p = 0.00 < 0.05)
Performance has improved.
internal pointer - large objects
time: [58.115 ns 58.137 ns 58.161 ns]
change: [+8.0877% +8.6753% +9.1317%] (p = 0.00 < 0.05)
Performance has regressed.
Check every word in side metadata until we find VO bit, and compute it back to the VO address
internal pointer - normal objects
time: [311.28 ns 312.38 ns 313.51 ns]
change: [-79.856% -79.804% -79.741%] (p = 0.00 < 0.05)
Performance has improved.
internal pointer - large objects
time: [57.582 ns 57.607 ns 57.635 ns]
change: [-0.9006% -0.8311% -0.7566%] (p = 0.00 < 0.05)
Change within noise threshold.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After applying the suggestion in #1165 (comment), we only check if the metadata address is mapped for every chunk. The performance is further improved.
internal pointer - normal objects
time: [139.48 ns 139.65 ns 139.82 ns]
change: [-55.524% -55.388% -55.250%] (p = 0.00 < 0.05)
Performance has improved.
internal pointer - large objects
time: [49.300 ns 49.361 ns 49.462 ns]
change: [-14.459% -14.367% -14.263%] (p = 0.00 < 0.05)
Performance has improved.
binding-refs |
find_object_from_internal_pointer to the is_mmtk_object module
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This PR adds internal pointer support. It supersedes #1155 which provides a simple but inefficient implementation for internal pointers. This PR is based on #1159 which adds requirements for object reference alignment.
This PR
memory_manager::find_object_from_internal_pointer