RFR: 8268425: Show decimal nid of OSThread instead of hex format one [v4]
Yi Yang
yyang at openjdk.java.net
Wed Jun 30 06:01:00 UTC 2021
On Wed, 30 Jun 2021 04:42:19 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
>> Yi Yang has updated the pull request incrementally with one additional commit since the last revision:
>>
>> update copyright
>
> test/hotspot/jtreg/serviceability/sa/JhsdbThreadInfoTest.java line 64:
>
>> 62:
>> 63: out.shouldMatch("\".+\" #\\d+ daemon prio=\\d+ tid=0x[0-9a-f]+ nid=[0-9]+ .+ \\[0x[0-9a-f]+]");
>> 64: out.shouldMatch("\"main\" #\\d+ prio=\\d+ tid=0x[0-9a-f]+ nid=[0-9]+ .+ \\[0x[0-9a-f]+]");
>
> small nit, instead of `[0-9]` you could use `\d`, and to match a hex number `\p{XDigit}` could be used. But since you just follow the existing pattern, I leave it up to you whether you want to change this.
Good catch! [`\p{XDigit}`](https://www.tutorialspoint.com/javaregex/javaregex_posix_class_xdigit.htm) seems a standard/better way to match any hexadecimal character than `[0-9a-fA-F]+`
-------------
PR: https://git.openjdk.java.net/jdk/pull/4449
More information about the serviceability-dev
mailing list