aboutsummaryrefslogtreecommitdiffstats
path: root/src/stdump.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/stdump.c')
-rw-r--r--src/stdump.c44
1 files changed, 0 insertions, 44 deletions
diff --git a/src/stdump.c b/src/stdump.c
deleted file mode 100644
index 282fb31..0000000
--- a/src/stdump.c
+++ /dev/null
@@ -1,44 +0,0 @@
1#include <stdio.h>
2#include <stdlib.h>
3#include <string.h>
4
5
6#include "litmus.h"
7#include "adaptive.h"
8#include "sched_trace.h"
9
10int show_sl_chg(trace_header_t* hdr)
11{
12 service_level_change_record_t *rec;
13
14 rec = (service_level_change_record_t*) hdr;
15 printf("SL CHANGE : PID=%d PERIOD=%lu\n", rec->task.pid,
16 rec->new_level.period);
17 return 0;
18}
19
20int show_weight_error(trace_header_t* hdr)
21{
22 weight_error_record_t *rec;
23
24 rec = (weight_error_record_t*) hdr;
25 printf("WEIGHT ERR: PID=%d EST=%5.4f ACT=%5.4f\n", rec->task,
26 fp2f(rec->estimate), fp2f(rec->actual));
27 return 0;
28}
29
30
31int main(int argc, char** argv)
32{
33 record_callback_t cb;
34 int ret;
35
36 init_record_callback(&cb);
37 set_callback(ST_SERVICE_LEVEL_CHANGE, show_sl_chg, &cb);
38 set_callback(ST_WEIGHT_ERROR, show_weight_error, &cb);
39
40 ret = walk_sched_trace_files_ordered(argv + 1, argc - 1, 0, &cb);
41 if (ret != 0)
42 perror("walk failed");
43 return 0;
44}