aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAndrea Bastoni <bastoni@sprg.uniroma2.it>2011-11-25 11:16:18 -0500
committerAndrea Bastoni <bastoni@sprg.uniroma2.it>2011-11-25 11:16:18 -0500
commit11e46234ce711665f75246d026631bcd6c946e44 (patch)
tree53926e2622e7be083f12a958319eaf799d18b70c /include
parent5bd89a34d89f252619d83fef3c9325e24311389e (diff)
Refactor tracing and debugging filenames + CONFIG macros
Tracing and Debugging filenames in Litmus were a bit clumsy. Particularly it was not immediate to tell the content of a tracing/debugging file from its name, and it was not intuitive to navigate through the CONFIG macros. This commit refactors tracing/debugging filenames and the corresponging CONFIG macros to more intuitive names. Overhead Tracing (employs Feather Trace): renamed: include/litmus/trace.h -> include/litmus/sched_trace_ohead.h renamed: litmus/trace.c -> litmus/sched_trace_ohead.c Scheduling-related tracing (employs Feather Trace): renamed: include/litmus/sched_trace.h -> include/litmus/sched_trace_task.h renamed: litmus/sched_task_trace.c -> litmus/sched_trace_task.c Debugging (TRACE() macro): renamed: litmus/sched_trace.c -> litmus/debug_trace.c
Diffstat (limited to 'include')
-rw-r--r--include/litmus/debug_trace.h4
-rw-r--r--include/litmus/litmus.h3
-rw-r--r--include/litmus/sched_trace_ohead.h (renamed from include/litmus/trace.h)12
-rw-r--r--include/litmus/sched_trace_task.h (renamed from include/litmus/sched_trace.h)8
4 files changed, 16 insertions, 11 deletions
diff --git a/include/litmus/debug_trace.h b/include/litmus/debug_trace.h
index 48d086d5a44c..bcf5a47f47cc 100644
--- a/include/litmus/debug_trace.h
+++ b/include/litmus/debug_trace.h
@@ -1,7 +1,7 @@
1#ifndef LITMUS_DEBUG_TRACE_H 1#ifndef LITMUS_DEBUG_TRACE_H
2#define LITMUS_DEBUG_TRACE_H 2#define LITMUS_DEBUG_TRACE_H
3 3
4#ifdef CONFIG_SCHED_DEBUG_TRACE 4#ifdef CONFIG_LITMUS_DEBUG_TRACE
5void sched_trace_log_message(const char* fmt, ...); 5void sched_trace_log_message(const char* fmt, ...);
6void dump_trace_buffer(int max); 6void dump_trace_buffer(int max);
7#else 7#else
@@ -12,7 +12,7 @@ void dump_trace_buffer(int max);
12 12
13extern atomic_t __log_seq_no; 13extern atomic_t __log_seq_no;
14 14
15#ifdef CONFIG_SCHED_DEBUG_TRACE_CALLER 15#ifdef CONFIG_LITMUS_DEBUG_TRACE_CALLER
16#define TRACE_PREFIX "%d P%d [%s@%s:%d]: " 16#define TRACE_PREFIX "%d P%d [%s@%s:%d]: "
17#define TRACE_ARGS atomic_add_return(1, &__log_seq_no), \ 17#define TRACE_ARGS atomic_add_return(1, &__log_seq_no), \
18 raw_smp_processor_id(), \ 18 raw_smp_processor_id(), \
diff --git a/include/litmus/litmus.h b/include/litmus/litmus.h
index 12af22266331..3f47d496870a 100644
--- a/include/litmus/litmus.h
+++ b/include/litmus/litmus.h
@@ -6,6 +6,7 @@
6#ifndef _LINUX_LITMUS_H_ 6#ifndef _LINUX_LITMUS_H_
7#define _LINUX_LITMUS_H_ 7#define _LINUX_LITMUS_H_
8 8
9#include <linux/sched.h>
9#include <litmus/debug_trace.h> 10#include <litmus/debug_trace.h>
10 11
11#ifdef CONFIG_RELEASE_MASTER 12#ifdef CONFIG_RELEASE_MASTER
@@ -226,7 +227,7 @@ static inline void clear_exit_np(struct task_struct *t)
226 227
227static inline int is_np(struct task_struct *t) 228static inline int is_np(struct task_struct *t)
228{ 229{
229#ifdef CONFIG_SCHED_DEBUG_TRACE 230#ifdef CONFIG_LITMUS_DEBUG_TRACE
230 int kernel, user; 231 int kernel, user;
231 kernel = is_kernel_np(t); 232 kernel = is_kernel_np(t);
232 user = is_user_np(t); 233 user = is_user_np(t);
diff --git a/include/litmus/trace.h b/include/litmus/sched_trace_ohead.h
index e2926a08c2f4..1e743599eb5c 100644
--- a/include/litmus/trace.h
+++ b/include/litmus/sched_trace_ohead.h
@@ -1,7 +1,11 @@
1#ifndef _SYS_TRACE_H_ 1/*
2#define _SYS_TRACE_H_ 2 * sched_trace_overhead.h - wrappers around feather_trace callbacks
3 * for scheduling overheads tracing.
4 */
5#ifndef _SCHED_TRACE_OVERHEAD_H_
6#define _SCHED_TRACE_OVERHEAD_H_
3 7
4#ifdef CONFIG_SCHED_OVERHEAD_TRACE 8#ifdef CONFIG_SCHED_TRACE_OVERHEAD
5 9
6#include <litmus/feather_trace.h> 10#include <litmus/feather_trace.h>
7#include <litmus/feather_buffer.h> 11#include <litmus/feather_buffer.h>
@@ -43,7 +47,7 @@ feather_callback void save_task_latency(unsigned long event, unsigned long when_
43#define LTIMESTAMP(id, task) \ 47#define LTIMESTAMP(id, task) \
44 ft_event1(id, save_task_latency, (unsigned long) task) 48 ft_event1(id, save_task_latency, (unsigned long) task)
45 49
46#else /* !CONFIG_SCHED_OVERHEAD_TRACE */ 50#else /* !CONFIG_SCHED_TRACE_OVERHEAD */
47 51
48#define TIMESTAMP(id) /* no tracing */ 52#define TIMESTAMP(id) /* no tracing */
49 53
diff --git a/include/litmus/sched_trace.h b/include/litmus/sched_trace_task.h
index 7ca34cb13881..bfe1fc015d4a 100644
--- a/include/litmus/sched_trace.h
+++ b/include/litmus/sched_trace_task.h
@@ -1,8 +1,8 @@
1/* 1/*
2 * sched_trace.h -- record scheduler events to a byte stream for offline analysis. 2 * sched_trace_task.h -- record scheduler events to a byte stream for offline analysis.
3 */ 3 */
4#ifndef _LINUX_SCHED_TRACE_H_ 4#ifndef _LINUX_SCHED_TRACE_TASK_H_
5#define _LINUX_SCHED_TRACE_H_ 5#define _LINUX_SCHED_TRACE_TASK_H_
6 6
7/* all times in nanoseconds */ 7/* all times in nanoseconds */
8 8
@@ -123,7 +123,7 @@ struct st_event_record {
123#include <linux/sched.h> 123#include <linux/sched.h>
124#include <litmus/feather_trace.h> 124#include <litmus/feather_trace.h>
125 125
126#ifdef CONFIG_SCHED_TASK_TRACE 126#ifdef CONFIG_SCHED_TRACE_TASK
127 127
128#define SCHED_TRACE(id, callback, task) \ 128#define SCHED_TRACE(id, callback, task) \
129 ft_event1(id, callback, task) 129 ft_event1(id, callback, task)