@@ -3512,93 +3512,6 @@ TR_IProfiler::countEntries()
3512
3512
return count;
3513
3513
}
3514
3514
3515
-
3516
- // helper functions for replay
3517
- //
3518
- void TR_IProfiler::setupEntriesInHashTable (TR_IProfiler *ip)
3519
- {
3520
- for (int32_t bucket = 0 ; bucket < TR::Options::_iProfilerBcHashTableSize; bucket++)
3521
- {
3522
- TR_IPBytecodeHashTableEntry *entry = _bcHashTable[bucket], *prevEntry = NULL ;
3523
-
3524
- while (entry)
3525
- {
3526
- uintptr_t pc = entry->getPC ();
3527
-
3528
- if (pc == 0 ||
3529
- pc == 0xffffffff )
3530
- {
3531
- printf (" invalid pc for entry %p %#" OMR_PRIxPTR " \n " , entry, pc);
3532
- fflush (stdout);
3533
- prevEntry = entry;
3534
- entry = entry->getNext ();
3535
- continue ;
3536
- }
3537
-
3538
-
3539
- TR_IPBytecodeHashTableEntry *newEntry = ip->findOrCreateEntry (bucket, pc, true );
3540
- // check for entries corresponding to
3541
- // unloaded methods, findOrCreateEntry will
3542
- // return NULL above. its ok to ignore these entries
3543
- // as they are invalid anyway
3544
- //
3545
- if (newEntry)
3546
- ip->copyDataFromEntry (entry, newEntry, NULL );
3547
- prevEntry = entry;
3548
- entry = entry->getNext ();
3549
- }
3550
- }
3551
- printf (" Finished adding entries from core to new iprofiler\n " );
3552
- }
3553
-
3554
- void TR_IProfiler::copyDataFromEntry (TR_IPBytecodeHashTableEntry *oldEntry, TR_IPBytecodeHashTableEntry *newEntry, TR_IProfiler *ip)
3555
- {
3556
- U_8 *oldEntryPC = (U_8*)oldEntry->getPC ();
3557
- U_8 byteCodeType = *(oldEntryPC);
3558
- if (isSwitch (byteCodeType))
3559
- {
3560
- ;// FIXME: dont care about switches at the moment
3561
- }
3562
- else
3563
- {
3564
- // isCompact(byteCodeType) or callGraph entries
3565
- //
3566
- printf (" populating entry for pc %p newentrypc %p\n " , oldEntryPC, (U_8*)newEntry->getPC ());
3567
- // vft entries for whacking
3568
- //
3569
- void *oldVft = *(void **)(oldEntry);
3570
- void *newVft = *(void **)(newEntry);
3571
- *(void **)(oldEntry) = newVft;
3572
- if (isCompact (byteCodeType))
3573
- {
3574
- uintptr_t data = oldEntry->getData ();
3575
- // printf("got oldvft = %p newvft = %p data %p\n", oldvft, newvft, data);
3576
- newEntry->setData (data);
3577
- }
3578
- else
3579
- {
3580
- // callGraph entry
3581
- //
3582
- CallSiteProfileInfo *oldCSInfo = ((TR_IPBCDataCallGraph*)(oldEntry))->getCGData ();
3583
- CallSiteProfileInfo *newCSInfo = ((TR_IPBCDataCallGraph*)(newEntry))->getCGData ();
3584
- printf (" got oldCSInfo %p\n " , oldCSInfo);
3585
-
3586
- if (oldCSInfo)
3587
- {
3588
- for (int32_t i = 0 ; i < NUM_CS_SLOTS; i++)
3589
- {
3590
- printf (" got clazz %#" OMR_PRIxPTR " weight %d\n " , oldCSInfo->getClazz (i), oldCSInfo->_weight [i]);
3591
- newCSInfo->setClazz (i, oldCSInfo->getClazz (i));
3592
- newCSInfo->_weight [i] = oldCSInfo->_weight [i];
3593
- }
3594
- }
3595
-
3596
- if (((TR_IPBCDataCallGraph*)oldEntry)->isWarmCallGraphTooBig ())
3597
- ((TR_IPBCDataCallGraph*)newEntry)->setWarmCallGraphTooBig ();
3598
- }
3599
- }
3600
- }
3601
-
3602
3515
void TR_IProfiler::checkMethodHashTable ()
3603
3516
{
3604
3517
static char *fname = feGetEnv (" TR_PrintMethodHashTableFileName" );
0 commit comments