RFR: 8315652: RISC-V: Features string uses wrong separator for jtreg

Robbin Ehn rehn at openjdk.org
Thu Sep 7 08:53:40 UTC 2023


On Thu, 7 Sep 2023 07:56:40 GMT, Fei Yang <fyang at openjdk.org> wrote:

> 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<String>, 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...]"

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.

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

PR Comment: https://git.openjdk.org/jdk/pull/15579#issuecomment-1709745846


More information about the hotspot-dev mailing list