Mercurial > hg > graal-compiler
diff src/share/vm/oops/method.hpp @ 14909:4ca6dc0799b6
Backout jdk9 merge
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Tue, 01 Apr 2014 13:57:07 +0200 |
parents | 8b772174c514 |
children | 52b4284cb496 |
line wrap: on
line diff
--- a/src/share/vm/oops/method.hpp Tue Apr 01 14:09:03 2014 +0200 +++ b/src/share/vm/oops/method.hpp Tue Apr 01 13:57:07 2014 +0200 @@ -38,11 +38,13 @@ #include "utilities/accessFlags.hpp" #include "utilities/growableArray.hpp" -// A Method represents a Java method. +// A Method* represents a Java method. // // Memory layout (each line represents a word). Note that most applications load thousands of methods, // so keeping the size of this structure small has a big impact on footprint. // +// We put all oops and method_size first for better gc cache locality. +// // The actual bytecodes are inlined after the end of the Method struct. // // There are bits in the access_flags telling whether inlined tables are present. @@ -62,17 +64,17 @@ // | header | // | klass | // |------------------------------------------------------| -// | ConstMethod* (metadata) | +// | ConstMethod* (oop) | // |------------------------------------------------------| -// | MethodData* (metadata) | -// | MethodCounters | +// | methodData (oop) | +// | methodCounters | // |------------------------------------------------------| // | access_flags | // | vtable_index | // |------------------------------------------------------| // | result_index (C++ interpreter only) | // |------------------------------------------------------| -// | method_size | intrinsic_id | flags | +// | method_size | intrinsic_id| flags | // |------------------------------------------------------| // | code (pointer) | // | i2i (pointer) | @@ -108,6 +110,7 @@ #endif u2 _method_size; // size of this object u1 _intrinsic_id; // vmSymbols::intrinsic_id (0 == _none) + // Flags enum Flags { _jfr_towrite = 1 << 0, @@ -351,21 +354,16 @@ } void set_method_data(MethodData* data) { - // The store into method must be released. On platforms without - // total store order (TSO) the reference may become visible before - // the initialization of data otherwise. - OrderAccess::release_store_ptr((volatile void *)&_method_data, data); + _method_data = data; } MethodCounters* method_counters() const { return _method_counters; } + void set_method_counters(MethodCounters* counters) { - // The store into method must be released. On platforms without - // total store order (TSO) the reference may become visible before - // the initialization of data otherwise. - OrderAccess::release_store_ptr((volatile void *)&_method_counters, counters); + _method_counters = counters; } #ifdef TIERED