src/hotspot/share/services/stathistDCmd.hpp
branchstuefe-statistical-history
changeset 57221 9653470b7294
equal deleted inserted replaced
53949:4a99d3a6a86d 57221:9653470b7294
       
     1 /*
       
     2  * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
       
     3  * Copyright (c) 2018, SAP SE.
       
     4  *
       
     5  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       
     6  *
       
     7  * This code is free software; you can redistribute it and/or modify it
       
     8  * under the terms of the GNU General Public License version 2 only, as
       
     9  * published by the Free Software Foundation.
       
    10  *
       
    11  * This code is distributed in the hope that it will be useful, but WITHOUT
       
    12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
       
    13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
       
    14  * version 2 for more details (a copy is included in the LICENSE file that
       
    15  * accompanied this code).
       
    16  *
       
    17  * You should have received a copy of the GNU General Public License version
       
    18  * 2 along with this work; if not, write to the Free Software Foundation,
       
    19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
       
    20  *
       
    21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
       
    22  * or visit www.oracle.com if you need additional information or have any
       
    23  * questions.
       
    24  *
       
    25  */
       
    26 
       
    27 
       
    28 #ifndef HOTSPOT_SHARE_SERVICES_STATHIST_INTERNALS_HPP
       
    29 #define HOTSPOT_SHARE_SERVICES_STATHIST_INTERNALS_HPP
       
    30 
       
    31 #include "services/diagnosticCommand.hpp"
       
    32 
       
    33 namespace StatisticsHistory {
       
    34 
       
    35 class StatHistDCmd : public DCmdWithParser {
       
    36 protected:
       
    37   DCmdArgument<char*> _scale;
       
    38   DCmdArgument<bool> _cvs;
       
    39   DCmdArgument<bool> _no_legend;
       
    40 #ifdef ASSERT
       
    41   DCmdArgument<bool> _raw;
       
    42 #endif
       
    43 public:
       
    44   StatHistDCmd(outputStream* output, bool heap);
       
    45   static const char* name() {
       
    46     return "VM.stathist";
       
    47   }
       
    48   static const char* description() {
       
    49     return "Provide statistics history.";
       
    50   }
       
    51   static const char* impact() {
       
    52     return "Low.";
       
    53   }
       
    54   static const JavaPermission permission() {
       
    55     JavaPermission p = {"java.lang.management.ManagementPermission",
       
    56                         "monitor", NULL};
       
    57     return p;
       
    58   }
       
    59   static int num_arguments();
       
    60   virtual void execute(DCmdSource source, TRAPS);
       
    61 };
       
    62 
       
    63 }; // namespace StatisticsHistory
       
    64 
       
    65 #endif /* HOTSPOT_SHARE_SERVICES_STATHIST_INTERNALS_HPP */