001/* 002 * This file is part of the Jikes RVM project (http://jikesrvm.org). 003 * 004 * This file is licensed to You under the Eclipse Public License (EPL); 005 * You may not use this file except in compliance with the License. You 006 * may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/eclipse-1.0.php 009 * 010 * See the COPYRIGHT.txt file distributed with this work for information 011 * regarding copyright ownership. 012 */ 013package org.jikesrvm.objectmodel; 014 015import static org.jikesrvm.mm.mminterface.MemoryManagerConstants.GENERATE_GC_TRACE; 016import static org.jikesrvm.runtime.UnboxedSizeConstants.LOG_BYTES_IN_ADDRESS; 017 018/** 019 * Defines other header words not used for 020 * core Java language support of memory allocation. 021 * Typically these are extra header words used for various 022 * kinds of instrumentation or profiling. 023 * 024 * @see ObjectModel 025 */ 026public final class MiscHeaderConstants { 027 028 /********************* 029 * Support for GC Tracing; uses either 0 or 3 words of MISC HEADER 030 */ 031 032 /* amount by which tracing causes headers to grow */ 033 public static final int GC_TRACING_HEADER_WORDS = 034 (GENERATE_GC_TRACE ? 3 : 0); 035 public static final int GC_TRACING_HEADER_BYTES = GC_TRACING_HEADER_WORDS << LOG_BYTES_IN_ADDRESS; 036 037 /** 038 * How many bytes are used by all misc header fields? 039 */ 040 public static final int NUM_BYTES_HEADER = GC_TRACING_HEADER_BYTES; // + YYY_HEADER_BYTES; 041 042 private MiscHeaderConstants() { 043 // prevent instantiation 044 } 045 046}