RFR: 8315559: Delay TempSymbol cleanup to avoid symbol table churn [v10]

Oli Gillespie ogillespie at openjdk.org
Tue Nov 28 11:03:46 UTC 2023


On Mon, 27 Nov 2023 22:49:57 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

>> I don't feel too strongly either way but someone else previously suggested draining during the periodic task so I added it.
>> The benefit is not leaving Symbols hanging around in the queue indefinitely (though granted, a fixed number of them, so the memory waste is limited). The downside is a small piece of added code and work on the periodic task.
>
> I didn't find any discussion of whether draining is needed in this PR, and draining is in the initial commit.
> Other downsides include the need to test that feature and the impact that feature has on testing other parts
> of this change.  Unless someone argues for it, I'd prefer to see it removed.

Yes, there is one additional test for the draining but it's quite simple. The drain feature actually helps with the other tests, that's how we can avoid the queue interfering with ref counts for the tests (create temp symbol, immediately drain queue), so even if we don't drain periodically I'd still leave the feature there for the existing tests.

What about the fact that not draining the queue means we could keep 128 symbols alive indefinitely? Are you not concerned because that's a small amount, and/or because natural churn will likely keep the queue moving?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16398#discussion_r1407582112


More information about the hotspot-dev mailing list