equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
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 |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
459 } |
459 } |
460 } |
460 } |
461 |
461 |
462 #endif //PRODUCT |
462 #endif //PRODUCT |
463 |
463 |
464 static int max_objArray_print_length = 4; |
|
465 |
|
466 void ObjArrayKlass::oop_print_value_on(oop obj, outputStream* st) { |
464 void ObjArrayKlass::oop_print_value_on(oop obj, outputStream* st) { |
467 assert(obj->is_objArray(), "must be objArray"); |
465 assert(obj->is_objArray(), "must be objArray"); |
468 st->print("a "); |
466 st->print("a "); |
469 element_klass()->print_value_on(st); |
467 element_klass()->print_value_on(st); |
470 int len = objArrayOop(obj)->length(); |
468 int len = objArrayOop(obj)->length(); |
471 st->print("[%d] ", len); |
469 st->print("[%d] ", len); |
472 obj->print_address_on(st); |
470 obj->print_address_on(st); |
473 if (NOT_PRODUCT(PrintOopAddress ||) PrintMiscellaneous && (WizardMode || Verbose)) { |
|
474 st->print("{"); |
|
475 for (int i = 0; i < len; i++) { |
|
476 if (i > max_objArray_print_length) { |
|
477 st->print("..."); break; |
|
478 } |
|
479 st->print(" " INTPTR_FORMAT, (intptr_t)(void*)objArrayOop(obj)->obj_at(i)); |
|
480 } |
|
481 st->print(" }"); |
|
482 } |
|
483 } |
471 } |
484 |
472 |
485 const char* ObjArrayKlass::internal_name() const { |
473 const char* ObjArrayKlass::internal_name() const { |
486 return external_name(); |
474 return external_name(); |
487 } |
475 } |