Re: RFR(S): 8240360: NativeLibraryEvent has wrong library name on Linux

Denghui Dong denghui.ddh at alibaba-inc.com
Tue Mar 10 06:16:28 UTC 2020


Hi,
I used a new way to fix this problem.
Ignore "perms", "offset" and "device" fields by "%*s" so that we don't need to be concerned about the length of the device,
and use "inode" instead of "device" for filtering.

Webrev: http://cr.openjdk.java.net/~ddong/8240360/webrev.01/

Could you review it?

Thanks,
Denghui Dong

------------------------------------------------------------------
From:董登辉(卓昂) <denghui.ddh at alibaba-inc.com>
Send Time:2020年3月4日(星期三) 12:05
To:hotspot-jfr-dev <hotspot-jfr-dev at openjdk.java.net>
Subject:Re: RFR(S): 8240360: NativeLibraryEvent has wrong library name on Linux

Testing: jdk/jfr all passed.
------------------------------------------------------------------
From:董登辉(卓昂) <denghui.ddh at alibaba-inc.com>
Send Time:2020年3月3日(星期二) 22:25
To:hotspot-jfr-dev <hotspot-jfr-dev at openjdk.java.net>
Subject:RFR(S): 8240360: NativeLibraryEvent has wrong library name on Linux

Hi team,

I found TestNativeLibrariesEvent is always failed in my Linux environment.

The root cause is that os::get_loaded_modules_info in os_linux.cpp can not read library name correctly,
because the device number in my Linux environment is 103:01, the format passed to sscanf can't identify
it.

I found the limit of major and minor device number in Linux from 
https://github.com/torvalds/linux/blob/master/include/linux/kdev_t.h, and made this patch.

Please review this small change that fixes this problem.

Bug: https://bugs.openjdk.java.net/browse/JDK-8240360
Webrev: http://cr.openjdk.java.net/~ddong/8240360/webrev.00/


Thanks
Denghui Dong


More information about the hotspot-jfr-dev mailing list