harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From var...@apache.org
Subject svn commit: r620795 - /harmony/enhanced/drlvm/trunk/vm/em/src/EdgeProfileCollector.cpp
Date Tue, 12 Feb 2008 13:38:21 GMT
Author: varlax
Date: Tue Feb 12 05:38:19 2008
New Revision: 620795

URL: http://svn.apache.org/viewvc?rev=620795&view=rev
Log:
Replaced assert with more graceful handling, because key generation does not produce 100%
unique id per HIR topology and in case of mis-mapping recompilation just falls back to static
profile.

Modified:
    harmony/enhanced/drlvm/trunk/vm/em/src/EdgeProfileCollector.cpp

Modified: harmony/enhanced/drlvm/trunk/vm/em/src/EdgeProfileCollector.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/em/src/EdgeProfileCollector.cpp?rev=620795&r1=620794&r2=620795&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/em/src/EdgeProfileCollector.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/em/src/EdgeProfileCollector.cpp Tue Feb 12 05:38:19 2008
@@ -135,9 +135,7 @@
 {
     //log2 search
     EdgeMap::const_iterator it = lower_bound(cntMap.begin(), cntMap.end(), key);
-    assert(it!=cntMap.end());
-    uint32 val = *it;
-    if (val!=key) {
+    if (it == cntMap.end() || *it != key) {
         return NULL;
     }
     uint32 idx = (uint32)(it - cntMap.begin());



Mime
View raw message