aboutsummaryrefslogtreecommitdiffstats
path: root/include/litmus/trace.h
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
committerGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
commitc71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch)
treeecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /include/litmus/trace.h
parentea53c912f8a86a8567697115b6a0d8152beee5c8 (diff)
parent6a00f206debf8a5c8899055726ad127dbeeed098 (diff)
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts: litmus/sched_cedf.c
Diffstat (limited to 'include/litmus/trace.h')
-rw-r--r--include/litmus/trace.h23
1 files changed, 18 insertions, 5 deletions
diff --git a/include/litmus/trace.h b/include/litmus/trace.h
index 05f487263f28..e809376d6487 100644
--- a/include/litmus/trace.h
+++ b/include/litmus/trace.h
@@ -20,7 +20,9 @@ struct timestamp {
20 uint32_t seq_no; 20 uint32_t seq_no;
21 uint8_t cpu; 21 uint8_t cpu;
22 uint8_t event; 22 uint8_t event;
23 uint8_t task_type; 23 uint8_t task_type:2;
24 uint8_t irq_flag:1;
25 uint8_t irq_count:5;
24}; 26};
25 27
26/* tracing callbacks */ 28/* tracing callbacks */
@@ -28,7 +30,7 @@ feather_callback void save_timestamp(unsigned long event);
28feather_callback void save_timestamp_def(unsigned long event, unsigned long type); 30feather_callback void save_timestamp_def(unsigned long event, unsigned long type);
29feather_callback void save_timestamp_task(unsigned long event, unsigned long t_ptr); 31feather_callback void save_timestamp_task(unsigned long event, unsigned long t_ptr);
30feather_callback void save_timestamp_cpu(unsigned long event, unsigned long cpu); 32feather_callback void save_timestamp_cpu(unsigned long event, unsigned long cpu);
31 33feather_callback void save_task_latency(unsigned long event, unsigned long when_ptr);
32 34
33#define TIMESTAMP(id) ft_event0(id, save_timestamp) 35#define TIMESTAMP(id) ft_event0(id, save_timestamp)
34 36
@@ -40,6 +42,9 @@ feather_callback void save_timestamp_cpu(unsigned long event, unsigned long cpu)
40#define CTIMESTAMP(id, cpu) \ 42#define CTIMESTAMP(id, cpu) \
41 ft_event1(id, save_timestamp_cpu, (unsigned long) cpu) 43 ft_event1(id, save_timestamp_cpu, (unsigned long) cpu)
42 44
45#define LTIMESTAMP(id, task) \
46 ft_event1(id, save_task_latency, (unsigned long) task)
47
43#else /* !CONFIG_SCHED_OVERHEAD_TRACE */ 48#else /* !CONFIG_SCHED_OVERHEAD_TRACE */
44 49
45#define TIMESTAMP(id) /* no tracing */ 50#define TIMESTAMP(id) /* no tracing */
@@ -50,6 +55,8 @@ feather_callback void save_timestamp_cpu(unsigned long event, unsigned long cpu)
50 55
51#define CTIMESTAMP(id, cpu) /* no tracing */ 56#define CTIMESTAMP(id, cpu) /* no tracing */
52 57
58#define LTIMESTAMP(id, when_ptr) /* no tracing */
59
53#endif 60#endif
54 61
55 62
@@ -61,6 +68,8 @@ feather_callback void save_timestamp_cpu(unsigned long event, unsigned long cpu)
61 * always the next number after the start time event id. 68 * always the next number after the start time event id.
62 */ 69 */
63 70
71
72
64#define TS_SCHED_START DTIMESTAMP(100, TSK_UNKNOWN) /* we only 73#define TS_SCHED_START DTIMESTAMP(100, TSK_UNKNOWN) /* we only
65 * care 74 * care
66 * about 75 * about
@@ -92,12 +101,16 @@ feather_callback void save_timestamp_cpu(unsigned long event, unsigned long cpu)
92#define TS_EXIT_NP_END TIMESTAMP(151) 101#define TS_EXIT_NP_END TIMESTAMP(151)
93 102
94#define TS_LOCK_START TIMESTAMP(170) 103#define TS_LOCK_START TIMESTAMP(170)
95#define TS_LOCK_END TIMESTAMP(171) 104#define TS_LOCK_SUSPEND TIMESTAMP(171)
96#define TS_UNLOCK_START TIMESTAMP(172) 105#define TS_LOCK_RESUME TIMESTAMP(172)
97#define TS_UNLOCK_END TIMESTAMP(173) 106#define TS_LOCK_END TIMESTAMP(173)
107
108#define TS_UNLOCK_START TIMESTAMP(180)
109#define TS_UNLOCK_END TIMESTAMP(181)
98 110
99#define TS_SEND_RESCHED_START(c) CTIMESTAMP(190, c) 111#define TS_SEND_RESCHED_START(c) CTIMESTAMP(190, c)
100#define TS_SEND_RESCHED_END DTIMESTAMP(191, TSK_UNKNOWN) 112#define TS_SEND_RESCHED_END DTIMESTAMP(191, TSK_UNKNOWN)
101 113
114#define TS_RELEASE_LATENCY(when) LTIMESTAMP(208, &(when))
102 115
103#endif /* !_SYS_TRACE_H_ */ 116#endif /* !_SYS_TRACE_H_ */