RFR: 8356372: JVMTI heap sampling not working properly with outside TLAB allocations [v3]
Stefan Karlsson
stefank at openjdk.org
Mon May 19 07:24:56 UTC 2025
On Fri, 16 May 2025 18:54:20 GMT, Serguei Spitsyn <sspitsyn at openjdk.org> wrote:
>> Stefan Karlsson has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Apply suggestions from code review
>>
>> Co-authored-by: Stefan Johansson <54407259+kstefanj at users.noreply.github.com>
>
> 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.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25114#discussion_r2095012687
More information about the hotspot-dev
mailing list