8231627: ThreadsListHandleInErrorHandlingTest.java fails in printing all threads

Reviewed-by: eosterlund, coleenp, pchilanomate, sspitsyn
This commit is contained in:
Daniel D. Daugherty 2021-01-06 14:34:55 +00:00
parent 7e01bc967d
commit c0540ffda9
3 changed files with 85 additions and 62 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -93,8 +93,10 @@ public class NestedThreadsListHandleInErrorHandlingTest {
Pattern.compile("Current thread .* _threads_hazard_ptr=0x[0-9A-Fa-f][0-9A-Fa-f]*, _nested_threads_hazard_ptr_cnt=1, _nested_threads_hazard_ptr=0x[0-9A-Fa-f][0-9A-Fa-f]*.*"),
// We should have a section of Threads class SMR info:
Pattern.compile("Threads class SMR info:"),
// We should have one nested ThreadsListHandle:
Pattern.compile(".*, _nested_thread_list_max=1"),
// We should have had a double nested ThreadsListHandle since
// ThreadsSMRSupport::print_info_on() now protects itself with
// a ThreadsListHandle in addition to what the test creates:
Pattern.compile(".*, _nested_thread_list_max=2"),
// The current thread (marked with '=>') in the threads list
// should show a hazard ptr and a nested hazard ptr:
Pattern.compile("=>.* JavaThread \"main\" .* _threads_hazard_ptr=0x[0-9A-Fa-f][0-9A-Fa-f]*, _nested_threads_hazard_ptr_cnt=1, _nested_threads_hazard_ptr=0x[0-9A-Fa-f][0-9A-Fa-f]*.*"),

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -93,6 +93,10 @@ public class ThreadsListHandleInErrorHandlingTest {
Pattern.compile("Current thread .* _threads_hazard_ptr=0x[0-9A-Fa-f][0-9A-Fa-f]*, _nested_threads_hazard_ptr_cnt=0.*"),
// We should have a section of Threads class SMR info:
Pattern.compile("Threads class SMR info:"),
// We should have had a single nested ThreadsListHandle since
// ThreadsSMRSupport::print_info_on() now protects itself with
// a ThreadsListHandle:
Pattern.compile(".*, _nested_thread_list_max=1"),
// The current thread (marked with '=>') in the threads list
// should show a hazard ptr and no nested hazard ptrs:
Pattern.compile("=>.* JavaThread \"main\" .* _threads_hazard_ptr=0x[0-9A-Fa-f][0-9A-Fa-f]*, _nested_threads_hazard_ptr_cnt=0.*"),