Mercurial > hg > graal-jvmci-8
comparison src/share/vm/ci/ciCallProfile.hpp @ 3464:be4ca325525a
Merge.
author | Thomas Wuerthinger <thomas@wuerthinger.net> |
---|---|
date | Wed, 27 Jul 2011 17:32:44 -0700 |
parents | 66ecfc755c86 f56542cb325a |
children | 04b9a2566eec |
comparison
equal
deleted
inserted
replaced
3239:7c4b4daac19b | 3464:be4ca325525a |
---|---|
34 // at some call site | 34 // at some call site |
35 class ciCallProfile : StackObj { | 35 class ciCallProfile : StackObj { |
36 private: | 36 private: |
37 // Fields are initialized directly by ciMethod::call_profile_at_bci. | 37 // Fields are initialized directly by ciMethod::call_profile_at_bci. |
38 friend class ciMethod; | 38 friend class ciMethod; |
39 friend class ciMethodHandle; | |
39 | 40 |
40 enum { MorphismLimit = 2 }; // Max call site's morphism we care about | 41 enum { MorphismLimit = 2 }; // Max call site's morphism we care about |
41 int _limit; // number of receivers have been determined | 42 int _limit; // number of receivers have been determined |
42 int _morphism; // determined call site's morphism | 43 int _morphism; // determined call site's morphism |
43 int _count; // # times has this call been executed | 44 int _count; // # times has this call been executed |
56 | 57 |
57 void add_receiver(ciKlass* receiver, int receiver_count); | 58 void add_receiver(ciKlass* receiver, int receiver_count); |
58 | 59 |
59 public: | 60 public: |
60 // Note: The following predicates return false for invalid profiles: | 61 // Note: The following predicates return false for invalid profiles: |
61 bool has_receiver(int i) { return _limit > i; } | 62 bool has_receiver(int i) const { return _limit > i; } |
62 int morphism() { return _morphism; } | 63 int morphism() const { return _morphism; } |
63 int limit() { return _limit; } | 64 int limit() const { return _limit; } |
64 | 65 |
65 int count() { return _count; } | 66 int count() const { return _count; } |
66 int receiver_count(int i) { | 67 int receiver_count(int i) { |
67 assert(i < _limit, "out of Call Profile MorphismLimit"); | 68 assert(i < _limit, "out of Call Profile MorphismLimit"); |
68 return _receiver_count[i]; | 69 return _receiver_count[i]; |
69 } | 70 } |
70 float receiver_prob(int i) { | 71 float receiver_prob(int i) { |