mfunction_t *f, *best;
int i, num, max/*, howmany*/;
+ if (!sv.active)
+ {
+ Con_Printf("no server running, can't profile\n");
+ return;
+ }
+
+ Con_Print( "Server Profile:\n[Profile] [BuiltinProfile] [CallCount]\n" );
+
//howmany = 10;
//if (Cmd_Argc() == 2)
// howmany = atoi(Cmd_Argv(1));
if (best)
{
//if (num < howmany)
- Con_Printf("%7i %7i %s\n", best->profile, best->builtinsprofile, PR_GetString(best->s_name));
+ Con_Printf("%7i %7i %7i %s\n", best->profile, best->builtinsprofile, best->callcount, PR_GetString(best->s_name));
num++;
best->profile = 0;
best->builtinsprofile = 0;
int i;
if (pr_xfunction)
{
- for (i = -4;i <= 0;i++)
+ for (i = -7;i <= 0;i++)
if (pr_xstatement + i >= pr_xfunction->first_statement)
PR_PrintStatement (pr_statements + pr_xstatement + i);
}
eval_t *ptr;
int profile, startprofile, cachedpr_trace, exitdepth;
- if (!fnum || fnum >= progs->numfunctions)
+ if (!fnum || fnum >= (unsigned) progs->numfunctions)
{
if (pr_global_struct->self)
ED_Print(PROG_TO_EDICT(pr_global_struct->self));