Exemplo n.º 1
0
        public PerformanceStore(string path)
        {
            this._data = new List <PerformanceItem>();

            if (Settings.Default.PerformanceInfo_On)
            {
                MicroArch selectedMicroarchitures = AsmDudeToolsStatic.Get_MicroArch_Switched_On();
                if (selectedMicroarchitures != MicroArch.NONE)
                {
                    var translations = this.Load_Instruction_Translation(path + "Instructions-Translations.tsv");
                    if (selectedMicroarchitures.HasFlag(MicroArch.IvyBridge))
                    {
                        this.AddData(MicroArch.IvyBridge, path + "IvyBridge.tsv", translations);
                    }
                    if (selectedMicroarchitures.HasFlag(MicroArch.Haswell))
                    {
                        this.AddData(MicroArch.Haswell, path + "Haswell.tsv", translations);
                    }
                    if (selectedMicroarchitures.HasFlag(MicroArch.Broadwell))
                    {
                        this.AddData(MicroArch.Broadwell, path + "Broadwell.tsv", translations);
                    }
                    if (selectedMicroarchitures.HasFlag(MicroArch.Skylake))
                    {
                        this.AddData(MicroArch.Skylake, path + "Skylake.tsv", translations);
                    }
                    if (selectedMicroarchitures.HasFlag(MicroArch.SkylakeX))
                    {
                        this.AddData(MicroArch.SkylakeX, path + "SkylakeX.tsv", translations);
                    }
                }
            }
        }
Exemplo n.º 2
0
 public IEnumerable <PerformanceItem> GetPerformance(Mnemonic mnemonic, MicroArch selectedArchitectures)
 {
     foreach (PerformanceItem item in this._data)
     {
         if ((item._instr == mnemonic) && selectedArchitectures.HasFlag(item._microArch))
         {
             yield return(item);
         }
     }
 }
Exemplo n.º 3
0
        public IReadOnlyList <PerformanceItem> GetPerformance(Mnemonic mnemonic, MicroArch selectedArchitectures)
        {
            List <PerformanceItem> result = new List <PerformanceItem>();

            foreach (PerformanceItem item in this._data)
            {
                if ((item._instr == mnemonic) && selectedArchitectures.HasFlag(item._microArch))
                {
                    result.Add(item);
                }
            }
            if (result.Count == 0)
            {
                AsmDudeToolsStatic.Output_INFO("PerformanceStore:GetPerformance: mnemonic " + mnemonic + " has no performance info");
            }
            return(result.AsReadOnly());
        }