RFR: 8134540: Much nearly duplicated code for PerfMemory support [v3]

Thomas Stuefe stuefe at openjdk.java.net
Tue Jan 19 07:16:45 UTC 2021


On Mon, 18 Jan 2021 05:16:46 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Harold Seigel has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   8134540 change AIX specific code to use same code as other unix's
>
> Hi Harold,
> 
> Thanks for the updates. Still some scope for future refactoring for Linux specific container stuff, but this looks good enough to me.
> 
> Thanks,
> David

Hi Harold,

AIX build breaks with your change because you have a typo there (do you use vi?)

With this fix it builds:

--- a/src/hotspot/os/posix/perfMemory_posix.cpp
+++ b/src/hotspot/os/posix/perfMemory_posix.cpp
@@ -342,7 +342,7 @@ static DIR *open_directory_secure(const char* dirname) {
   }

   // Check to make sure fd and dirp are referencing the same file system object.
-  if (!is_same_fsobject(fd, AIX_ONLY(dirp->dd_fdi) NOT_AIX(dirfd(dirp)))) {
+  if (!is_same_fsobject(fd, AIX_ONLY(dirp->dd_fd) NOT_AIX(dirfd(dirp)))) {
     // The directory is not secure.
     os::close(fd);
     os::closedir(dirp);

No tests ran yet because of this, but I'll reschedule the AIX tests.

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

PR: https://git.openjdk.java.net/jdk/pull/2037


More information about the hotspot-runtime-dev mailing list