mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1034138 - a. Get native stack for permahangs in BHM; r=snorp
This commit is contained in:
parent
07a5dc2fb3
commit
8168e91f41
@ -147,7 +147,7 @@ public:
|
||||
uint32_t aMaxTimeoutMs);
|
||||
|
||||
// Report a hang; aManager->mLock IS locked
|
||||
void ReportHang(PRIntervalTime aHangTime);
|
||||
Telemetry::HangHistogram& ReportHang(PRIntervalTime aHangTime);
|
||||
// Report a permanent hang; aManager->mLock IS locked
|
||||
void ReportPermaHang();
|
||||
// Called by BackgroundHangMonitor::NotifyActivity
|
||||
@ -354,7 +354,7 @@ BackgroundHangThread::~BackgroundHangThread()
|
||||
Telemetry::RecordThreadHangStats(mStats);
|
||||
}
|
||||
|
||||
void
|
||||
Telemetry::HangHistogram&
|
||||
BackgroundHangThread::ReportHang(PRIntervalTime aHangTime)
|
||||
{
|
||||
// Recovered from a hang; called on the monitor thread
|
||||
@ -366,12 +366,13 @@ BackgroundHangThread::ReportHang(PRIntervalTime aHangTime)
|
||||
if (newHistogram == *oldHistogram) {
|
||||
// New histogram matches old one
|
||||
oldHistogram->Add(aHangTime);
|
||||
return;
|
||||
return *oldHistogram;
|
||||
}
|
||||
}
|
||||
// Add new histogram
|
||||
newHistogram.Add(aHangTime);
|
||||
mStats.mHangs.append(Move(newHistogram));
|
||||
return mStats.mHangs.back();
|
||||
}
|
||||
|
||||
void
|
||||
@ -380,8 +381,11 @@ BackgroundHangThread::ReportPermaHang()
|
||||
// Permanently hanged; called on the monitor thread
|
||||
// mManager->mLock IS locked
|
||||
|
||||
// TODO: Add more detailed analysis for perma-hangs
|
||||
ReportHang(mMaxTimeout);
|
||||
Telemetry::HangHistogram& hang = ReportHang(mMaxTimeout);
|
||||
Telemetry::HangStack& stack = hang.GetNativeStack();
|
||||
if (stack.empty()) {
|
||||
mStackHelper.GetNativeStack(stack);
|
||||
}
|
||||
}
|
||||
|
||||
MOZ_ALWAYS_INLINE void
|
||||
|
Loading…
Reference in New Issue
Block a user