< prev index next >

src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotProfilingInfo.java

Print this page




  40     private HotSpotMethodDataAccessor dataAccessor;
  41 
  42     private boolean includeNormal;
  43     private boolean includeOSR;
  44 
  45     public HotSpotProfilingInfo(HotSpotMethodData methodData, HotSpotResolvedJavaMethod method, boolean includeNormal, boolean includeOSR) {
  46         this.methodData = methodData;
  47         this.method = method;
  48         this.includeNormal = includeNormal;
  49         this.includeOSR = includeOSR;
  50         this.isMature = methodData.isProfileMature();
  51         hintPosition = 0;
  52         hintBCI = -1;
  53     }
  54 
  55     @Override
  56     public int getCodeSize() {
  57         return method.getCodeSize();
  58     }
  59 












  60     @Override
  61     public JavaTypeProfile getTypeProfile(int bci) {
  62         if (!isMature) {
  63             return null;
  64         }
  65         findBCI(bci, false);
  66         return dataAccessor.getTypeProfile(methodData, position);
  67     }
  68 
  69     @Override
  70     public JavaMethodProfile getMethodProfile(int bci) {
  71         if (!isMature) {
  72             return null;
  73         }
  74         findBCI(bci, false);
  75         return dataAccessor.getMethodProfile(methodData, position);
  76     }
  77 
  78     @Override
  79     public double getBranchTakenProbability(int bci) {




  40     private HotSpotMethodDataAccessor dataAccessor;
  41 
  42     private boolean includeNormal;
  43     private boolean includeOSR;
  44 
  45     public HotSpotProfilingInfo(HotSpotMethodData methodData, HotSpotResolvedJavaMethod method, boolean includeNormal, boolean includeOSR) {
  46         this.methodData = methodData;
  47         this.method = method;
  48         this.includeNormal = includeNormal;
  49         this.includeOSR = includeOSR;
  50         this.isMature = methodData.isProfileMature();
  51         hintPosition = 0;
  52         hintBCI = -1;
  53     }
  54 
  55     @Override
  56     public int getCodeSize() {
  57         return method.getCodeSize();
  58     }
  59 
  60     public int getDecompileCount() {
  61         return methodData.getDecompileCount();
  62     }
  63 
  64     public int getOverflowRecompileCount() {
  65         return methodData.getOverflowRecompileCount();
  66     }
  67 
  68     public int getOverflowTrapsCount() {
  69         return methodData.getOverflowTrapsCount();
  70     }
  71 
  72     @Override
  73     public JavaTypeProfile getTypeProfile(int bci) {
  74         if (!isMature) {
  75             return null;
  76         }
  77         findBCI(bci, false);
  78         return dataAccessor.getTypeProfile(methodData, position);
  79     }
  80 
  81     @Override
  82     public JavaMethodProfile getMethodProfile(int bci) {
  83         if (!isMature) {
  84             return null;
  85         }
  86         findBCI(bci, false);
  87         return dataAccessor.getMethodProfile(methodData, position);
  88     }
  89 
  90     @Override
  91     public double getBranchTakenProbability(int bci) {


< prev index next >