char* sendDesc::sendMessage( frame* lookupFrame, oop receiver, oop perform_selector, oop perform_delegatee, oop arg1 ) { ShowLookupInMonitor sl; LookupType type= lookupType(); oop sel = static_or_dynamic_selector( perform_selector, type); oop del = static_or_dynamic_delegatee( perform_delegatee, type); sendMessagePrologue( receiver, lookupFrame ); if ( !Trace) { // try codeTable first (order of magnitude faster) char* r = fastCacheLookupAndBackpatch(type, receiver->map()->enclosing_mapOop(), sel, del); if (r) { if (SilentTrace) LOG_EVENT1("SendMessage: fast-found %#lx", r); return r; } } // have to do it the slow way ResourceMark m; FlushRegisterWindows(); // for vframe conversion below cacheProbingLookup L( receiver, sel, del, MH_TBD, // method holder new_vframe(lookupFrame), this, NULL, // DIDesc false ); // don't want a debug version // should we have switched stacks sooner? (dmu) also in SendDIMessage nmethod* nm = switchToVMStack( SendMessage_cont, &L ); if (SilentTrace) LOG_EVENT1("sendDesc::sendMessage: found %#lx", nm); return Interpret ? L.interpretResultForCompiledSender(arg1) : nm->verifiedEntryPoint(); }
DeltaProcess::DeltaProcess(oop receiver, symbolOop selector, bool createThread) { _receiver = receiver; _selector = selector; _state = initialized; _is_terminating = false; _event = os::create_event(false); _thread = createThread ? os::create_thread((int (*)(void*)) &launch_delta, (void*) this, &_thread_id) : os::starting_thread(&_thread_id); _stack_limit = (char*)os::stack_limit(_thread); _unwind_head = NULL; _firstHandle = NULL; _time_stamp = 0; _isCallback = false; LOG_EVENT1("creating process %#lx", this); set_last_Delta_fp(NULL); set_last_Delta_sp(NULL); set_last_Delta_pc(NULL); Processes::add(this); }
nmethod* cacheProbingLookup::compileOrReuse() { nmethod* nm = findMethodToReuse(); if ( nm == cannotReuse ) { nm= compilingLookup::compileOrReuse(); updateCache(nm); return nm; } if ( nm == compileAndReuse ) { // compile in context of method holder and reuse MethodLookupKey orig(&key); key= canonical_key; nm= compilingLookup::compileOrReuse(); key= orig; updateCache(nm); updateCache(nm, &canonical_key); return nm; } // reuse nm const char *s= sprintName(NULL, selector()); if (PrintCompilation) lprintf("*Reusing NIC method %#lx for selector %s\n", nm, s); LOG_EVENT1("Reusing NIC method %#lx", nm); nm->addDeps(deps); updateCache(nm, &key); return nm; }
VOID L1Config_Dump(L1Config *pThis) { UINT16 nFrame = 0; // LOG_EVENT( "Dumping L1Config Data 0x%x", pThis); LOG_EVENT1( "Dumping L1Config Data 0x%x", pThis); // LOG_EVENT( "Inputs\n---------"); LOG_EVENT0( "Inputs\n---------"); // LOG_EVENT( "ChannelComb: %d TN: %d", pThis->eChannelComb, pThis->nTN); LOG_EVENT2( "ChannelComb: %d TN: %d", pThis->eChannelComb, pThis->nTN); // LOG_EVENT( "Direction: %d(0-DL, 1-UL), VocoderType: %d", pThis->eDir, pThis->eVocoderType); LOG_EVENT2( "Direction: %d(0-DL, 1-UL), VocoderType: %d", pThis->eDir, pThis->eVocoderType); // LOG_EVENT( "BSIC: %d and Coder Type: %d (0-Decoder, 1-Encoder)", pThis->nBSIC, pThis->eL1fec_Type); LOG_EVENT2( "BSIC: %d and Coder Type: %d (0-Decoder, 1-Encoder)", pThis->nBSIC, pThis->eL1fec_Type); // LOG_EVENT( "Outputs\n---------"); LOG_EVENT0( "Outputs\n---------"); // LOG_EVENT( "MaxL1FECBlockPerChannel required: %d MaxLogChanClassPerChannel required: %d", pThis->nMaxL1FECBlockPerChannel, pThis->nMaxLogChanClassPerChannel); LOG_EVENT2( "MaxL1FECBlockPerChannel required: %d MaxLogChanClassPerChannel required: %d", pThis->nMaxL1FECBlockPerChannel, pThis->nMaxLogChanClassPerChannel); // LOG_EVENT( "Multiframe Table\n---------------"); LOG_EVENT0( "Multiframe Table\n---------------"); for(nFrame = 0; nFrame < MAX_MODULES; nFrame++) { //LOG_EVENT( "FrameNum: %d BurstType: %s", nFrame, pThis->pL1FECTable[nFrame]->pTDFrm->sName); LOG_EVENT2( "FrameNum: %d BurstType: %s", nFrame, pThis->pL1FECTable[nFrame]->pTDFrm->sName); } }
void nmethod::invalidate() { if (isInvalid()) return; processes->needsInvalidate = true; # if GENERATE_DEBUGGING_AIDS if (CheckAssertions && this == (nmethod*)catchThisOne) warning("caught nmethod"); # endif if (PrintMethodInvalidation) { lprintf("*invalidating nmethod 0x%lx (", (void*)this); printName(0, key.selector); lprintf(")\n"); } LOG_EVENT1("invalidating nmethod %#lx", this); flags.isInvalid = true; unlink(); }
DeltaProcess::DeltaProcess(oop receiver, symbolOop selector) { _receiver = receiver; _selector = selector; _state = initialized; _is_terminating = false; _event = os::create_event(false); _thread = os::create_thread((int (*)(void*)) &launch_delta, (void*) this, &_thread_id); _unwind_head = NULL; _time_stamp = 0; LOG_EVENT1("creating process %#lx", this); set_last_Delta_fp(NULL); set_last_Delta_sp(NULL); set_last_Delta_pc(NULL); Processes::add(this); }
static bool validateContextChain(blockClosureOop block) { assert(block->is_block(), "must be block"); bool is_valid = true; { contextOop con = block->lexical_scope(); // verify entire context chain assert(con->is_context(), "expecting a context"); while (true) { if (con->unoptimized_context() != NULL) { is_valid = false; break; } if (!con->has_outer_context()) break; con = con->outer_context(); } } if (is_valid) return true; assert(block->isCompiledBlock(), "we should be in a compiled block"); // Patch the blockClosure methodOop method = block->method(); nmethod* nm = block->jump_table_entry()->block_nmethod(); LOG_EVENT1("Deoptimized context in blockClosure -> switch to methodOop 0x%lx", nm); { block->set_method(method); contextOop con = block->lexical_scope(); contextOop un_con = con->unoptimized_context(); if (un_con) { block->set_lexical_scope(un_con); } else { Unimplemented(); } } return false; }
void oTable::gc_mark_rest() { for (; current.buffer; current.buffer= current.buffer->next, current.index= 0) { for (; current.index < object_table_size; current.index++) { if ( current.buffer == point.buffer && current.index == point.index) return; oopsOop p = (oopsOop) current.buffer->entries[current.index].obj; # if GENERATE_DEBUGGING_AIDS if (CheckAssertions) { LOG_EVENT2("Marking map of 0x%x index %d", p, current.index); } # endif p->map()->gc_mark_contents(p); # if GENERATE_DEBUGGING_AIDS if (CheckAssertions) { LOG_EVENT1("Marking referents of 0x%x", p); } # endif p->gc_mark_referents(); } } }
static void deoptimize_context_and_patch_block(blockClosureOop block) { assert(block->is_block(), "must be block"); assert(block->isCompiledBlock(), "we should be in a compiled block"); // Patch the blockClosure methodOop method = block->method(); nmethod* nm = block->jump_table_entry()->block_nmethod(); LOG_EVENT1("Deoptimized context in blockClosure -> switch to methodOop 0x%lx", nm); contextOop con = block->lexical_scope(); block->set_method(method); if (method->expectsContext()) { guarantee(con && con->is_context(), "Optimized context must be present"); // we have (nm, con) the deoptimize the context contextOop unoptimized_con = con->unoptimized_context(); guarantee(unoptimized_con && unoptimized_con->is_context(), "Unoptimized context must be present"); block->set_lexical_scope(unoptimized_con); } else { guarantee(!con->is_context(), "Cannot be a context"); } }
static VOID DUCTx_TskProcessJob(DUCTx *pThis) { GSMTime oTime; UINT32 nCurrentFN; UINT8 nID; // static UINT32 nCount = 0; UINT16 nReadIndex; INT16 nTimeLimit; SysTime oPrevTime, oNow; UINT8 nDUC = 0; while(1) { Signal_Pend(&pThis->oSigProcessJob); Signal_Post(GetIIPCSignal()); for( nID = 0; nID < MAX_TX_MGR; nID++ ) { nReadIndex = oTxPacket[nID].nReadIndex; if( oTxPacket[nID].oJob[nReadIndex].bWrote == TRUE ) { volatile DUC_TxData *pPacket; // UINT32 nDiff; // SysTime oNow; INT64 nDiffUS; SysTime_Now(&oNow); nDiffUS = SysTime_DeltaUs(&oNow,&oTxPacket[nID].oJob[nReadIndex].oTimeToSend); if ( oTxPacket[nID].oJob[nReadIndex].bCB == TRUE ) { nTimeLimit = 1; } else { nTimeLimit = 1; } if( nDiffUS >= nTimeLimit ) continue; if( oTxPacket[nID].oJob[nReadIndex].bDataPak == TRUE ) { pPacket = (volatile DUC_TxData *)oTxPacket[nID].oJob[nReadIndex].pDataPacket; if(nCBTxChannel != nPrevCBTxChannel) { // LOG_FATAL_CB("nCBTxChannel = %d nPrevCBTxChannel = %d",nCBTxChannel,nPrevCBTxChannel); nPrevCBTxChannel = nCBTxChannel; } if(nCBTxChannel == 0) { // LOG_FATAL_CB("B4 MEMSET:pPacket->oData.DUCBurst.Data[19] = %d", pPacket->oData.DUCBurst.Data[19]); memset((VOID *)&pPacket->oData.DUCBurst.Data[0],0,20); // LOG_FATAL_CB("AFTER MEMSET: pPacket->oData.DUCBurst.Data[19] = %d", pPacket->oData.DUCBurst.Data[19]); for(nDUC=0;nDUC<4;nDUC++) { pPacket->oData.ValidDUCFlag = (DataDUCFlag)(1 << nDUC); Srio_TxPacket(Srio_GetHandle(), (void *)pPacket, pPacket->Header.nByteCnt+4, 0x1234, // FPGA Device ID. 0x8D000000, // Target Ram address. Dummy address SRIO_IF_1); } } Srio_TxPacket(Srio_GetHandle(), (void *)pPacket, pPacket->Header.nByteCnt+4, 0x1234, // FPGA Device ID. 0x8D000000, // Target Ram address. Dummy address SRIO_IF_1); oPrevTimetoSend[nID] = oTxPacket[nID].oJob[nReadIndex].oTimeToSend; SysTime_Now(&oNow); if( SysTime_DeltaUs(&oPrevTime,&oNow) > 730 ) { //LOG_EVENT("--------------DiffUS: %d", SysTime_DeltaUs(&oPrevTime,&oNow)); LOG_EVENT1("--------------DiffUS: %d", SysTime_DeltaUs(&oPrevTime,&oNow)); //LOG_EVENT("Processed FN: %d", oTxPacket[nID].oJob[nReadIndex].pDataPacket->DummyData); LOG_EVENT1("Processed FN: %d", oTxPacket[nID].oJob[nReadIndex].pDataPacket->DummyData); if( oTxPacket[nID].oJob[nReadIndex].pBTS ) { //LOG_EVENT("Current FN: %d", oTxPacket[nID].oJob[nReadIndex].pBTS->nCurrentFN); LOG_EVENT1("Current FN: %d", oTxPacket[nID].oJob[nReadIndex].pBTS->nCurrentFN); } //LOG_EVENT("Current Time (sec) %d (usec) %d",oNow.nSec, oNow.nUSec); LOG_EVENT2("Current Time (sec) %d (usec) %d",oNow.nSec, oNow.nUSec); } oPrevTime = oNow; if( oTxPacket[nID].oJob[nReadIndex].pBTS ) { HSEM_Lock((Hsem*)gBTSSem); GSMTime_Init(&oTime, oTxPacket[nID].oJob[nReadIndex].pBTS->nCurrentFN, 0); nCurrentFN = oTxPacket[nID].oJob[nReadIndex].pBTS->nCurrentFN; //memcpy(&oTxPacket[nID].oJob[nReadIndex].pBTS->oLastSyncTime, &pThis->oNow, sizeof(SysTime)); //LOG_EVENT("-----------------Current FN: %d", nCurrentFN); LOG_EVENT1("-----------------Current FN: %d", nCurrentFN); GSMTime_Inc(&oTime, 1); oTxPacket[nID].oJob[nReadIndex].pBTS->nCurrentFN = GSMTime_FN(&oTime); HSEM_Unlock((Hsem*)gBTSSem); { UINT8 nMFN = nCurrentFN % 51; switch (nMFN) { case 1: case 11: case 21: case 31: case 41: UpdateLastSentPakNum(oTxPacket[nID].oJob[nReadIndex].pBTS, oTxPacket[nID].oJob[nReadIndex].oTimeToSend, nCurrentFN); break; } } oTxPacket[nID].oJob[nReadIndex].pBTS = NULL; } } else { CmdIf_SendPacket(CmdIf_GetHandler(), oTxPacket[nID].oJob[nReadIndex].pCmdPacket, CMDPKT_FPGA_WRITE); } nData = pPacket->oData.DUCBurst.Data[0]; nData |= pPacket->oData.DUCBurst.Data[1]<<8; nData |= pPacket->oData.DUCBurst.Data[2]<<16; nData |= pPacket->oData.DUCBurst.Data[3]<<24; //LOG_EVENT("Sent 0x%x data", nData); LOG_EVENT1("Sent 0x%x data", nData); //LOG_EVENT("Sent at %d sec %d usec", oNow.nSec, oNow.nUSec); LOG_EVENT2("Sent at %d sec %d usec", oNow.nSec, oNow.nUSec); oTxPacket[nID].oJob[nReadIndex].bWrote = FALSE; oTxPacket[nID].nReadIndex = nReadIndex + 1; if( oTxPacket[nID].nReadIndex >=MAX_TX_PACKETS ) oTxPacket[nID].nReadIndex=0; #ifdef EVM_BOARD // Gpo_Clear(&Srio2TxLed); nTimerCounter++; if( nTimerCounter >= 100 ) { Gpo_Toggle(&Srio2TxLed); nTimerCounter= 0; } #endif } // if } // for }// while }