src/share/vm/ci/ciCallProfile.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 7071307 Sdiff src/share/vm/ci

src/share/vm/ci/ciCallProfile.hpp

Print this page




  62   bool      has_receiver(int i) const { return _limit > i; }
  63   int       morphism() const          { return _morphism; }
  64 
  65   int       count() const             { return _count; }
  66   int       receiver_count(int i)  {
  67     assert(i < _limit, "out of Call Profile MorphismLimit");
  68     return _receiver_count[i];
  69   }
  70   float     receiver_prob(int i)  {
  71     assert(i < _limit, "out of Call Profile MorphismLimit");
  72     return (float)_receiver_count[i]/(float)_count;
  73   }
  74   ciMethod* method(int i)          {
  75     assert(i < _limit, "out of Call Profile MorphismLimit");
  76     return _method[i];
  77   }
  78   ciKlass*  receiver(int i)        {
  79     assert(i < _limit, "out of Call Profile MorphismLimit");
  80     return _receiver[i];
  81   }











  82 };
  83 
  84 #endif // SHARE_VM_CI_CICALLPROFILE_HPP


  62   bool      has_receiver(int i) const { return _limit > i; }
  63   int       morphism() const          { return _morphism; }
  64 
  65   int       count() const             { return _count; }
  66   int       receiver_count(int i)  {
  67     assert(i < _limit, "out of Call Profile MorphismLimit");
  68     return _receiver_count[i];
  69   }
  70   float     receiver_prob(int i)  {
  71     assert(i < _limit, "out of Call Profile MorphismLimit");
  72     return (float)_receiver_count[i]/(float)_count;
  73   }
  74   ciMethod* method(int i)          {
  75     assert(i < _limit, "out of Call Profile MorphismLimit");
  76     return _method[i];
  77   }
  78   ciKlass*  receiver(int i)        {
  79     assert(i < _limit, "out of Call Profile MorphismLimit");
  80     return _receiver[i];
  81   }
  82 
  83   // Rescale the current profile based on the incoming scale
  84   ciCallProfile rescale(double scale) {
  85     assert(scale >= 0 && scale <= 1.0, "out of range");
  86     ciCallProfile call = *this;
  87     call._count = (int)(call._count * scale);
  88     for (int i = 0; i < _morphism; i++) {
  89       call._receiver_count[i] = (int)(call._receiver_count[i] * scale);
  90     }
  91     return call;
  92   }
  93 };
  94 
  95 #endif // SHARE_VM_CI_CICALLPROFILE_HPP
src/share/vm/ci/ciCallProfile.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File