Mercurial > hg > graal-compiler
diff src/share/vm/classfile/javaClasses.hpp @ 20415:47e3110c47e8
6642881: Improve performance of Class.getClassLoader()
Summary: Add classLoader to java/lang/Class instance for fast access
Reviewed-by: alanb, lfoltan, rriggs, vlivanov, twisti, jfranck
author | coleenp |
---|---|
date | Fri, 05 Sep 2014 16:01:29 -0400 |
parents | 27188ae8bbbb |
children | fe34c5ab0b35 |
line wrap: on
line diff
--- a/src/share/vm/classfile/javaClasses.hpp Fri Sep 05 00:28:43 2014 +0200 +++ b/src/share/vm/classfile/javaClasses.hpp Fri Sep 05 16:01:29 2014 -0400 @@ -239,19 +239,23 @@ static int _protection_domain_offset; static int _init_lock_offset; static int _signers_offset; + static int _class_loader_offset; static bool offsets_computed; static int classRedefinedCount_offset; + static GrowableArray<Klass*>* _fixup_mirror_list; static void set_init_lock(oop java_class, oop init_lock); static void set_protection_domain(oop java_class, oop protection_domain); + static void set_class_loader(oop java_class, oop class_loader); static void initialize_mirror_fields(KlassHandle k, Handle mirror, Handle protection_domain, TRAPS); public: static void compute_offsets(); // Instance creation - static void create_mirror(KlassHandle k, Handle protection_domain, TRAPS); + static void create_mirror(KlassHandle k, Handle class_loader, + Handle protection_domain, TRAPS); static void fixup_mirror(KlassHandle k, TRAPS); static oop create_basic_type_mirror(const char* basic_type_name, BasicType type, TRAPS); // Conversion @@ -289,6 +293,8 @@ static objArrayOop signers(oop java_class); static void set_signers(oop java_class, objArrayOop signers); + static oop class_loader(oop java_class); + static int oop_size(oop java_class); static void set_oop_size(oop java_class, int size); static int static_oop_field_count(oop java_class);