RFR: JDK-8326586: Improve Speed of System.map [v2]

Thomas Stuefe stuefe at openjdk.org
Sat Mar 2 08:57:54 UTC 2024


On Tue, 27 Feb 2024 20:29:57 GMT, Gerard Ziemski <gziemski at openjdk.org> wrote:

>> Thomas Stuefe has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   uintx->size_t
>
> BTW here is the truth table I used to convince myself that the code is doing the right thing, might be useful to someone (even myself) looking at this in the future:
> 
> 
> range_intersects == MAX(from) < MIN(to)
> NEW CODE: break if (to <= range.from)
> OLD CODE: break if (from < _range.to)
> 
> ....{..}.... from,to
> [..]........ range
> ....<....... MAX(from)
> ...>........ MIN(to)
> ...><.......  MAX(from) < MIN(to) -> FALSE
> .......}.... to
> [........... range.from
> [......}....  to <= range.from    -> FALSE
> ....{....... from
> ...]........ range.to
> ...]{.......  from < _range.to    -> FALSE
> 
> ....{..}.... from,to
> .[..]....... range
> ....<....... MAX(from)
> ....>....... MIN(to)
> ....X.......  MAX(from) < MIN(to) -> FALSE
> .......}.... to
> .[.......... range.from
> .[.....}....  to <= range.from    -> FALSE
> ....{....... from
> ....]....... range.to
> ....X.......  from < _range.to    -> FALSE
> 
> ....{..}.... from,to
> ..[..]...... range
> ....<....... MAX(from)
> .....>...... MIN(to)
> ....<>......  MAX(from) < MIN(to) -> TRUE
> .......}.... to
> ..[......... range.from
> ..[....}....  to <= range.from    -> FALSE
> ....{....... from
> .....]...... range.to
> ....{]......  from < _range.to    -> TRUE
> 
> ....{..}.... from,to
> ...[..]..... range
> ....<....... MAX(from)
> ......>..... MIN(to)
> ....<.>.....  MAX(from) < MIN(to) -> TRUE
> .......}.... to
> ...[........ range.from
> ...[...}....  to <= range.from    -> FALSE
> ....{....... from
> ......]..... range.to
> ....{.].....  from < _range.to    -> TRUE
> 
> ....{..}.... from,to
> ....[..].... range
> ....<....... MAX(from)
> .......>.... MIN(to)
> ....<..>....  MAX(from) < MIN(to) -> TRUE
> .......}.... to
> ....[....... range.from
> ....[..}....  to <= range.from    -> FALSE
> ....{....... from
> .......].... range.to
> ....{..]....  from < _range.to    -> TRUE
> 
> ....{..}.... from,to
> .....[..]... range
> .....<...... MAX(from)
> .......>.... MIN(to)
> .....<.>....  MAX(from) < MIN(to) -> TRUE
> .......}.... to
> .....[...... range.from
> .....[.}....  to <= range.from    -> FALSE
> ....{....... from
> ........]... range.to
> ....{...]...  from < _range.to    -> TRUE
> 
> ....{..}.... from,to
> ......[..].. range
> ......<..... MAX(from)
> .......>.... MIN(to)
> ......<>....  MAX(from) < MIN(to) -> TRUE
> .......}.... to
> ......[..... range.from
> ......[}....  to <= range.from    -> FALSE
> ....{....... from
> .........].. range.to
> ....{....]..  from < _range.to    -> TRUE
> 
> ....{..}.... from,to
> .......[..]. range
> .......<.... MAX(from)
> .......>.... MIN(to)
> .......X....  MAX(from) < MIN(to) -> FALSE
> .......}.... to
> .......[.... range.from
> ...

thanks @gerard-ziemski and @jdksjolen

-------------

PR Comment: https://git.openjdk.org/jdk/pull/17984#issuecomment-1974734800


More information about the hotspot-runtime-dev mailing list