美文网首页Hotspot源码调试
java.lang.Object类结构解析

java.lang.Object类结构解析

作者: 过三 | 来源:发表于2017-09-18 22:18 被阅读0次

    图形工具

    Object.class

    工具:Classpy

    相关代码

    debug watch

    对比图形工具中的值,与value中的值一致

    主要函数

    instanceKlassHandle ClassFileParser::parseClassFile(Symbol* name,
                                                        Handle class_loader,
                                                        Handle protection_domain,
                                                        KlassHandle host_klass,
                                                        GrowableArray<Handle>* cp_patches,
                                                        TempNewSymbol& parsed_name,
                                                        bool verify,
                                                        TRAPS) {
    
        // Constant pool
        constantPoolHandle cp = parse_constant_pool(class_loader, CHECK_(nullHandle));
    
        // Fields (offsets are filled in later)
        FieldAllocationCount fac;
        objArrayHandle fields_annotations;
        typeArrayHandle fields = parse_fields(class_name, cp, access_flags.is_interface(), &fac, &fields_annotations,
                                              &java_fields_count,
                                              CHECK_(nullHandle));
    
        // Methods
        objArrayHandle methods = parse_methods(cp, access_flags.is_interface(),
                                               &promoted_flags,
                                               &has_final_method,
                                               &methods_annotations_oop,
                                               &methods_parameter_annotations_oop,
                                               &methods_default_annotations_oop,
                                               CHECK_(nullHandle));
    }
    

    相关文章

      网友评论

        本文标题:java.lang.Object类结构解析

        本文链接:https://www.haomeiwen.com/subject/ijkisxtx.html