RFR: 8287761: Make the logging of J2DBench stable
Sergey Bylokhov
serb at openjdk.java.net
Fri Jun 3 05:55:47 UTC 2022
Currently, the logging of the J2DBench differs from run to run. Each time the order of the parameters is random.
For example:
First run: `with to Default Frame, bounce, 1x1, SrcOver, ident, !extraalpha, !xormode, !clip, Default, from transvolimg translucent, !touchsrc, Nearest neighbor`
Next run: `with SrcOver, bounce, Nearest neighbor, ident, !touchsrc, to CompatImage(Opaque), Default, 1x1, !xormode, !clip, from bmcompatimg bitmask, !extraalpha
`
The root cause is that the options are stored in the Hashtable and printed in the "random" order.
The fix replaces the usage of Hashtable by the LinkedHashMap. The code is tested on jdk1.7 and -source/-target 1.4
-------------
Commit messages:
- 8287761: Make the logging of J2DBench stable
Changes: https://git.openjdk.java.net/jdk/pull/9008/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=9008&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8287761
Stats: 28 lines in 2 files changed: 5 ins; 5 del; 18 mod
Patch: https://git.openjdk.java.net/jdk/pull/9008.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/9008/head:pull/9008
PR: https://git.openjdk.java.net/jdk/pull/9008
More information about the client-libs-dev
mailing list