Commit 1981e13
committed
Implement KnownObjectTable caching
This commit is mainly for the benefit of JITServer.
Experiments have shows that addKnownObjectConstraints() function used
by GlobalVP generates many server-client messages when calling:
fej9()->getObjectClassInfoFromObjectReferenceLocation() to fetch
some class information about a particular known object.
This commit implements a caching mechanism for that class information as described below:
An entry in the knownObjectTable is extended to include the following fields:
uintptr_t *_jniReference; // This existed before this commit
TR_OpaqueClassBlock *_clazz;
TR_OpaqueClassBlock *_jlClass;
bool _isFixedJavaLangClass;
bool _isString;
When a new entry is added into the knownObjectTable, only the
"old" field _jniReference will be populated; the others will
be set to default values, NULL or false.
If GlobalVP is asking about the other fields and they are not
yet populated, the server will send a message, find the value
of these other fields and store them into the knownObjectTable.
If these fields are already populated when GlobalVP asks about
them, they will be immediately retrieved from the
knownObjectTable entry, saving a message.
Note that the same caching mechanism is going to be used at
the client, but the benefit is expected to be low.
Experimental results have shown a 84% reduction of the messages
sent by the server during addKnownObjectConstraints().
There are two options that control this feature:
-Xjit:disableKnownObjectTableCaching disables the caching
mechanism and always asks the client for the desired information.
-Xjit:enableKnownObjectTableCachingVerification when caching is
enabled this option always sends a message to the client,
fetches the desired information and then compares it against
the cached information. If the two don't match, a fatal assert is
triggered.
Depends on: eclipse-omr/omr#8056
Signed-off-by: Marius Pirvu <[email protected]>1 parent c05527b commit 1981e13
File tree
11 files changed
+175
-114
lines changed- runtime/compiler
- compile
- control
- env
- net
11 files changed
+175
-114
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
851 | 851 | | |
852 | 852 | | |
853 | 853 | | |
854 | | - | |
855 | | - | |
856 | | - | |
857 | | - | |
858 | | - | |
859 | | - | |
860 | | - | |
861 | | - | |
862 | | - | |
863 | | - | |
864 | | - | |
865 | | - | |
866 | | - | |
| 854 | + | |
| 855 | + | |
867 | 856 | | |
868 | | - | |
869 | | - | |
870 | 857 | | |
871 | 858 | | |
872 | 859 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
673 | 673 | | |
674 | 674 | | |
675 | 675 | | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
676 | 684 | | |
677 | 685 | | |
678 | 686 | | |
| |||
2781 | 2789 | | |
2782 | 2790 | | |
2783 | 2791 | | |
2784 | | - | |
2785 | | - | |
2786 | | - | |
2787 | | - | |
2788 | | - | |
2789 | | - | |
2790 | | - | |
2791 | | - | |
2792 | | - | |
2793 | | - | |
2794 | | - | |
2795 | | - | |
2796 | | - | |
2797 | | - | |
2798 | | - | |
2799 | 2792 | | |
2800 | 2793 | | |
2801 | 2794 | | |
2802 | 2795 | | |
2803 | 2796 | | |
2804 | 2797 | | |
2805 | 2798 | | |
2806 | | - | |
2807 | | - | |
2808 | | - | |
2809 | | - | |
2810 | | - | |
2811 | | - | |
2812 | | - | |
2813 | | - | |
2814 | | - | |
2815 | | - | |
2816 | | - | |
2817 | | - | |
2818 | | - | |
2819 | 2799 | | |
2820 | 2800 | | |
2821 | 2801 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
| 76 | + | |
97 | 77 | | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
115 | 93 | | |
116 | 94 | | |
117 | 95 | | |
| |||
135 | 113 | | |
136 | 114 | | |
137 | 115 | | |
138 | | - | |
| 116 | + | |
139 | 117 | | |
140 | 118 | | |
141 | 119 | | |
| |||
204 | 182 | | |
205 | 183 | | |
206 | 184 | | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
| 185 | + | |
215 | 186 | | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
221 | 190 | | |
222 | 191 | | |
223 | 192 | | |
224 | 193 | | |
225 | 194 | | |
226 | 195 | | |
227 | 196 | | |
228 | | - | |
229 | | - | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
230 | 208 | | |
231 | 209 | | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
232 | 228 | | |
233 | 229 | | |
234 | 230 | | |
| |||
244 | 240 | | |
245 | 241 | | |
246 | 242 | | |
247 | | - | |
248 | | - | |
| 243 | + | |
| 244 | + | |
249 | 245 | | |
250 | 246 | | |
251 | 247 | | |
252 | | - | |
| 248 | + | |
253 | 249 | | |
254 | | - | |
255 | | - | |
| 250 | + | |
256 | 251 | | |
257 | 252 | | |
258 | 253 | | |
| |||
403 | 398 | | |
404 | 399 | | |
405 | 400 | | |
406 | | - | |
| 401 | + | |
407 | 402 | | |
408 | 403 | | |
409 | 404 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
77 | 90 | | |
78 | 91 | | |
79 | | - | |
| 92 | + | |
| 93 | + | |
80 | 94 | | |
81 | 95 | | |
82 | | - | |
83 | 96 | | |
84 | 97 | | |
85 | 98 | | |
| |||
106 | 119 | | |
107 | 120 | | |
108 | 121 | | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
109 | 127 | | |
110 | 128 | | |
111 | 129 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1294 | 1294 | | |
1295 | 1295 | | |
1296 | 1296 | | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
| 1341 | + | |
| 1342 | + | |
| 1343 | + | |
| 1344 | + | |
| 1345 | + | |
| 1346 | + | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
1297 | 1364 | | |
1298 | 1365 | | |
1299 | 1366 | | |
| |||
0 commit comments