void elg_readcb_ENTER_CS(elg_ui4 lid, elg_d8 time, elg_ui4 csid, elg_ui1 metc, elg_ui8 metv[], void* userdata) { lid = locmap[lid]; if ( need_usr && stk_top(lid)->reg == ELG_NO_ID ) { stk_push(lid, state_user, time); wbytes += VTF3_WriteDownto(fcb, time*1.0e+10, state_user, (unsigned int) lid, VTF3_SCLNONE); } stk_push(lid, csitetab[csid].erid, time); wbytes += VTF3_WriteDownto(fcb, time*1.0e+10, (int) csitetab[csid].erid, (unsigned int) lid, scl_of_csite(csid)); genWriteCOUNTER(lid, time, metc, metv); }
int handleEnter( void* firsthandlerarg, uint64_t time, uint32_t statetoken, uint32_t cpuid, uint32_t scltoken ) { nodeT *node = treehash_searchnode(((fcbT*) firsthandlerarg)->p_hashtab, cpuid); if ( 0 == node ) { fprintf( stderr, "otf2vtf WARNING: undefined process %u, record ignored\n", cpuid ); return OTF_RETURN_OK; } while (node->stacks <= node->stackc) { node->stacks += STACK_ALLOC_WIDTH; node->stack = realloc(node->stack,sizeof(uint32_t)*node->stacks); assert(node->stack); } node->stack[node->stackc] = statetoken; ++node->stackc; FileIOEndQueue_check( &(((fcbT*) firsthandlerarg)->FileIOQueue), time, firsthandlerarg ); /* 1st test ********************************************/ return ( 0 == VTF3_WriteDownto( ((fcbT*) firsthandlerarg)->fcb, time, statetoken, node->processi, scltoken ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; }
void elg_readcb_ENTER_TRACING(elg_ui4 lid, elg_d8 time, elg_ui1 metc, elg_ui8 metv[], void* userdata) { lid = locmap[lid]; wbytes += VTF3_WriteDownto(fcb, time*1.0e+10, state_tracing, (unsigned int) lid, VTF3_SCLNONE); genWriteCOUNTER(lid, time, metc, metv); }
void elg_readcb_OMP_FORK(elg_ui4 lid, elg_d8 time, void* userdata) { lid = locmap[lid]; if ( !writeOMP ) { wbytes += VTF3_WriteDownto(fcb, time*1.0e+10, state_pregion, (unsigned int) lid, VTF3_SCLNONE); } lasttime = time; }
void elg_readcb_ENTER(elg_ui4 lid, elg_d8 time, elg_ui4 rid, elg_ui1 metc, elg_ui8 metv[], void* userdata) { lid = locmap[lid]; if ( need_usr && stk_top(lid)->reg == ELG_NO_ID ) { stk_push(lid, state_user, time); wbytes += VTF3_WriteDownto(fcb, time*1.0e+10, state_user, (unsigned int) lid, VTF3_SCLNONE); } stk_push(lid, rid, time); if ( writeOMP && statetab[rid].act == act_omp && statetab[rid].type != ELG_FUNCTION ) { wbytes += VTF3_WriteOpenmpenter(fcb, time*1.0e+10, (unsigned int) lid, (unsigned int) statetab[rid].type, (unsigned int) rid, scl_of_state(rid)); } else { wbytes += VTF3_WriteDownto(fcb, time*1.0e+10, (int) rid, (unsigned int) lid, scl_of_state(rid)); } genWriteCOUNTER(lid, time, metc, metv); }
void conv_setup() { int lid; if ( state_idle != -1 && addidle ) { for(lid=0; lid<totallocs; lid++) { if ( loctab[lid].proc->member[0].id != lid ) { /*slave thread*/ wbytes += VTF3_WriteDownto(fcb, 0.0, state_idle, locmap[lid], VTF3_SCLNONE); } } } }