Mercurial > hg > truffle
diff src/share/vm/c1/c1_CodeStubs.hpp @ 6725:da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
Summary: Remove PermGen, allocate meta-data in metaspace linked to class loaders, rewrite GC walking, rewrite and rename metadata to be C++ classes
Reviewed-by: jmasa, stefank, never, coleenp, kvn, brutisso, mgerdin, dholmes, jrose, twisti, roland
Contributed-by: jmasa <jon.masamitsu@oracle.com>, stefank <stefan.karlsson@oracle.com>, mgerdin <mikael.gerdin@oracle.com>, never <tom.rodriguez@oracle.com>
author | coleenp |
---|---|
date | Sat, 01 Sep 2012 13:25:18 -0400 |
parents | 09aad8452938 |
children | db9981fd3124 |
line wrap: on
line diff
--- a/src/share/vm/c1/c1_CodeStubs.hpp Fri Aug 31 16:39:35 2012 -0700 +++ b/src/share/vm/c1/c1_CodeStubs.hpp Sat Sep 01 13:25:18 2012 -0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -346,7 +346,8 @@ public: enum PatchID { access_field_id, - load_klass_id + load_klass_id, + load_mirror_id }; enum constants { patch_info_size = 3 @@ -360,7 +361,7 @@ Label _patch_site_continuation; Register _obj; CodeEmitInfo* _info; - int _oop_index; // index of the patchable oop in nmethod oop table if needed + int _index; // index of the patchable oop or Klass* in nmethod oop or metadata table if needed static int _patch_info_offset; void align_patch_site(MacroAssembler* masm); @@ -368,10 +369,10 @@ public: static int patch_info_offset() { return _patch_info_offset; } - PatchingStub(MacroAssembler* masm, PatchID id, int oop_index = -1): + PatchingStub(MacroAssembler* masm, PatchID id, int index = -1): _id(id) , _info(NULL) - , _oop_index(oop_index) { + , _index(index) { if (os::is_MP()) { // force alignment of patch sites on MP hardware so we // can guarantee atomic writes to the patch site. @@ -399,8 +400,8 @@ } NativeMovRegMem* n_move = nativeMovRegMem_at(pc_start()); n_move->set_offset(field_offset); - } else if (_id == load_klass_id) { - assert(_obj != noreg, "must have register object for load_klass"); + } else if (_id == load_klass_id || _id == load_mirror_id) { + assert(_obj != noreg, "must have register object for load_klass/load_mirror"); #ifdef ASSERT // verify that we're pointing at a NativeMovConstReg nativeMovConstReg_at(pc_start());