RFR: JDK-8313632: ciEnv::dump_replay_data use fclose
David Holmes
dholmes at openjdk.org
Fri Aug 4 06:54:38 UTC 2023
On Thu, 3 Aug 2023 08:43:03 GMT, Matthias Baesken <mbaesken 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?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15135#discussion_r1284048435
More information about the hotspot-compiler-dev
mailing list