Bug 1889610 - Remove unused parameters in MergeStack() r=canaltinova,profiler-reviewers

Differential Revision: https://phabricator.services.mozilla.com/D206621
This commit is contained in:
Alexandre Lissy 2024-04-04 16:50:34 +00:00
parent 53ad2861f9
commit f5ddde82ce
2 changed files with 17 additions and 22 deletions

View file

@ -1283,9 +1283,9 @@ struct NativeStack {
// Merges the profiling stack and native stack, outputting the details to
// aCollector.
static void MergeStacks(uint32_t aFeatures, bool aIsSynchronous,
static void MergeStacks(bool aIsSynchronous,
const RegisteredThread& aRegisteredThread,
const Registers& aRegs, const NativeStack& aNativeStack,
const NativeStack& aNativeStack,
ProfilerStackCollector& aCollector) {
// WARNING: this function runs within the profiler's "critical section".
// WARNING: this function might be called while the profiler is inactive, and
@ -1695,13 +1695,11 @@ static inline void DoSharedSample(
aCaptureOptions == StackCaptureOptions::Full) {
DoNativeBacktrace(aLock, aRegisteredThread, aRegs, nativeStack);
MergeStacks(ActivePS::Features(aLock), aIsSynchronous, aRegisteredThread,
aRegs, nativeStack, collector);
MergeStacks(aIsSynchronous, aRegisteredThread, nativeStack, collector);
} else
#endif
{
MergeStacks(ActivePS::Features(aLock), aIsSynchronous, aRegisteredThread,
aRegs, nativeStack, collector);
MergeStacks(aIsSynchronous, aRegisteredThread, nativeStack, collector);
// We can't walk the whole native stack, but we can record the top frame.
if (aCaptureOptions == StackCaptureOptions::Full) {
@ -3786,13 +3784,11 @@ void profiler_suspend_and_sample_thread(BaseProfilerThreadId aThreadId,
# error "Invalid configuration"
# endif
MergeStacks(aFeatures, isSynchronous, registeredThread, aRegs,
nativeStack, aCollector);
MergeStacks(isSynchronous, registeredThread, nativeStack, aCollector);
} else
#endif
{
MergeStacks(aFeatures, isSynchronous, registeredThread, aRegs,
nativeStack, aCollector);
MergeStacks(isSynchronous, registeredThread, nativeStack, aCollector);
aCollector.CollectNativeLeafAddr((void*)aRegs.mPC);
}

View file

@ -1918,11 +1918,10 @@ static uint32_t ExtractJsFrames(
// Merges the profiling stack, native stack, and JS stack, outputting the
// details to aCollector.
static void MergeStacks(
uint32_t aFeatures, bool aIsSynchronous,
bool aIsSynchronous,
const ThreadRegistration::UnlockedReaderAndAtomicRWOnThread& aThreadData,
const Registers& aRegs, const NativeStack& aNativeStack,
ProfilerStackCollector& aCollector, JsFrame* aJsFrames,
uint32_t aJsFramesCount) {
const NativeStack& aNativeStack, ProfilerStackCollector& aCollector,
JsFrame* aJsFrames, uint32_t aJsFramesCount) {
// WARNING: this function runs within the profiler's "critical section".
// WARNING: this function might be called while the profiler is inactive, and
// cannot rely on ActivePS.
@ -2571,13 +2570,13 @@ static inline void DoSharedSample(
DoNativeBacktrace(aThreadData, aRegs, nativeStack,
stackWalkControlIfSupported);
MergeStacks(aFeatures, aIsSynchronous, aThreadData, aRegs, nativeStack,
collector, aJsFrames, jsFramesCount);
MergeStacks(aIsSynchronous, aThreadData, nativeStack, collector, aJsFrames,
jsFramesCount);
} else
#endif
{
MergeStacks(aFeatures, aIsSynchronous, aThreadData, aRegs, nativeStack,
collector, aJsFrames, jsFramesCount);
MergeStacks(aIsSynchronous, aThreadData, nativeStack, collector, aJsFrames,
jsFramesCount);
// We can't walk the whole native stack, but we can record the top frame.
if (aCaptureOptions == StackCaptureOptions::Full) {
@ -7157,13 +7156,13 @@ static void profiler_suspend_and_sample_thread(
# error "Invalid configuration"
# endif
MergeStacks(aFeatures, !aLockIfAsynchronousSampling, aThreadData, aRegs,
nativeStack, aCollector, aJsFrames, jsFramesCount);
MergeStacks(!aLockIfAsynchronousSampling, aThreadData, nativeStack,
aCollector, aJsFrames, jsFramesCount);
} else
#endif
{
MergeStacks(aFeatures, !aLockIfAsynchronousSampling, aThreadData, aRegs,
nativeStack, aCollector, aJsFrames, jsFramesCount);
MergeStacks(!aLockIfAsynchronousSampling, aThreadData, nativeStack,
aCollector, aJsFrames, jsFramesCount);
aCollector.CollectNativeLeafAddr((void*)aRegs.mPC);
}