< prev index next >

src/share/vm/oops/typeArrayKlass.hpp

Print this page
rev 8910 : full patch for jfr
   1 /*
   2  * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
   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  *


  76   int oop_oop_iterate(oop obj, ExtendedOopClosure* blk);
  77   int oop_oop_iterate_m(oop obj, ExtendedOopClosure* blk, MemRegion mr);
  78 
  79   // Garbage collection
  80   void oop_follow_contents(oop obj);
  81   int  oop_adjust_pointers(oop obj);
  82 
  83   // Parallel Scavenge and Parallel Old
  84   PARALLEL_GC_DECLS
  85 
  86  protected:
  87   // Find n'th dimensional array
  88   virtual Klass* array_klass_impl(bool or_null, int n, TRAPS);
  89 
  90   // Returns the array class with this class as element type
  91   virtual Klass* array_klass_impl(bool or_null, TRAPS);
  92 
  93  public:
  94   // Casting from Klass*
  95   static TypeArrayKlass* cast(Klass* k) {
  96     assert(k->oop_is_typeArray(), "cast to TypeArrayKlass");
  97     return (TypeArrayKlass*) k;




  98   }
  99 
 100   // Naming
 101   static const char* external_name(BasicType type);
 102 
 103   // Sizing
 104   static int header_size()  { return sizeof(TypeArrayKlass)/HeapWordSize; }
 105   int size() const          { return ArrayKlass::static_size(header_size()); }
 106 
 107   // Initialization (virtual from Klass)
 108   void initialize(TRAPS);
 109 
 110  public:
 111   // Printing
 112 #ifndef PRODUCT
 113   void oop_print_on(oop obj, outputStream* st);
 114 #endif
 115 
 116   void print_on(outputStream* st) const;
 117   void print_value_on(outputStream* st) const;
   1 /*
   2  * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
   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  *


  76   int oop_oop_iterate(oop obj, ExtendedOopClosure* blk);
  77   int oop_oop_iterate_m(oop obj, ExtendedOopClosure* blk, MemRegion mr);
  78 
  79   // Garbage collection
  80   void oop_follow_contents(oop obj);
  81   int  oop_adjust_pointers(oop obj);
  82 
  83   // Parallel Scavenge and Parallel Old
  84   PARALLEL_GC_DECLS
  85 
  86  protected:
  87   // Find n'th dimensional array
  88   virtual Klass* array_klass_impl(bool or_null, int n, TRAPS);
  89 
  90   // Returns the array class with this class as element type
  91   virtual Klass* array_klass_impl(bool or_null, TRAPS);
  92 
  93  public:
  94   // Casting from Klass*
  95   static TypeArrayKlass* cast(Klass* k) {
  96     return const_cast<TypeArrayKlass*>(cast(const_cast<const Klass*>(k)));
  97   }
  98 
  99   static const TypeArrayKlass* cast(const Klass* k) {
 100     //assert(k->is_typeArray_klass(), "cast to TypeArrayKlass");
 101     return static_cast<const TypeArrayKlass*>(k);
 102   }
 103 
 104   // Naming
 105   static const char* external_name(BasicType type);
 106 
 107   // Sizing
 108   static int header_size()  { return sizeof(TypeArrayKlass)/HeapWordSize; }
 109   int size() const          { return ArrayKlass::static_size(header_size()); }
 110 
 111   // Initialization (virtual from Klass)
 112   void initialize(TRAPS);
 113 
 114  public:
 115   // Printing
 116 #ifndef PRODUCT
 117   void oop_print_on(oop obj, outputStream* st);
 118 #endif
 119 
 120   void print_on(outputStream* st) const;
 121   void print_value_on(outputStream* st) const;
< prev index next >