From 60e56f3efee2abb4caeca67d1b6cce458929f50d Mon Sep 17 00:00:00 2001 From: FICTURE7 Date: Tue, 13 Apr 2021 11:41:40 +0400 Subject: [PATCH] Remove rejit requests queue logging --- ARMeilleure/Translation/Translator.cs | 33 --------------------------- 1 file changed, 33 deletions(-) diff --git a/ARMeilleure/Translation/Translator.cs b/ARMeilleure/Translation/Translator.cs index 541aa26a1..ad059e715 100644 --- a/ARMeilleure/Translation/Translator.cs +++ b/ARMeilleure/Translation/Translator.cs @@ -24,10 +24,6 @@ namespace ARMeilleure.Translation { private const int CountTableCapacity = 4 * 1024 * 1024; - private long _nextUpdate; - private long _requestAdded; - private long _requestRemoved; - private readonly IJitMemoryAllocator _allocator; private readonly IMemoryManager _memory; @@ -50,8 +46,6 @@ namespace ARMeilleure.Translation public Translator(IJitMemoryAllocator allocator, IMemoryManager memory) { - _nextUpdate = Stopwatch.GetTimestamp(); - _allocator = allocator; _memory = memory; @@ -79,8 +73,6 @@ namespace ARMeilleure.Translation if (_backgroundStack.TryPop(out RejitRequest request) && _backgroundSet.TryRemove(request.Address, out _)) { - Interlocked.Increment(ref _requestRemoved); - TranslatedFunction func = Translate( _memory, _jumpTable, @@ -102,28 +94,6 @@ namespace ARMeilleure.Translation PtcProfiler.UpdateEntry(request.Address, request.Mode, highCq: true); } - var nextUpdate = Interlocked.Exchange(ref _nextUpdate, 0); - - if (nextUpdate != 0) - { - var now = Stopwatch.GetTimestamp(); - - if (now < nextUpdate) - { - _nextUpdate = nextUpdate; - } - else - { - Ryujinx.Common.Logging.Logger.Info?.Print( - Ryujinx.Common.Logging.LogClass.Cpu, - $"{_backgroundStack.Count} rejit requests remaining (+{_requestAdded}:-{_requestRemoved})."); - - _requestAdded = 0; - _requestRemoved = 0; - _nextUpdate = now + Stopwatch.Frequency * 30; - } - } - _backgroundTranslatorLock.ReleaseReaderLock(); } else @@ -480,7 +450,6 @@ namespace ARMeilleure.Translation { if (_backgroundSet.TryAdd(guestAddress, null)) { - Interlocked.Increment(ref _requestAdded); _backgroundStack.Push(new RejitRequest(guestAddress, mode)); _backgroundTranslatorEvent.Set(); } @@ -513,8 +482,6 @@ namespace ARMeilleure.Translation { _backgroundTranslatorLock.AcquireWriterLock(Timeout.Infinite); - Interlocked.Add(ref _requestRemoved, _backgroundStack.Count); - if (allowRequeue) { while (_backgroundStack.TryPop(out var request))