diff options
Diffstat (limited to '0032-Bug-1807652-Rename-some-methods-to-not-conflict-with.patch')
-rw-r--r-- | 0032-Bug-1807652-Rename-some-methods-to-not-conflict-with.patch | 160 |
1 files changed, 0 insertions, 160 deletions
diff --git a/0032-Bug-1807652-Rename-some-methods-to-not-conflict-with.patch b/0032-Bug-1807652-Rename-some-methods-to-not-conflict-with.patch deleted file mode 100644 index 5d2227f4d0da..000000000000 --- a/0032-Bug-1807652-Rename-some-methods-to-not-conflict-with.patch +++ /dev/null @@ -1,160 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Naz=C4=B1m=20Can=20Alt=C4=B1nova?= <canaltinova@gmail.com> -Date: Mon, 13 Feb 2023 13:52:46 +0000 -Subject: [PATCH] Bug 1807652 - Rename some methods to not conflict with - aliases r=mstange - -We have some aliases with the names of LockedRWFromAnyThread and -LockedRWOnThread. We also had some methods with the same name. clang and gcc -that were before version 12 weren't complaining about that. But apparently -starting from gcc 13, it became an error. This patch renames the methods so we -don't conflict with these aliases anymore. - -Differential Revision: https://phabricator.services.mozilla.com/D169507 ---- - tools/profiler/core/platform.cpp | 14 +++++++------- - tools/profiler/public/ProfilerThreadRegistration.h | 4 ++-- - tools/profiler/public/ProfilerThreadRegistry.h | 4 ++-- - tools/profiler/tests/gtest/GeckoProfiler.cpp | 6 +++--- - 4 files changed, 14 insertions(+), 14 deletions(-) - -diff --git a/tools/profiler/core/platform.cpp b/tools/profiler/core/platform.cpp -index 3a6e5df144d45f3fc530e373cbc6e58332aecf0a..1f116ad26095f6a34b533bec8d8872c1d2770556 100644 ---- a/tools/profiler/core/platform.cpp -+++ b/tools/profiler/core/platform.cpp -@@ -1178,7 +1178,7 @@ class ActivePS { - continue; - } - ThreadRegistry::OffThreadRef::RWFromAnyThreadWithLock lockedThreadData = -- offThreadRef.LockedRWFromAnyThread(); -+ offThreadRef.GetLockedRWFromAnyThread(); - MOZ_RELEASE_ASSERT(array.append(ProfiledThreadListElement{ - profiledThreadData->Info().RegisterTime(), - lockedThreadData->GetJSContext(), profiledThreadData})); -@@ -4210,7 +4210,7 @@ void SamplerThread::Run() { - - if (threadStackSampling) { - ThreadRegistry::OffThreadRef::RWFromAnyThreadWithLock -- lockedThreadData = offThreadRef.LockedRWFromAnyThread(); -+ lockedThreadData = offThreadRef.GetLockedRWFromAnyThread(); - // Suspend the thread and collect its stack data in the local - // buffer. - mSampler.SuspendAndSampleAndResumeThread( -@@ -4924,7 +4924,7 @@ static ProfilingStack* locked_register_thread( - aLock, aOffThreadRef.UnlockedConstReaderCRef().Info()); - if (threadProfilingFeatures != ThreadProfilingFeatures::NotProfiled) { - ThreadRegistry::OffThreadRef::RWFromAnyThreadWithLock -- lockedRWFromAnyThread = aOffThreadRef.LockedRWFromAnyThread(); -+ lockedRWFromAnyThread = aOffThreadRef.GetLockedRWFromAnyThread(); - - ProfiledThreadData* profiledThreadData = ActivePS::AddLiveProfiledThread( - aLock, MakeUnique<ProfiledThreadData>( -@@ -5790,7 +5790,7 @@ static void locked_profiler_start(PSLockRef aLock, PowerOfTwo32 aCapacity, - ActivePS::ProfilingFeaturesForThread(aLock, info); - if (threadProfilingFeatures != ThreadProfilingFeatures::NotProfiled) { - ThreadRegistry::OffThreadRef::RWFromAnyThreadWithLock lockedThreadData = -- offThreadRef.LockedRWFromAnyThread(); -+ offThreadRef.GetLockedRWFromAnyThread(); - ProfiledThreadData* profiledThreadData = ActivePS::AddLiveProfiledThread( - aLock, MakeUnique<ProfiledThreadData>(info)); - lockedThreadData->SetProfilingFeaturesAndData(threadProfilingFeatures, -@@ -6014,7 +6014,7 @@ void profiler_ensure_started(PowerOfTwo32 aCapacity, double aInterval, - } - - ThreadRegistry::OffThreadRef::RWFromAnyThreadWithLock lockedThreadData = -- offThreadRef.LockedRWFromAnyThread(); -+ offThreadRef.GetLockedRWFromAnyThread(); - - lockedThreadData->ClearProfilingFeaturesAndData(aLock); - -@@ -6357,7 +6357,7 @@ static void locked_unregister_thread( - // thread that is in the process of disappearing. - - ThreadRegistration::OnThreadRef::RWOnThreadWithLock lockedThreadData = -- aOnThreadRef.LockedRWOnThread(); -+ aOnThreadRef.GetLockedRWOnThread(); - - ProfiledThreadData* profiledThreadData = - lockedThreadData->GetProfiledThreadData(lock); -@@ -6878,7 +6878,7 @@ void profiler_clear_js_context() { - // The profiler mutex must be locked before the ThreadRegistration's. - PSAutoLock lock; - ThreadRegistration::OnThreadRef::RWOnThreadWithLock lockedThreadData = -- aOnThreadRef.LockedRWOnThread(); -+ aOnThreadRef.GetLockedRWOnThread(); - - if (ProfiledThreadData* profiledThreadData = - lockedThreadData->GetProfiledThreadData(lock); -diff --git a/tools/profiler/public/ProfilerThreadRegistration.h b/tools/profiler/public/ProfilerThreadRegistration.h -index fafe06e446d6392ce93b5804e753a1434d7151ec..3fb931987dc840e6690a1258cdbf5edc734f94a0 100644 ---- a/tools/profiler/public/ProfilerThreadRegistration.h -+++ b/tools/profiler/public/ProfilerThreadRegistration.h -@@ -214,14 +214,14 @@ class ThreadRegistration { - DataLock mDataLock; - }; - -- [[nodiscard]] RWOnThreadWithLock LockedRWOnThread() { -+ [[nodiscard]] RWOnThreadWithLock GetLockedRWOnThread() { - return RWOnThreadWithLock{mThreadRegistration->mData, - mThreadRegistration->mDataMutex}; - } - - template <typename F> - auto WithLockedRWOnThread(F&& aF) { -- RWOnThreadWithLock lockedData = LockedRWOnThread(); -+ RWOnThreadWithLock lockedData = GetLockedRWOnThread(); - return std::forward<F>(aF)(lockedData.DataRef()); - } - -diff --git a/tools/profiler/public/ProfilerThreadRegistry.h b/tools/profiler/public/ProfilerThreadRegistry.h -index 76e0c0a78a7cc95b6977055b8f36729dd327a623..4d0fd3ef68049133f3fdf8a7e84e3eec1448ba3e 100644 ---- a/tools/profiler/public/ProfilerThreadRegistry.h -+++ b/tools/profiler/public/ProfilerThreadRegistry.h -@@ -177,14 +177,14 @@ class ThreadRegistry { - ThreadRegistration::DataLock mDataLock; - }; - -- [[nodiscard]] RWFromAnyThreadWithLock LockedRWFromAnyThread() { -+ [[nodiscard]] RWFromAnyThreadWithLock GetLockedRWFromAnyThread() { - return RWFromAnyThreadWithLock{mThreadRegistration->mData, - mThreadRegistration->mDataMutex}; - } - - template <typename F> - auto WithLockedRWFromAnyThread(F&& aF) { -- RWFromAnyThreadWithLock lockedData = LockedRWFromAnyThread(); -+ RWFromAnyThreadWithLock lockedData = GetLockedRWFromAnyThread(); - return std::forward<F>(aF)(lockedData.DataRef()); - } - -diff --git a/tools/profiler/tests/gtest/GeckoProfiler.cpp b/tools/profiler/tests/gtest/GeckoProfiler.cpp -index 223aed970d95d0c90de3a91d2c5444ee010d701f..20623ea50ea5314b7e054c5cb78235f7bd96b0f1 100644 ---- a/tools/profiler/tests/gtest/GeckoProfiler.cpp -+++ b/tools/profiler/tests/gtest/GeckoProfiler.cpp -@@ -622,7 +622,7 @@ TEST(GeckoProfiler, ThreadRegistration_DataAccess) - EXPECT_FALSE(TR::IsDataMutexLockedOnCurrentThread()); - { - TR::OnThreadRef::RWOnThreadWithLock rwOnThreadWithLock = -- aOnThreadRef.LockedRWOnThread(); -+ aOnThreadRef.GetLockedRWOnThread(); - EXPECT_TRUE(TR::IsDataMutexLockedOnCurrentThread()); - TestConstLockedRWOnThread(rwOnThreadWithLock.DataCRef(), - beforeRegistration, afterRegistration, -@@ -1021,7 +1021,7 @@ TEST(GeckoProfiler, ThreadRegistry_DataAccess) - EXPECT_FALSE(TR::IsDataMutexLockedOnCurrentThread()); - { - TRy::OffThreadRef::RWFromAnyThreadWithLock rwFromAnyThreadWithLock = -- aOffThreadRef.LockedRWFromAnyThread(); -+ aOffThreadRef.GetLockedRWFromAnyThread(); - if (profiler_current_thread_id() == testThreadId) { - EXPECT_TRUE(TR::IsDataMutexLockedOnCurrentThread()); - } -@@ -1158,7 +1158,7 @@ TEST(GeckoProfiler, ThreadRegistration_RegistrationEdgeCases) - PR_Sleep(PR_MillisecondsToInterval(1)); - } - TRy::OffThreadRef::RWFromAnyThreadWithLock rwFromAnyThreadWithLock = -- aOffThreadRef.LockedRWFromAnyThread(); -+ aOffThreadRef.GetLockedRWFromAnyThread(); - ++otherThreadReads; - if (otherThreadReads % 1000 == 0) { - PR_Sleep(PR_MillisecondsToInterval(1)); |