2 #include "multicoregarbage.h"
3 #include "multicoreruntime.h"
4 #include "runtime_arch.h"
5 #include "SimpleHash.h"
6 #include "GenericHashtable.h"
8 extern struct genhashtable * activetasks;
9 extern struct parameterwrapper ** objectqueues[][NUMCLASSES];
10 extern struct taskparamdescriptor *currtpd;
11 //extern struct RuntimeHash *fdtoobject;
13 struct largeObjList lObjList;
14 struct markedObjList mObjList;
15 INTPTR curr_heaptop = 0;
17 struct markedObjList {
18 struct markedObjItem * head;
19 struct markedObjItem * tail;
23 struct largeObjItem * head;
24 struct largeObjItem * tail;
27 bool isLarge(void * ptr, int * ttype, int * tsize) {
28 // check if a pointer is referring to a large object
29 int type = ((int *)ptr)[0];
31 if(type < NUMCLASSES) {
33 size = classsize[type];
36 struct ArrayObject *ao=(struct ArrayObject *)ptr;
37 int elementsize=classsize[type];
38 int length=ao->___length___;
39 size=sizeof(struct ArrayObject)+length*elementsize;
43 return(!isLocal(ptr + size));
46 int hostcore(void * ptr) {
47 // check the host core of ptr
51 RESIDECORE(ptr, &x, &y);
52 host = (x == 0)?(x * bamboo_height + y) : (x * bamboo_height + y - 2);
56 bool isLocal(void * ptr) {
57 // check if a pointer is in shared heap on this core
58 return hostcore(ptr) == BAMBOO_NUM_OF_CORE;
61 void insertMarkedObj(struct markedObjList * list, struct markedObjItem * toinsert) {
62 // insert a markedObjItem
63 struct markedObjItem * tmp = list->head;
65 list->head = toinsert;
66 list->tail = toinsert;
67 } else if(tmp->orig > toinsert->orig) {
68 // insert into the head of the list
70 list->head = toinsert;
72 struct markedObjItem * next = tmp->next;
74 if(next->orig < toinsert->orig) {
77 } else if((next->orig == toinsert->orig) || (tmp->orig == toinsert->orig)) {
84 toinsert->next = next;
88 } // while(next != NULL)
90 if(tmp->orig == toinsert->orig) {
94 // insert to the tail of the list
96 list->tail = toinsert;
102 struct markedObjItem * getStartItem(struct markedObjItem * moi, INTPTR start) {
103 // find the markedobj whose start address is start
104 struct markedObjItem * tostart = moi;
105 while(tostart->orig < start) {
106 tostart = tostart->next;
111 void transferMarkResults() {
112 // TODO, need distiguish between send and cache
113 // invoked inside interruptiong handler
117 // core coordinator routine
118 if(0 == BAMBOO_NUM_OF_CORE) {
120 bme_install_interrupt_handler(INT_UDN_AVAIL, gc_msghandler);
122 tprintf("Process %x(%d): change udn interrupt handler\n", BAMBOO_NUM_OF_CORE,
125 __insn_mtspr(SPR_UDN_TAG_1, UDN1_DEMUX_TAG);
126 // enable udn interrupts
127 //__insn_mtspr(SPR_INTERRUPT_MASK_RESET_2_1, INT_MASK_HI(INT_UDN_AVAIL));
128 __insn_mtspr(SPR_UDN_AVAIL_EN, (1<<1));
129 BAMBOO_CLOSE_CRITICAL_SECTION_MSG();
132 gcwaitconfirm = false;
135 for(i = 1; i < NUMCORES - 1; i++) {
136 // send GC start messages to all cores
140 lObjList.head = NULL;
141 lObjList.tail = NULL;
142 mObjList.head = NULL;
143 mObjList.tail = NULL;
146 while(gcphase == 0) {
152 bool allStall = false;
154 if((!gcwaitconfirm) ||
155 (gcwaitconfirm && (gcnumconfirm == 0))) {
156 BAMBOO_START_CRITICAL_SECTION_STATUS();
157 gccorestatus[BAMBOO_NUM_OF_CORE] = 0;
158 gcnumsendobjs[BAMBOO_NUM_OF_CORE] = gcself_numsendobjs;
159 gcnumreceiveobjs[BAMBOO_NUM_OF_CORE] = gcself_numreceiveobjs;
160 // check the status of all cores
162 for(i = 0; i < NUMCORES; ++i) {
163 if(gccorestatus[i] != 0) {
169 // check if the sum of send objs and receive obj are the same
170 // yes->check if the info is the latest; no->go on executing
172 for(i = 0; i < NUMCORES; ++i) {
173 sumsendobj += gcnumsendobjs[i];
175 for(i = 0; i < NUMCORES; ++i) {
176 sumsendobj -= gcnumreceiveobjs[i];
178 if(0 == sumsendobj) {
180 // the first time found all cores stall
181 // send out status confirm msg to all other cores
182 // reset the corestatus array too
183 gccorestatus[BAMBOO_NUM_OF_CORE] = 1;
184 gcwaitconfirm = true;
185 gcnumconfirm = NUMCORES - 1;
186 for(i = 1; i < NUMCORES; ++i) {
188 // send mark phase finish confirm request msg to core i
192 // all the core status info are the latest
195 for(i = 0; i < NUMCORES; ++i) {
198 } // if(!gcwautconfirm) else()
199 } // if(0 == sumsendobj)
201 BAMBOO_CLOSE_CRITICAL_SECTION_STATUS();
202 } // if((!gcwaitconfirm)...
203 } // while(gcphase == 0)
204 // send msgs to all cores requiring large objs info
205 gcnumconfirm = NUMCORES - 1;
206 for(i = 1; i < NUMCORES; ++i) {
209 while(gcnumconfirm != 0) {} // wait for responses
210 // TODO compute load balance
212 // TODO cache all large objects
213 for(i = 1; i < NUMCORES; ++i) {
214 //TODO send start compact messages to all cores
220 gccorestatus[BAMBOO_NUM_OF_CORE] = 0;
221 while(gcphase == 1) {
222 // check the status of all cores
224 for(i = 0; i < NUMCORES; ++i) {
225 if(gccorestatus[i] != 0) {
231 for(i = 0; i < NUMCORES; ++i) {
236 } // while(gcphase == 1)
237 // TODO merge all mapping information
239 for(i = 1; i < NUMCORES; ++i) {
240 // send start flush messages to all cores
246 gccorestatus[BAMBOO_NUM_OF_CORE] = 0;
247 while(gcphase == 2) {
248 // check the status of all cores
250 for(i = 0; i < NUMCORES; ++i) {
251 if(gccorestatus[i] != 0) {
259 } // while(gcphase == 2)
260 // TODO merge all mapping information
262 for(i = 1; i < NUMCORES; ++i) {
263 // send gc finish messages to all cores
268 bme_install_interrupt_handler(INT_UDN_AVAIL, udn_inter_handle);
270 tprintf("Process %x(%d): change back udn interrupt handler\n", BAMBOO_NUM_OF_CORE,
273 __insn_mtspr(SPR_UDN_TAG_0, UDN0_DEMUX_TAG);
274 // enable udn interrupts
275 //__insn_mtspr(SPR_INTERRUPT_MASK_RESET_2_1, INT_MASK_HI(INT_UDN_AVAIL));
276 __insn_mtspr(SPR_UDN_AVAIL_EN, (1<<0));
277 BAMBOO_START_CRITICAL_SECTION_MSG();
285 void mark(bool isfirst) {
291 // initialize gctomark queue
292 while(!isEmpty(gctomark)) {
295 // enqueue current stack TODO
297 // enqueue objectsets
299 for(i=0; i<NUMCLASSES; i++) {
300 struct parameterwrapper ** queues=objectqueues[BAMBOO_NUM_OF_CORE][i];
301 int length = numqueues[BAMBOO_NUM_OF_CORE][i];
302 for(j = 0; j < length; ++j) {
303 struct parameterwrapper * parameter = queues[j];
304 struct ObjectHash * set=parameter->objectset;
305 struct ObjectNode * ptr=set->listhead;
307 void *orig=(void *)ptr->key;
308 addNewItem(gctomark, orig);
313 // euqueue current task descriptor
314 for(i=0; i<currtpd->numParameters; i++) {
315 void *orig=currtpd->parameterArray[i];
316 addNewItem(gctomark, orig);
318 // euqueue active tasks
319 struct genpointerlist * ptr=activetasks->list;
321 struct taskparamdescriptor *tpd=ptr->src;
323 for(i=0; i<tpd->numParameters; i++) {
324 void * orig=tpd->parameterArray[i];
325 addNewItem(gctomark, orig);
332 while(gcphase == 0) {
333 while(!isEmpty(gctomark)) {
334 voit * ptr = getItem(gctomark);
337 if(isLarge(ptr, &type, &size)) {
338 // ptr is a large object
339 struct largeObjItem * loi =
340 (struct largeObjItem *)RUNMALLOC(sizeof(struct largeObjItem));
341 loi->orig = (INTPTR)ptr;
342 loi->dst = (INTPTR)0;
344 if(lObjList.head == NULL) {
345 lObjList.head = lObjList.tail = loi;
347 lObjList.tail->next = loi;
350 } else if (isLocal(ptr)) {
351 // ptr is an active object on this core
355 curr_heaptop += size;
356 struct markedObjItem * moi =
357 (struct markedObjItem *)RUNMALLOC(sizeof(struct markedObjItem));
358 moi->orig = (INTPTR)ptr;
359 moi->dst = (INTPTR)0;
360 insertMarkedObj(&mObjList, moi);
362 // scan all pointers in ptr
363 unsigned INTPTR * pointer;
364 pointer=pointerarray[type];
366 /* Array of primitives */
368 } else if (((INTPTR)pointer)==1) {
369 /* Array of pointers */
370 struct ArrayObject *ao=(struct ArrayObject *) ptr;
371 int length=ao->___length___;
373 for(j=0; j<length; j++) {
374 void *objptr=((void **)(((char *)&ao->___length___)+sizeof(int)))[j];
375 int host = hostcore(objptr);
376 if(BAMBOO_NUM_OF_CORE == host) {
378 addNewItem(gctomark, objptr);
380 // send a msg to host informing that objptr is active
381 send_msg_2(host, 0x1a, objptr);
382 gcself_numsendobjs++;
386 INTPTR size=pointer[0];
388 for(i=1; i<=size; i++) {
389 unsigned int offset=pointer[i];
390 void * objptr=*((void **)(((char *)ptr)+offset));
391 int host = hostcore(objptr);
392 if(BAMBOO_NUM_OF_CORE == host) {
394 addNewItem(gctomark, objptr);
396 // send a msg to host informing that objptr is active
397 send_msg_2(host, 0x1a, objptr);
398 gcself_numsendobjs++;
402 } // while(!isEmpty(gctomark))
403 gcbusystatus = false;
404 // send mark finish msg to core coordinator
405 send_msg_4(STARTUPCORE, 0x14, BAMBOO_NUM_OF_CORE, gcself_numsendobjs, gcself_numreceiveobjs);
407 if(BAMBOO_NUM_OF_CORE == 0) {
410 } // while(gcphase == 0)
418 struct markedObjItem * moi = mObjList.head;
421 if((cinstruction == NULL) || (cinstruction->tomoveobjs == NULL)
422 || (curr_heaptop < cinstruction->tomoveobjs->starts[0])) {
424 int type = ((int *)(moi->orig))[0];
429 if(type < NUMCLASSES) {
431 size = classsize[type];
432 moi->dst = curr_heaptop;
433 curr_heaptop += size;
435 memcpy(moi->dst, moi->orig, size);
436 genputtable(pointertbl, moi->orig, moi->dst);
440 struct ArrayObject *ao=(struct ArrayObject *)ptr;
441 int elementsize=classsize[type];
442 int length=ao->___length___;
443 size=sizeof(struct ArrayObject)+length*elementsize;
444 moi->dst = curr_heaptop;
445 curr_heaptop += size;
447 memcpy(moi->dst, moi->orig, size);
448 genputtable(pointertbl, moi->orig, moi->dst);
455 } // while(moi != NULL)
457 if(cinstruction->incomingobjs != NULL) {
458 for(int j = 0; j < cinstruction->incomingobjs->length; j++) {
459 // send messages to corresponding cores to start moving
460 send_msg_2(cinstruction->incomingobjs->dsts[j], 0x1b, BAMBOO_NUM_OF_CORE);
464 int num_dsts = cinstruction->tomoveobjs->length;
465 while(num_dsts > 0) {
467 // start moving objects to other cores
469 while(!isEmpty(gcdsts)) {
470 int dst = (int)(getItem(gcdsts));
473 for(j = 0; j < cinstruction->tomoveobjs->length; j++) {
474 if(dst == cinstruction->tomoveobjs->dsts[j]) {
478 INTPTR top = cinstruction->tomoveobjs->dststarts[j];
479 INTPTR start = cinstruction->tomoveobjs->starts[j];
480 INTPTR end = cinstruction->tomoveobjs->ends[j];
481 struct markedObjItem * tomove = getStartItem(moi, start);
483 int type = ((int *)(tomove->orig))[0];
488 if(type < NUMCLASSES) {
490 size = classsize[type];
493 memcpy(moi->dst, moi->orig, size);
494 genputtable(pointertbl, moi->orig, moi->dst);
497 struct ArrayObject *ao=(struct ArrayObject *)ptr;
498 int elementsize=classsize[type];
499 int length=ao->___length___;
500 size=sizeof(struct ArrayObject)+length*elementsize;
503 memcpy(moi->dst, moi->orig, size);
504 genputtable(pointertbl, moi->orig, moi->dst);
506 tomove = tomove->next;
507 } while(tomove->orig < end);
508 } // while(!isEmpty(gcdsts))
509 } // while(num_dsts > 0)
510 } // if(moi == NULL) else()
511 if((cinstruction != NULL) && (cinstruction->largeobjs != NULL)) {
512 // move all large objects
514 // dequeue the first large obj
515 struct largeObjItem * loi = cinstruction->largeobjs;
516 cinstruction->largeobjs = loi->next;
517 // move this large obj
518 memcpy(loi->dst, loi->orig, loi->length);
519 genputtable(pointertbl, loi->orig, loi->dst);
521 }while(cinstruction->largeobjs != NULL);
523 // send compact finish message to core coordinator
524 send_msg_2(STARTUPCORE, 0x15, BAMBOO_NUM_OF_CORE);
529 struct markedObjItem * moi = mObjList.head;
531 void * ptr = moi->dst;
532 int type = ((int *)(ptr))[0];
533 // scan all pointers in ptr
534 unsigned INTPTR * pointer;
535 pointer=pointerarray[type];
537 /* Array of primitives */
539 } else if (((INTPTR)pointer)==1) {
540 /* Array of pointers */
541 struct ArrayObject *ao=(struct ArrayObject *) ptr;
542 int length=ao->___length___;
544 for(j=0; j<length; j++) {
545 void *objptr=((void **)(((char *)&ao->___length___)+sizeof(int)))[j];
546 // change to new address
547 void *dstptr = gengettable(pointertbl, objptr);
549 // send msg to host core for the mapping info
550 obj2map = (int)objptr;
553 send_msg_3(hostcore(objptr), 0x1c, (int)objptr, BAMBOO_NUM_OF_CORE);
557 ((void **)(((char *)&ao->___length___)+sizeof(int)))[j] = dstptr;
560 INTPTR size=pointer[0];
562 for(i=1; i<=size; i++) {
563 unsigned int offset=pointer[i];
564 void * objptr=*((void **)(((char *)ptr)+offset));
565 // change to new address
566 void *dstptr = gengettable(pointertbl, objptr);
568 // send msg to host core for the mapping info
569 obj2map = (int)objptr;
572 send_msg_3(hostcore(objptr), 0x1c, (int)objptr, BAMBOO_NUM_OF_CORE);
576 *((void **)(((char *)ptr)+offset)) = dstptr;
580 } // while(moi != NULL)
581 // send flush finish message to core coordinator
582 send_msg_2(STARTUPCORE, 0x16, BAMBOO_NUM_OF_CORE);
587 // core collector routine
589 bme_install_interrupt_handler(INT_UDN_AVAIL, gc_msghandler);
591 tprintf("Process %x(%d): change udn interrupt handler\n", BAMBOO_NUM_OF_CORE,
594 __insn_mtspr(SPR_UDN_TAG_1, UDN1_DEMUX_TAG);
595 // enable udn interrupts
596 //__insn_mtspr(SPR_INTERRUPT_MASK_RESET_2_1, INT_MASK_HI(INT_UDN_AVAIL));
597 __insn_mtspr(SPR_UDN_AVAIL_EN, (1<<1));
598 BAMBOO_CLOSE_CRITICAL_SECTION_MSG();
600 lObjList.head = NULL;
601 lObjList.tail = NULL;
602 mObjList.head = NULL;
603 mObjList.tail = NULL;
606 while(gcphase != 2) {}
612 bme_install_interrupt_handler(INT_UDN_AVAIL, udn_inter_handle);
614 tprintf("Process %x(%d): change back udn interrupt handler\n", BAMBOO_NUM_OF_CORE,
617 __insn_mtspr(SPR_UDN_TAG_0, UDN0_DEMUX_TAG);
618 // enable udn interrupts
619 //__insn_mtspr(SPR_INTERRUPT_MASK_RESET_2_1, INT_MASK_HI(INT_UDN_AVAIL));
620 __insn_mtspr(SPR_UDN_AVAIL_EN, (1<<0));
621 BAMBOO_START_CRITICAL_SECTION_MSG();
630 * type:11 -- GC start
631 * 12 -- compact phase start
632 * 13 -- flush phase start
633 * 14 -- mark phase finish
634 * 15 -- compact phase finish
635 * 16 -- flush phase finish
637 * 18 -- marked phase finish confirm request
638 * 19 -- marked phase finish confirm response
639 * 1a -- markedObj msg
640 * 1b -- start moving objs msg
641 * 1c -- ask for mapping info of a markedObj
642 * 1d -- mapping info of a markedObj
643 * 1e -- large objs info request
644 * 1f -- large objs info response
646 * GCMsg: 11 (size is always 1 * sizeof(int))
647 * 12 + size of msg + (num of objs to move + (start address + end address + dst core + start dst)+)? + (num of incoming objs + (start dst + orig core)+)? + (num of large obj lists + (start address + lenght + start dst)+)?
648 * 13 (size is always 1 * sizeof(int))
649 * 14 + corenum + gcsendobjs + gcreceiveobjs (size if always 4 * sizeof(int))
650 * 15/16 + corenum (size is always 2 * sizeof(int))
651 * 17 (size is always 1 * sizeof(int))
652 * 18 (size if always 1 * sizeof(int))
653 * 19 + size of msg + corenum + gcsendobjs + gcreceiveobjs (size is always 5 * sizeof(int))
654 * 1a + obj's address (size is always 2 * sizeof(int))
655 * 1b + corenum ( size is always 2 * sizeof(int))
656 * 1c + obj's address + corenum (size is always 3 * sizeof(int))
657 * 1d + obj's address + dst address (size if always 3 * sizeof(int))
658 * 1e (size is always 1 * sizeof(int))
659 * 1f + size of msg + corenum + (num of large obj lists + (start address + length)+)?
661 * NOTE: for Tilera, all GCMsgs except the GC start msg should be processed with a different net/port with other msgs
665 int gc_msghandler() {
670 if(receiveGCMsg() == -1) {
674 if(gcmsgdataindex == gcmsglength) {
675 // received a whole msg
676 int type, data1; // will receive at least 2 words including type
678 data1 = gcmsgdata[1];
681 // a compact phase start msg
682 if(cinstruction == NULL) {
683 cinstruction = (struct compactInstr *)RUNMALLOC(sizeof(struct compactInstr));
685 // clean up out of data info
686 if(cinstruction->tomoveobjs != NULL) {
687 RUNFREE(cinstruction->tomoveobjs->starts);
688 RUNFREE(cinstruction->tomoveobjs->ends);
689 RUNFREE(cinstruction->tomoveobjs->dststarts);
690 RUNFREE(cinstruction->tomoveobjs->dsts);
691 RUNFREE(cinstruction->tomoveobjs);
692 cinstruction->tomoveobjs = NULL;
694 if(cinstruction->incomingobjs != NULL) {
696 RUNFREE(cinstruction->incomingobjs->starts);
697 RUNFREE(cinstruction->incomingobjs->dsts);
698 RUNFREE(cinstruction->incomingobjs);
699 cinstruction->incomingobjs = NULL;
701 // largeobj items should have been freed when processed
702 if(cinstruction->largeobjs != NULL) {
707 // have objs to move etc.
709 // process objs to move
710 int num = gcmsgdata[startindex++];
712 cinstruction->tomoveobjs = (struct moveObj *)RUNMALLOC(sizeof(struct moveObj));
713 cinstruction->tomoveobjs->length = num;
714 cinstruction->tomoveobjs->starts = (INTPTR *)RUNMALLOC(num * sizeof(INTPTR));
715 cinstruction->tomoveobjs->ends = (INTPTR *)RUNMALLOC(num * sizeof(INTPTR));
716 cinstruction->tomoveobjs->dststarts = (INTPTR *)RUNMALLOC(num * sizeof(INTPTR));
717 cinstruction->tomoveobjs->dsts = (INTPTR *)RUNMALLOC(num * sizeof(INTPTR));
718 for(i = 0; i < num; i++) {
719 cinstruction->tomoveobjs->starts[i] = gcmsgdata[startindex++];
720 cinstruction->tomoveobjs->ends[i] = gcmsgdata[startindex++];
721 cinstruction->tomoveobjs->dsts[i] = gcmsgdata[startindex++];
722 cinstruction->tomoveobjs->dststarts[i] = gcmsgdata[startindex++];
725 // process incoming objs
726 num = gcmsgdata[startindex++];
728 cinstruction->incomingobjs = (struct moveObj *)RUNMALLOC(sizeof(struct moveObj));
729 cinstruction->incomingobjs->length = num;
730 cinstruction->incomingobjs->starts = (INTPTR *)RUNMALLOC(num * sizeof(INTPTR));
731 cinstruction->incomingobjs->dsts = (INTPTR *)RUNMALLOC(num * sizeof(INTPTR));
732 for(i = 0; i < num; i++) {
733 cinstruction->incomingobjs->starts[i] = gcmsgdata[startindex++];
734 cinstruction->incomingobjs->dsts[i] = gcmsgdata[startindex++];
737 // process large objs
738 num = gcmsgdata[startindex++];
739 for(i = 0; i < num; i++) {
740 struct largeObjItem * loi = (struct largeObjItem *)RUNMALLOC(sizeof(struct largeObjItem ));
741 loi->orig = gcmsgdata[startindex++];
742 loi->length = gcmsgdata[startindex++];
743 loi->dst = gcmsgdata[startindex++];
746 cinstruction->largeobjs->next = loi;
748 cinstruction->largeobjs = loi;
756 // received a flush phase start msg
762 // received a mark phase finish msg
763 if(BAMBOO_NUM_OF_CORE != STARTUPCORE) {
764 // non startup core can not receive this msg
767 BAMBOO_DEBUGPRINT_REG(data1);
771 if(data1 < NUMCORES) {
772 gccorestatus[data1] = 0;
773 gcnumsendobjs[data1] = gcmsgdata[2];
774 gcnumreceiveobjs[data1] = gcmsgdata[3];
780 // received a compact phase finish msg
781 if(BAMBOO_NUM_OF_CORE != STARTUPCORE) {
782 // non startup core can not receive this msg
785 BAMBOO_DEBUGPRINT_REG(data1);
789 if(data1 < NUMCORES) {
790 gccorestatus[data1] = 0;
796 // received a flush phase finish msg
797 if(BAMBOO_NUM_OF_CORE != STARTUPCORE) {
798 // non startup core can not receive this msg
801 BAMBOO_DEBUGPRINT_REG(data1);
805 if(data1 < NUMCORES) {
806 gccorestatus[data1] = 0;
812 // received a GC finish msg
818 // received a marked phase finish confirm request msg
819 if((BAMBOO_NUM_OF_CORE == STARTUPCORE) || (BAMBOO_NUM_OF_CORE > NUMCORES - 1)) {
820 // wrong core to receive such msg
825 cache_msg_5(STARTUPCORE, 0x19, BAMBOO_NUM_OF_CORE, gcbusystatus, gcself_numsendobjs, gcself_numreceiveobjs);
827 send_msg_5(STARTUPCORE, 0x19, BAMBOO_NUM_OF_CORE, gcbusystatus, gcself_numsendobjs, gcself_numreceiveobjs);
834 // received a marked phase finish confirm response msg
835 if(BAMBOO_NUM_OF_CORE != STARTUPCORE) {
836 // wrong core to receive such msg
838 BAMBOO_DEBUGPRINT_REG(gcmsgdata[2]);
845 gccorestatus[data1] = gcmsgdata[2];
846 gcnumsendobjs[data1] = gcmsgdata[3];
847 gcnumreceiveobjs[data1] = gcmsgdata[4];
853 // received a markedObj msg
854 addNewItem(gctomark, data1);
855 gcself_numreceiveobjs++;
861 // received a start moving objs msg
862 addNewItem_I(gcdsts, data1);
868 // received a mapping info request msg
869 void * dstptr = gengettable(pointertbl, data1);
871 // no such pointer in this core, something is wrong
874 // send back the mapping info
876 cache_msg_3(gcmsgdata[2], 0x1d, data1, dstptr);
878 send_msg_3(gcmsgdata[2], 0x1d, data1, dstptr);
885 // received a mapping info response msg
886 if(data1 != obj2map) {
887 // obj not matched, something is wrong
890 mappedobj = gcmsgdata[2];
891 genputtable(pointertbl, obj2map, mappedobj);
898 // received a large objs info request msg
899 transferMarkResults();
904 // received a large objs info response msg
913 for(gcmsgdataindex--; gcmsgdataindex > 0; --gcmsgdataindex) {
914 gcmsgdata[gcmsgdataindex] = -1;
919 if(BAMBOO_GCMSG_AVAIL() != 0) {
932 BAMBOO_DEBUGPRINT(0xe88d);