hotspot/src/share/vm/code/relocInfo.hpp

Print this page
rev 611 : Merge
   1 #ifdef USE_PRAGMA_IDENT_HDR
   2 #pragma ident "@(#)relocInfo.hpp        1.87 07/06/19 09:08:11 JVM"
   3 #endif
   4 /*
   5  * Copyright 1997-2006 Sun Microsystems, Inc.  All Rights Reserved.
   6  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   7  *
   8  * This code is free software; you can redistribute it and/or modify it
   9  * under the terms of the GNU General Public License version 2 only, as
  10  * published by the Free Software Foundation.
  11  *
  12  * This code is distributed in the hope that it will be useful, but WITHOUT
  13  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  14  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  15  * version 2 for more details (a copy is included in the LICENSE file that
  16  * accompanied this code).
  17  *
  18  * You should have received a copy of the GNU General Public License version
  19  * 2 along with this work; if not, write to the Free Software Foundation,
  20  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  21  *
  22  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
  23  * CA 95054 USA or visit www.sun.com if you need additional information or
  24  * have any questions.
  25  *  


1186 
1187   section_word_Relocation(address target, int section) {
1188     assert(target != NULL, "must not be null");
1189     assert(section >= 0, "must be a valid section");
1190     _target  = target;
1191     _section = section;
1192   }
1193 
1194   //void pack_data_to -- inherited
1195   void unpack_data();
1196 
1197  private:
1198   friend class RelocIterator; 
1199   section_word_Relocation() { }
1200 };
1201 
1202 
1203 class poll_Relocation : public Relocation {
1204   bool          is_data()                      { return true; }
1205   relocInfo::relocType type() { return relocInfo::poll_type; }

1206 };
1207 
1208 class poll_return_Relocation : public Relocation {
1209   bool          is_data()                      { return true; }
1210   relocInfo::relocType type() { return relocInfo::poll_return_type; }

1211 };
1212 
1213 
1214 class breakpoint_Relocation : public Relocation {
1215   relocInfo::relocType type() { return relocInfo::breakpoint_type; }
1216 
1217   enum {
1218     // attributes which affect the interpretation of the data:
1219     removable_attr = 0x0010,   // buffer [i...] allows for undoing the trap
1220     internal_attr  = 0x0020,   // the target is an internal addr (local stub)
1221     settable_attr  = 0x0040,   // the target is settable
1222 
1223     // states which can change over time:
1224     enabled_state  = 0x0100,   // breakpoint must be active in running code
1225     active_state   = 0x0200,   // breakpoint instruction actually in code
1226 
1227     kind_mask      = 0x000F,   // mask for extracting kind
1228     high_bit       = 0x4000    // extra bit which is always set
1229   };
1230 


   1 #ifdef USE_PRAGMA_IDENT_HDR
   2 #pragma ident "@(#)relocInfo.hpp        1.87 07/06/19 09:08:11 JVM"
   3 #endif
   4 /*
   5  * Copyright 1997-2008 Sun Microsystems, Inc.  All Rights Reserved.
   6  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   7  *
   8  * This code is free software; you can redistribute it and/or modify it
   9  * under the terms of the GNU General Public License version 2 only, as
  10  * published by the Free Software Foundation.
  11  *
  12  * This code is distributed in the hope that it will be useful, but WITHOUT
  13  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  14  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  15  * version 2 for more details (a copy is included in the LICENSE file that
  16  * accompanied this code).
  17  *
  18  * You should have received a copy of the GNU General Public License version
  19  * 2 along with this work; if not, write to the Free Software Foundation,
  20  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  21  *
  22  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
  23  * CA 95054 USA or visit www.sun.com if you need additional information or
  24  * have any questions.
  25  *  


1186 
1187   section_word_Relocation(address target, int section) {
1188     assert(target != NULL, "must not be null");
1189     assert(section >= 0, "must be a valid section");
1190     _target  = target;
1191     _section = section;
1192   }
1193 
1194   //void pack_data_to -- inherited
1195   void unpack_data();
1196 
1197  private:
1198   friend class RelocIterator; 
1199   section_word_Relocation() { }
1200 };
1201 
1202 
1203 class poll_Relocation : public Relocation {
1204   bool          is_data()                      { return true; }
1205   relocInfo::relocType type() { return relocInfo::poll_type; }
1206   void     fix_relocation_after_move(const CodeBuffer* src, CodeBuffer* dest);
1207 };
1208 
1209 class poll_return_Relocation : public Relocation {
1210   bool          is_data()                      { return true; }
1211   relocInfo::relocType type() { return relocInfo::poll_return_type; }
1212   void     fix_relocation_after_move(const CodeBuffer* src, CodeBuffer* dest);
1213 };
1214 
1215 
1216 class breakpoint_Relocation : public Relocation {
1217   relocInfo::relocType type() { return relocInfo::breakpoint_type; }
1218 
1219   enum {
1220     // attributes which affect the interpretation of the data:
1221     removable_attr = 0x0010,   // buffer [i...] allows for undoing the trap
1222     internal_attr  = 0x0020,   // the target is an internal addr (local stub)
1223     settable_attr  = 0x0040,   // the target is settable
1224 
1225     // states which can change over time:
1226     enabled_state  = 0x0100,   // breakpoint must be active in running code
1227     active_state   = 0x0200,   // breakpoint instruction actually in code
1228 
1229     kind_mask      = 0x000F,   // mask for extracting kind
1230     high_bit       = 0x4000    // extra bit which is always set
1231   };
1232