hotspot/src/share/vm/services/diagnosticCommand.cpp
changeset 24424 2658d7834c6e
parent 23517 27c4307d6cda
child 25051 8110ec6e7340
equal deleted inserted replaced
24358:8528b67f6562 24424:2658d7834c6e
     1 /*
     1 /*
     2  * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    30 #include "services/diagnosticCommand.hpp"
    30 #include "services/diagnosticCommand.hpp"
    31 #include "services/diagnosticFramework.hpp"
    31 #include "services/diagnosticFramework.hpp"
    32 #include "services/heapDumper.hpp"
    32 #include "services/heapDumper.hpp"
    33 #include "services/management.hpp"
    33 #include "services/management.hpp"
    34 #include "utilities/macros.hpp"
    34 #include "utilities/macros.hpp"
       
    35 
       
    36 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
    35 
    37 
    36 void DCmdRegistrant::register_dcmds(){
    38 void DCmdRegistrant::register_dcmds(){
    37   // Registration of the diagnostic commands
    39   // Registration of the diagnostic commands
    38   // First argument specifies which interfaces will export the command
    40   // First argument specifies which interfaces will export the command
    39   // Second argument specifies if the command is enabled
    41   // Second argument specifies if the command is enabled
    99     DCmdFactory* factory = DCmdFactory::factory(source, _cmd.value(),
   101     DCmdFactory* factory = DCmdFactory::factory(source, _cmd.value(),
   100                                                 strlen(_cmd.value()));
   102                                                 strlen(_cmd.value()));
   101     if (factory != NULL) {
   103     if (factory != NULL) {
   102       output()->print_cr("%s%s", factory->name(),
   104       output()->print_cr("%s%s", factory->name(),
   103                          factory->is_enabled() ? "" : " [disabled]");
   105                          factory->is_enabled() ? "" : " [disabled]");
   104       output()->print_cr(factory->description());
   106       output()->print_cr("%s", factory->description());
   105       output()->print_cr("\nImpact: %s", factory->impact());
   107       output()->print_cr("\nImpact: %s", factory->impact());
   106       JavaPermission p = factory->permission();
   108       JavaPermission p = factory->permission();
   107       if(p._class != NULL) {
   109       if(p._class != NULL) {
   108         if(p._action != NULL) {
   110         if(p._action != NULL) {
   109           output()->print_cr("\nPermission: %s(%s, %s)",
   111           output()->print_cr("\nPermission: %s(%s, %s)",