diff options
| author | LDj3SNuD <35856442+LDj3SNuD@users.noreply.github.com> | 2022-10-19 04:08:34 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-19 02:08:34 +0000 |
| commit | 62585755fdd79a95a1e276a7ba742c2d7a9bed54 (patch) | |
| tree | fdc3f2b00e818ec39198bc279f0db1ff14457eb4 /ARMeilleure/Translation | |
| parent | 56621615b1ca52822141862d660a661054fd6694 (diff) | |
Do not clear the rejit queue when overlaps count is equal to 0. (#3721)
* Do not clear the rejit queue when overlaps count is equal to 0.
* Ptc and PtcProfiler must be invalidated.
* Revert "Ptc and PtcProfiler must be invalidated."
This reverts commit f5b0ad9d7dc3c0b3a0da184de4d04d7234939c81.
* Fix #3710 slow path due to #3701.
Diffstat (limited to 'ARMeilleure/Translation')
| -rw-r--r-- | ARMeilleure/Translation/Translator.cs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/ARMeilleure/Translation/Translator.cs b/ARMeilleure/Translation/Translator.cs index ee8e3e8b..c50b1c3d 100644 --- a/ARMeilleure/Translation/Translator.cs +++ b/ARMeilleure/Translation/Translator.cs @@ -455,13 +455,16 @@ namespace ARMeilleure.Translation public void InvalidateJitCacheRegion(ulong address, ulong size) { - // If rejit is running, stop it as it may be trying to rejit a function on the invalidated region. - ClearRejitQueue(allowRequeue: true); - ulong[] overlapAddresses = Array.Empty<ulong>(); int overlapsCount = Functions.GetOverlaps(address, size, ref overlapAddresses); + if (overlapsCount != 0) + { + // If rejit is running, stop it as it may be trying to rejit a function on the invalidated region. + ClearRejitQueue(allowRequeue: true); + } + for (int index = 0; index < overlapsCount; index++) { ulong overlapAddress = overlapAddresses[index]; |
