author | naoto |
Tue, 09 Jul 2019 08:05:38 -0700 | |
changeset 55627 | 9c1885fb2a42 |
parent 54896 | ea619918de95 |
child 57828 | 35db8fba55f9 |
permissions | -rw-r--r-- |
46505 | 1 |
/* |
53244
9807daeb47c4
8216167: Update include guards to reflect correct directories
coleenp
parents:
51567
diff
changeset
|
2 |
* Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved. |
46505 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
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 |
|
7 |
* published by the Free Software Foundation. |
|
8 |
* |
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
13 |
* accompanied this code). |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License version |
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
18 |
* |
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
20 |
* or visit www.oracle.com if you need additional information or have any |
|
21 |
* questions. |
|
22 |
* |
|
23 |
*/ |
|
24 |
||
53244
9807daeb47c4
8216167: Update include guards to reflect correct directories
coleenp
parents:
51567
diff
changeset
|
25 |
#ifndef SHARE_PRIMS_RESOLVEDMETHODTABLE_HPP |
9807daeb47c4
8216167: Update include guards to reflect correct directories
coleenp
parents:
51567
diff
changeset
|
26 |
#define SHARE_PRIMS_RESOLVEDMETHODTABLE_HPP |
46505 | 27 |
|
54511
fbfcebad8e66
8221393: ResolvedMethodTable too small for StackWalking applications
stefank
parents:
53924
diff
changeset
|
28 |
#include "gc/shared/oopStorage.hpp" |
fbfcebad8e66
8221393: ResolvedMethodTable too small for StackWalking applications
stefank
parents:
53924
diff
changeset
|
29 |
#include "memory/allocation.hpp" |
46505 | 30 |
#include "oops/symbol.hpp" |
49818
e57e6addb978
8201505: Use WeakHandle for ProtectionDomainCacheTable and ResolvedMethodTable
coleenp
parents:
48615
diff
changeset
|
31 |
#include "oops/weakHandle.hpp" |
46505 | 32 |
|
54511
fbfcebad8e66
8221393: ResolvedMethodTable too small for StackWalking applications
stefank
parents:
53924
diff
changeset
|
33 |
class ResolvedMethodTable; |
fbfcebad8e66
8221393: ResolvedMethodTable too small for StackWalking applications
stefank
parents:
53924
diff
changeset
|
34 |
class ResolvedMethodTableConfig; |
46505 | 35 |
|
54511
fbfcebad8e66
8221393: ResolvedMethodTable too small for StackWalking applications
stefank
parents:
53924
diff
changeset
|
36 |
class ResolvedMethodTable : public AllStatic { |
fbfcebad8e66
8221393: ResolvedMethodTable too small for StackWalking applications
stefank
parents:
53924
diff
changeset
|
37 |
static OopStorage* _weak_handles; |
46505 | 38 |
|
54511
fbfcebad8e66
8221393: ResolvedMethodTable too small for StackWalking applications
stefank
parents:
53924
diff
changeset
|
39 |
static volatile bool _has_work; |
46505 | 40 |
public: |
54511
fbfcebad8e66
8221393: ResolvedMethodTable too small for StackWalking applications
stefank
parents:
53924
diff
changeset
|
41 |
// Initialization |
fbfcebad8e66
8221393: ResolvedMethodTable too small for StackWalking applications
stefank
parents:
53924
diff
changeset
|
42 |
static void create_table(); |
46505 | 43 |
|
54511
fbfcebad8e66
8221393: ResolvedMethodTable too small for StackWalking applications
stefank
parents:
53924
diff
changeset
|
44 |
static size_t table_size(); |
fbfcebad8e66
8221393: ResolvedMethodTable too small for StackWalking applications
stefank
parents:
53924
diff
changeset
|
45 |
|
fbfcebad8e66
8221393: ResolvedMethodTable too small for StackWalking applications
stefank
parents:
53924
diff
changeset
|
46 |
// Lookup and inserts |
fbfcebad8e66
8221393: ResolvedMethodTable too small for StackWalking applications
stefank
parents:
53924
diff
changeset
|
47 |
static oop find_method(const Method* method); |
fbfcebad8e66
8221393: ResolvedMethodTable too small for StackWalking applications
stefank
parents:
53924
diff
changeset
|
48 |
static oop add_method(const Method* method, Handle rmethod_name); |
46505 | 49 |
|
54511
fbfcebad8e66
8221393: ResolvedMethodTable too small for StackWalking applications
stefank
parents:
53924
diff
changeset
|
50 |
// Callbacks |
fbfcebad8e66
8221393: ResolvedMethodTable too small for StackWalking applications
stefank
parents:
53924
diff
changeset
|
51 |
static void item_added(); |
fbfcebad8e66
8221393: ResolvedMethodTable too small for StackWalking applications
stefank
parents:
53924
diff
changeset
|
52 |
static void item_removed(); |
fbfcebad8e66
8221393: ResolvedMethodTable too small for StackWalking applications
stefank
parents:
53924
diff
changeset
|
53 |
|
fbfcebad8e66
8221393: ResolvedMethodTable too small for StackWalking applications
stefank
parents:
53924
diff
changeset
|
54 |
// Cleaning |
54896
ea619918de95
8223956: Make SymbolTable and StringTable AllStatic
coleenp
parents:
54574
diff
changeset
|
55 |
static bool has_work() { return _has_work; } |
46505 | 56 |
|
54511
fbfcebad8e66
8221393: ResolvedMethodTable too small for StackWalking applications
stefank
parents:
53924
diff
changeset
|
57 |
// GC Support - Backing storage for the oop*s |
54896
ea619918de95
8223956: Make SymbolTable and StringTable AllStatic
coleenp
parents:
54574
diff
changeset
|
58 |
static OopStorage* weak_storage() { return _weak_handles; } |
54511
fbfcebad8e66
8221393: ResolvedMethodTable too small for StackWalking applications
stefank
parents:
53924
diff
changeset
|
59 |
|
fbfcebad8e66
8221393: ResolvedMethodTable too small for StackWalking applications
stefank
parents:
53924
diff
changeset
|
60 |
// Cleaning and table management |
fbfcebad8e66
8221393: ResolvedMethodTable too small for StackWalking applications
stefank
parents:
53924
diff
changeset
|
61 |
|
fbfcebad8e66
8221393: ResolvedMethodTable too small for StackWalking applications
stefank
parents:
53924
diff
changeset
|
62 |
static double get_load_factor(); |
fbfcebad8e66
8221393: ResolvedMethodTable too small for StackWalking applications
stefank
parents:
53924
diff
changeset
|
63 |
static double get_dead_factor(); |
51472
eb97d1a319f9
8206423: Use locking for cleaning ResolvedMethodTable
pchilanomate
parents:
49818
diff
changeset
|
64 |
|
54511
fbfcebad8e66
8221393: ResolvedMethodTable too small for StackWalking applications
stefank
parents:
53924
diff
changeset
|
65 |
static void check_concurrent_work(); |
fbfcebad8e66
8221393: ResolvedMethodTable too small for StackWalking applications
stefank
parents:
53924
diff
changeset
|
66 |
static void trigger_concurrent_work(); |
fbfcebad8e66
8221393: ResolvedMethodTable too small for StackWalking applications
stefank
parents:
53924
diff
changeset
|
67 |
static void do_concurrent_work(JavaThread* jt); |
51567
0c4f2b26849e
8209844: MemberNameLeak.java fails when ResolvedMethod entry is not removed
pchilanomate
parents:
51472
diff
changeset
|
68 |
|
54511
fbfcebad8e66
8221393: ResolvedMethodTable too small for StackWalking applications
stefank
parents:
53924
diff
changeset
|
69 |
static void grow(JavaThread* jt); |
fbfcebad8e66
8221393: ResolvedMethodTable too small for StackWalking applications
stefank
parents:
53924
diff
changeset
|
70 |
static void clean_dead_entries(JavaThread* jt); |
fbfcebad8e66
8221393: ResolvedMethodTable too small for StackWalking applications
stefank
parents:
53924
diff
changeset
|
71 |
|
fbfcebad8e66
8221393: ResolvedMethodTable too small for StackWalking applications
stefank
parents:
53924
diff
changeset
|
72 |
// GC Notification |
46505 | 73 |
|
54511
fbfcebad8e66
8221393: ResolvedMethodTable too small for StackWalking applications
stefank
parents:
53924
diff
changeset
|
74 |
// Must be called before a parallel walk where objects might die. |
fbfcebad8e66
8221393: ResolvedMethodTable too small for StackWalking applications
stefank
parents:
53924
diff
changeset
|
75 |
static void reset_dead_counter(); |
fbfcebad8e66
8221393: ResolvedMethodTable too small for StackWalking applications
stefank
parents:
53924
diff
changeset
|
76 |
// After the parallel walk this method must be called to trigger |
fbfcebad8e66
8221393: ResolvedMethodTable too small for StackWalking applications
stefank
parents:
53924
diff
changeset
|
77 |
// cleaning. Note it might trigger a resize instead. |
fbfcebad8e66
8221393: ResolvedMethodTable too small for StackWalking applications
stefank
parents:
53924
diff
changeset
|
78 |
static void finish_dead_counter(); |
fbfcebad8e66
8221393: ResolvedMethodTable too small for StackWalking applications
stefank
parents:
53924
diff
changeset
|
79 |
// If GC uses ParState directly it should add the number of cleared |
fbfcebad8e66
8221393: ResolvedMethodTable too small for StackWalking applications
stefank
parents:
53924
diff
changeset
|
80 |
// entries to this method. |
fbfcebad8e66
8221393: ResolvedMethodTable too small for StackWalking applications
stefank
parents:
53924
diff
changeset
|
81 |
static void inc_dead_counter(size_t ndead); |
46505 | 82 |
|
54511
fbfcebad8e66
8221393: ResolvedMethodTable too small for StackWalking applications
stefank
parents:
53924
diff
changeset
|
83 |
// JVMTI Support - It is called at safepoint only for RedefineClasses |
fbfcebad8e66
8221393: ResolvedMethodTable too small for StackWalking applications
stefank
parents:
53924
diff
changeset
|
84 |
JVMTI_ONLY(static void adjust_method_entries(bool * trace_name_printed);) |
fbfcebad8e66
8221393: ResolvedMethodTable too small for StackWalking applications
stefank
parents:
53924
diff
changeset
|
85 |
|
fbfcebad8e66
8221393: ResolvedMethodTable too small for StackWalking applications
stefank
parents:
53924
diff
changeset
|
86 |
// Debugging |
fbfcebad8e66
8221393: ResolvedMethodTable too small for StackWalking applications
stefank
parents:
53924
diff
changeset
|
87 |
static size_t items_count(); |
54574 | 88 |
static void verify(); |
46505 | 89 |
}; |
90 |
||
53244
9807daeb47c4
8216167: Update include guards to reflect correct directories
coleenp
parents:
51567
diff
changeset
|
91 |
#endif // SHARE_PRIMS_RESOLVEDMETHODTABLE_HPP |