author | simonis |
Tue, 19 Jun 2018 09:43:53 +0200 | |
changeset 50625 | d9753e3db0c6 |
parent 50443 | 8e56de95ce10 |
child 50863 | 9084fd587141 |
permissions | -rw-r--r-- |
50443
8e56de95ce10
8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details
stuefe
parents:
diff
changeset
|
1 |
/* |
8e56de95ce10
8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details
stuefe
parents:
diff
changeset
|
2 |
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. |
8e56de95ce10
8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details
stuefe
parents:
diff
changeset
|
3 |
* Copyright (c) 2018 SAP SE. All rights reserved. |
8e56de95ce10
8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details
stuefe
parents:
diff
changeset
|
4 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
8e56de95ce10
8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details
stuefe
parents:
diff
changeset
|
5 |
* |
8e56de95ce10
8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details
stuefe
parents:
diff
changeset
|
6 |
* This code is free software; you can redistribute it and/or modify it |
8e56de95ce10
8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details
stuefe
parents:
diff
changeset
|
7 |
* under the terms of the GNU General Public License version 2 only, as |
8e56de95ce10
8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details
stuefe
parents:
diff
changeset
|
8 |
* published by the Free Software Foundation. |
8e56de95ce10
8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details
stuefe
parents:
diff
changeset
|
9 |
* |
8e56de95ce10
8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details
stuefe
parents:
diff
changeset
|
10 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
8e56de95ce10
8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details
stuefe
parents:
diff
changeset
|
11 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
8e56de95ce10
8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details
stuefe
parents:
diff
changeset
|
12 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
8e56de95ce10
8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details
stuefe
parents:
diff
changeset
|
13 |
* version 2 for more details (a copy is included in the LICENSE file that |
8e56de95ce10
8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details
stuefe
parents:
diff
changeset
|
14 |
* accompanied this code). |
8e56de95ce10
8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details
stuefe
parents:
diff
changeset
|
15 |
* |
8e56de95ce10
8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details
stuefe
parents:
diff
changeset
|
16 |
* You should have received a copy of the GNU General Public License version |
8e56de95ce10
8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details
stuefe
parents:
diff
changeset
|
17 |
* 2 along with this work; if not, write to the Free Software Foundation, |
8e56de95ce10
8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details
stuefe
parents:
diff
changeset
|
18 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
8e56de95ce10
8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details
stuefe
parents:
diff
changeset
|
19 |
* |
8e56de95ce10
8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details
stuefe
parents:
diff
changeset
|
20 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
8e56de95ce10
8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details
stuefe
parents:
diff
changeset
|
21 |
* or visit www.oracle.com if you need additional information or have any |
8e56de95ce10
8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details
stuefe
parents:
diff
changeset
|
22 |
* questions. |
8e56de95ce10
8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details
stuefe
parents:
diff
changeset
|
23 |
* |
8e56de95ce10
8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details
stuefe
parents:
diff
changeset
|
24 |
*/ |
8e56de95ce10
8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details
stuefe
parents:
diff
changeset
|
25 |
|
8e56de95ce10
8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details
stuefe
parents:
diff
changeset
|
26 |
#ifndef HOTSPOT_SHARE_CLASSFILE_CLASSLOADERHIERARCHYDCMD_HPP_ |
8e56de95ce10
8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details
stuefe
parents:
diff
changeset
|
27 |
#define HOTSPOT_SHARE_CLASSFILE_CLASSLOADERHIERARCHYDCMD_HPP_ |
8e56de95ce10
8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details
stuefe
parents:
diff
changeset
|
28 |
|
8e56de95ce10
8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details
stuefe
parents:
diff
changeset
|
29 |
#include "services/diagnosticCommand.hpp" |
8e56de95ce10
8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details
stuefe
parents:
diff
changeset
|
30 |
|
8e56de95ce10
8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details
stuefe
parents:
diff
changeset
|
31 |
class ClassLoaderHierarchyDCmd: public DCmdWithParser { |
8e56de95ce10
8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details
stuefe
parents:
diff
changeset
|
32 |
DCmdArgument<bool> _show_classes; |
8e56de95ce10
8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details
stuefe
parents:
diff
changeset
|
33 |
DCmdArgument<bool> _verbose; |
8e56de95ce10
8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details
stuefe
parents:
diff
changeset
|
34 |
public: |
8e56de95ce10
8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details
stuefe
parents:
diff
changeset
|
35 |
|
8e56de95ce10
8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details
stuefe
parents:
diff
changeset
|
36 |
ClassLoaderHierarchyDCmd(outputStream* output, bool heap); |
8e56de95ce10
8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details
stuefe
parents:
diff
changeset
|
37 |
|
8e56de95ce10
8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details
stuefe
parents:
diff
changeset
|
38 |
static const char* name() { |
8e56de95ce10
8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details
stuefe
parents:
diff
changeset
|
39 |
return "VM.classloaders"; |
8e56de95ce10
8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details
stuefe
parents:
diff
changeset
|
40 |
} |
8e56de95ce10
8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details
stuefe
parents:
diff
changeset
|
41 |
|
8e56de95ce10
8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details
stuefe
parents:
diff
changeset
|
42 |
static const char* description() { |
8e56de95ce10
8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details
stuefe
parents:
diff
changeset
|
43 |
return "Prints classloader hierarchy."; |
8e56de95ce10
8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details
stuefe
parents:
diff
changeset
|
44 |
} |
8e56de95ce10
8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details
stuefe
parents:
diff
changeset
|
45 |
static const char* impact() { |
8e56de95ce10
8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details
stuefe
parents:
diff
changeset
|
46 |
return "Medium: Depends on number of class loaders and classes loaded."; |
8e56de95ce10
8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details
stuefe
parents:
diff
changeset
|
47 |
} |
8e56de95ce10
8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details
stuefe
parents:
diff
changeset
|
48 |
static const JavaPermission permission() { |
8e56de95ce10
8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details
stuefe
parents:
diff
changeset
|
49 |
JavaPermission p = {"java.lang.management.ManagementPermission", |
8e56de95ce10
8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details
stuefe
parents:
diff
changeset
|
50 |
"monitor", NULL}; |
8e56de95ce10
8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details
stuefe
parents:
diff
changeset
|
51 |
return p; |
8e56de95ce10
8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details
stuefe
parents:
diff
changeset
|
52 |
} |
8e56de95ce10
8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details
stuefe
parents:
diff
changeset
|
53 |
static int num_arguments(); |
8e56de95ce10
8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details
stuefe
parents:
diff
changeset
|
54 |
virtual void execute(DCmdSource source, TRAPS); |
8e56de95ce10
8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details
stuefe
parents:
diff
changeset
|
55 |
|
8e56de95ce10
8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details
stuefe
parents:
diff
changeset
|
56 |
}; |
8e56de95ce10
8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details
stuefe
parents:
diff
changeset
|
57 |
|
8e56de95ce10
8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details
stuefe
parents:
diff
changeset
|
58 |
#endif /* HOTSPOT_SHARE_CLASSFILE_CLASSLOADERHIERARCHYDCMD_HPP_ */ |