aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--include/timestamp.h4
-rw-r--r--src/ft2csv.c4
-rw-r--r--src/ftdump.c51
-rwxr-xr-xst_trace11
5 files changed, 36 insertions, 36 deletions
diff --git a/Makefile b/Makefile
index 4214b9a..246dd7c 100644
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,7 @@
5-include .config 5-include .config
6 6
7# Where is the LITMUS^RT userspace library source tree? 7# Where is the LITMUS^RT userspace library source tree?
8LIBLITMUS ?= ../liblitmus2010 8LIBLITMUS ?= ../liblitmus
9 9
10# Include default configuration from liblitmus 10# Include default configuration from liblitmus
11# Liblitmus must have been built before ft_tools can be built. 11# Liblitmus must have been built before ft_tools can be built.
diff --git a/include/timestamp.h b/include/timestamp.h
index 64a0f23..81d7a79 100644
--- a/include/timestamp.h
+++ b/include/timestamp.h
@@ -17,7 +17,9 @@ struct timestamp {
17 uint32_t seq_no; 17 uint32_t seq_no;
18 uint8_t cpu; 18 uint8_t cpu;
19 uint8_t event; 19 uint8_t event;
20 uint8_t task_type; 20 uint8_t task_type:3;
21 uint8_t irq_flag:1;
22 uint8_t irq_count:4;
21}; 23};
22 24
23typedef uint32_t cmd_t; 25typedef uint32_t cmd_t;
diff --git a/src/ft2csv.c b/src/ft2csv.c
index ce44c7e..b75b284 100644
--- a/src/ft2csv.c
+++ b/src/ft2csv.c
@@ -37,7 +37,6 @@ static int only_cpu = -1;
37 37
38static unsigned int complete = 0; 38static unsigned int complete = 0;
39static unsigned int incomplete = 0; 39static unsigned int incomplete = 0;
40static unsigned int filtered = 0;
41static unsigned int skipped = 0; 40static unsigned int skipped = 0;
42static unsigned int non_rt = 0; 41static unsigned int non_rt = 0;
43static unsigned int interleaved = 0; 42static unsigned int interleaved = 0;
@@ -46,9 +45,9 @@ static unsigned int lvl_a_sched = 0;
46static unsigned int lvl_b_sched = 0; 45static unsigned int lvl_b_sched = 0;
47static unsigned int lvl_c_sched = 0; 46static unsigned int lvl_c_sched = 0;
48static unsigned int other_sched = 0; 47static unsigned int other_sched = 0;
48static unsigned int filtered = 0;
49 49
50#define CYCLES_PER_US 2128 50#define CYCLES_PER_US 2128
51
52static unsigned long long threshold = CYCLES_PER_US * 10000; /* 10 ms == 10 full ticks */ 51static unsigned long long threshold = CYCLES_PER_US * 10000; /* 10 ms == 10 full ticks */
53 52
54static struct timestamp* next(struct timestamp* start, struct timestamp* end, 53static struct timestamp* next(struct timestamp* start, struct timestamp* end,
@@ -428,5 +427,6 @@ int main(int argc, char** argv)
428 interleaved, lvl_a_sched, lvl_b_sched, lvl_c_sched, 427 interleaved, lvl_a_sched, lvl_b_sched, lvl_c_sched,
429 other_sched); 428 other_sched);
430 429
430
431 return 0; 431 return 0;
432} 432}
diff --git a/src/ftdump.c b/src/ftdump.c
index 65cbe3f..1462c4d 100644
--- a/src/ftdump.c
+++ b/src/ftdump.c
@@ -37,34 +37,23 @@ static void dump(struct timestamp* ts, size_t count)
37 if (last_seq && last_seq + 1 != x->seq_no) 37 if (last_seq && last_seq + 1 != x->seq_no)
38 printf("==== non-consecutive sequence number ====\n"); 38 printf("==== non-consecutive sequence number ====\n");
39 last_seq = x->seq_no; 39 last_seq = x->seq_no;
40 if (x->event <= PID_RECORDS_RANGE) { 40 if (name)
41 if (name) 41 printf("%-20s seq:%u timestamp:%llu cpu:%d type:%-8s irq:%u irqc:%02u \n",
42 printf("%-20s seq:%u timestamp:%llu pid:%u\n", 42 name, x->seq_no,
43 name, x->seq_no, 43 (unsigned long long) x->timestamp,
44 (unsigned long long) x->timestamp, 44 x->cpu,
45 ts_pid_fragment(x)); 45 task_type2str(x->task_type),
46 else 46 x->irq_flag,
47 printf("%16s:%3u seq:%u timestamp:%llu pid:%u\n", 47 x->irq_count);
48 "event", 48 else
49 (unsigned int) x->event, x->seq_no, 49 printf("%16s:%3u seq:%u timestamp:%llu cpu:%u type:%-8s irq:%u irqc:%02u\n",
50 (unsigned long long) x->timestamp, 50 "event",
51 ts_pid_fragment(x)); 51 (unsigned int) x->event, x->seq_no,
52 } 52 (unsigned long long) x->timestamp,
53 else { 53 x->cpu,
54 if (name) 54 task_type2str(x->task_type),
55 printf("%-20s seq:%u timestamp:%llu cpu:%d type:%-8s \n", 55 x->irq_flag,
56 name, x->seq_no, 56 x->irq_count);
57 (unsigned long long) x->timestamp,
58 x->cpu,
59 task_type2str(x->task_type));
60 else
61 printf("%16s:%3u seq:%u timestamp:%llu cpu:%u type:%-8s\n",
62 "event",
63 (unsigned int) x->event, x->seq_no,
64 (unsigned long long) x->timestamp,
65 x->cpu,
66 task_type2str(x->task_type));
67 }
68 } 57 }
69} 58}
70 59
@@ -89,14 +78,12 @@ int main(int argc, char** argv)
89 "\t offset(timestamp) = %3lu\n" 78 "\t offset(timestamp) = %3lu\n"
90 "\t offset(seq_no) = %3lu\n" 79 "\t offset(seq_no) = %3lu\n"
91 "\t offset(cpu) = %3lu\n" 80 "\t offset(cpu) = %3lu\n"
92 "\t offset(event) = %3lu\n" 81 "\t offset(event) = %3lu\n",
93 "\t offset(task_type) = %3lu\n",
94 (unsigned long) sizeof(struct timestamp), 82 (unsigned long) sizeof(struct timestamp),
95 offset(struct timestamp, timestamp), 83 offset(struct timestamp, timestamp),
96 offset(struct timestamp, seq_no), 84 offset(struct timestamp, seq_no),
97 offset(struct timestamp, cpu), 85 offset(struct timestamp, cpu),
98 offset(struct timestamp, event), 86 offset(struct timestamp, event));
99 offset(struct timestamp, task_type));
100 87
101 if (argc != 2) 88 if (argc != 2)
102 die("Usage: ftdump <logfile>"); 89 die("Usage: ftdump <logfile>");
diff --git a/st_trace b/st_trace
index b89ce95..e9c1a9f 100755
--- a/st_trace
+++ b/st_trace
@@ -29,6 +29,17 @@ trap 'on_finish' SIGUSR1
29# works for sparc64 and Intel x86 if all CPUs are online 29# works for sparc64 and Intel x86 if all CPUs are online
30NUM_CPUS=`egrep -c '^processor|online' /proc/cpuinfo` 30NUM_CPUS=`egrep -c '^processor|online' /proc/cpuinfo`
31 31
32# Trace ID Key:
33# 501 - sched_trace_task_name
34# 502 - sched_trace_task_param
35# 503 - sched_trace_task_release
36# 504 - sched_trace_task_switch_to
37# 505 - sched_trace_task_switch_away
38# 506 - sched_trace_task_completion
39# 507 - sched_trace_task_block
40# 508 - sched_trace_task_resume
41# 509 - sched_trace_action
42# 510 - sched_trace_sys_release
32ST_IDS="501 502 503 504 505 506 507 508 509 510" 43ST_IDS="501 502 503 504 505 506 507 508 509 510"
33 44
34TAG=$1 45TAG=$1