src/share/vm/oops/compiledICHolder.hpp

changeset 8997
f8a45a60bc6b
parent 4037
da91efe96a93
child 9041
95a08233f46c
child 9185
82f9d3b7e317
     1.1 --- a/src/share/vm/oops/compiledICHolder.hpp	Tue Aug 08 12:02:01 2017 +0100
     1.2 +++ b/src/share/vm/oops/compiledICHolder.hpp	Fri Sep 29 14:30:05 2017 -0400
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -28,8 +28,9 @@
    1.11  #include "oops/oop.hpp"
    1.12  
    1.13  // A CompiledICHolder* is a helper object for the inline cache implementation.
    1.14 -// It holds an intermediate value (method+klass pair) used when converting from
    1.15 -// compiled to an interpreted call.
    1.16 +// It holds:
    1.17 +//   (1) (method+klass pair) when converting from compiled to an interpreted call
    1.18 +//   (2) (klass+klass pair) when calling itable stub from megamorphic compiled call
    1.19  //
    1.20  // These are always allocated in the C heap and are freed during a
    1.21  // safepoint by the ICBuffer logic.  It's unsafe to free them earlier
    1.22 @@ -44,14 +45,14 @@
    1.23    static volatile int _live_not_claimed_count; // allocated but not yet in use so not
    1.24                                                 // reachable by iterating over nmethods
    1.25  
    1.26 -  Method* _holder_method;
    1.27 +  Metadata* _holder_metadata;
    1.28    Klass*    _holder_klass;    // to avoid name conflict with oopDesc::_klass
    1.29    CompiledICHolder* _next;
    1.30  
    1.31   public:
    1.32    // Constructor
    1.33 -  CompiledICHolder(Method* method, Klass* klass)
    1.34 -      : _holder_method(method), _holder_klass(klass) {
    1.35 +  CompiledICHolder(Metadata* metadata, Klass* klass)
    1.36 +      : _holder_metadata(metadata), _holder_klass(klass) {
    1.37  #ifdef ASSERT
    1.38      Atomic::inc(&_live_count);
    1.39      Atomic::inc(&_live_not_claimed_count);
    1.40 @@ -69,19 +70,20 @@
    1.41    static int live_not_claimed_count() { return _live_not_claimed_count; }
    1.42  
    1.43    // accessors
    1.44 -  Method* holder_method() const     { return _holder_method; }
    1.45    Klass*    holder_klass()  const     { return _holder_klass; }
    1.46 +  Metadata* holder_metadata() const   { return _holder_metadata; }
    1.47  
    1.48 -  void set_holder_method(Method* m) { _holder_method = m; }
    1.49 -  void set_holder_klass(Klass* k)   { _holder_klass = k; }
    1.50 +  void set_holder_metadata(Metadata* m) { _holder_metadata = m; }
    1.51 +  void set_holder_klass(Klass* k)     { _holder_klass = k; }
    1.52  
    1.53 -  // interpreter support (offsets in bytes)
    1.54 -  static int holder_method_offset()   { return offset_of(CompiledICHolder, _holder_method); }
    1.55 +  static int holder_metadata_offset() { return offset_of(CompiledICHolder, _holder_metadata); }
    1.56    static int holder_klass_offset()    { return offset_of(CompiledICHolder, _holder_klass); }
    1.57  
    1.58    CompiledICHolder* next()     { return _next; }
    1.59    void set_next(CompiledICHolder* n) { _next = n; }
    1.60  
    1.61 +  bool is_loader_alive(BoolObjectClosure* is_alive);
    1.62 +
    1.63    // Verify
    1.64    void verify_on(outputStream* st);
    1.65  

mercurial