File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,14 @@ uintptr_t
67
67
J9::VMMethodEnv::startPC (TR_OpaqueMethodBlock *method)
68
68
{
69
69
J9Method *j9method = reinterpret_cast <J9Method *>(method);
70
- return reinterpret_cast <uintptr_t >(TR::CompilationInfo::getJ9MethodStartPC (j9method));
70
+ uintptr_t returnStartPC = reinterpret_cast <uintptr_t >(TR::CompilationInfo::getJ9MethodStartPC (j9method));
71
+
72
+ if ((returnStartPC & J9_STARTPC_NOT_TRANSLATED) == J9_STARTPC_NOT_TRANSLATED)
73
+ {
74
+ returnStartPC = 0 ;
75
+ }
76
+
77
+ return returnStartPC;
71
78
}
72
79
73
80
Original file line number Diff line number Diff line change @@ -552,7 +552,8 @@ J9::CodeCache::addFreeBlock(void *voidMetaData)
552
552
{
553
553
// There could be several bodyInfo pointing to the same methodInfo
554
554
// Prevent deallocating twice by freeing only for the last body
555
- if (TR::Compiler->mtd .startPC ((TR_OpaqueMethodBlock*)metaData->ramMethod ) == (uintptr_t )metaData->startPC )
555
+ uintptr_t ramMethodStartPC = TR::Compiler->mtd .startPC ((TR_OpaqueMethodBlock*)metaData->ramMethod );
556
+ if ((ramMethodStartPC != 0 ) && (ramMethodStartPC == (uintptr_t )metaData->startPC ))
556
557
{
557
558
// Clear profile info
558
559
pmi->setBestProfileInfo (NULL );
You can’t perform that action at this time.
0 commit comments