aboutsummaryrefslogtreecommitdiffstats
path: root/litmus/trace.c
diff options
context:
space:
mode:
authorBjoern B. Brandenburg <bbb@cs.unc.edu>2011-02-05 23:15:09 -0500
committerBjoern B. Brandenburg <bbb@cs.unc.edu>2011-11-24 15:21:04 -0500
commit1dead199b4ae68ab98eacec4a661fd5ecb5a2704 (patch)
treef15c9a70f79bab4e7c6ca8937710b9f02ee76f0b /litmus/trace.c
parent4490f9ecf94e28458069a02e8cfcf4f385390499 (diff)
Feather-Trace: keep track of release latency
Diffstat (limited to 'litmus/trace.c')
-rw-r--r--litmus/trace.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/litmus/trace.c b/litmus/trace.c
index 1e916aa406b9..f0eb2c706488 100644
--- a/litmus/trace.c
+++ b/litmus/trace.c
@@ -61,6 +61,26 @@ feather_callback void save_timestamp_cpu(unsigned long event,
61 __save_timestamp_cpu(event, TSK_UNKNOWN, cpu); 61 __save_timestamp_cpu(event, TSK_UNKNOWN, cpu);
62} 62}
63 63
64feather_callback void save_task_latency(unsigned long event,
65 unsigned long when_ptr)
66{
67 lt_t now = litmus_clock();
68 lt_t *when = (lt_t*) when_ptr;
69 unsigned int seq_no;
70 int cpu = raw_smp_processor_id();
71 struct timestamp *ts;
72
73 seq_no = fetch_and_inc((int *) &ts_seq_no);
74 if (ft_buffer_start_write(trace_ts_buf, (void**) &ts)) {
75 ts->event = event;
76 ts->timestamp = now - *when;
77 ts->seq_no = seq_no;
78 ts->cpu = cpu;
79 ts->task_type = TSK_RT;
80 ft_buffer_finish_write(trace_ts_buf, ts);
81 }
82}
83
64/******************************************************************************/ 84/******************************************************************************/
65/* DEVICE FILE DRIVER */ 85/* DEVICE FILE DRIVER */
66/******************************************************************************/ 86/******************************************************************************/