You can use
ManagementFactory.getThreadMXBean().getCurrentThreadCpuTime()
and
ManagementFactory.getThreadMXBean().getThreadCpuTime()
to get the CPU time consumed by threads.
If you use a Custom ThreadGroup or poll you
Thread periodically, you can collect this information for Threads which die.