Print this page


Split Close
Expand all
Collapse all
          --- old/src/share/vm/code/nmethod.hpp
          +++ new/src/share/vm/code/nmethod.hpp
↓ open down ↓ 73 lines elided ↑ open up ↑
  74   74    PcDesc* find_pc_desc(int pc_offset, bool approximate);
  75   75    void    add_pc_desc(PcDesc* pc_desc);
  76   76    PcDesc* last_pc_desc() { return _last_pc_desc; }
  77   77  };
  78   78  
  79   79  
  80   80  // nmethods (native methods) are the compiled code versions of Java methods.
  81   81  
  82   82  struct nmFlags {
  83   83    friend class VMStructs;
  84      -  unsigned int version:8;                 // version number (0 = first version)
  85      -  unsigned int level:4;                   // optimization level
  86      -  unsigned int age:4;                     // age (in # of sweep steps)
  87      -
  88      -  unsigned int state:2;                   // {alive, zombie, unloaded)
  89      -
  90      -  unsigned int isUncommonRecompiled:1;    // recompiled because of uncommon trap?
  91      -  unsigned int isToBeRecompiled:1;        // to be recompiled as soon as it matures
  92      -  unsigned int hasFlushedDependencies:1;  // Used for maintenance of dependencies
  93      -  unsigned int markedForReclamation:1;    // Used by NMethodSweeper
       84 +  unsigned int version:8;                    // version number (0 = first version)
       85 +  unsigned int level:4;                      // optimization level
       86 +  unsigned int age:4;                        // age (in # of sweep steps)
       87 +
       88 +  unsigned int state:2;                      // {alive, zombie, unloaded)
       89 +
       90 +  unsigned int isUncommonRecompiled:1;       // recompiled because of uncommon trap?
       91 +  unsigned int isToBeRecompiled:1;           // to be recompiled as soon as it matures
       92 +  unsigned int hasFlushedDependencies:1;     // Used for maintenance of dependencies
       93 +  unsigned int markedForReclamation:1;       // Used by NMethodSweeper
  94   94  
  95      -  unsigned int has_unsafe_access:1;       // May fault due to unsafe access.
       95 +  unsigned int has_unsafe_access:1;          // May fault due to unsafe access.
       96 +  unsigned int has_method_handle_invokes:1;  // Has this method MethodHandle invokes?
  96   97  
  97   98    void clear();
  98   99  };
  99  100  
 100  101  
 101  102  // A nmethod contains:
 102  103  //  - header                 (the nmethod structure)
 103  104  //  [Relocation]
 104  105  //  - relocation information
 105  106  //  - constant part          (doubles, longs and floats used in nmethod)
↓ open down ↓ 292 lines elided ↑ open up ↑
 398  399      flags.hasFlushedDependencies = 1;
 399  400    }
 400  401  
 401  402    bool  is_marked_for_reclamation() const         { return flags.markedForReclamation; }
 402  403    void  mark_for_reclamation()                    { check_safepoint(); flags.markedForReclamation = 1; }
 403  404    void  unmark_for_reclamation()                  { check_safepoint(); flags.markedForReclamation = 0; }
 404  405  
 405  406    bool  has_unsafe_access() const                 { return flags.has_unsafe_access; }
 406  407    void  set_has_unsafe_access(bool z)             { flags.has_unsafe_access = z; }
 407  408  
      409 +  bool  has_method_handle_invokes() const         { return flags.has_method_handle_invokes; }
      410 +  void  set_has_method_handle_invokes(bool z)     { flags.has_method_handle_invokes = z; }
      411 +
 408  412    int   level() const                             { return flags.level; }
 409  413    void  set_level(int newLevel)                   { check_safepoint(); flags.level = newLevel; }
 410  414  
 411  415    int   comp_level() const                        { return _comp_level; }
 412  416  
 413  417    int   version() const                           { return flags.version; }
 414  418    void  set_version(int v);
 415  419  
 416  420    // Non-perm oop support
 417  421    bool  on_scavenge_root_list() const                  { return (_scavenge_root_state & 1) != 0; }
↓ open down ↓ 112 lines elided ↑ open up ↑
 530  534    void copy_scopes_pcs(PcDesc* pcs, int count);
 531  535    void copy_scopes_data(address buffer, int size);
 532  536  
 533  537    // deopt
 534  538    // return true is the pc is one would expect if the frame is being deopted.
 535  539    bool is_deopt_pc(address pc);
 536  540    // Accessor/mutator for the original pc of a frame before a frame was deopted.
 537  541    address get_original_pc(const frame* fr) { return *orig_pc_addr(fr); }
 538  542    void    set_original_pc(const frame* fr, address pc) { *orig_pc_addr(fr) = pc; }
 539  543  
      544 +  // MethodHandle
      545 +  bool is_method_handle_return(address return_pc);
      546 +
 540  547    // jvmti support:
 541  548    void post_compiled_method_load_event();
 542  549  
 543  550    // verify operations
 544  551    void verify();
 545  552    void verify_scopes();
 546  553    void verify_interrupt_point(address interrupt_point);
 547  554  
 548  555    // printing support
 549  556    void print()                          const;
↓ open down ↓ 90 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX