RFR: 8315652: RISC-V: Features string uses wrong separator for jtreg [v2]
Fei Yang
fyang at openjdk.org
Thu Sep 7 14:21:40 UTC 2023
On Thu, 7 Sep 2023 12:29:03 GMT, Robbin Ehn <rehn at openjdk.org> wrote:
>> Hi, please consider.
>>
>> As described in jbs, this handles both cases with a rough solution by having two strings.
>> Meaning we get e.g. 'v' as a separate feature from CPUInfo, but we still get the pretty string in e.g. hs_err.
>>
>> Tested tier1 on qemu rv.
>
> Robbin Ehn has updated the pull request incrementally with one additional commit since the last revision:
>
> Wrong buffer copied
> > Hi, I have a small question about the JBS description. Where does the comma in the string we are regexping comes from if we use plain space here? I am also wondering if we could do the separation for the original `_features_string`. This would help elimnate changes to the shared code. I guess it might not be a big issue for other places.
>
> CPUInfo.java splits the feature string into a List, so the string supplied to jtreg required annotation is Arrays.toString(). So e.g. "rv64 i g c v zicbop z..." is in a List with strings: "rv64", "i", "g", "c", "v", "zicbop,".... toString() returns: "[rv64, i, g, c, v, zicbop, z...]"
Thanks for the explaination.
> Yes, we could do the separation from the original string but adding a method to parse out everything didn't seem better. I think it actually easier to do the other way around having the feature flags with separator and then remove them for 'pretty' print string. But not clear to me that it would be an improvement, i.e. having more code dealing with strings.
In fact, I mean simply keeping the feature flags with space separators in `_features_string` without removing them for 'pretty' print string. As you mentioned on JBS, then we would have CPU info/desc like:
"CPU: total 16 (initial active 16) rv64 i m a f d c v zicbom zicboz zicbop zba zbb zbs zicsr zifencei zic64b zihintpause"
This seems acceptable to me. Please consider.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/15579#issuecomment-1710239845
More information about the hotspot-dev
mailing list