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.adaptive; 014 015import org.jikesrvm.classloader.RVMField; 016import org.jikesrvm.classloader.NormalMethod; 017import static org.jikesrvm.runtime.EntrypointHelper.getField; 018import static org.jikesrvm.runtime.EntrypointHelper.getMethod; 019 020/** 021 * Entrypoints that are valid when the build includes the adaptive optimization system. 022 */ 023public final class AosEntrypoints { 024 public static final NormalMethod osrGetRefAtMethod = 025 getMethod(org.jikesrvm.osr.ObjectHolder.class, "getRefAt", "(II)Ljava/lang/Object;"); 026 public static final NormalMethod osrCleanRefsMethod = getMethod(org.jikesrvm.osr.ObjectHolder.class, "cleanRefs", "(I)V"); 027 public static final RVMField methodListenerNumSamplesField = 028 getField(org.jikesrvm.adaptive.measurements.listeners.MethodListener.class, "numSamples", int.class); 029 public static final RVMField edgeListenerUpdateCalledField = 030 getField(org.jikesrvm.adaptive.measurements.listeners.EdgeListener.class, "updateCalled", int.class); 031 public static final RVMField edgeListenerSamplesTakenField = 032 getField(org.jikesrvm.adaptive.measurements.listeners.EdgeListener.class, "samplesTaken", int.class); 033 public static final RVMField yieldCountListenerNumYieldsField = 034 getField(org.jikesrvm.adaptive.measurements.listeners.YieldCounterListener.class, "numYields", int.class); 035 public static final RVMField counterArrayManagerCounterArraysField = 036 getField(org.jikesrvm.adaptive.measurements.instrumentation.CounterArrayManager.class, "counterArrays", double[][].class); 037 public static final RVMField invocationCountsField = 038 getField(org.jikesrvm.adaptive.recompilation.InvocationCounts.class, "counts", int[].class); 039 public static final NormalMethod invocationCounterTrippedMethod = 040 getMethod(org.jikesrvm.adaptive.recompilation.InvocationCounts.class, "counterTripped", "(I)V"); 041 public static final RVMField globalCBSField = 042 getField(org.jikesrvm.adaptive.recompilation.instrumentation.CounterBasedSampling.class, "globalCounter", int.class); 043 public static final RVMField threadCBSField = getField(org.jikesrvm.scheduler.RVMThread.class, "thread_cbs_counter", int.class); 044 public static final RVMField cbsResetValueField = 045 getField(org.jikesrvm.adaptive.recompilation.instrumentation.CounterBasedSampling.class, "resetValue", int.class); 046 public static final RVMField specializedMethodsField = 047 getField(org.jikesrvm.compilers.opt.specialization.SpecializedMethodPool.class, 048 "specializedMethods", 049 org.jikesrvm.compilers.common.CodeArray[].class); 050 051 private AosEntrypoints() { 052 // prevent instantiation 053 } 054}