diff --git a/drawing.cpp b/drawing.cpp index 77aa67f4..2e26de41 100644 --- a/drawing.cpp +++ b/drawing.cpp @@ -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) { diff --git a/graph.cpp b/graph.cpp index 435defb3..4163fa51 100644 --- a/graph.cpp +++ b/graph.cpp @@ -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 diff --git a/hyper-main.cpp b/hyper-main.cpp index 5c18629a..bd753ea3 100644 --- a/hyper-main.cpp +++ b/hyper-main.cpp @@ -63,7 +63,6 @@ EX int hyper_main(int argc, char **argv) { #endif mainloop(); finishAll(); - profile_info(); return 0; } } diff --git a/shmup.cpp b/shmup.cpp index 89fa7514..5f3e7e9a 100644 --- a/shmup.cpp +++ b/shmup.cpp @@ -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) diff --git a/util.cpp b/util.cpp index 2cd6d4a0..f12daa98 100644 --- a/util.cpp +++ b/util.cpp @@ -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