hotspot/src/share/vm/oops/method.hpp
changeset 22551 9bf46d16dcc6
parent 20710 550442bd8ffc
child 22876 57aa8995d43b
equal deleted inserted replaced
22550:820966182ab9 22551:9bf46d16dcc6
    36 #include "oops/oop.hpp"
    36 #include "oops/oop.hpp"
    37 #include "oops/typeArrayOop.hpp"
    37 #include "oops/typeArrayOop.hpp"
    38 #include "utilities/accessFlags.hpp"
    38 #include "utilities/accessFlags.hpp"
    39 #include "utilities/growableArray.hpp"
    39 #include "utilities/growableArray.hpp"
    40 
    40 
    41 // A Method* represents a Java method.
    41 // A Method represents a Java method.
    42 //
    42 //
    43 // Memory layout (each line represents a word). Note that most applications load thousands of methods,
    43 // Memory layout (each line represents a word). Note that most applications load thousands of methods,
    44 // so keeping the size of this structure small has a big impact on footprint.
    44 // so keeping the size of this structure small has a big impact on footprint.
    45 //
       
    46 // We put all oops and method_size first for better gc cache locality.
       
    47 //
    45 //
    48 // The actual bytecodes are inlined after the end of the Method struct.
    46 // The actual bytecodes are inlined after the end of the Method struct.
    49 //
    47 //
    50 // There are bits in the access_flags telling whether inlined tables are present.
    48 // There are bits in the access_flags telling whether inlined tables are present.
    51 // Note that accessing the line number and local variable tables is not performance critical at all.
    49 // Note that accessing the line number and local variable tables is not performance critical at all.
    62 //
    60 //
    63 // |------------------------------------------------------|
    61 // |------------------------------------------------------|
    64 // | header                                               |
    62 // | header                                               |
    65 // | klass                                                |
    63 // | klass                                                |
    66 // |------------------------------------------------------|
    64 // |------------------------------------------------------|
    67 // | ConstMethod*                   (oop)                 |
    65 // | ConstMethod*                   (metadata)            |
    68 // |------------------------------------------------------|
    66 // |------------------------------------------------------|
    69 // | methodData                     (oop)                 |
    67 // | MethodData*                    (metadata)            |
    70 // | methodCounters                                       |
    68 // | MethodCounters                                       |
    71 // |------------------------------------------------------|
    69 // |------------------------------------------------------|
    72 // | access_flags                                         |
    70 // | access_flags                                         |
    73 // | vtable_index                                         |
    71 // | vtable_index                                         |
    74 // |------------------------------------------------------|
    72 // |------------------------------------------------------|
    75 // | result_index (C++ interpreter only)                  |
    73 // | result_index (C++ interpreter only)                  |
    76 // |------------------------------------------------------|
    74 // |------------------------------------------------------|
    77 // | method_size             |   intrinsic_id|   flags    |
    75 // | method_size             | intrinsic_id  |   flags    |
    78 // |------------------------------------------------------|
    76 // |------------------------------------------------------|
    79 // | code                           (pointer)             |
    77 // | code                           (pointer)             |
    80 // | i2i                            (pointer)             |
    78 // | i2i                            (pointer)             |
    81 // | adapter                        (pointer)             |
    79 // | adapter                        (pointer)             |
    82 // | from_compiled_entry            (pointer)             |
    80 // | from_compiled_entry            (pointer)             |