25 #include "pips_config.h"
38 #include <sys/resource.h>
43 #define USAGE_STACK_SIZE 10
52 fprintf(
f,
"%.3f", (
double) p->tv_sec + (
double) p->tv_usec/1e6);
58 struct timeval *begin,
62 delta.tv_sec =
end->tv_sec - begin->tv_sec;
63 delta.tv_usec =
end->tv_usec - begin->tv_usec;
83 fprintf(
f,
"s\n page faults major: %ld/%ld minor: %ld/%ld\n",
84 end->ru_majflt-begin->ru_majflt,
end->ru_majflt,
85 end->ru_minflt-begin->ru_minflt,
end->ru_minflt);
103 fprintf(
f,
"[performance_spy] %s\n", msg);
105 getrusage(RUSAGE_SELF, &
current);
109 getrusage(RUSAGE_CHILDREN, &
current);
#define message_assert(msg, ex)
int f(int off1, int off2, int n, float r[n], float a[n], float b[n])
#define USAGE_STACK_SIZE
for USAGE information
void push_performance_spy()
perf_spy.c
static void printf_time(FILE *f, struct timeval *p)
available bucket
static void printf_usage_delta(FILE *f, struct rusage *begin, struct rusage *end)
simply dump all available information...
static struct rusage usage_stack[USAGE_STACK_SIZE]
void pop_performance_spy(FILE *f, string msg)
static void printf_time_delta(FILE *f, struct timeval *begin, struct timeval *end)
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...