17 #ifdef POK_NEEDS_INSTRUMENTATION
24 uint8_t pok_instrumentation_task_is_init = 0;
25 uint8_t pok_instrumentation_partition_is_init = 0;
27 void pok_instrumentation_task_archi (
const uint32_t id)
32 if (
id == pok_partitions[pok_threads[
id].partition].thread_index_low)
37 if (pok_instrumentation_task_is_init == 0)
39 printf (
"[INSTRUMENTATION][CHEDDAR][ARCHI] </address_spaces>\n");
40 printf (
"[INSTRUMENTATION][CHEDDAR][ARCHI] <tasks>\n");
43 pok_instrumentation_task_is_init = 1;
45 printf (
"[INSTRUMENTATION][CHEDDAR][ARCHI] <task task_type=\"PERIODIC_TYPE\">\n");
46 printf (
"[INSTRUMENTATION][CHEDDAR][ARCHI] <cpu_name>pokkernel</cpu_name>\n");
47 printf (
"[INSTRUMENTATION][CHEDDAR][ARCHI] <address_space_name>partition%d</address_space_name>\n", pok_threads[
id].partition);
48 printf (
"[INSTRUMENTATION][CHEDDAR][ARCHI] <address_space_name>partition%d</address_space_name>\n", pok_threads[
id].partition);
49 printf (
"[INSTRUMENTATION][CHEDDAR][ARCHI] <name>task%d</name>\n",
id);
50 printf (
"[INSTRUMENTATION][CHEDDAR][ARCHI] <capacity>%d</capacity>\n", pok_threads[
id].time_capacity);
51 printf (
"[INSTRUMENTATION][CHEDDAR][ARCHI] <start_time>0</start_time>\n");
52 printf (
"[INSTRUMENTATION][CHEDDAR][ARCHI] <policy>SCHED_FIFO</policy>\n");
53 printf (
"[INSTRUMENTATION][CHEDDAR][ARCHI] <deadline>%d</deadline>\n", pok_threads[
id].deadline);
54 printf (
"[INSTRUMENTATION][CHEDDAR][ARCHI] <criticality>0</criticality>\n");
55 printf (
"[INSTRUMENTATION][CHEDDAR][ARCHI] <context_switch_overhead>0</context_switch_overhead>\n");
56 printf (
"[INSTRUMENTATION][CHEDDAR][ARCHI] <blocking_time>0</blocking_time>\n");
57 printf (
"[INSTRUMENTATION][CHEDDAR][ARCHI] <priority>1</priority>\n");
58 printf (
"[INSTRUMENTATION][CHEDDAR][ARCHI] <text_memory_size>0</text_memory_size>\n");
59 printf (
"[INSTRUMENTATION][CHEDDAR][ARCHI] <stack_memory_size>0</stack_memory_size>\n");
60 printf (
"[INSTRUMENTATION][CHEDDAR][ARCHI] <period>%d</period>\n", pok_threads[
id].period);
61 printf (
"[INSTRUMENTATION][CHEDDAR][ARCHI] <jitter>0</jitter>\n");
62 printf (
"[INSTRUMENTATION][CHEDDAR][ARCHI] </task>\n");
65 void pok_instrumentation_partition_archi (
const uint8_t id)
67 if (pok_instrumentation_partition_is_init == 0)
69 printf (
"[INSTRUMENTATION][CHEDDAR][ARCHI] <address_spaces>\n");
72 pok_instrumentation_partition_is_init = 1;
74 printf (
"[INSTRUMENTATION][CHEDDAR][ARCHI] <address_space>\n");
75 printf (
"[INSTRUMENTATION][CHEDDAR][ARCHI] <name>partition%d</name>\n",
id);
76 printf (
"[INSTRUMENTATION][CHEDDAR][ARCHI] <cpu_name>pokkernel</cpu_name>\n");
77 printf (
"[INSTRUMENTATION][CHEDDAR][ARCHI] <text_memory_size> 0</text_memory_size>\n");
78 printf (
"[INSTRUMENTATION][CHEDDAR][ARCHI] <stack_memory_size> 0</stack_memory_size>\n");
79 printf (
"[INSTRUMENTATION][CHEDDAR][ARCHI] <data_memory_size> 0</data_memory_size>\n");
80 printf (
"[INSTRUMENTATION][CHEDDAR][ARCHI] <heap_memory_size> 0</heap_memory_size>\n");
81 printf (
"[INSTRUMENTATION][CHEDDAR][ARCHI] <scheduler quantum= \"%d\">", pok_partitions[
id].period);
82 printf (
"[INSTRUMENTATION][CHEDDAR][ARCHI] POSIX_1003_HIGHEST_PRIORITY_FIRST_PROTOCOL </scheduler>\n");
83 printf (
"[INSTRUMENTATION][CHEDDAR][ARCHI] </address_space>\n");
86 void pok_instrumentation_running_task (
const uint32_t id)
88 printf (
"[INSTRUMENTATION][CHEDDAR][EVENTS] <running_task> ");
89 printf (
"%d", POK_GETTICK() );
90 printf (
" task%d",
id);
91 printf (
"</running_task>\n");