mmtk / mmtk-core

Memory Management ToolKit
https://www.mmtk.io
Other
379 stars 69 forks source link

A more optimal implementation for finding base references #1193

Open qinsoon opened 2 months ago

qinsoon commented 2 months ago

We currently use SideMetadata::find_prev_non_zero_value to find the base reference for an internal reference. The implementation of SideMetadata::find_prev_non_zero_value is fully general for all kinds of side metadata, and does not use any specific assumption about object references. In our discussion for https://github.com/mmtk/mmtk-core/pull/1192, Steve mentioned that we may be able to implement a more optimal implementation of finding base references. For example, if we assume the returned address will be an aligned object reference, we don't need the filtering in https://github.com/mmtk/mmtk-core/pull/1192. There might be other opportunities for optimization. We need further discussion to decide what we can optimize.