removed obsolete profiling

This commit is contained in:
Zeno Rogue 2021-03-09 10:45:44 +01:00
parent c4ab8cca8b
commit 95d4e942e2
5 changed files with 0 additions and 67 deletions

View File

@ -2405,8 +2405,6 @@ EX void drawqueue() {
glClear(GL_STENCIL_BUFFER_BIT);
#endif
profile_start(3);
sort_drawqueue();
DEBB(DF_GRAPH, ("sort walls"));
@ -2437,8 +2435,6 @@ EX void drawqueue() {
});
}
profile_stop(3);
#if CAP_SDL
if(current_display->stereo_active() && !vid.usingGL) {

View File

@ -4667,8 +4667,6 @@ EX void drawthemap() {
if(sightrange_bonus > 0 && !allowIncreasedSight())
sightrange_bonus = 0;
profile_frame();
profile_start(0);
swap(gmatrix0, gmatrix);
gmatrix.clear();
current_display->all_drawn_copies.clear();
@ -4742,7 +4740,6 @@ EX void drawthemap() {
arrowtraps.clear();
profile_start(1);
make_actual_view();
currentmap->draw_all();
drawWormSegments();
@ -4757,10 +4754,7 @@ EX void drawthemap() {
callhooks(hooks_frame);
profile_stop(1);
profile_start(4);
drawMarkers();
profile_stop(4);
drawFlashes();
mapeditor::draw_dtshapes();
@ -4818,7 +4812,6 @@ EX void drawthemap() {
lmouseover = mousedest.d >= 0 ? cwt.at->modmove(cwt.spin + mousedest.d) : cwt.at;
}
#endif
profile_stop(0);
}
EX void drawmovestar(double dx, double dy) {
@ -5006,14 +4999,11 @@ EX void drawfullmap() {
if(cmode & sm::DRAW) mapeditor::drawGrid();
#endif
}
profile_start(2);
drawaura();
#if CAP_QUEUE
drawqueue();
#endif
profile_stop(2);
}
#if ISMOBILE

View File

@ -63,7 +63,6 @@ EX int hyper_main(int argc, char **argv) {
#endif
mainloop();
finishAll();
profile_info();
return 0;
}
}

View File

@ -26,18 +26,6 @@ ld sqdist(shiftpoint a, shiftpoint b) {
else return intval(a.h, unshift(b, a.shift));
}
/*
const char *lastprofile = "";
int lt = 0;
void profile(const char *buf) {
int gt = SDL_GetTicks();
printf("%4d %s\n", gt - lt, lastprofile);
lt = gt;
lastprofile = buf;
}
*/
#if HDR
#define SCALE cgi.scalefactor
#define SCALE2 (SCALE*SCALE)

View File

@ -72,46 +72,6 @@ EX ld ilerp(ld a0, ld a1, ld x) {
return (x-a0) / (a1-a0);
}
// debug utilities
#if CAP_PROFILING
#define FRAMES 64
#define CATS 16
long long proftable[16][FRAMES];
int pframeid;
void profile_frame() {
pframeid++; pframeid %= FRAMES;
for(int t=0; t<16; t++) proftable[t][pframeid] = 0;
}
EX void profile_start(int t) { proftable[t][pframeid] -= getms(); }
EX void profile_stop(int t) { proftable[t][pframeid] += getms(); }
void profile_info() {
for(int t=0; t<16; t++) {
sort(proftable[t], proftable[t]+FRAMES);
if(proftable[t][FRAMES-1] == 0) continue;
long long sum = 0;
for(int f=0; f<FRAMES; f++) sum += proftable[t][f];
printf("Category %d: avg = %Ld, %Ld..%Ld..%Ld..%Ld..%Ld\n",
t, sum / FRAMES, proftable[t][0], proftable[t][16], proftable[t][32],
proftable[t][48], proftable[t][63]);
}
}
#endif
#if !CAP_PROFILING
#if HDR
#define profile_frame()
#define profile_start(t)
#define profile_stop(t)
#define profile_info()
#endif
#endif
EX purehookset hooks_tests;
EX string simplify(const string& s) {