remove useless memorybarrier remove double membarrier in wait pm4 cmd add int64 cvar use int64 cvar for x64 feature mask Rework some functions that were frontend bound according to vtune placing some of their code in different noinline functions, profiling after indicating l1 cache misses decreased and perf of func increased remove long vpinsrd dep chain code for conversion.h, instead do normal load+bswap or movbe if avail Much faster entry table via split_map, code size could be improved though GetResolveInfo was very large and had impact on icache, mark callees as noinline + msvc pragma optimize small use log2 shifts instead of integer divides in memory minor optimizations in PhysicalHeap::EnableAccessCallbacks, the majority of time in the function is spent looping, NOT calling Protect! Someone should optimize this function and rework the algo completely remove wonky scheduling log message, it was spammy and unhelpful lock count was unnecessary for criticalsection mutex, criticalsection is already a recursive mutex brief notes i gotta run
59 lines
1.5 KiB
C++
59 lines
1.5 KiB
C++
/**
|
|
******************************************************************************
|
|
* Xenia : Xbox 360 Emulator Research Project *
|
|
******************************************************************************
|
|
* Copyright 2013 Ben Vanik. All rights reserved. *
|
|
* Released under the BSD license - see LICENSE in the root for more details. *
|
|
******************************************************************************
|
|
*/
|
|
|
|
#ifndef XENIA_CPU_ENTRY_TABLE_H_
|
|
#define XENIA_CPU_ENTRY_TABLE_H_
|
|
|
|
#include <unordered_map>
|
|
#include <vector>
|
|
|
|
#include "xenia/base/mutex.h"
|
|
#include "xenia/base/split_map.h"
|
|
namespace xe {
|
|
namespace cpu {
|
|
|
|
class Function;
|
|
|
|
typedef struct Entry_t {
|
|
typedef enum {
|
|
STATUS_NEW = 0,
|
|
STATUS_COMPILING,
|
|
STATUS_READY,
|
|
STATUS_FAILED,
|
|
} Status;
|
|
|
|
uint32_t address;
|
|
uint32_t end_address;
|
|
Status status;
|
|
Function* function;
|
|
} Entry;
|
|
|
|
class EntryTable {
|
|
public:
|
|
EntryTable();
|
|
~EntryTable();
|
|
|
|
Entry* Get(uint32_t address);
|
|
Entry::Status GetOrCreate(uint32_t address, Entry** out_entry);
|
|
void Delete(uint32_t address);
|
|
|
|
std::vector<Function*> FindWithAddress(uint32_t address);
|
|
|
|
private:
|
|
xe::global_critical_region global_critical_region_;
|
|
// TODO(benvanik): replace with a better data structure.
|
|
xe::split_map<uint32_t, Entry*> map_;
|
|
//std::unordered_map<uint32_t, Entry*> map_;
|
|
};
|
|
|
|
} // namespace cpu
|
|
} // namespace xe
|
|
|
|
#endif // XENIA_CPU_ENTRY_TABLE_H_
|