Skip to content

Commit

Permalink
fix(rtlib): added debug conditions to output
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasrothenberger committed Oct 17, 2023
1 parent a29920f commit b1a6796
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions rtlib/iFunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -875,7 +875,9 @@ namespace __dp {
nextFreeMemoryRegionId++;
// create entry to list of allocatedMemoryRegions
string var_name = allocId;
cout << "alloca: " << var << " (" << var_name << ") @ " << decodeLID(lid) << " : " << std::hex << startAddr << " - " << std::hex << endAddr << " -> #allocations: " << to_string(allocatedMemoryRegions->size()) << "\n";
if(DP_DEBUG){
cout << "alloca: " << var << " (" << var_name << ") @ " << decodeLID(lid) << " : " << std::hex << startAddr << " - " << std::hex << endAddr << " -> #allocations: " << to_string(allocatedMemoryRegions->size()) << "\n";
}
allocatedMemoryRegions->push_back(tuple<LID, string, int64_t, int64_t, int64_t, int64_t>{lid, var_name, startAddr, endAddr, numBytes, numElements});
allocatedMemRegTree->allocate_region(startAddr, endAddr, buffer, tempAddrCount, NUM_WORKERS);

Expand All @@ -899,8 +901,10 @@ namespace __dp {

allocatedMemRegTree->allocate_region(startAddr, endAddr, buffer, tempAddrCount, NUM_WORKERS);

cout << "new/malloc: " << decodeLID(lid) << ", " << allocId << ", " << std::hex << startAddr << " - " << std::hex << endAddr;
printf(" NumBytes: %lld\n", numBytes);
if(DP_DEBUG){
cout << "new/malloc: " << decodeLID(lid) << ", " << allocId << ", " << std::hex << startAddr << " - " << std::hex << endAddr;
printf(" NumBytes: %lld\n", numBytes);
}

allocatedMemoryRegions->push_back(tuple<LID, string, int64_t, int64_t, int64_t, int64_t>{lid, allocId, startAddr, endAddr, numBytes, -1});
lastHitIterator = allocatedMemoryRegions->end();
Expand Down

0 comments on commit b1a6796

Please sign in to comment.