RFR: 8356372: JVMTI heap sampling not working properly with outside TLAB allocations [v3]

Serguei Spitsyn sspitsyn at openjdk.org
Mon May 19 09:28:54 UTC 2025


On Mon, 19 May 2025 07:22:06 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:

>> src/hotspot/share/runtime/threadHeapSampler.hpp line 92:
>> 
>>> 90:   }
>>> 91: 
>>> 92:   size_t bytes_since_last_sample(HeapWord* tlab_top) const {
>> 
>> Nit: I wonder if we can make names shorter with replacing:
>>   `bytes_since_last_sample` => `unsampled_bytes`
>
> I had it like that but previous reviewers complained about the name. I made it longer to make sure that it is as clear as possible what this value is about. IMHO, one of the reasons why this code was hard to figure out why it was broken was because the names where not precise enough to explain what was stored in the variables.
> 
> Let me try to go the other way and completely remove the "unsampled" name. And then you can take a look and see if you really hate it and if you do I'll take a stab at finding some shorter names that still are descriptive for the casual reader.

Okay, thanks.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25114#discussion_r2095271858


More information about the hotspot-dev mailing list