comparison src/share/vm/services/memoryPool.cpp @ 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 1d1603768966
children db9981fd3124
comparison
equal deleted inserted replaced
6724:36d1d483d5d6 6725:da91efe96a93
1 /* 1 /*
2 * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2003, 2012, 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.
75 // loads from anything _memory_pool_obj points to or implies. 75 // loads from anything _memory_pool_obj points to or implies.
76 instanceOop pool_obj = (instanceOop)OrderAccess::load_ptr_acquire(&_memory_pool_obj); 76 instanceOop pool_obj = (instanceOop)OrderAccess::load_ptr_acquire(&_memory_pool_obj);
77 if (pool_obj == NULL) { 77 if (pool_obj == NULL) {
78 // It's ok for more than one thread to execute the code up to the locked region. 78 // It's ok for more than one thread to execute the code up to the locked region.
79 // Extra pool instances will just be gc'ed. 79 // Extra pool instances will just be gc'ed.
80 klassOop k = Management::sun_management_ManagementFactory_klass(CHECK_NULL); 80 Klass* k = Management::sun_management_ManagementFactory_klass(CHECK_NULL);
81 instanceKlassHandle ik(THREAD, k); 81 instanceKlassHandle ik(THREAD, k);
82 82
83 Handle pool_name = java_lang_String::create_from_str(_name, CHECK_NULL); 83 Handle pool_name = java_lang_String::create_from_str(_name, CHECK_NULL);
84 jlong usage_threshold_value = (_usage_threshold->is_high_threshold_supported() ? 0 : -1L); 84 jlong usage_threshold_value = (_usage_threshold->is_high_threshold_supported() ? 0 : -1L);
85 jlong gc_usage_threshold_value = (_gc_usage_threshold->is_high_threshold_supported() ? 0 : -1L); 85 jlong gc_usage_threshold_value = (_gc_usage_threshold->is_high_threshold_supported() ? 0 : -1L);