Printing the compiler thread when the process gets a SIGQUIT

David Holmes david.holmes at oracle.com
Wed Jan 8 21:41:18 PST 2014


Hi Jeremy,

On 9/01/2014 8:45 AM, Jeremy Manson wrote:
> Hi folks,
>
> We've found it useful to have a complete list of threads when we handle
> a SIGQUIT.  Hotspot currently prints out the VM thread and the GC
> threads, but not the compiler threads.  Follows a patch to make it do
> this.  Any interest, or was there a reason that compiler thread printing
> was never implemented?

I think you'd need to ask the compiler folk rather than runtime folk so 
cc'ing hotspot-dev to broaden the audience - and hopefully find a 
sponsor for this. :)

Looking at the patch you use:

  _name = NEW_C_HEAP_ARRAY(char, strlen(name) + 1, mtInternal);

whereas NamedThread uses:

_name = NEW_C_HEAP_ARRAY(char, max_name_len, mtThread);

I don't know whether mtInternal or mtThread is the appropriate selection 
here.

> (Not sure whether I should delete the associated memory or not...  There
> seems to be very little cleanup from compiler threads, or attempt to
> shut them down.)

I'd opt for doing the free in the destructor as NamedThread does.

Thanks,
David

> Jeremy


More information about the hotspot-dev mailing list