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 */ 013 package org.jikesrvm.compilers.baseline; 014 015 /** 016 * Profile data for a branch instruction. 017 */ 018 public abstract class BranchProfile { 019 /** 020 * The bytecode index of the branch instruction 021 */ 022 protected final int bci; 023 024 /** 025 * The number of times the branch was executed. 026 */ 027 protected final float freq; 028 029 /** 030 * @param _bci the bytecode index of the source branch instruction 031 * @param _freq the number of times the branch was executed 032 */ 033 BranchProfile(int _bci, float _freq) { 034 bci = _bci; 035 freq = _freq; 036 } 037 038 public final int getBytecodeIndex() { return bci; } 039 040 public final float getFrequency() { return freq; } 041 042 }