author | coleenp |
Wed, 24 Jul 2019 10:22:11 -0400 | |
changeset 57511 | 00ae3b739184 |
parent 53244 | 9807daeb47c4 |
permissions | -rw-r--r-- |
50572
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
1 |
/* |
53244
9807daeb47c4
8216167: Update include guards to reflect correct directories
coleenp
parents:
50572
diff
changeset
|
2 |
* Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved. |
50572
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
3 |
* Copyright (c) 2018, SAP SE. All rights reserved. |
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
4 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
5 |
* |
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
6 |
* This code is free software; you can redistribute it and/or modify it |
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
7 |
* under the terms of the GNU General Public License version 2 only, as |
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
8 |
* published by the Free Software Foundation. |
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
9 |
* |
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
10 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
11 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
12 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
13 |
* version 2 for more details (a copy is included in the LICENSE file that |
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
14 |
* accompanied this code). |
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
15 |
* |
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
16 |
* You should have received a copy of the GNU General Public License version |
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
17 |
* 2 along with this work; if not, write to the Free Software Foundation, |
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
18 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
19 |
* |
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
20 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
21 |
* or visit www.oracle.com if you need additional information or have any |
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
22 |
* questions. |
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
23 |
* |
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
24 |
*/ |
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
25 |
|
53244
9807daeb47c4
8216167: Update include guards to reflect correct directories
coleenp
parents:
50572
diff
changeset
|
26 |
#ifndef SHARE_OOPS_REFLECTIONACCESSORIMPLKLASSHELPER_HPP |
9807daeb47c4
8216167: Update include guards to reflect correct directories
coleenp
parents:
50572
diff
changeset
|
27 |
#define SHARE_OOPS_REFLECTIONACCESSORIMPLKLASSHELPER_HPP |
50572
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
28 |
|
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
29 |
#include "memory/allocation.hpp" |
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
30 |
|
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
31 |
class InstanceKlass; |
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
32 |
|
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
33 |
// Helper for classes derived from jdk/internal/reflect/{Method|Constructor}AccessorImpl: |
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
34 |
// offers convenience functions to extract the names of target class/method/signature |
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
35 |
// from the constant pool of these classes. |
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
36 |
class ReflectionAccessorImplKlassHelper: public AllStatic { |
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
37 |
|
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
38 |
// Returns true if k is of type jdk/internal/reflect/GeneratedMethodAccessorXXX. |
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
39 |
static bool is_generated_method_accessor(const InstanceKlass* k); |
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
40 |
|
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
41 |
// Returns true if k is of type jdk/internal/reflect/GeneratedConstructorAccessorXXX. |
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
42 |
static bool is_generated_constructor_accessor(const InstanceKlass* k); |
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
43 |
|
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
44 |
// Returns true if k is of type jdk/internal/reflect/GeneratedSerializationConstructorAccessorXXX. |
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
45 |
static bool is_generated_method_serialization_constructor_accessor(const InstanceKlass* k); |
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
46 |
|
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
47 |
// Assuming k is of type jdk/internal/reflect/Generated{SerializationConstructor|Constructor|Method}AccessorXXX, |
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
48 |
// the name of the target class as resource-area allocated string. |
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
49 |
static const char* get_target_class_name(const InstanceKlass* k); |
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
50 |
|
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
51 |
// Assuming k is of type jdk/internal/reflect/Generated{SerializationConstructor|Constructor|Method}AccessorXXX, |
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
52 |
// the name of the target method as resource-area allocated string. |
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
53 |
static const char* get_target_method_name(const InstanceKlass* k); |
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
54 |
|
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
55 |
// Assuming k is of type jdk/internal/reflect/Generated{SerializationConstructor|Constructor|Method}AccessorXXX, |
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
56 |
// the signature of the target method as resource-area allocated string. |
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
57 |
static const char* get_target_method_signature(const InstanceKlass* k); |
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
58 |
|
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
59 |
public: |
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
60 |
|
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
61 |
// Returns true if k is of type jdk/internal/reflect/Generated{SerializationConstructor|Constructor|Method}AccessorXXX |
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
62 |
// and it is safe to call print_invocation_target(k) |
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
63 |
static bool is_generated_accessor(const Klass* k); |
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
64 |
|
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
65 |
// Assuming k is of type jdk/internal/reflect/Generated{SerializationConstructor|Constructor|Method}AccessorXXX, |
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
66 |
// print out target class, method, signature in one line. |
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
67 |
static void print_invocation_target(outputStream* out, Klass* k); |
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
68 |
|
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
69 |
}; |
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
70 |
|
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
71 |
|
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
72 |
|
6d4332f746ad
8203343: VM.{metaspace|classloaders|classhierarchy...} jcmd should show invocation targets for Generated{Method|Constructor}AccessorImpl classes
stuefe
parents:
diff
changeset
|
73 |
|
53244
9807daeb47c4
8216167: Update include guards to reflect correct directories
coleenp
parents:
50572
diff
changeset
|
74 |
#endif // SHARE_OOPS_REFLECTIONACCESSORIMPLKLASSHELPER_HPP |