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

Coleen Phillimore coleenp at openjdk.org
Tue Nov 28 13:10:21 UTC 2023


On Tue, 28 Nov 2023 10:58:08 GMT, Oli Gillespie <ogillespie at openjdk.org> wrote:

>> 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?

I think the footprint savings is probably negligible.  I like the idea that the queue is periodically drained because it might show issues where we've messed up the refcounts, but they'd be hard to debug, so maybe not worth it. So I see neither the harm nor the benefit of draining the queue in the periodic task, but we should have the feature for the one test.

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

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


More information about the hotspot-dev mailing list