Skip to content

Commit

Permalink
Remove print debugging from runtime.h
Browse files Browse the repository at this point in the history
  • Loading branch information
ysthakur committed Dec 13, 2024
1 parent 711ff9d commit 36afa04
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/main/resources/runtime/runtime.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,10 @@ void addPCR(
struct PCRBucket **prev = &pcrBuckets;
while (*prev != NULL && (*prev)->scc < scc)
{
// fprintf(stderr, "[addPCR] prev scc: %d\n", (*prev)->scc);
prev = &(*prev)->next;
}

struct PCR *pcr = malloc(sizeof(struct PCR));
fprintf(stderr, "[addPCR] Added PCR %p, prev = %p, scc: %d, obj: %p\n", pcr, *prev, scc, obj);
pcr->obj = obj;
pcr->markGray = markGray;
pcr->scan = scan;
Expand All @@ -99,7 +97,6 @@ void removePCR(Common *obj, int scc)
if (!obj->addedPCR)
return;
obj->addedPCR = 0;
fprintf(stderr, "[removePCR] Trying to remove object %p\n", obj);

struct PCRBucket **prevBucket = &pcrBuckets;
struct PCRBucket *bucket = pcrBuckets;
Expand All @@ -113,13 +110,10 @@ void removePCR(Common *obj, int scc)
struct PCR *head = bucket->pcrs;
while (head != NULL)
{
fprintf(stderr, "[removePCR] head = %p\n", head);
if (head->obj == obj)
{
fprintf(stderr, "[removePCR] Removed %p (obj=%p)\n", head, obj);
*prev = head->next;
if (bucket->pcrs == NULL) {
fprintf(stderr, "[removePCR] Removed bucket too\n");
// This was the only PCR in the bucket, so remove the bucket too
*prevBucket = bucket->next;
free(bucket);
Expand Down Expand Up @@ -187,7 +181,6 @@ void processAllPCRs()
}
collectWhiteAllPCRs(pcrBuckets->pcrs);
collectFreeList();
fprintf(stderr, "[processAllPCRs]: Processed scc %d\n", pcrBuckets->scc);
struct PCRBucket *next = pcrBuckets->next;
free(pcrBuckets);
pcrBuckets = next;
Expand Down

0 comments on commit 36afa04

Please sign in to comment.