RFR: JDK-8313632: ciEnv::dump_replay_data use fclose
David Holmes
dholmes at openjdk.org
Fri Aug 4 06:54:39 UTC 2023
On Fri, 4 Aug 2023 06:49:41 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Seems we miss to call fclose at the end of ciEnv::dump_replay_data .
>> This should better be done like it is documented here in the fdopen example :
>> https://www.ibm.com/docs/en/i/7.3?topic=functions-fdopen-associates-stream-file-descriptor
>>
>> I also added close calls in case fdopen fails, should we use them too?
>
> src/hotspot/share/ci/ciEnv.cpp line 1711:
>
>> 1709: dump_replay_data(&replay_data_stream);
>> 1710: tty->print_cr("# Compiler replay data is saved as: %s", buffer);
>> 1711: fclose(replay_data_file);
>
> Why are you doing this when the fileStream will close it in the destructor?
Never mind I see the follow up issue to fix this again.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15135#discussion_r1284049850
More information about the hotspot-compiler-dev
mailing list