1.1 --- a/src/share/vm/oops/annotations.hpp Thu Jan 24 23:30:45 2013 -0800 1.2 +++ b/src/share/vm/oops/annotations.hpp Fri Jan 25 15:06:18 2013 -0500 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -34,6 +34,7 @@ 1.11 1.12 class ClassLoaderData; 1.13 class outputStream; 1.14 +class KlassSizeStats; 1.15 1.16 typedef Array<u1> AnnotationArray; 1.17 1.18 @@ -82,7 +83,12 @@ 1.19 Array<AnnotationArray*>* mda, TRAPS); 1.20 void deallocate_contents(ClassLoaderData* loader_data); 1.21 DEBUG_ONLY(bool on_stack() { return false; }) // for template 1.22 + 1.23 + // Sizing (in words) 1.24 static int size() { return sizeof(Annotations) / wordSize; } 1.25 +#if INCLUDE_SERVICES 1.26 + void collect_statistics(KlassSizeStats *sz) const; 1.27 +#endif 1.28 1.29 // Constructor to initialize to null 1.30 Annotations() : _class_annotations(NULL), 1.31 @@ -142,7 +148,7 @@ 1.32 void set_methods_annotations_of(instanceKlassHandle ik, 1.33 int idnum, AnnotationArray* anno, 1.34 Array<AnnotationArray*>** md_p, TRAPS); 1.35 - 1.36 + static julong count_bytes(Array<AnnotationArray*>* p); 1.37 public: 1.38 const char* internal_name() const { return "{constant pool}"; } 1.39 #ifndef PRODUCT