Reformat all the things. Have fun with merge conflicts.

This commit is contained in:
Pierre Bourdon
2016-06-24 10:43:46 +02:00
parent 2115e8a4a6
commit 3570c7f03a
1116 changed files with 187405 additions and 180344 deletions

View File

@ -2,7 +2,6 @@
// Licensed under GPLv2+
// Refer to the license.txt file included.
#pragma once
#include <cstddef>
@ -14,24 +13,23 @@
#if defined(_M_X86_64)
#define PROFILER_QUERY_PERFORMANCE_COUNTER(pt) \
MOV(64, R(ABI_PARAM1), Imm64((u64) pt)); \
ABI_CallFunction((const void*) QueryPerformanceCounter)
#define PROFILER_QUERY_PERFORMANCE_COUNTER(pt) \
MOV(64, R(ABI_PARAM1), Imm64((u64)pt)); \
ABI_CallFunction((const void*)QueryPerformanceCounter)
// block->ticCounter += block->ticStop - block->ticStart
#define PROFILER_UPDATE_TIME(block) \
MOV(64, R(RSCRATCH2), Imm64((u64) block)); \
MOV(64, R(RSCRATCH), MDisp(RSCRATCH2, offsetof(struct JitBlock, ticStop))); \
SUB(64, R(RSCRATCH), MDisp(RSCRATCH2, offsetof(struct JitBlock, ticStart))); \
ADD(64, R(RSCRATCH), MDisp(RSCRATCH2, offsetof(struct JitBlock, ticCounter))); \
MOV(64, MDisp(RSCRATCH2, offsetof(struct JitBlock, ticCounter)), R(RSCRATCH));
#define PROFILER_UPDATE_TIME(block) \
MOV(64, R(RSCRATCH2), Imm64((u64)block)); \
MOV(64, R(RSCRATCH), MDisp(RSCRATCH2, offsetof(struct JitBlock, ticStop))); \
SUB(64, R(RSCRATCH), MDisp(RSCRATCH2, offsetof(struct JitBlock, ticStart))); \
ADD(64, R(RSCRATCH), MDisp(RSCRATCH2, offsetof(struct JitBlock, ticCounter))); \
MOV(64, MDisp(RSCRATCH2, offsetof(struct JitBlock, ticCounter)), R(RSCRATCH));
#define PROFILER_VPUSH \
BitSet32 registersInUse = CallerSavedRegistersInUse(); \
ABI_PushRegistersAndAdjustStack(registersInUse, 0);
#define PROFILER_VPUSH \
BitSet32 registersInUse = CallerSavedRegistersInUse(); \
ABI_PushRegistersAndAdjustStack(registersInUse, 0);
#define PROFILER_VPOP \
ABI_PopRegistersAndAdjustStack(registersInUse, 0);
#define PROFILER_VPOP ABI_PopRegistersAndAdjustStack(registersInUse, 0);
#else
@ -44,24 +42,25 @@
struct BlockStat
{
BlockStat(int bn, u32 _addr, u64 c, u64 ticks, u64 run, u32 size) :
blockNum(bn), addr(_addr), cost(c), tick_counter(ticks), run_count(run), block_size(size) {}
int blockNum;
u32 addr;
u64 cost;
u64 tick_counter;
u64 run_count;
u32 block_size;
BlockStat(int bn, u32 _addr, u64 c, u64 ticks, u64 run, u32 size)
: blockNum(bn), addr(_addr), cost(c), tick_counter(ticks), run_count(run), block_size(size)
{
}
int blockNum;
u32 addr;
u64 cost;
u64 tick_counter;
u64 run_count;
u32 block_size;
bool operator <(const BlockStat &other) const
{ return cost > other.cost; }
bool operator<(const BlockStat& other) const { return cost > other.cost; }
};
struct ProfileStats
{
std::vector<BlockStat> block_stats;
u64 cost_sum;
u64 timecost_sum;
u64 countsPerSec;
std::vector<BlockStat> block_stats;
u64 cost_sum;
u64 timecost_sum;
u64 countsPerSec;
};
namespace Profiler