src/hotspot/share/code/relocInfo.hpp
changeset 48486 bda5211e7876
parent 47216 71c04702a3d5
child 49373 47b5652f2928
equal deleted inserted replaced
48485:258a4dab74a7 48486:bda5211e7876
     1 /*
     1 /*
     2  * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
   908     new(rh) oop_Relocation(oop_index, offset);
   908     new(rh) oop_Relocation(oop_index, offset);
   909     return rh;
   909     return rh;
   910   }
   910   }
   911   // an oop in the instruction stream
   911   // an oop in the instruction stream
   912   static RelocationHolder spec_for_immediate() {
   912   static RelocationHolder spec_for_immediate() {
       
   913     // If no immediate oops are generated, we can skip some walks over nmethods.
       
   914     // Assert that they don't get generated accidently!
       
   915     assert(relocInfo::mustIterateImmediateOopsInCode(),
       
   916            "Must return true so we will search for oops as roots etc. in the code.");
   913     const int oop_index = 0;
   917     const int oop_index = 0;
   914     const int offset    = 0;    // if you want an offset, use the oop pool
   918     const int offset    = 0;    // if you want an offset, use the oop pool
   915     RelocationHolder rh = newHolder();
   919     RelocationHolder rh = newHolder();
   916     new(rh) oop_Relocation(oop_index, offset);
   920     new(rh) oop_Relocation(oop_index, offset);
   917     return rh;
   921     return rh;