comparison src/share/vm/oops/objArrayKlass.cpp @ 665:c89f86385056

6814659: separable cleanups and subroutines for 6655638 Summary: preparatory but separable changes for method handles Reviewed-by: kvn, never
author jrose
date Fri, 20 Mar 2009 23:19:36 -0700
parents 443791f333a2
children df6caf649ff7 1413494da700
comparison
equal deleted inserted replaced
647:bd441136a5ce 665:c89f86385056
1 /* 1 /*
2 * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. 2 * Copyright 1997-2009 Sun Microsystems, Inc. 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.
500 if (remaining > 0) { 500 if (remaining > 0) {
501 tty->print_cr(" - <%d more elements, increase MaxElementPrintSize to print>", remaining); 501 tty->print_cr(" - <%d more elements, increase MaxElementPrintSize to print>", remaining);
502 } 502 }
503 } 503 }
504 504
505 static int max_objArray_print_length = 4;
505 506
506 void objArrayKlass::oop_print_value_on(oop obj, outputStream* st) { 507 void objArrayKlass::oop_print_value_on(oop obj, outputStream* st) {
507 assert(obj->is_objArray(), "must be objArray"); 508 assert(obj->is_objArray(), "must be objArray");
509 st->print("a ");
508 element_klass()->print_value_on(st); 510 element_klass()->print_value_on(st);
509 st->print("a [%d] ", objArrayOop(obj)->length()); 511 int len = objArrayOop(obj)->length();
510 as_klassOop()->klass()->print_value_on(st); 512 st->print("[%d] ", len);
513 obj->print_address_on(st);
514 if (PrintOopAddress || PrintMiscellaneous && (WizardMode || Verbose)) {
515 st->print("{");
516 for (int i = 0; i < len; i++) {
517 if (i > max_objArray_print_length) {
518 st->print("..."); break;
519 }
520 st->print(" "INTPTR_FORMAT, (intptr_t)(void*)objArrayOop(obj)->obj_at(i));
521 }
522 st->print(" }");
523 }
511 } 524 }
512 525
513 #endif // PRODUCT 526 #endif // PRODUCT
514 527
515 const char* objArrayKlass::internal_name() const { 528 const char* objArrayKlass::internal_name() const {