8171008: Integrate AOT compiler into JDK

Co-authored-by: Christian Thalinger <cthalinger@twitter.com>
Co-authored-by: Dean Long <dean.long@oracle.com>
Co-authored-by: Dmitrij Pochepko <dmitrij.pochepko@oracle.com>
Co-authored-by: Dmitry Chuyko <dmitry.chuyko@oracle.com>
Co-authored-by: Doug Simon <doug.simon@oracle.com>
Co-authored-by: Eric Caspole <eric.caspole@oracle.com>
Co-authored-by: Igor Ignatyev <igor.ignatyev@oracle.com>
Co-authored-by: Igor Veresov <igor.veresov@oracle.com>
Co-authored-by: John Rose <john.r.rose@oracle.com>
Co-authored-by: Morris Meyer <morris.meyer@oracle.com>
Co-authored-by: Niclas Adlertz <niclas.adlertz@oracle.com>
Co-authored-by: Rickard Backman <rickard.backman@oracle.com>
Reviewed-by: erikj, mchung, psandoz, coleenp, iklam, stefank, simonis
This commit is contained in:
Bharadwaj Yadavalli 2016-12-11 19:07:04 -08:00 committed by Vladimir Kozlov
parent 3ef35612c7
commit 2841c5eb2b
262 changed files with 19625 additions and 676 deletions

View file

@ -103,6 +103,10 @@ class Method : public Metadata {
CompiledMethod* volatile _code; // Points to the corresponding piece of native code
volatile address _from_interpreted_entry; // Cache of _code ? _adapter->i2c_entry() : _i2i_entry
#if INCLUDE_AOT && defined(TIERED)
CompiledMethod* _aot_code;
#endif
// Constructor
Method(ConstMethod* xconst, AccessFlags access_flags);
public:
@ -386,7 +390,20 @@ class Method : public Metadata {
mcs->set_rate(rate);
}
}
#endif
#if INCLUDE_AOT
void set_aot_code(CompiledMethod* aot_code) {
_aot_code = aot_code;
}
CompiledMethod* aot_code() const {
return _aot_code;
}
#else
CompiledMethod* aot_code() const { return NULL; }
#endif // INCLUDE_AOT
#endif // TIERED
int nmethod_age() const {
if (method_counters() == NULL) {
return INT_MAX;
@ -648,6 +665,10 @@ class Method : public Metadata {
// simultaneously. Use with caution.
bool has_compiled_code() const { return code() != NULL; }
#ifdef TIERED
bool has_aot_code() const { return aot_code() != NULL; }
#endif
// sizing
static int header_size() { return sizeof(Method)/wordSize; }
static int size(bool is_native);