Print this page
rev 1025 : imported patch indy.compiler.patch
Split |
Close |
Expand all |
Collapse all |
--- old/src/share/vm/opto/bytecodeInfo.cpp
+++ new/src/share/vm/opto/bytecodeInfo.cpp
1 1 /*
2 2 * Copyright 1998-2009 Sun Microsystems, Inc. All Rights Reserved.
3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 4 *
5 5 * This code is free software; you can redistribute it and/or modify it
6 6 * under the terms of the GNU General Public License version 2 only, as
7 7 * published by the Free Software Foundation.
8 8 *
9 9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 12 * version 2 for more details (a copy is included in the LICENSE file that
13 13 * accompanied this code).
14 14 *
15 15 * You should have received a copy of the GNU General Public License version
16 16 * 2 along with this work; if not, write to the Free Software Foundation,
17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 18 *
19 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
20 20 * CA 95054 USA or visit www.sun.com if you need additional information or
21 21 * have any questions.
22 22 *
23 23 */
24 24
25 25 #include "incls/_precompiled.incl"
26 26 #include "incls/_bytecodeInfo.cpp.incl"
27 27
28 28 //=============================================================================
29 29 //------------------------------InlineTree-------------------------------------
30 30 InlineTree::InlineTree( Compile* c, const InlineTree *caller_tree, ciMethod* callee, JVMState* caller_jvms, int caller_bci, float site_invoke_ratio )
31 31 : C(c), _caller_jvms(caller_jvms),
32 32 _caller_tree((InlineTree*)caller_tree),
33 33 _method(callee), _site_invoke_ratio(site_invoke_ratio),
34 34 _count_inline_bcs(method()->code_size()) {
35 35 NOT_PRODUCT(_count_inlines = 0;)
36 36 if (_caller_jvms != NULL) {
37 37 // Keep a private copy of the caller_jvms:
38 38 _caller_jvms = new (C) JVMState(caller_jvms->method(), caller_tree->caller_jvms());
39 39 _caller_jvms->set_bci(caller_jvms->bci());
40 40 assert(!caller_jvms->should_reexecute(), "there should be no reexecute bytecode with inlining");
41 41 }
42 42 assert(_caller_jvms->same_calls_as(caller_jvms), "consistent JVMS");
43 43 assert((caller_tree == NULL ? 0 : caller_tree->inline_depth() + 1) == inline_depth(), "correct (redundant) depth parameter");
44 44 assert(caller_bci == this->caller_bci(), "correct (redundant) bci parameter");
45 45 if (UseOldInlining) {
46 46 // Update hierarchical counts, count_inline_bcs() and count_inlines()
47 47 InlineTree *caller = (InlineTree *)caller_tree;
48 48 for( ; caller != NULL; caller = ((InlineTree *)(caller->caller_tree())) ) {
49 49 caller->_count_inline_bcs += count_inline_bcs();
50 50 NOT_PRODUCT(caller->_count_inlines++;)
51 51 }
52 52 }
53 53 }
54 54
55 55 InlineTree::InlineTree(Compile* c, ciMethod* callee_method, JVMState* caller_jvms, float site_invoke_ratio)
56 56 : C(c), _caller_jvms(caller_jvms), _caller_tree(NULL),
57 57 _method(callee_method), _site_invoke_ratio(site_invoke_ratio),
58 58 _count_inline_bcs(method()->code_size()) {
59 59 NOT_PRODUCT(_count_inlines = 0;)
60 60 assert(!UseOldInlining, "do not use for old stuff");
61 61 }
62 62
63 63
64 64
65 65 static void print_indent(int depth) {
66 66 tty->print(" ");
67 67 for (int i = depth; i != 0; --i) tty->print(" ");
68 68 }
69 69
70 70 static bool is_init_with_ea(ciMethod* callee_method,
71 71 ciMethod* caller_method, Compile* C) {
72 72 // True when EA is ON and a java constructor is called or
73 73 // a super constructor is called from an inlined java constructor.
74 74 return C->do_escape_analysis() && EliminateAllocations &&
75 75 ( callee_method->is_initializer() ||
76 76 (caller_method->is_initializer() &&
77 77 caller_method != C->method() &&
78 78 caller_method->holder()->is_subclass_of(callee_method->holder()))
79 79 );
80 80 }
81 81
82 82 // positive filter: should send be inlined? returns NULL, if yes, or rejection msg
83 83 const char* InlineTree::shouldInline(ciMethod* callee_method, ciMethod* caller_method, int caller_bci, ciCallProfile& profile, WarmCallInfo* wci_result) const {
84 84 // Allows targeted inlining
85 85 if(callee_method->should_inline()) {
86 86 *wci_result = *(WarmCallInfo::always_hot());
87 87 if (PrintInlining && Verbose) {
88 88 print_indent(inline_depth());
89 89 tty->print_cr("Inlined method is hot: ");
90 90 }
91 91 return NULL;
92 92 }
93 93
94 94 // positive filter: should send be inlined? returns NULL (--> yes)
95 95 // or rejection msg
96 96 int max_size = C->max_inline_size();
97 97 int size = callee_method->code_size();
98 98
99 99 // Check for too many throws (and not too huge)
100 100 if(callee_method->interpreter_throwout_count() > InlineThrowCount &&
101 101 size < InlineThrowMaxSize ) {
102 102 wci_result->set_profit(wci_result->profit() * 100);
103 103 if (PrintInlining && Verbose) {
104 104 print_indent(inline_depth());
105 105 tty->print_cr("Inlined method with many throws (throws=%d):", callee_method->interpreter_throwout_count());
106 106 }
107 107 return NULL;
108 108 }
109 109
110 110 if (!UseOldInlining) {
111 111 return NULL; // size and frequency are represented in a new way
112 112 }
113 113
114 114 int call_site_count = method()->scale_count(profile.count());
115 115 int invoke_count = method()->interpreter_invocation_count();
116 116 assert( invoke_count != 0, "Require invokation count greater than zero");
117 117 int freq = call_site_count/invoke_count;
118 118
119 119 // bump the max size if the call is frequent
120 120 if ((freq >= InlineFrequencyRatio) ||
121 121 (call_site_count >= InlineFrequencyCount) ||
122 122 is_init_with_ea(callee_method, caller_method, C)) {
123 123
124 124 max_size = C->freq_inline_size();
125 125 if (size <= max_size && TraceFrequencyInlining) {
126 126 print_indent(inline_depth());
127 127 tty->print_cr("Inlined frequent method (freq=%d count=%d):", freq, call_site_count);
128 128 print_indent(inline_depth());
129 129 callee_method->print();
130 130 tty->cr();
131 131 }
132 132 } else {
133 133 // Not hot. Check for medium-sized pre-existing nmethod at cold sites.
134 134 if (callee_method->has_compiled_code() &&
135 135 callee_method->instructions_size() > InlineSmallCode/4)
136 136 return "already compiled into a medium method";
137 137 }
138 138 if (size > max_size) {
139 139 if (max_size > C->max_inline_size())
140 140 return "hot method too big";
141 141 return "too big";
142 142 }
143 143 return NULL;
144 144 }
145 145
146 146
147 147 // negative filter: should send NOT be inlined? returns NULL, ok to inline, or rejection msg
148 148 const char* InlineTree::shouldNotInline(ciMethod *callee_method, ciMethod* caller_method, WarmCallInfo* wci_result) const {
149 149 // negative filter: should send NOT be inlined? returns NULL (--> inline) or rejection msg
150 150 if (!UseOldInlining) {
151 151 const char* fail = NULL;
152 152 if (callee_method->is_abstract()) fail = "abstract method";
153 153 // note: we allow ik->is_abstract()
154 154 if (!callee_method->holder()->is_initialized()) fail = "method holder not initialized";
155 155 if (callee_method->is_native()) fail = "native method";
156 156
157 157 if (fail) {
158 158 *wci_result = *(WarmCallInfo::always_cold());
159 159 return fail;
160 160 }
161 161
162 162 if (callee_method->has_unloaded_classes_in_signature()) {
163 163 wci_result->set_profit(wci_result->profit() * 0.1);
164 164 }
165 165
166 166 // don't inline exception code unless the top method belongs to an
167 167 // exception class
168 168 if (callee_method->holder()->is_subclass_of(C->env()->Throwable_klass())) {
169 169 ciMethod* top_method = caller_jvms() ? caller_jvms()->of_depth(1)->method() : method();
170 170 if (!top_method->holder()->is_subclass_of(C->env()->Throwable_klass())) {
171 171 wci_result->set_profit(wci_result->profit() * 0.1);
172 172 }
173 173 }
174 174
175 175 if (callee_method->has_compiled_code() && callee_method->instructions_size() > InlineSmallCode) {
176 176 wci_result->set_profit(wci_result->profit() * 0.1);
177 177 // %%% adjust wci_result->size()?
178 178 }
179 179
180 180 return NULL;
181 181 }
182 182
183 183 // First check all inlining restrictions which are required for correctness
184 184 if (callee_method->is_abstract()) return "abstract method";
185 185 // note: we allow ik->is_abstract()
186 186 if (!callee_method->holder()->is_initialized()) return "method holder not initialized";
187 187 if (callee_method->is_native()) return "native method";
188 188 if (callee_method->has_unloaded_classes_in_signature()) return "unloaded signature classes";
189 189
190 190 if (callee_method->should_inline()) {
191 191 // ignore heuristic controls on inlining
192 192 return NULL;
193 193 }
194 194
195 195 // Now perform checks which are heuristic
196 196
197 197 if( callee_method->has_compiled_code() && callee_method->instructions_size() > InlineSmallCode )
198 198 return "already compiled into a big method";
199 199
200 200 // don't inline exception code unless the top method belongs to an
201 201 // exception class
202 202 if (caller_tree() != NULL &&
203 203 callee_method->holder()->is_subclass_of(C->env()->Throwable_klass())) {
204 204 const InlineTree *top = this;
205 205 while (top->caller_tree() != NULL) top = top->caller_tree();
206 206 ciInstanceKlass* k = top->method()->holder();
207 207 if (!k->is_subclass_of(C->env()->Throwable_klass()))
208 208 return "exception method";
209 209 }
210 210
211 211 // use frequency-based objections only for non-trivial methods
212 212 if (callee_method->code_size() <= MaxTrivialSize) return NULL;
213 213
214 214 // don't use counts with -Xcomp or CTW
215 215 if (UseInterpreter && !CompileTheWorld) {
216 216
217 217 if (!callee_method->has_compiled_code() &&
218 218 !callee_method->was_executed_more_than(0)) {
219 219 return "never executed";
220 220 }
221 221
222 222 if (is_init_with_ea(callee_method, caller_method, C)) {
223 223
224 224 // Escape Analysis: inline all executed constructors
225 225
226 226 } else if (!callee_method->was_executed_more_than(MIN2(MinInliningThreshold,
227 227 CompileThreshold >> 1))) {
228 228 return "executed < MinInliningThreshold times";
229 229 }
230 230 }
231 231
232 232 if (callee_method->should_not_inline()) {
233 233 return "disallowed by CompilerOracle";
234 234 }
235 235
236 236 if (UseStringCache) {
237 237 // Do not inline StringCache::profile() method used only at the beginning.
238 238 if (callee_method->name() == ciSymbol::profile_name() &&
239 239 callee_method->holder()->name() == ciSymbol::java_lang_StringCache()) {
240 240 return "profiling method";
241 241 }
242 242 }
243 243
244 244 return NULL;
245 245 }
246 246
247 247 //-----------------------------try_to_inline-----------------------------------
248 248 // return NULL if ok, reason for not inlining otherwise
249 249 // Relocated from "InliningClosure::try_to_inline"
250 250 const char* InlineTree::try_to_inline(ciMethod* callee_method, ciMethod* caller_method, int caller_bci, ciCallProfile& profile, WarmCallInfo* wci_result) {
251 251
252 252 // Old algorithm had funny accumulating BC-size counters
253 253 if (UseOldInlining && ClipInlining
254 254 && (int)count_inline_bcs() >= DesiredMethodLimit) {
255 255 return "size > DesiredMethodLimit";
256 256 }
257 257
258 258 const char *msg = NULL;
259 259 if ((msg = shouldInline(callee_method, caller_method, caller_bci,
260 260 profile, wci_result)) != NULL) {
261 261 return msg;
262 262 }
263 263 if ((msg = shouldNotInline(callee_method, caller_method,
264 264 wci_result)) != NULL) {
265 265 return msg;
266 266 }
267 267
268 268 bool is_accessor = InlineAccessors && callee_method->is_accessor();
269 269
270 270 // suppress a few checks for accessors and trivial methods
271 271 if (!is_accessor && callee_method->code_size() > MaxTrivialSize) {
272 272
273 273 // don't inline into giant methods
274 274 if (C->unique() > (uint)NodeCountInliningCutoff) {
275 275 return "NodeCountInliningCutoff";
276 276 }
277 277
278 278 if ((!UseInterpreter || CompileTheWorld) &&
279 279 is_init_with_ea(callee_method, caller_method, C)) {
280 280
281 281 // Escape Analysis stress testing when running Xcomp or CTW:
282 282 // inline constructors even if they are not reached.
283 283
284 284 } else if (profile.count() == 0) {
285 285 // don't inline unreached call sites
286 286 return "call site not reached";
287 287 }
288 288 }
289 289
290 290 if (!C->do_inlining() && InlineAccessors && !is_accessor) {
291 291 return "not an accessor";
292 292 }
293 293 if( inline_depth() > MaxInlineLevel ) {
294 294 return "inlining too deep";
295 295 }
296 296 if( method() == callee_method &&
297 297 inline_depth() > MaxRecursiveInlineLevel ) {
298 298 return "recursively inlining too deep";
299 299 }
300 300
301 301 int size = callee_method->code_size();
302 302
303 303 if (UseOldInlining && ClipInlining
304 304 && (int)count_inline_bcs() + size >= DesiredMethodLimit) {
305 305 return "size > DesiredMethodLimit";
306 306 }
307 307
308 308 // ok, inline this method
309 309 return NULL;
310 310 }
311 311
312 312 //------------------------------pass_initial_checks----------------------------
313 313 bool pass_initial_checks(ciMethod* caller_method, int caller_bci, ciMethod* callee_method) {
314 314 ciInstanceKlass *callee_holder = callee_method ? callee_method->holder() : NULL;
↓ open down ↓ |
314 lines elided |
↑ open up ↑ |
315 315 // Check if a callee_method was suggested
316 316 if( callee_method == NULL ) return false;
317 317 // Check if klass of callee_method is loaded
318 318 if( !callee_holder->is_loaded() ) return false;
319 319 if( !callee_holder->is_initialized() ) return false;
320 320 if( !UseInterpreter || CompileTheWorld /* running Xcomp or CTW */ ) {
321 321 // Checks that constant pool's call site has been visited
322 322 // stricter than callee_holder->is_initialized()
323 323 ciBytecodeStream iter(caller_method);
324 324 iter.force_bci(caller_bci);
325 - int index = iter.get_index_int();
326 - if( !caller_method->is_klass_loaded(index, true) ) {
327 - return false;
328 - }
329 - // Try to do constant pool resolution if running Xcomp
330 325 Bytecodes::Code call_bc = iter.cur_bc();
331 - if( !caller_method->check_call(index, call_bc == Bytecodes::_invokestatic) ) {
332 - return false;
326 + // An invokedynamic instruction does not have a klass.
327 + if (call_bc != Bytecodes::_invokedynamic) {
328 + int index = iter.get_index_int();
329 + if (!caller_method->is_klass_loaded(index, true)) {
330 + return false;
331 + }
332 + // Try to do constant pool resolution if running Xcomp
333 + if( !caller_method->check_call(index, call_bc == Bytecodes::_invokestatic) ) {
334 + return false;
335 + }
333 336 }
334 337 }
335 338 // We will attempt to see if a class/field/etc got properly loaded. If it
336 339 // did not, it may attempt to throw an exception during our probing. Catch
337 340 // and ignore such exceptions and do not attempt to compile the method.
338 341 if( callee_method->should_exclude() ) return false;
339 342
340 343 return true;
341 344 }
342 345
343 346 #ifndef PRODUCT
344 347 //------------------------------print_inlining---------------------------------
345 348 // Really, the failure_msg can be a success message also.
346 349 void InlineTree::print_inlining(ciMethod *callee_method, int caller_bci, const char *failure_msg) const {
347 350 print_indent(inline_depth());
348 351 tty->print("@ %d ", caller_bci);
349 352 if( callee_method ) callee_method->print_short_name();
350 353 else tty->print(" callee not monotonic or profiled");
351 354 tty->print(" %s", (failure_msg ? failure_msg : "inline"));
352 355 if( Verbose && callee_method ) {
353 356 const InlineTree *top = this;
354 357 while( top->caller_tree() != NULL ) { top = top->caller_tree(); }
355 358 tty->print(" bcs: %d+%d invoked: %d", top->count_inline_bcs(), callee_method->code_size(), callee_method->interpreter_invocation_count());
356 359 }
357 360 tty->cr();
358 361 }
359 362 #endif
360 363
361 364 //------------------------------ok_to_inline-----------------------------------
362 365 WarmCallInfo* InlineTree::ok_to_inline(ciMethod* callee_method, JVMState* jvms, ciCallProfile& profile, WarmCallInfo* initial_wci) {
363 366 assert(callee_method != NULL, "caller checks for optimized virtual!");
364 367 #ifdef ASSERT
365 368 // Make sure the incoming jvms has the same information content as me.
366 369 // This means that we can eventually make this whole class AllStatic.
367 370 if (jvms->caller() == NULL) {
368 371 assert(_caller_jvms == NULL, "redundant instance state");
369 372 } else {
370 373 assert(_caller_jvms->same_calls_as(jvms->caller()), "redundant instance state");
371 374 }
372 375 assert(_method == jvms->method(), "redundant instance state");
373 376 #endif
374 377 const char *failure_msg = NULL;
375 378 int caller_bci = jvms->bci();
376 379 ciMethod *caller_method = jvms->method();
377 380
378 381 if( !pass_initial_checks(caller_method, caller_bci, callee_method)) {
379 382 if( PrintInlining ) {
380 383 failure_msg = "failed_initial_checks";
381 384 print_inlining( callee_method, caller_bci, failure_msg);
382 385 }
383 386 return NULL;
384 387 }
385 388
386 389 // Check if inlining policy says no.
387 390 WarmCallInfo wci = *(initial_wci);
388 391 failure_msg = try_to_inline(callee_method, caller_method, caller_bci, profile, &wci);
389 392 if (failure_msg != NULL && C->log() != NULL) {
390 393 C->log()->begin_elem("inline_fail reason='");
391 394 C->log()->text("%s", failure_msg);
392 395 C->log()->end_elem("'");
393 396 }
394 397
395 398 #ifndef PRODUCT
396 399 if (UseOldInlining && InlineWarmCalls
397 400 && (PrintOpto || PrintOptoInlining || PrintInlining)) {
398 401 bool cold = wci.is_cold();
399 402 bool hot = !cold && wci.is_hot();
400 403 bool old_cold = (failure_msg != NULL);
401 404 if (old_cold != cold || (Verbose || WizardMode)) {
402 405 tty->print(" OldInlining= %4s : %s\n WCI=",
403 406 old_cold ? "cold" : "hot", failure_msg ? failure_msg : "OK");
404 407 wci.print();
405 408 }
406 409 }
407 410 #endif
408 411 if (UseOldInlining) {
409 412 if (failure_msg == NULL)
410 413 wci = *(WarmCallInfo::always_hot());
411 414 else
412 415 wci = *(WarmCallInfo::always_cold());
413 416 }
414 417 if (!InlineWarmCalls) {
415 418 if (!wci.is_cold() && !wci.is_hot()) {
416 419 // Do not inline the warm calls.
417 420 wci = *(WarmCallInfo::always_cold());
418 421 }
419 422 }
420 423
421 424 if (!wci.is_cold()) {
422 425 // In -UseOldInlining, the failure_msg may also be a success message.
423 426 if (failure_msg == NULL) failure_msg = "inline (hot)";
424 427
425 428 // Inline!
426 429 if( PrintInlining ) print_inlining( callee_method, caller_bci, failure_msg);
427 430 if (UseOldInlining)
428 431 build_inline_tree_for_callee(callee_method, jvms, caller_bci);
429 432 if (InlineWarmCalls && !wci.is_hot())
430 433 return new (C) WarmCallInfo(wci); // copy to heap
431 434 return WarmCallInfo::always_hot();
432 435 }
433 436
434 437 // Do not inline
435 438 if (failure_msg == NULL) failure_msg = "too cold to inline";
436 439 if( PrintInlining ) print_inlining( callee_method, caller_bci, failure_msg);
437 440 return NULL;
438 441 }
439 442
440 443 //------------------------------compute_callee_frequency-----------------------
441 444 float InlineTree::compute_callee_frequency( int caller_bci ) const {
442 445 int count = method()->interpreter_call_site_count(caller_bci);
443 446 int invcnt = method()->interpreter_invocation_count();
444 447 float freq = (float)count/(float)invcnt;
445 448 // Call-site count / interpreter invocation count, scaled recursively.
446 449 // Always between 0.0 and 1.0. Represents the percentage of the method's
447 450 // total execution time used at this call site.
448 451
449 452 return freq;
450 453 }
451 454
452 455 //------------------------------build_inline_tree_for_callee-------------------
453 456 InlineTree *InlineTree::build_inline_tree_for_callee( ciMethod* callee_method, JVMState* caller_jvms, int caller_bci) {
454 457 float recur_frequency = _site_invoke_ratio * compute_callee_frequency(caller_bci);
455 458 // Attempt inlining.
456 459 InlineTree* old_ilt = callee_at(caller_bci, callee_method);
457 460 if (old_ilt != NULL) {
458 461 return old_ilt;
459 462 }
460 463 InlineTree *ilt = new InlineTree( C, this, callee_method, caller_jvms, caller_bci, recur_frequency );
461 464 _subtrees.append( ilt );
462 465
463 466 NOT_PRODUCT( _count_inlines += 1; )
464 467
465 468 return ilt;
466 469 }
467 470
468 471
469 472 //---------------------------------------callee_at-----------------------------
470 473 InlineTree *InlineTree::callee_at(int bci, ciMethod* callee) const {
471 474 for (int i = 0; i < _subtrees.length(); i++) {
472 475 InlineTree* sub = _subtrees.at(i);
473 476 if (sub->caller_bci() == bci && callee == sub->method()) {
474 477 return sub;
475 478 }
476 479 }
477 480 return NULL;
478 481 }
479 482
480 483
481 484 //------------------------------build_inline_tree_root-------------------------
482 485 InlineTree *InlineTree::build_inline_tree_root() {
483 486 Compile* C = Compile::current();
484 487
485 488 // Root of inline tree
486 489 InlineTree *ilt = new InlineTree(C, NULL, C->method(), NULL, -1, 1.0F);
487 490
488 491 return ilt;
489 492 }
490 493
491 494
492 495 //-------------------------find_subtree_from_root-----------------------------
493 496 // Given a jvms, which determines a call chain from the root method,
494 497 // find the corresponding inline tree.
495 498 // Note: This method will be removed or replaced as InlineTree goes away.
496 499 InlineTree* InlineTree::find_subtree_from_root(InlineTree* root, JVMState* jvms, ciMethod* callee, bool create_if_not_found) {
497 500 InlineTree* iltp = root;
498 501 uint depth = jvms && jvms->has_method() ? jvms->depth() : 0;
499 502 for (uint d = 1; d <= depth; d++) {
500 503 JVMState* jvmsp = jvms->of_depth(d);
501 504 // Select the corresponding subtree for this bci.
502 505 assert(jvmsp->method() == iltp->method(), "tree still in sync");
503 506 ciMethod* d_callee = (d == depth) ? callee : jvms->of_depth(d+1)->method();
504 507 InlineTree* sub = iltp->callee_at(jvmsp->bci(), d_callee);
505 508 if (!sub) {
506 509 if (create_if_not_found && d == depth) {
507 510 return iltp->build_inline_tree_for_callee(d_callee, jvmsp, jvmsp->bci());
508 511 }
509 512 assert(sub != NULL, "should be a sub-ilt here");
510 513 return NULL;
511 514 }
512 515 iltp = sub;
513 516 }
514 517 return iltp;
515 518 }
↓ open down ↓ |
173 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX