comparison src/share/vm/oops/oop.hpp @ 12056:740e263c80c6

8003424: Enable Class Data Sharing for CompressedOops 8016729: ObjectAlignmentInBytes=16 now forces the use of heap based compressed oops 8005933: The -Xshare:auto option is ignored for -server Summary: Move klass metaspace above the heap and support CDS with compressed klass ptrs. Reviewed-by: coleenp, kvn, mgerdin, tschatzl, stefank
author hseigel
date Thu, 15 Aug 2013 20:04:10 -0400
parents db9981fd3124
children ad72068ac41e
comparison
equal deleted inserted replaced
12055:d96f52012aaa 12056:740e263c80c6
1 /* 1 /*
2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 2013, 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.
60 friend class VMStructs; 60 friend class VMStructs;
61 private: 61 private:
62 volatile markOop _mark; 62 volatile markOop _mark;
63 union _metadata { 63 union _metadata {
64 Klass* _klass; 64 Klass* _klass;
65 narrowOop _compressed_klass; 65 narrowKlass _compressed_klass;
66 } _metadata; 66 } _metadata;
67 67
68 // Fast access to barrier set. Must be initialized. 68 // Fast access to barrier set. Must be initialized.
69 static BarrierSet* _bs; 69 static BarrierSet* _bs;
70 70
82 void init_mark(); 82 void init_mark();
83 83
84 Klass* klass() const; 84 Klass* klass() const;
85 Klass* klass_or_null() const volatile; 85 Klass* klass_or_null() const volatile;
86 Klass** klass_addr(); 86 Klass** klass_addr();
87 narrowOop* compressed_klass_addr(); 87 narrowKlass* compressed_klass_addr();
88 88
89 void set_klass(Klass* k); 89 void set_klass(Klass* k);
90 90
91 // For klass field compression 91 // For klass field compression
92 int klass_gap() const; 92 int klass_gap() const;
187 static oop atomic_compare_exchange_oop(oop exchange_value, 187 static oop atomic_compare_exchange_oop(oop exchange_value,
188 volatile HeapWord *dest, 188 volatile HeapWord *dest,
189 oop compare_value, 189 oop compare_value,
190 bool prebarrier = false); 190 bool prebarrier = false);
191 191
192 // klass encoding for klass pointer in objects.
193 static narrowOop encode_klass_not_null(Klass* v);
194 static narrowOop encode_klass(Klass* v);
195
196 static Klass* decode_klass_not_null(narrowOop v);
197 static Klass* decode_klass(narrowOop v);
198
199 // Access to fields in a instanceOop through these methods. 192 // Access to fields in a instanceOop through these methods.
200 oop obj_field(int offset) const; 193 oop obj_field(int offset) const;
201 volatile oop obj_field_volatile(int offset) const; 194 volatile oop obj_field_volatile(int offset) const;
202 void obj_field_put(int offset, oop value); 195 void obj_field_put(int offset, oop value);
203 void obj_field_put_raw(int offset, oop value); 196 void obj_field_put_raw(int offset, oop value);