diff --git a/rtlib/iFunctions.cpp b/rtlib/iFunctions.cpp index e69fe2c45..c4b87b710 100644 --- a/rtlib/iFunctions.cpp +++ b/rtlib/iFunctions.cpp @@ -55,7 +55,7 @@ namespace __dp { /******* Helper functions *******/ -void addDep(depType type, LID curr, LID depOn, char *var, string AAvar, +void addDep(depType type, LID curr, LID depOn, const char *var, string AAvar, bool isStackAccess, ADDR addr, bool addrIsFirstWrittenInScope, bool positiveScopeChangeOccuredSinceLastAccess) { #ifdef DP_INTERNAL_TIMER diff --git a/rtlib/iFunctionsTypes.hpp b/rtlib/iFunctionsTypes.hpp index aca7c72a8..05e937f46 100644 --- a/rtlib/iFunctionsTypes.hpp +++ b/rtlib/iFunctionsTypes.hpp @@ -65,7 +65,7 @@ struct AccessInfo { bool skip; // End HA LID lid; - char *var; + const char *var; std::string AAvar; // name of allocated variable -> "Anti Aliased Variable" ADDR addr; bool isStackAccess = false; @@ -75,12 +75,12 @@ struct AccessInfo { // For runtime dependency merging struct Dep { - Dep(depType T, LID dep, char *var, std::string AAvar) + Dep(depType T, LID dep, const char *var, std::string AAvar) : type(T), depOn(dep), var(var), AAvar(AAvar) {} depType type; LID depOn; - char *var; + const char *var; std::string AAvar; }; @@ -109,12 +109,7 @@ typedef std::unordered_map depMap; typedef std::unordered_map> stringDepMap; typedef std::set ReportedBBSet; typedef std::set ReportedBBPairSet; +typedef std::set ReportedBBPairSet; // End HA } // namespace __dp - -// issue a warning if DP_PTHREAD_COMPATIBILITY_MODE is enabled -#ifdef DP_PTHREAD_COMPATIBILITY_MODE -#warning \ - "DP_PTHREAD_COMPATIBILITY_MODE enabled! This may have negative implications on the profiling time." -#endif diff --git a/rtlib/injected_functions/dp_read.cpp b/rtlib/injected_functions/dp_read.cpp index 7d9fe79a7..2206caf64 100644 --- a/rtlib/injected_functions/dp_read.cpp +++ b/rtlib/injected_functions/dp_read.cpp @@ -33,7 +33,7 @@ extern "C" { #ifdef SKIP_DUP_INSTR void __dp_read(LID lid, ADDR addr, char *var, ADDR lastaddr, int64_t count) { #else -void __dp_read(LID lid, ADDR addr, char *var) { +void __dp_read(LID lid, ADDR addr, const char *var) { #endif if (!dpInited || targetTerminated) { diff --git a/rtlib/injected_functions/dp_read.hpp b/rtlib/injected_functions/dp_read.hpp index 8ebe5c672..fc45e20b6 100644 --- a/rtlib/injected_functions/dp_read.hpp +++ b/rtlib/injected_functions/dp_read.hpp @@ -22,7 +22,7 @@ extern "C" { #ifdef SKIP_DUP_INSTR void __dp_read(LID lid, ADDR addr, char *var, ADDR lastaddr, int64_t count); #else -void __dp_read(LID lid, ADDR addr, char *var); +void __dp_read(LID lid, ADDR addr, const char *var); #endif } diff --git a/rtlib/injected_functions/dp_write.cpp b/rtlib/injected_functions/dp_write.cpp index 8ab88df20..b29bd5386 100644 --- a/rtlib/injected_functions/dp_write.cpp +++ b/rtlib/injected_functions/dp_write.cpp @@ -34,7 +34,7 @@ extern "C" { #ifdef SKIP_DUP_INSTR void __dp_write(LID lid, ADDR addr, char *var, ADDR lastaddr, int64_t count) { #else -void __dp_write(LID lid, ADDR addr, char *var) { +void __dp_write(LID lid, ADDR addr, const char *var) { #endif if (!dpInited || targetTerminated) { diff --git a/rtlib/injected_functions/dp_write.hpp b/rtlib/injected_functions/dp_write.hpp index f2987c161..3e0e8969b 100644 --- a/rtlib/injected_functions/dp_write.hpp +++ b/rtlib/injected_functions/dp_write.hpp @@ -22,7 +22,7 @@ extern "C" { #ifdef SKIP_DUP_INSTR void __dp_write(LID lid, ADDR addr, char *var, ADDR lastaddr, int64_t count); #else -void __dp_write(LID lid, ADDR addr, char *var); +void __dp_write(LID lid, ADDR addr, const char *var); #endif } diff --git a/rtlib/memory/MemoryManager.hpp b/rtlib/memory/MemoryManager.hpp index 4841aaa4b..e9df9bc51 100644 --- a/rtlib/memory/MemoryManager.hpp +++ b/rtlib/memory/MemoryManager.hpp @@ -96,11 +96,11 @@ class MemoryManager { scopeManager.leaveScope(type.c_str(), debug_lid); } - void registerStackRead(const ADDR address, const LID debug_lid, char *debug_var) { + void registerStackRead(const ADDR address, const LID debug_lid, const char *debug_var) { scopeManager.registerStackRead(address, debug_lid, debug_var); } - void registerStackWrite(const ADDR address, const LID debug_lid, char *debug_var) { + void registerStackWrite(const ADDR address, const LID debug_lid, const char *debug_var) { scopeManager.registerStackWrite(address, debug_lid, debug_var); } diff --git a/rtlib/memory/Scope.hpp b/rtlib/memory/Scope.hpp index ca78c4246..97355a2f2 100644 --- a/rtlib/memory/Scope.hpp +++ b/rtlib/memory/Scope.hpp @@ -27,13 +27,13 @@ namespace __dp { struct Scope { Scope(unsigned long id) : scope_id(id) {} - void registerStackRead(ADDR address, LID debug_lid, char *debug_var) { + void registerStackRead(ADDR address, LID debug_lid, const char *debug_var) { if (!(first_written.find(address) != first_written.end())) { first_read.insert(address); } } - void registerStackWrite(ADDR address, LID debug_lid, char *debug_var) { + void registerStackWrite(ADDR address, LID debug_lid, const char *debug_var) { if (!(first_read.find(address) != first_read.end())) { first_written.insert(address); } @@ -75,12 +75,12 @@ struct ScopeManager { scopeStack.pop_back(); } - void registerStackRead(ADDR address, LID debug_lid, char *debug_var) { + void registerStackRead(ADDR address, LID debug_lid, const char *debug_var) { scopeStack.back().registerStackRead(address, debug_lid, debug_var); addrToLastAccessScopeID[address] = scopeStack.back().get_id(); } - void registerStackWrite(ADDR address, LID debug_lid, char *debug_var) { + void registerStackWrite(ADDR address, LID debug_lid, const char *debug_var) { scopeStack.back().registerStackWrite(address, debug_lid, debug_var); addrToLastAccessScopeID[address] = scopeStack.back().get_id(); }