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