Lines Matching refs:em
475 EventMapping* em; in CLG_() local
479 em = (EventMapping*) CLG_MALLOC("cl.events.geMapping.1", in CLG_()
483 em->capacity = es->size; in CLG_()
484 em->size = 0; in CLG_()
485 em->es = es; in CLG_()
487 return em; in CLG_()
490 void CLG_(append_event)(EventMapping* em, Char* n) in CLG_()
496 CLG_ASSERT(em != 0); in CLG_()
498 if ((em->es->mask & mask)==0) continue; in CLG_()
506 CLG_ASSERT(em->capacity > em->size); in CLG_()
507 em->entry[em->size].group = i; in CLG_()
508 em->entry[em->size].index = j; in CLG_()
509 em->entry[em->size].offset = offset; in CLG_()
510 em->size++; in CLG_()
518 Int CLG_(sprint_eventmapping)(Char* buf, EventMapping* em) in CLG_()
523 CLG_ASSERT(em != 0); in CLG_()
525 for(i=0; i< em->size; i++) { in CLG_()
527 eg = eventGroup[em->entry[i].group]; in CLG_()
529 pos += VG_(sprintf)(buf + pos, "%s", eg->name[em->entry[i].index]); in CLG_()
537 Int CLG_(sprint_mappingcost)(Char* buf, EventMapping* em, ULong* c) in CLG_()
541 if (!c || em->size==0) return 0; in CLG_()
544 pos = VG_(sprintf)(buf, "%llu", c[em->entry[0].offset]); in CLG_()
546 for(i=1; i<em->size; i++) { in CLG_()
547 if (c[em->entry[i].offset] == 0) { in CLG_()
557 pos += VG_(sprintf)(buf+pos, "%llu", c[em->entry[i].offset]); in CLG_()