annotate hotspot/src/share/vm/gc_implementation/shared/ageTable.hpp @ 7397:5b173b4ca846

6989984: Use standard include model for Hospot Summary: Replaced MakeDeps and the includeDB files with more standardized solutions. Reviewed-by: coleenp, kvn, kamg
author stefank
date Tue, 23 Nov 2010 13:22:55 -0800
parents f4b087cbb361
children 37f75ba502b1
rev   line source
duke@1 1 /*
stefank@7397 2 * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
duke@1 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@1 4 *
duke@1 5 * This code is free software; you can redistribute it and/or modify it
duke@1 6 * under the terms of the GNU General Public License version 2 only, as
duke@1 7 * published by the Free Software Foundation.
duke@1 8 *
duke@1 9 * This code is distributed in the hope that it will be useful, but WITHOUT
duke@1 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@1 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@1 12 * version 2 for more details (a copy is included in the LICENSE file that
duke@1 13 * accompanied this code).
duke@1 14 *
duke@1 15 * You should have received a copy of the GNU General Public License version
duke@1 16 * 2 along with this work; if not, write to the Free Software Foundation,
duke@1 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@1 18 *
trims@5547 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
trims@5547 20 * or visit www.oracle.com if you need additional information or have any
trims@5547 21 * questions.
duke@1 22 *
duke@1 23 */
duke@1 24
stefank@7397 25 #ifndef SHARE_VM_GC_IMPLEMENTATION_SHARED_AGETABLE_HPP
stefank@7397 26 #define SHARE_VM_GC_IMPLEMENTATION_SHARED_AGETABLE_HPP
stefank@7397 27
stefank@7397 28 #include "oops/markOop.hpp"
stefank@7397 29 #include "oops/oop.hpp"
stefank@7397 30 #include "runtime/perfData.hpp"
stefank@7397 31
trims@5547 32 /* Copyright (c) 1992-2009 Oracle and/or its affiliates, and Stanford University.
duke@1 33 See the LICENSE file for license information. */
duke@1 34
duke@1 35 // Age table for adaptive feedback-mediated tenuring (scavenging)
duke@1 36 //
duke@1 37 // Note: all sizes are in oops
duke@1 38
duke@1 39 class ageTable VALUE_OBJ_CLASS_SPEC {
duke@1 40 friend class VMStructs;
duke@1 41
duke@1 42 public:
duke@1 43 // constants
duke@1 44 enum { table_size = markOopDesc::max_age + 1 };
duke@1 45
duke@1 46 // instance variables
duke@1 47 size_t sizes[table_size];
duke@1 48
duke@1 49 // constructor. "global" indicates that this is the global age table
duke@1 50 // (as opposed to gc-thread-local)
duke@1 51 ageTable(bool global = true);
duke@1 52
duke@1 53 // clear table
duke@1 54 void clear();
duke@1 55
duke@1 56 // add entry
duke@1 57 void add(oop p, size_t oop_size) {
duke@1 58 int age = p->age();
duke@1 59 assert(age > 0 && age < table_size, "invalid age of object");
duke@1 60 sizes[age] += oop_size;
duke@1 61 }
duke@1 62
duke@1 63 // Merge another age table with the current one. Used
duke@1 64 // for parallel young generation gc.
duke@1 65 void merge(ageTable* subTable);
apetrusenko@2009 66 void merge_par(ageTable* subTable);
duke@1 67
duke@1 68 // calculate new tenuring threshold based on age information
duke@1 69 int compute_tenuring_threshold(size_t survivor_capacity);
duke@1 70
duke@1 71 private:
duke@1 72 PerfVariable* _perf_sizes[table_size];
duke@1 73 };
stefank@7397 74
stefank@7397 75 #endif // SHARE_VM_GC_IMPLEMENTATION_SHARED_AGETABLE_HPP