4coder/4ed_internal.h

61 lines
1.4 KiB
C
Raw Normal View History

2015-09-28 23:34:55 +00:00
/*
* Mr. 4th Dimention - Allen Webster
*
* 16.05.2015
*
* Fascilities available for development but not intended for shipping.
*
*/
2015-11-14 04:42:06 +00:00
// TOP
2015-09-28 23:34:55 +00:00
#if FRED_INTERNAL == 1
2015-11-14 04:42:06 +00:00
#define ProfileStart_(name, start, counter, hit, thread, n, c)
2015-09-28 23:34:55 +00:00
2015-11-14 04:42:06 +00:00
#define ProfileEnd_(name, start, counter, hit, thread)
2015-09-28 23:34:55 +00:00
2015-11-14 04:42:06 +00:00
#define ProfileMoment_(name, counter, thread)
2015-09-28 23:34:55 +00:00
2015-11-14 04:42:06 +00:00
#if 0
2015-09-28 23:34:55 +00:00
2015-11-14 04:42:06 +00:00
#define ProfileStart(name) char *_pname_##name; i64 _pstart_##name; \
i32 _pcounter_##name; u32 _phit_##name; \
ProfileStart_(_pname_##name, _pstart_##name, _pcounter_##name, \
_phit_##name, system->thread_get_id(thread), \
#name, __COUNTER__)
2015-09-28 23:34:55 +00:00
2015-11-14 04:42:06 +00:00
#define ProfileEnd(name) ProfileEnd_(_pname_##name, _pstart_##name, \
_pcounter_##name, _phit_##name, \
system->thread_get_id(thread))
2015-09-28 23:34:55 +00:00
#define ProfileMoment(name, thread) ProfileMoment_(#name, __COUNTER__, thread)
#define ProfileMomentFunction() ProfileMoment_(__FUNCTION__, __COUNTER__, 0)
#else
#define ProfileStart(name)
#define ProfileEnd(name)
#define ProfileMoment(name)
#define ProfileMomentFunction()
#endif
2015-11-14 04:42:06 +00:00
struct Sys_Bubble : public Bubble{
i32 line_number;
char *file_name;
};
#else
#define ProfileStart(name)
#define ProfileEnd(name)
#define ProfileMoment(name)
#define ProfileMomentFunction()
#endif
// BOTTOM