RFR: 8365610: Sort share/jfr includes
Aleksey Shipilev
shade at openjdk.org
Tue Aug 19 10:30:52 UTC 2025
On Fri, 15 Aug 2025 13:32:11 GMT, Francesco Andreuzzi <duke at openjdk.org> wrote:
>> This PR sorts the includes in hotspot/share/jfr using SortIncludes.java. I'm also adding the directory to TestIncludesAreSorted.
>>
>> Testing:
>> - [x] tier1
>> - [x] tier2
>
> src/hotspot/share/jfr/periodic/jfrOSInterface.cpp line 35:
>
>> 33: #include "utilities/ostream.hpp"
>> 34:
>> 35: #include <stdlib.h> // for environment variables
>
> I couldn't find any usage for this include, let me know if it should stay. It's been here for a long time: https://github.com/openjdk/jdk/commit/a060be188df894ed5c26fc12fc9e902f9af32bd3
I suspect it has to do with `generate_environment_variables_events()` here:
https://github.com/openjdk/jdk/pull/26800/files#diff-2d77a162387fd8e8a57c631e91543fa87889a7ef867725ecbfa37804b678fdabR83
Which does not have any implementation. I cannot find any code history about this as well; looks like it was unimplemented from day 1:
% git log -p --follow src/hotspot/ | grep generate_environment_variables_events
+ void generate_environment_variables_events();
So maybe keep this one intact, and submit another quick RFE to clean up both the header inclusion and the dead method declarations? It would also match the synopsis for current PR ("sort") better.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26800#discussion_r2284818979
More information about the hotspot-jfr-dev
mailing list