Removes NJ_PROFILE and related code, since it's all dead. (bug 560300 r=nnethercote+)

Host VM's should remove #define NJ_PROFILE and NJ_PROFILE_DISABLED

--HG--
extra : convert_revision : 02bc396c1339e7ed0ac17f77b074d5edcb1517f7
This commit is contained in:
Edwin Smith 2010-04-19 20:22:56 -04:00
Родитель 519091121b
Коммит 249f28c795
6 изменённых файлов: 3 добавлений и 80 удалений

Просмотреть файл

@ -79,7 +79,6 @@ namespace nanojit
#endif
, _config(config)
{
VMPI_memset(&_stats, 0, sizeof(_stats));
VMPI_memset(lookahead, 0, N_LOOKAHEAD * sizeof(LInsp));
nInit(core);
(void)logc;
@ -219,8 +218,6 @@ namespace nanojit
_allocator.addActive(r, ins);
ins->setReg(r);
} else {
counter_increment(steals);
// Nothing free, steal one.
// LSRA says pick the one with the furthest use.
LIns* vic = findVictim(setA___);
@ -282,7 +279,6 @@ namespace nanojit
_nExitIns = 0;
codeStart = codeEnd = 0;
exitStart = exitEnd = 0;
_stats.pages = 0;
codeList = 0;
nativePageReset();
@ -705,8 +701,6 @@ namespace nanojit
void Assembler::evict(LIns* vic)
{
// Not free, need to steal.
counter_increment(steals);
Register r = vic->getReg();
NanoAssert(!_allocator.isFree(r));
@ -779,7 +773,6 @@ namespace nanojit
NIns* Assembler::asm_leave_trace(LInsp guard)
{
verbose_only( int32_t nativeSave = _stats.native );
verbose_only( verbose_outputf("----------------------------------- ## END exit block %p", guard);)
// This point is unreachable. So free all the registers. If an
@ -823,8 +816,6 @@ namespace nanojit
debug_only( _fpuStkDepth = _sv_fpuStkDepth; _sv_fpuStkDepth = 9999; )
#endif
verbose_only(_stats.exitnative += (_stats.native-nativeSave));
return jmpTarget;
}
@ -993,12 +984,6 @@ namespace nanojit
_thisfrag = frag;
_inExit = false;
counter_reset(native);
counter_reset(exitnative);
counter_reset(steals);
counter_reset(spills);
counter_reset(remats);
setError(None);
// native code gen buffer setup
@ -1007,12 +992,6 @@ namespace nanojit
// make sure we got memory at least one page
if (error()) return;
#ifdef PERFM
_stats.pages = 0;
_stats.codeStart = _nIns-1;
_stats.codeExitStart = _nExitIns-1;
#endif /* PERFM */
_epilogue = NULL;
nBeginAssembly();

Просмотреть файл

@ -181,25 +181,6 @@ namespace nanojit
#endif
#endif
struct Stats
{
counter_define(steals;)
counter_define(remats;)
counter_define(spills;)
counter_define(native;)
counter_define(exitnative;)
int32_t pages;
NIns* codeStart;
NIns* codeExitStart;
DECLARE_PLATFORM_STATS()
#ifdef __GNUC__
// inexplicably, gnuc gives padding/alignment warnings without this. pacify it.
bool pad[4];
#endif
};
// error codes
enum AssmError
{
@ -323,8 +304,6 @@ namespace nanojit
CodeList* codeList; // finished blocks of code.
private:
Stats _stats;
void gen(LirFilter* toCompile);
NIns* genPrologue();
NIns* genEpilogue();

Просмотреть файл

@ -151,12 +151,6 @@ namespace nanojit
}
#endif
#ifdef NJ_PROFILE
// @todo fixup move to nanojit.h
#undef counter_value
#define counter_value(x) x
#endif /* NJ_PROFILE */
// LCompressedBuffer
LirBuffer::LirBuffer(Allocator& alloc) :
#ifdef NJ_VERBOSE

Просмотреть файл

@ -150,7 +150,6 @@ namespace nanojit {
// but only outputs if LC_Assembly is set. Also prepends the output
// with the address of the current native instruction.
#define asm_output(...) do { \
counter_increment(native); \
if (_logc->lcbits & LC_Assembly) { \
outline[0]='\0'; \
VMPI_sprintf(outline, "%010lx ", (unsigned long)_nIns); \

Просмотреть файл

@ -82,7 +82,6 @@
#define _DEBUG
#endif
#define NJ_VERBOSE 1
#define NJ_PROFILE 1
#include <stdarg.h>
#endif

Просмотреть файл

@ -148,12 +148,9 @@ namespace nanojit
}
#ifdef AVMPLUS_VERBOSE
#ifndef NJ_VERBOSE_DISABLED
#define NJ_VERBOSE 1
#endif
#ifndef NJ_PROFILE_DISABLED
#define NJ_PROFILE 1
#endif
#ifndef NJ_VERBOSE_DISABLED
#define NJ_VERBOSE 1
#endif
#endif
#ifdef NJ_NO_VARIADIC_MACROS
@ -177,30 +174,6 @@ namespace nanojit
#define debug_only(x)
#endif /* DEBUG */
#ifdef NJ_PROFILE
#define counter_struct_begin() struct {
#define counter_struct_end() } _stats;
#define counter_define(x) int32_t x
#define counter_value(x) _stats.x
#define counter_set(x,v) (counter_value(x)=(v))
#define counter_adjust(x,i) (counter_value(x)+=(int32_t)(i))
#define counter_reset(x) counter_set(x,0)
#define counter_increment(x) counter_adjust(x,1)
#define counter_decrement(x) counter_adjust(x,-1)
#define profile_only(x) x
#else
#define counter_struct_begin()
#define counter_struct_end()
#define counter_define(x)
#define counter_value(x)
#define counter_set(x,v)
#define counter_adjust(x,i)
#define counter_reset(x)
#define counter_increment(x)
#define counter_decrement(x)
#define profile_only(x)
#endif /* NJ_PROFILE */
#define isS8(i) ( int32_t(i) == int8_t(i) )
#define isU8(i) ( int32_t(i) == uint8_t(i) )
#define isS16(i) ( int32_t(i) == int16_t(i) )