Revisit the ThreadList

Description

Currently jlib maintains a list of active threads which is used for displaying in the stack trace and also in the process monitor for mapping busy threads.

Maintaining this list adds an overhead

  • critical sections at the start and end

The critical sections don't add very much

  • maintaining the array. 

If there are large numbers of threads then using an array is inefficient because removing them  becomes expensive (3,000 threads ~2us 30,000 threads ~15us).

See branch ghalliday/activeThreadLinkedList for an implementation.  It seems to slow down small  threads a little (but hard to tell because of variations in timings).

 

Conclusion

None

Activity

Show:
Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Components

Assignee

Reporter

Priority

Fix versions

Pull Request URL

Created April 28, 2022 at 9:01 AM
Updated May 6, 2022 at 1:18 PM
Resolved May 6, 2022 at 1:18 PM