There's a typo in test runner.
-XX:CompileCommand=compileony,compiler.codegen.Test8005033::testBitCount
Because of that, compiler directive fails. It doesn't affect the testing functionality, but HotSpot has to compile all methods encountered.
After correcting the typo, hotspot only compiles the method it is supposed to test. Test time of fastdebug build reduces from 16.778s to 0.226
CompileCommand: An error occurred during parsing
Error: Unrecognized option 'compileony'
Line: 'compileony,compiler.codegen.Test8005033::testBitCount'
Usage: '-XX:CompileCommand=<option>,<method pattern>' - to set boolean option to true
Usage: '-XX:CompileCommand=<option>,<method pattern>,<value>'
Use: '-XX:CompileCommand=help' for more information and to list all option.
EXECUTING test.
SUCCESSFULLY passed test.
STATUS:Passed.
sh ./x.sh 16.72s user 0.33s system 101% cpu 16.778 total
EXECUTING test.
SUCCESSFULLY passed test.
STATUS:Passed.
sh ./x.sh 0.13s user 0.08s system 95% cpu 0.226 total