#include "profile.h"
#include "prof_err.h"
-
-#define STAT_ONCE_PER_SECOND
+#undef STAT_ONCE_PER_SECOND
+#undef HAVE_STAT
/* Begin prof_int.h */
return 0;
}
+#ifdef DEBUG_PROGRAM
errcode_t
profile_init_path(const char * filepath,
profile_t *ret_profile)
return retval;
}
+#endif
void
profile_release(profile_t profile)
#define EOL "\n"
#endif
+#ifdef DEBUG_PROGRAM
/* Errors should be returned, not ignored! */
static void dump_profile(struct profile_node *root, int level,
void (*cb)(const char *, void *), void *data)
} while (iter != 0);
}
-#ifdef DEBUG_PROGRAM
static void dump_profile_to_file_cb(const char *str, void *data)
{
fputs(str, data);
dump_profile(root, 0, dump_profile_to_file_cb, dstfile);
return 0;
}
-#endif
struct prof_buf {
char *base;
int err;
};
-#ifdef DEBUG_PROGRAM
static void add_data_to_buffer(struct prof_buf *b, const void *d, size_t len)
{
if (b->err)