Diagnostic command fixes

David Holmes david.holmes at oracle.com
Tue Feb 14 19:03:46 PST 2012


Hi Nils,

I only glanced at this and though the change in thread.cpp a little strange:

3401   // Set flag that basic initialization has completed. Used by 
exceptions and various
3402   // debug stuff, that does not work until all basic classes have 
been initialized.
3403   set_init_completed();
3404
3405 #ifndef USDT2
3406   HS_DTRACE_PROBE(hotspot, vm__init__end);
3407 #else /* USDT2 */
3408   HOTSPOT_VM_INIT_END();
3409 #endif /* USDT2 */
3410
3411   // Must be run after init_ft which initializes ft_enabled
3412   if (TRACE_INITIALIZE() != JNI_OK) {
3413     vm_exit_during_initialization("Failed to initialize tracing 
backend");
3414   }

Seems odd to move something that can abort VM initialization to _after_ 
the point where we have set_init_completed() and posted vm__init__end. 
Surely this should go above there.

Also are we certain that none of the preceding initialization code will 
lead to other TRACE related code that will require that TRACE has 
already been initialized? (I seem to recall from sideband email that 
this had to move until after IllegalArgumentException had been 
initialized incase initialization failed).

Speaking of initializing IllegalArgumentException ... the else clause 
for InitializeJavaLangExceptionsErrors seems to be getting out of sync 
with the if clause. That said I wonder if anything can even work if 
InitializeJavaLangExceptionsErrors were set false?

Cheers,
David

On 14/02/2012 7:58 AM, Nils Loodin wrote:
> Hey all!
>
> The new diagnostic command parser needs some additional specializations for time and bytes, here included.
> Also a few fixes for crashes for some combinations of commandlines.
>
> Tested by throwing a lot of different arguments on the parser, also by running the tests in sun/tools/jcmd.
>
> http://cr.openjdk.java.net/~nloodin/7145243/webrev.00/
>
> I would also need a sponsor to get this in..
>
> Regards
> Nils Loodin


More information about the serviceability-dev mailing list