Remove cold methods from the CPU cache (#224)
* Remove unused tracing functionality from the CPU * GetNsoExecutable -> GetExecutable * Unsigned comparison * Re-add cpu tracing * Config change * Remove cold methods from the translation cache on the cpu * Replace lock with try lock, pass new ATranslatorCache instead of ATranslator * Rebase fixups
This commit is contained in:
parent
99b2692425
commit
6d65e53664
11 changed files with 318 additions and 232 deletions
|
@ -3,18 +3,21 @@ using Ryujinx.HLE.HOS;
|
|||
using Ryujinx.HLE.HOS.Kernel;
|
||||
using Ryujinx.HLE.Loaders.Executables;
|
||||
using Ryujinx.HLE.Utilities;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
namespace Ryujinx.HLE.Loaders
|
||||
{
|
||||
class Executable
|
||||
{
|
||||
private AMemory Memory;
|
||||
|
||||
private List<ElfDyn> Dynamic;
|
||||
|
||||
private Dictionary<long, string> m_SymbolTable;
|
||||
|
||||
public IReadOnlyDictionary<long, string> SymbolTable => m_SymbolTable;
|
||||
public ReadOnlyCollection<ElfSym> SymbolTable;
|
||||
|
||||
public string Name { get; private set; }
|
||||
|
||||
|
@ -23,16 +26,12 @@ namespace Ryujinx.HLE.Loaders
|
|||
public long ImageBase { get; private set; }
|
||||
public long ImageEnd { get; private set; }
|
||||
|
||||
private AMemory Memory;
|
||||
|
||||
private KMemoryManager MemoryManager;
|
||||
|
||||
public Executable(IExecutable Exe, KMemoryManager MemoryManager, AMemory Memory, long ImageBase)
|
||||
{
|
||||
Dynamic = new List<ElfDyn>();
|
||||
|
||||
m_SymbolTable = new Dictionary<long, string>();
|
||||
|
||||
FilePath = Exe.FilePath;
|
||||
|
||||
if (FilePath != null)
|
||||
|
@ -103,14 +102,18 @@ namespace Ryujinx.HLE.Loaders
|
|||
|
||||
long SymEntSize = GetFirstValue(ElfDynTag.DT_SYMENT);
|
||||
|
||||
List<ElfSym> Symbols = new List<ElfSym>();
|
||||
|
||||
while ((ulong)SymTblAddr < (ulong)StrTblAddr)
|
||||
{
|
||||
ElfSym Sym = GetSymbol(SymTblAddr, StrTblAddr);
|
||||
|
||||
m_SymbolTable.TryAdd(Sym.Value, Sym.Name);
|
||||
Symbols.Add(Sym);
|
||||
|
||||
SymTblAddr += SymEntSize;
|
||||
}
|
||||
|
||||
SymbolTable = Array.AsReadOnly(Symbols.OrderBy(x => x.Value).ToArray());
|
||||
}
|
||||
|
||||
private ElfRel GetRelocation(long Position)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue