diff --git a/power-libperfmgr/aidl/PowerSessionManager.cpp b/power-libperfmgr/aidl/PowerSessionManager.cpp
index f4b2f91..d697c6a 100644
--- a/power-libperfmgr/aidl/PowerSessionManager.cpp
+++ b/power-libperfmgr/aidl/PowerSessionManager.cpp
@@ -122,37 +122,23 @@
 void PowerSessionManager::addThreadsFromPowerSession(PowerHintSession *session) {
     std::lock_guard<std::mutex> guard(mLock);
     for (auto t : session->getTidList()) {
-        mTidSessionListMap[t].insert(session);
-        if (mTidRefCountMap.find(t) == mTidRefCountMap.end()) {
+        if (mTidSessionListMap[t].empty()) {
             if (!SetTaskProfiles(t, {"ResetUclampGrp"})) {
                 ALOGW("Failed to set ResetUclampGrp task profile for tid:%d", t);
-            } else {
-                mTidRefCountMap[t] = 1;
             }
-            continue;
         }
-        if (mTidRefCountMap[t] <= 0) {
-            ALOGE("Error! Unexpected zero/negative RefCount:%d for tid:%d", mTidRefCountMap[t], t);
-            continue;
-        }
-        mTidRefCountMap[t]++;
+        mTidSessionListMap[t].insert(session);
     }
 }
 
 void PowerSessionManager::removeThreadsFromPowerSession(PowerHintSession *session) {
     std::lock_guard<std::mutex> guard(mLock);
     for (auto t : session->getTidList()) {
-        if (mTidRefCountMap.find(t) == mTidRefCountMap.end()) {
-            ALOGE("Unexpected Error! Failed to look up tid:%d in TidRefCountMap", t);
-            continue;
-        }
         mTidSessionListMap[t].erase(session);
-        mTidRefCountMap[t]--;
-        if (mTidRefCountMap[t] <= 0) {
+        if (mTidSessionListMap[t].empty()) {
             if (!SetTaskProfiles(t, {"NoResetUclampGrp"})) {
                 ALOGW("Failed to set NoResetUclampGrp task profile for tid:%d", t);
             }
-            mTidRefCountMap.erase(t);
         }
     }
 }
diff --git a/power-libperfmgr/aidl/PowerSessionManager.h b/power-libperfmgr/aidl/PowerSessionManager.h
index 4246053..1c2733a 100644
--- a/power-libperfmgr/aidl/PowerSessionManager.h
+++ b/power-libperfmgr/aidl/PowerSessionManager.h
@@ -70,7 +70,6 @@
     const std::string kDisableBoostHintName;
 
     std::unordered_set<PowerHintSession *> mSessions;  // protected by mLock
-    std::unordered_map<int, int> mTidRefCountMap;      // protected by mLock
     std::unordered_map<int, std::unordered_set<PowerHintSession *>> mTidSessionListMap;
     bool mActive;  // protected by mLock
     /**
