RFR: 8307766: Linux: Provide the option to override the timer slack [v7]

Aleksey Shipilev shade at openjdk.org
Wed Jul 5 11:16:12 UTC 2023


On Sun, 2 Jul 2023 23:35:55 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Fix exclusion tag
>
> test/hotspot/jtreg/runtime/os/TestTimerSlack.java line 56:
> 
>> 54:             if (defaultSlack == 0) {
>> 55:                 output.reportDiagnosticSummary();
>> 56:                 throw new IllegalStateException("Default slack value (" + defaultSlack + ") is unexpected");
> 
> This pattern is repeated quite a few times. Pity we can't make use of something in OutputAnalyzer directly. A small helper method `fail(String msg)` would avoid the repetition.

Done so in the new commit.

> test/hotspot/jtreg/runtime/os/TestTimerSlack.java line 79:
> 
>> 77:         }
>> 78: 
>> 79:         // Check the timer slack value is accepted by all threads
> 
> I don't see anything thread related in the logic that follows. I expected to see the test program create threads and read back their time-slack values.

Right. I was mostly concentrating on main thread. New commit spawns a few threads explicitly. Alas, we cannot check if those are the same threads, because our printout happens on thread creation path, when `setName` did not yet have a chance to set the thread name.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13889#discussion_r1252945332
PR Review Comment: https://git.openjdk.org/jdk/pull/13889#discussion_r1252946660


More information about the hotspot-runtime-dev mailing list